1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00

Utilize envvars.d which is from the recent www/apache2 change so

that set LD_PRELOAD automatically.

Thanks to:	clement
This commit is contained in:
Hye-Shik Chang 2004-12-19 17:55:30 +00:00
parent 55fa155fec
commit 2efd69c6f1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=124500
3 changed files with 12 additions and 6 deletions

View File

@ -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>

View File

@ -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
================================================================================

View File

@ -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