diff options
author | perky <perky@FreeBSD.org> | 2005-05-18 12:11:39 +0800 |
---|---|---|
committer | perky <perky@FreeBSD.org> | 2005-05-18 12:11:39 +0800 |
commit | 5590c7723668df4417c7c2e62226f1675e4c435d (patch) | |
tree | cc52f3379b488785240093827c42bf019d82a984 /www | |
parent | 526c5385e8ee7e7aa7bb367060641484c2f75351 (diff) | |
download | freebsd-ports-gnome-5590c7723668df4417c7c2e62226f1675e4c435d.tar.gz freebsd-ports-gnome-5590c7723668df4417c7c2e62226f1675e4c435d.tar.zst freebsd-ports-gnome-5590c7723668df4417c7c2e62226f1675e4c435d.zip |
Convert a LD_PRELOAD black magic to a white one utilizing python
shared library which is provided on modern python ports. This also
unbreaks build on amd64 and ia64.
Requested by: lioux
Diffstat (limited to 'www')
-rw-r--r-- | www/mod_python3/Makefile | 19 | ||||
-rw-r--r-- | www/mod_python3/files/patch-configure | 11 | ||||
-rw-r--r-- | www/mod_python3/pkg-plist | 1 |
3 files changed, 13 insertions, 18 deletions
diff --git a/www/mod_python3/Makefile b/www/mod_python3/Makefile index f1df60aa412d..afdec29ccf39 100644 --- a/www/mod_python3/Makefile +++ b/www/mod_python3/Makefile @@ -7,6 +7,7 @@ PORTNAME= mod_python PORTVERSION= 3.1.4 +PORTREVISION= 1 CATEGORIES= www python MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} MASTER_SITE_SUBDIR= modpython @@ -17,7 +18,7 @@ COMMENT= Apache module that embeds the Python interpreter within the server WITH_APACHE2= yes USE_APACHE= yes -USE_PYTHON= yes +USE_PYTHON= 2.3+ LATEST_LINK= mod_python3 GNU_CONFIGURE= yes @@ -27,26 +28,10 @@ MAKE_ENV= EXPR_COMPAT=yes .include <bsd.port.pre.mk> -.if ${ARCH} == "ia64" || ${ARCH} == "amd64" -BROKEN= "Does not compile on amd64 or ia64" -.endif - -.if ${PYTHON_REL} >= 230 post-patch: ${REINPLACE_CMD} -e 's,LONG_LONG,long long,g' ${WRKSRC}/src/requestobject.c -.endif - -.if !exists(${PREFIX}/etc/apache2/envvars.d) && !defined(PACKAGE_BUILDING) -BROKEN= "Please upgrade your www/apache2 installation." -.endif - -post-build: - THREAD_LIB=`ldd ${PYTHON_CMD} | ${EGREP} '(pthread|c_r)' | ${AWK} '{print $$3}'`; \ - ${ECHO_CMD} "LD_PRELOAD=$${THREAD_LIB}" > ${WRKDIR}/mod_python3.env - ${ECHO_CMD} "export LD_PRELOAD" >> ${WRKDIR}/mod_python3.env post-install: - ${INSTALL_DATA} ${WRKDIR}/mod_python3.env ${PREFIX}/etc/apache2/envvars.d @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/www/mod_python3/files/patch-configure b/www/mod_python3/files/patch-configure new file mode 100644 index 000000000000..354e95a5596f --- /dev/null +++ b/www/mod_python3/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig Sun Jan 30 06:25:27 2005 ++++ configure Wed May 18 12:06:06 2005 +@@ -2643,7 +2643,7 @@ + PyLIBP=${PyEXEC_INSTALLDIR}/lib/python${PyVERSION} + PyLIBPL=${PyLIBP}/config + PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a +-PyLIBS=`grep "^LIB[SMC]=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' ' '` ++PyLIBS=`ldd $PYTHON_BIN | sed -n 's,^.* => [^ ]*/lib\(.*\)\.so[^ ]* \((.*)\),-l\1,p' | grep -v '^-lc$' | xargs echo` + PyMODLIBS=`grep "^LOCALMODLIBS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' ' '` + PyFRAMEWORK=`grep "^PYTHONFRAMEWORK=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' ' '` + PyFRAMEWORKDIR=`grep "^PYTHONFRAMEWORKDIR=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' ' ' | awk '{print $1}'` diff --git a/www/mod_python3/pkg-plist b/www/mod_python3/pkg-plist index 8fd4b02e9d8c..63f42994e49d 100644 --- a/www/mod_python3/pkg-plist +++ b/www/mod_python3/pkg-plist @@ -1,4 +1,3 @@ -etc/apache2/envvars.d/mod_python3.env libexec/apache2/mod_python.so @exec %D/sbin/apxs -e -a -n python %f @unexec %D/sbin/apxs -e -A -n python %f |