From 9d4e7ac9f524291b89598732fb9e861d675dd0f9 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Sun, 6 Oct 2002 01:12:32 +0000 Subject: Have another crack at fixing this port. gcc 3.2 deprecated the -malign-* options (which now generate a noisy warning), but gcc 2.95 didn't yet have support for the replacement options (-falign=*). As a result we have to use a conditional patch based on OSVERSION to get the desired behaviour in both cases. Switch to REINPLACE_CMD while I'm here. --- devel/crystal/Makefile | 18 +++++++++++++----- devel/crystal/files/patch-ab | 17 ----------------- 2 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 devel/crystal/files/patch-ab (limited to 'devel') 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 + +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 +.include 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 -- cgit v1.2.3