diff options
-rw-r--r-- | devel/crystal/Makefile | 18 | ||||
-rw-r--r-- | devel/crystal/files/patch-ab | 17 |
2 files changed, 13 insertions, 22 deletions
diff --git a/devel/crystal/Makefile b/devel/crystal/Makefile index 4f732b12d85d..aee3e315cdb6 100644 --- a/devel/crystal/Makefile +++ b/devel/crystal/Makefile @@ -18,17 +18,25 @@ LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ USE_BZIP2= yes USE_GMAKE= yes +USE_REINPLACE= yes USE_XLIB= yes WRKSRC= ${WRKDIR}/CS +.include <bsd.port.pre.mk> + +SUBR_PATCH= s|-O6|${PTHREAD_CFLAGS}|; s|/usr/local|${LOCALBASE}|; \ + s|-lGL|-lGL ${PTHREAD_LIBS}|g; s|-lpthread|${PTHREAD_LIBS}|g; \ + s|INSTALL_DIR = ${LOCALBASE}/crystal|INSTALL_DIR = ${PREFIX}/crystal|; \ + s|CFLAGS.GENERAL=-Wall|CFLAGS.GENERAL=$(CXXFLAGS) -O0| +.if ( ${OSVERSION} >= 500034 ) +SUBR_PATCH+= ; s|-malign|-falign|g +.endif + pre-build: cd ${WRKSRC}; ${GMAKE} freebsd pre-patch: - @${FIND} ${WRKSRC} -name "*.mak" | ${XARGS} ${PERL} -pi -e \ - 's|-O6|${PTHREAD_CFLAGS}|; s|/usr/local|${LOCALBASE}|; \ - s|-lGL|-lGL ${PTHREAD_LIBS}|g; s|-lpthread|${PTHREAD_LIBS}|g; \ - s|INSTALL_DIR = ${LOCALBASE}/crystal|INSTALL_DIR = ${PREFIX}/crystal|' + @${FIND} ${WRKSRC} -name "*.mak" | ${XARGS} ${REINPLACE_CMD} '${SUBR_PATCH}' -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/devel/crystal/files/patch-ab b/devel/crystal/files/patch-ab deleted file mode 100644 index a3f8761df8b7..000000000000 --- a/devel/crystal/files/patch-ab +++ /dev/null @@ -1,17 +0,0 @@ ---- ./libs/cssys/unix/freebsd.mak.orig Fri Sep 20 16:19:32 2002 -+++ ./libs/cssys/unix/freebsd.mak Fri Sep 20 16:18:44 2002 -@@ -72,11 +72,11 @@ - CFLAGS.INCLUDE=$(CFLAGS.I)/usr/local/include - - # General flags for the compiler which are used in any case. --CFLAGS.GENERAL=-Wall -+CFLAGS.GENERAL=$(CXXFLAGS) -O0 - - # Flags for the compiler which are used when optimizing. --CFLAGS.optimize=-D_THREAD_SAFE -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 \ -- -malign-functions=2 -ffast-math -+CFLAGS.optimize=-D_THREAD_SAFE -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 \ -+ -falign-functions=2 -ffast-math - - # Flags for the compiler which are used when debugging. - CFLAGS.debug=-g3 -gstabs |