aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2009-03-06 00:55:59 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2009-03-06 00:55:59 +0000
commit86ec42a418ba9e44962dd237a1766177d6c90b5d (patch)
tree2313c88bbda6b2ca88f67c05276645b925c4d200
parent5c8fd55ef1923797cc4ecc7075e364406664bf7a (diff)
downloadports-86ec42a418ba9e44962dd237a1766177d6c90b5d.tar.gz
ports-86ec42a418ba9e44962dd237a1766177d6c90b5d.zip
Notes
-rw-r--r--security/cfv/Makefile10
-rw-r--r--security/cfv/files/extra-psyco-patch-Makefile11
2 files changed, 20 insertions, 1 deletions
diff --git a/security/cfv/Makefile b/security/cfv/Makefile
index 55e489d45456..161a4ae0baf5 100644
--- a/security/cfv/Makefile
+++ b/security/cfv/Makefile
@@ -22,7 +22,15 @@ INSTALL_TARGET= install-wrapper
MAN1= cfv.1
+OPTIONS= PSYCO "Enable devel/py-psyco optimization support" off
+
post-patch:
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/Makefile
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_PSYCO)
+EXTRA_PATCHES+= ${FILESDIR}/extra-psyco-patch-Makefile
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/security/cfv/files/extra-psyco-patch-Makefile b/security/cfv/files/extra-psyco-patch-Makefile
new file mode 100644
index 000000000000..373ea63294bc
--- /dev/null
+++ b/security/cfv/files/extra-psyco-patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig 2009-03-05 21:47:26.000000000 -0300
++++ Makefile 2009-03-05 21:51:11.000000000 -0300
+@@ -37,7 +37,7 @@
+ #this will create a wrapper script that calls python directly (if we can find it), or using the bin/env trick.
+ #we don't need to check for PYTHON being set to something, since os.path.join handles the case of the component being an absolute path
+ cfv.wrapper:
+- $(PYTHON) -c 'import string,os; py=filter(lambda x: os.path.isfile(x),map(lambda x: os.path.join(x,"$(PYTHON)"),string.split(os.environ["PATH"],":"))); py.append(" /usr/bin/env $(PYTHON)"); open("cfv.wrapper","w").write("#!%s\nimport cfv\ncfv.main()\n"%py[0])'
++ $(PYTHON) -c 'import string,os; py=filter(lambda x: os.path.isfile(x),map(lambda x: os.path.join(x,"$(PYTHON)"),string.split(os.environ["PATH"],":"))); py.append(" /usr/bin/env $(PYTHON)"); open("cfv.wrapper","w").write("#!%s\ntry:\n import psyco\n import re\n psyco.cannotcompile(re.compile)\n psyco.profile()\nexcept ImportError:\n pass\nimport cfv\ncfv.main()\n"%py[0])'
+
+ $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(bindir):
+ $(install_dir) $@