aboutsummaryrefslogtreecommitdiff
path: root/lang/spl
diff options
context:
space:
mode:
authorPatrick Li <pat@FreeBSD.org>2002-05-23 00:32:04 +0000
committerPatrick Li <pat@FreeBSD.org>2002-05-23 00:32:04 +0000
commit797bc0968f6c141c034212ff2d71f0d1f5e35194 (patch)
treeae9f52a6cc5a1541ffff20edd302bcbcb336a823 /lang/spl
parent5fdaa85b0d76467676b8f9a6cb38497c8fb02688 (diff)
downloadports-797bc0968f6c141c034212ff2d71f0d1f5e35194.tar.gz
ports-797bc0968f6c141c034212ff2d71f0d1f5e35194.zip
Fix ports for building with -current without perl
PR: 38359 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=59747
Diffstat (limited to 'lang/spl')
-rw-r--r--lang/spl/Makefile21
1 files changed, 15 insertions, 6 deletions
diff --git a/lang/spl/Makefile b/lang/spl/Makefile
index 0a0d4656caf6..4212b5f2dc4f 100644
--- a/lang/spl/Makefile
+++ b/lang/spl/Makefile
@@ -15,21 +15,30 @@ MAINTAINER= perky@fallin.lv
USE_BISON= yes
USE_GMAKE= yes
+ALL_TARGET= spl2c libspl.a
ALL_EXAMPLES= Makefile fibonacci.spl fibonacci2.spl guess.spl hello.spl \
primes.spl reverse.spl shakesbeer.spl
+.include <bsd.port.pre.mk>
+
post-patch:
+.if ${OSVERSION} < 500036
@${PERL} -pi -e 's,= gcc,?= gcc,; s,^CCFLAGS.*,CFLAGS += -Wall,; \
- s,CCFLAGS,CFLAGS,g' \
+ s,CCFLAGS,CFLAGS,g; s,^SPLPATH =.*,SPLPATH =${PREFIX},g; \
+ s, spl/, ${PREFIX}/,g;' \
${WRKSRC}/Makefile ${WRKSRC}/examples/Makefile
+.else
+ @for f in ${WRKSRC}/Makefile ${WRKSRC}/examples/Makefile; do \
+ ${SED} -i "" -e 's,= gcc,?= gcc,' -e 's,^CCFLAGS.*,CFLAGS += -Wall,' \
+ -e 's,CCFLAGS,CFLAGS,g' -e 's,^SPLPATH =.*,SPLPATH =${PREFIX},g' \
+ -e 's, spl/, ${PREFIX}/,g' $$f; \
+ done
+.endif
-do-install:
- ${TAR} -C ${WRKSRC}/spl -cf- . | ${TAR} -C ${PREFIX} -xpf-
+post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC}/examples && ${INSTALL_DATA} ${ALL_EXAMPLES} ${EXAMPLESDIR}
- @${PERL} -pi -e 's,^SPLPATH =.*,SPLPATH =${PREFIX},g' \
- ${EXAMPLESDIR}/Makefile
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>