ports/148503: [patch] graphics/mupdf: remove forceful optimization

Anonymous swell.k at gmail.com
Sun Jul 11 22:50:05 UTC 2010


>Number:         148503
>Category:       ports
>Synopsis:       [patch] graphics/mupdf: remove forceful optimization
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 11 22:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
- -msse2 and -march=k8 can easily break package on old machines,
  prefer anything beyond -O2 + _CPUCFLAGS to be specified by user
  in make.conf
- make build verbose by default. It should make pointyhat logs a bit
  more useful.
- sort and coalesce multiple invocations REINPLACE_CMD against one file
  in order to make it easier to examine modifications by `diff foo.bak foo'
- define ARCH_X86_64 on amd64
>How-To-Repeat:
>Fix:
--- a.diff begins here ---
Index: graphics/mupdf/Makefile
===================================================================
RCS file: /a/.cvsup/ports/graphics/mupdf/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- graphics/mupdf/Makefile	10 Jul 2010 11:12:09 -0000	1.7
+++ graphics/mupdf/Makefile	11 Jul 2010 22:41:54 -0000
@@ -20,7 +20,7 @@ LIB_DEPENDS=	freetype.9:${PORTSDIR}/prin
 		openjpeg.2:${PORTSDIR}/graphics/openjpeg
 
 USE_GMAKE=	yes
-MAKE_ARGS+=	build=release prefix=${PREFIX} verbose=true
+MAKE_ARGS+=	build=release prefix=${PREFIX}
 WRKSRC=		${WRKDIR}/${PORTNAME}
 USE_XORG=	x11 xext
 USE_GNOME=	pkgconfig
@@ -38,12 +38,20 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 
 .if ${ARCH} == "sparc64"
 BROKEN=		Does not install on sparc64
+.elif ${ARCH} == amd64
+CFLAGS+=	-DARCH_X86_64
+.else
+CFLAGS+=	-DARCH_X86
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} 's/LAGS :=/LAGS +=/g' ${WRKSRC}/Makerules
-	@${REINPLACE_CMD} 's/Linux/FreeBSD/g' ${WRKSRC}/Makerules
-	@${REINPLACE_CMD} 's/CC = .*/CC = ${CC}/g' ${WRKSRC}/Makerules
-	@${REINPLACE_CMD} 's#\(PDF.*_EXE=.*DIR./\)#\1mu_#g' ${WRKSRC}/Makefile
+post-patch:	.SILENT
+	${REINPLACE_CMD} -e 's#\(PDF.*_EXE=.*DIR./\)#\1mu_#g' \
+		-e 's/@[[:space:]]*echo[^&]*&&//' \
+		${WRKSRC}/Makefile
+	${REINPLACE_CMD} -e 's/LAGS :=/LAGS +=/g' \
+		-e 's/Linux/FreeBSD/g' \
+		-e 's/CC = .*/CC = ${CC}/g' \
+		-e '/-msse/d' \
+		${WRKSRC}/Makerules
 
 .include <bsd.port.mk>
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list