Date: Thu, 15 Mar 2001 16:21:29 -0800 (PST) From: perky@python.or.kr To: freebsd-gnats-submit@FreeBSD.org Subject: ports/25839: Update port: www/mod_python (by Maintainer) Message-ID: <200103160021.f2G0LTk01805@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 25839 >Category: ports >Synopsis: Update port: www/mod_python (by Maintainer) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 15 16:30:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Chang, Hye-Shik >Release: FreeBSD 4.2-RELEASE >Organization: Yonsei University >Environment: FreeBSD sbtm.yonsei.ac.kr 4.3-BETA FreeBSD 4.3-BETA #0: Tue Mar 13 19:01:28 KST 2001 root@sbtm.yonsei.ac.kr:/usr/src/sys/compile/AYANAMI i386 >Description: more flexible build options: .enables apache module to embeded more python features. (crypt, cmath, strop.. and so many;same to lang/python port) but useless features (openpty, gnu readline) are disabled by default. .strip object at post-build phase by default. >How-To-Repeat: >Fix: diff -ruN mod_python/Makefile mod_python.new/Makefile --- mod_python/Makefile Sun Feb 25 06:05:26 2001 +++ mod_python.new/Makefile Fri Mar 16 09:12:46 2001 @@ -19,23 +19,78 @@ BUILD_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13 RUN_DEPENDS= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13 +USE_PYTHON= yes + +.include <bsd.port.pre.mk> + PYTHON_WRKSRC= ${WRKSRC}/../Python-${PYTHON_VERSION:S/python//g} APXS= ${PREFIX}/sbin/apxs GNU_CONFIGURE= yes -USE_PYTHON= yes -CONFIGURE_ARGS= --with-apxs=${LOCALBASE}/sbin/apxs \ +CONFIGURE_ARGS+= --with-apxs=${LOCALBASE}/sbin/apxs \ --with-python=${PYTHON_WRKSRC} CONFIGURE_ENV= PYTHON_BIN=${LOCALBASE}/bin/python PLIST_SUB+= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g} +.if defined(WITH_OPENPTY) +OPTIONAL_LIBS+= -lutil +.endif + +.if defined(WITH_GNUREADLINE) +OPTIONAL_LIBS+= -lreadline +.endif + +PYTHON_CONFIGURE_ARGS+= --without-threads +PYTHON_SETUP_FILE?= ${PORTSDIR}/lang/python/files/Setup +STRIP_BIN?= /usr/bin/strip + +pre-fetch: + @${ECHO} "" + @${ECHO} "You may use the following build option:" + @${ECHO} "" + @${ECHO} " PYTHON_SETUP_FILE=path specify python modules setup file" + @${ECHO} " WITH_OPENPTY=yes enables openpty function in posixmodule" + @${ECHO} " WITH_GNUREADLINE=yes enables gnu readline library" + @${ECHO} " DONT_STRIP=yes don't strip shared object" + @${ECHO} "" + +pre-patch: +.if !defined(${WITH_OPENPTY}) + ${PATCH} -s <files/optpatch-Python::configure +.endif + pre-configure: - cd ${PYTHON_WRKSRC} && ./configure --without-threads && cd Modules && ${MAKE} -f Makefile.pre Makefile + cd ${PYTHON_WRKSRC} && ./configure ${PYTHON_CONFIGURE_ARGS} +.if !exists(${PYTHON_SETUP_FILE}) + @${ECHO} "" + @${ECHO} "### COULD NOT FIND PYTHON SETUP FILE" + @${ECHO} "### SPECIFY FILE PATH OR INSTALL PORT 'lang/python'" + @${ECHO} "" +.endif + +.if !defined(WITH_GNUREADLINE) + ${SED} 's/^readline/#without_readline/g' ${PYTHON_SETUP_FILE} \ + > ${PYTHON_WRKSRC}/Modules/Setup +.else + ${CP} ${PYTHON_SETUP_FILE} ${PYTHON_WRKSRC}/Modules/Setup +.endif + +post-configure: +.if defined(OPTIONAL_LIBS) + ${SED} 's/^\(LIBS=.*\)/\1 ${OPTIONAL_LIBS}/' ${WRKSRC}/src/Makefile \ + > ${WRKSRC}/src/Makefile.tmp && \ + ${MV} -f ${WRKSRC}/src/Makefile.tmp ${WRKSRC}/src/Makefile +.endif pre-build: cd ${PYTHON_WRKSRC} && ${MAKE} +post-build: +.if !defined(DONT_STRIP) && exists(${STRIP_BIN}) + ${STRIP_BIN} ${WRKSRC}/src/mod_python.so +.endif + post-install: @${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff -ruN mod_python/files/optpatch-Python::configure mod_python.new/files/optpatch-Python::configure --- mod_python/files/optpatch-Python::configure Thu Jan 1 09:00:00 1970 +++ mod_python.new/files/optpatch-Python::configure Fri Mar 16 07:51:52 2001 @@ -0,0 +1,20 @@ +--- work/Python-2.0/configure.orig Fri Mar 16 07:32:48 2001 ++++ work/Python-2.0/configure Fri Mar 16 07:35:20 2001 +@@ -3975,7 +3975,7 @@ + fi + done + +- ++if false; then + # check for openpty and forkpty + + for ac_func in openpty +@@ -4173,7 +4173,7 @@ + + fi + done +- ++fi + + # check for long file support functions + for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103160021.f2G0LTk01805>