Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2001 02:21:43 +0200 (CEST)
From:      Anders Nordby <anders@fix.no>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/29738: Update port: www/mod_python
Message-ID:  <20010816002143.ECC763C84@totem.fix.no>

next in thread | raw e-mail | index | archive | help

>Number:         29738
>Category:       ports
>Synopsis:       Update port: www/mod_python
>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:   Wed Aug 15 17:30:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Anders Nordby
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
Fluxpod Information eXchange
>Environment:

	<Relevant environment information (multiple lines)>

>Description:

-Update the port to 2.7.6, fix to work with Python 2.1.1.
-Take maintainership, with current maintainers approval.
-Stop rolling own Python port inside mod_python, require Python
w/WITHOUT_NOTHREADS instead.
-Etc.

Files added:

pkg-req.threads

Files removed:

files/optpatch-WITHOUT_OPENPTY
files/patch-Python::setup.py

>How-To-Repeat:

	<Code/input/activities to reproduce the problem (multiple lines)>

>Fix:

diff -Nur mod_python.old/Makefile mod_python/Makefile
--- mod_python.old/Makefile	Sun May 27 17:18:40 2001
+++ mod_python/Makefile	Thu Aug 16 01:30:44 2001
@@ -6,15 +6,14 @@
 #
 
 PORTNAME=	mod_python
-PORTVERSION=	2.7.3
+PORTVERSION=	2.7.6
 CATEGORIES=	www python
-MASTER_SITES=	http://www.python.org/ftp/python/${PYTHON_VERSION:S/python//g}/ \
-		http://www.modpython.org/dist/ \
-		http://www3.kr.freebsd.org/~perky/distfiles/
-DISTFILES=	mod_python-${PORTVERSION}.tgz ${PYTHON_DISTFILE}
+MASTER_SITES=	http://www.modpython.org/dist/ \
+		ftp://ftp.nuug.no/pub/anders/distfiles/
 DIST_SUBDIR=	python
+EXTRACT_SUFX=	.tgz
 
-MAINTAINER=	perky@python.or.kr
+MAINTAINER=	anders@fix.no
 
 BUILD_DEPENDS=	${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
 RUN_DEPENDS=	${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
@@ -23,19 +22,13 @@
 
 .include <bsd.port.pre.mk>
 
-PYTHON_WRKSRC=	${WRKSRC}/../Python-${PYTHON_VERSION:S/python//g}
-APXS=		${PREFIX}/sbin/apxs
+APXS?=		${LOCALBASE}/sbin/apxs
 
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS+=--with-apxs=${APXS} --with-python=${PYTHON_WRKSRC}
+CONFIGURE_ARGS+=	--with-apxs=${APXS}
 CONFIGURE_ENV=	PYTHON_BIN=${PYTHON_CMD}
 PLIST_SUB+=	PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g}
 
-.if defined(WITH_OPENPTY)
-OPTIONAL_LIBS+=	-lutil
-.endif
-
-PYTHON_CONFIGURE_ARGS+=	--without-threads
 STRIP_CMD?=	strip
 
 pre-fetch:
@@ -43,29 +36,20 @@
 	@${ECHO} "You may use the following build option:"
 	@${ECHO} ""
 	@${ECHO} "  WANT_EAPI=yes  build as apache EAPI module (for apache13-modssl)"
-	@${ECHO} "  WITH_OPENPTY=yes  enables openpty function in posixmodule"
 	@${ECHO} ""
 
 pre-patch:
-.if !defined(WITH_OPENPTY)
-	cd ${PYTHON_WRKSRC} && ${PATCH} -s < ${PATCHDIR}/optpatch-WITHOUT_OPENPTY
-.endif
 .if defined(WANT_EAPI)
 	cd ${WRKSRC} && ${PATCH} -p2 -s < ${PATCHDIR}/optpatch-WANT_EAPI
 .endif
 
-pre-configure:
-	cd ${PYTHON_WRKSRC} && ./configure ${PYTHON_CONFIGURE_ARGS}
-
 post-configure:
+	@${SH} ${PKGREQ}.threads ${PYTHON_CMD} ${PYTHON_BASE}
 .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_CMD})
diff -Nur mod_python.old/distinfo mod_python/distinfo
--- mod_python.old/distinfo	Sat May 19 21:08:26 2001
+++ mod_python/distinfo	Tue Aug  7 02:08:07 2001
@@ -1,2 +1 @@
-MD5 (python/mod_python-2.7.3.tgz) = 06798145df78dbd8de7cbd089842264b
-MD5 (python/Python-2.1.tgz) = 2ba2baeccd6100a4be80e6368a975054
+MD5 (python/mod_python-2.7.6.tgz) = 68929391d20c14d820d7004458ab9f03
diff -Nur mod_python.old/files/optpatch-WITHOUT_OPENPTY mod_python/files/optpatch-WITHOUT_OPENPTY
--- mod_python.old/files/optpatch-WITHOUT_OPENPTY	Fri May 11 14:38:46 2001
+++ mod_python/files/optpatch-WITHOUT_OPENPTY	Thu Jan  1 01:00:00 1970
@@ -1,18 +0,0 @@
---- work/Python-2.1/configure.orig	Wed May  9 06:04:43 2001
-+++ work/Python-2.1/configure	Wed May  9 06:05:14 2001
-@@ -4293,6 +4293,7 @@
- done
- 
- 
-+if false; then
- # check for openpty and forkpty
- 
- for ac_func in openpty
-@@ -4491,6 +4492,7 @@
- fi
- done
- 
-+fi
- 
- # check for long file support functions
- for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
diff -Nur mod_python.old/files/patch-Python::setup.py mod_python/files/patch-Python::setup.py
--- mod_python.old/files/patch-Python::setup.py	Fri May 11 14:38:46 2001
+++ mod_python/files/patch-Python::setup.py	Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- ../Python-2.1/setup.py.orig	Fri Mar  2 07:24:14 2001
-+++ ../Python-2.1/setup.py	Mon Mar  5 15:26:17 2001
-@@ -14,7 +14,7 @@
- from distutils.command.build_ext import build_ext
- 
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+disabled_module_list = ["_tkinter", "gdbm", "pyexpat"]
- 
- def find_file(filename, std_dirs, paths):
-     """Searches for the directory where a given file is located,
diff -Nur mod_python.old/pkg-descr mod_python/pkg-descr
--- mod_python.old/pkg-descr	Wed Nov 15 15:09:36 2000
+++ mod_python/pkg-descr	Thu Aug 16 01:36:44 2001
@@ -3,7 +3,9 @@
 in designing web based applications.
 
 WWW: http://www.modpython.org/
-developed by Gregory Trubetskoy <grisha@ispol.com>
+developed by Gregory Trubetskoy <grisha@modpython.org> and others
 
-- Hye-Shik "Perky" Chang
-  perky@python.or.kr
+This port requires a Python installation without threads support. Build &
+(re)install Python with WITHOUT_THREADS set.
+
+- Anders Nordby <anders@fix.no>
diff -Nur mod_python.old/pkg-req.threads mod_python/pkg-req.threads
--- mod_python.old/pkg-req.threads	Thu Jan  1 01:00:00 1970
+++ mod_python/pkg-req.threads	Thu Aug 16 01:30:03 2001
@@ -0,0 +1,22 @@
+#! /bin/sh
+# anders@fix.no, 2001-08-07
+
+mydir=`dirname $0`
+mylibc=`ldd $1 | tail +2 | awk '{print $1}' | cut -d'.' -f1 | grep ^libc`
+
+case $mylibc in
+libc_r)
+	echo "Error: Python installation in $2 uses threads. mod_python requires"
+	echo "it to be built without threads. Please deinstall & rebuild/reinstall Python with"
+	echo "WITHOUT_THREADS set."
+	exit 1
+	;;
+libc)
+	echo "Using a no-threads Python installation (PREFIX $2). Good."
+	exit 0
+	;;
+*)
+	echo "Unknown libc library. Cannot use a Python installation that uses this."
+	exit 1
+	;;
+esac
>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?20010816002143.ECC763C84>