Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 May 2001 14:29:12 -0700 (PDT)
From:      perky@python.or.kr
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/27214: Update port: www/mod_python (maintainer/currently broken)
Message-ID:  <200105082129.f48LTCB13659@freefall.freebsd.org>

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

>Number:         27214
>Category:       ports
>Synopsis:       Update port: www/mod_python (maintainer/currently broken)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 08 14:30:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Chang, Hye-Shik
>Release:        FreeBSD 4.3
>Organization:
Yonsei University
>Environment:
FreeBSD free.yonsei.ac.kr 4.3-STABLE FreeBSD 4.3-STABLE #0: Wed Apr 25 06:57:11 KST 2001     root@free.yonsei.ac.kr:/usr/src/sys/compile/RYOKO  i386
>Description:
mod_python has broken since lang/python port was upgraded to 2.1

updates 2.7.2_2
. Python 2.1 support
. EAPI option added. (for www/apache13-modssl)
. MASTER_SITES order changed (www.modpython.org site is always slow)

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

files removed:
. files/optptch-Python::configure

>How-To-Repeat:

>Fix:
diff -ruN mod_python.orig/Makefile mod_python/Makefile
--- mod_python.orig/Makefile	Wed Apr  4 05:05:31 2001
+++ mod_python/Makefile	Wed May  9 06:17:59 2001
@@ -7,10 +7,10 @@
 
 PORTNAME=	mod_python
 PORTVERSION=	2.7.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www python
-MASTER_SITES=	http://www.modpython.org/dist/ \
-		http://www.python.org/ftp/python/2.0/ \
+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}
 DIST_SUBDIR=	python
@@ -21,7 +21,6 @@
 RUN_DEPENDS=	${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
 
 USE_PYTHON=	yes
-INSTALLS_SHLIB=	yes
 
 .include <bsd.port.pre.mk>
 
@@ -29,53 +28,35 @@
 APXS=		${PREFIX}/sbin/apxs
 
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS+=	--with-apxs=${LOCALBASE}/sbin/apxs \
-		--with-python=${PYTHON_WRKSRC}
-CONFIGURE_ENV=	PYTHON_BIN=${LOCALBASE}/bin/python
+CONFIGURE_ARGS+=--with-apxs=${APXS} --with-python=${PYTHON_WRKSRC}
+CONFIGURE_ENV=	PYTHON_BIN=${PYTHON_CMD}
 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
+STRIP_CMD?=	strip
 
 pre-fetch:
 	@${ECHO} ""
 	@${ECHO} "You may use the following build option:"
 	@${ECHO} ""
-	@${ECHO} "  PYTHON_SETUP_FILE=path  specify python modules setup file"
+	@${ECHO} "  WANT_EAPI=yes  build as apache EAPI module (for apache13-modssl)"
 	@${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
+.if !defined(WITH_OPENPTY)
+	${PATCH} -s < ${PATCHDIR}/optpatch-WITHOUT_OPENPTY
+.endif
+.if defined(WANT_EAPI)
+	${PATCH} -s < ${PATCHDIR}/optpatch-WANT_EAPI
 .endif
 
 pre-configure:
 	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)
@@ -88,8 +69,8 @@
 	cd ${PYTHON_WRKSRC} && ${MAKE}
 
 post-build:
-.if !defined(DONT_STRIP) && exists(${STRIP_BIN})
-	${STRIP_BIN} ${WRKSRC}/src/mod_python.so
+.if !defined(DONT_STRIP) && exists(${STRIP_CMD})
+	${STRIP_CMD} ${WRKSRC}/src/mod_python.so
 .endif
 
 post-install:
diff -ruN mod_python.orig/distinfo mod_python/distinfo
--- mod_python.orig/distinfo	Wed Apr  4 05:05:31 2001
+++ mod_python/distinfo	Wed May  9 05:42:32 2001
@@ -1,2 +1,2 @@
 MD5 (python/mod_python-2.7.2.tgz) = 5b73af91c891c63f4be450d7a7dc0bb2
-MD5 (python/BeOpen-Python-2.0.tar.gz) = 8c4a64891d3dc6422df2514c603f0c98
+MD5 (python/Python-2.1.tgz) = 2ba2baeccd6100a4be80e6368a975054
diff -ruN mod_python.orig/files/optpatch-Python::configure mod_python/files/optpatch-Python::configure
--- mod_python.orig/files/optpatch-Python::configure	Fri Mar 23 10:37:32 2001
+++ mod_python/files/optpatch-Python::configure	Thu Jan  1 09:00:00 1970
@@ -1,20 +0,0 @@
---- 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
diff -ruN mod_python.orig/files/optpatch-WANT_EAPI mod_python/files/optpatch-WANT_EAPI
--- mod_python.orig/files/optpatch-WANT_EAPI	Thu Jan  1 09:00:00 1970
+++ mod_python/files/optpatch-WANT_EAPI	Wed May  9 05:17:11 2001
@@ -0,0 +1,11 @@
+--- work/mod_python-2.7.2/src/Makefile.in.orig	Sun Mar 25 16:05:21 2001
++++ work/mod_python-2.7.2/src/Makefile.in	Sun Mar 25 16:05:30 2001
+@@ -52,7 +52,7 @@
+ INCLUDES=@INCLUDES@
+ LIBS=@LIBS@
+ LDFLAGS=@LDFLAGS@
+-OPT=
++OPT=-DEAPI
+ CFLAGS=$(OPT) $(INCLUDES) 
+ srcdir=.
+ 
diff -ruN mod_python.orig/files/optpatch-WITHOUT_OPENPTY mod_python/files/optpatch-WITHOUT_OPENPTY
--- mod_python.orig/files/optpatch-WITHOUT_OPENPTY	Thu Jan  1 09:00:00 1970
+++ mod_python/files/optpatch-WITHOUT_OPENPTY	Wed May  9 06:06:14 2001
@@ -0,0 +1,18 @@
+--- 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 -ruN mod_python.orig/files/patch-Python::setup.py mod_python/files/patch-Python::setup.py
--- mod_python.orig/files/patch-Python::setup.py	Thu Jan  1 09:00:00 1970
+++ mod_python/files/patch-Python::setup.py	Wed May  9 05:56:29 2001
@@ -0,0 +1,11 @@
+--- ../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,

>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?200105082129.f48LTCB13659>