diff options
author | perky <perky@FreeBSD.org> | 2004-12-20 01:55:30 +0800 |
---|---|---|
committer | perky <perky@FreeBSD.org> | 2004-12-20 01:55:30 +0800 |
commit | f5ae5f8d37a9abd94ae7b256e34ba4770b4dcda6 (patch) | |
tree | 4815c70b1459bddeadc274efd1fe3ee8e2e98f0b /www/mod_python3 | |
parent | f4a9f2753a3d65c7a231eb219303514f35bfec70 (diff) | |
download | freebsd-ports-gnome-f5ae5f8d37a9abd94ae7b256e34ba4770b4dcda6.tar.gz freebsd-ports-gnome-f5ae5f8d37a9abd94ae7b256e34ba4770b4dcda6.tar.zst freebsd-ports-gnome-f5ae5f8d37a9abd94ae7b256e34ba4770b4dcda6.zip |
Utilize envvars.d which is from the recent www/apache2 change so
that set LD_PRELOAD automatically.
Thanks to: clement
Diffstat (limited to 'www/mod_python3')
-rw-r--r-- | www/mod_python3/Makefile | 11 | ||||
-rw-r--r-- | www/mod_python3/pkg-message | 6 | ||||
-rw-r--r-- | www/mod_python3/pkg-plist | 1 |
3 files changed, 12 insertions, 6 deletions
diff --git a/www/mod_python3/Makefile b/www/mod_python3/Makefile index f5a7ab5f9b47..f7abffb7f9cf 100644 --- a/www/mod_python3/Makefile +++ b/www/mod_python3/Makefile @@ -7,6 +7,7 @@ PORTNAME= mod_python PORTVERSION= 3.1.3 +PORTREVISION= 1 CATEGORIES= www python MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} MASTER_SITE_SUBDIR= modpython @@ -36,7 +37,17 @@ post-patch: ${REINPLACE_CMD} -e 's,LONG_LONG,long long,g' ${WRKSRC}/src/requestobject.c .endif +.if !exists(${PREFIX}/etc/apache2/envvars.d) +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/pkg-message b/www/mod_python3/pkg-message index 09fba1821353..612fd5e7f501 100644 --- a/www/mod_python3/pkg-message +++ b/www/mod_python3/pkg-message @@ -9,10 +9,4 @@ PythonDebug On For more information, see http://www.modpython.org/. -And, if you built apache without thread support, you may need to add the -following lines to $PREFIX/sbin/envvars: - -LD_PRELOAD=/usr/lib/libc_r.so # or libpthread.so -export LD_PRELOAD - ================================================================================ diff --git a/www/mod_python3/pkg-plist b/www/mod_python3/pkg-plist index 63f42994e49d..8fd4b02e9d8c 100644 --- a/www/mod_python3/pkg-plist +++ b/www/mod_python3/pkg-plist @@ -1,3 +1,4 @@ +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 |