diff options
author | kris <kris@FreeBSD.org> | 2002-10-06 09:12:32 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2002-10-06 09:12:32 +0800 |
commit | 564b0fa4a9309a458beebf0310c34936e740dd13 (patch) | |
tree | 3e4002136b5d29491c89034f82609a09e84f8bdf /devel/crystal | |
parent | 90a31ea5c410887cfd6a02f95fdead47ceea18ce (diff) | |
download | freebsd-ports-gnome-564b0fa4a9309a458beebf0310c34936e740dd13.tar.gz freebsd-ports-gnome-564b0fa4a9309a458beebf0310c34936e740dd13.tar.zst freebsd-ports-gnome-564b0fa4a9309a458beebf0310c34936e740dd13.zip |
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.
Diffstat (limited to 'devel/crystal')
-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 |