aboutsummaryrefslogtreecommitdiffstats
path: root/devel/crystal/Makefile
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-10-06 09:12:32 +0800
committerkris <kris@FreeBSD.org>2002-10-06 09:12:32 +0800
commit564b0fa4a9309a458beebf0310c34936e740dd13 (patch)
tree3e4002136b5d29491c89034f82609a09e84f8bdf /devel/crystal/Makefile
parent90a31ea5c410887cfd6a02f95fdead47ceea18ce (diff)
downloadfreebsd-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/Makefile')
-rw-r--r--devel/crystal/Makefile18
1 files changed, 13 insertions, 5 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>