Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 2013 09:01:51 GMT
From:      Trevor Caira <trevor@bitba.se>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/183353: [patch] www/mod_wsgi3 doesn't build under python3
Message-ID:  <201310270901.r9R91pGB051961@oldred.freebsd.org>
Resent-Message-ID: <201310270910.r9R9A0xj032066@freefall.freebsd.org>

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

>Number:         183353
>Category:       ports
>Synopsis:       [patch] www/mod_wsgi3 doesn't build under python3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 27 09:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Trevor Caira
>Release:        9.2-RELEASE
>Organization:
Bitbase LLC
>Environment:
FreeBSD tour 9.2-RELEASE FreeBSD 9.2-RELEASE #1 r255967: Tue Oct  1 11:18:56 EDT 2013     root@tour:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
mod_wsgi3 can't find the python 3 shared libraries in the latest released version. I have attached a shar containing the patch from upstream revision 8bc27ffbc6c1 and a bump to the portrevision.

https://code.google.com/p/modwsgi/source/detail?r=8bc27ffbc6c10f26a4803d6a4841460ad239e6f2&name=mod_wsgi-3.X
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mod_wsgi3/Makefile
#	mod_wsgi3/files/patch-configure
#	mod_wsgi3/files/patch-configure.ac
#
echo x - mod_wsgi3/Makefile
sed 's/^X//' >mod_wsgi3/Makefile << '2d978fcce3c58be1685520763cd52181'
X# $FreeBSD: www/mod_wsgi3/Makefile 327776 2013-09-20 23:36:50Z bapt $
X
XPORTNAME=	mod_wsgi
XPORTVERSION=	3.4
XPORTREVISION=	2
XCATEGORIES=	www python
XMASTER_SITES=	GOOGLE_CODE
XPKGNAMEPREFIX=	${APACHE_PKGNAMEPREFIX}
X
XMAINTAINER=	douglas@douglasthrift.net
XCOMMENT=	Python WSGI adapter module for Apache
X
XLICENSE=	AL2
X
X#LATEST_LINK=	mod_wsgi
XCONFLICTS=	${PKGNAMEPREFIX}mod_wsgi-2.* mod_wsgi-2.*
X
XPROJECTHOST=	modwsgi
X
XUSE_APACHE=	22+
XUSE_PYTHON=	2.5+
X
XGNU_CONFIGURE=	yes
XCONFIGURE_ARGS+=--with-apxs="${APXS}" --with-python="${PYTHON_CMD}"
X
XSUB_FILES=	pkg-message
X
XNO_STAGE=	yes
X.include <bsd.port.pre.mk>
X
X.if ${PYTHON_REL} >= 300 && ${PYTHON_REL} < 310
XIGNORE=		is unsupported with Python 3.0
X.endif
X
Xpre-everything::
X	@${ECHO_MSG} "======================= ATTENTION! ======================"
X	@${ECHO_MSG}
X	@${ECHO_MSG} "If you want to use daemon mode you will need to make sure"
X	@${ECHO_MSG} "Apache and APR include thread support."
X	@${ECHO_MSG}
X	@${ECHO_MSG} "========================================================="
X
Xpost-install:
X	@${APXS} -e -a -n "${SHORTMODNAME}" "${APACHEMODDIR}/${MODULENAME}.so"
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
2d978fcce3c58be1685520763cd52181
echo x - mod_wsgi3/files/patch-configure
sed 's/^X//' >mod_wsgi3/files/patch-configure << '7640b27d67afd22fa751412add85f2d5'
X--- configure.orig	Thu Oct 18 21:12:46 2012 +1100
X+++ configure		Thu Oct 18 21:14:28 2012 +1100
X@@ -1785,7 +1785,15 @@
X 
X PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \
X     from distutils import sysconfig; \
X-    stdout.write((sysconfig.get_config_var("VERSION")))'`
X+    stdout.write(sysconfig.get_config_var("VERSION"))'`
X+
X+PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \
X+    from distutils import sysconfig; \
X+    stdout.write(sysconfig.get_config_var("LDVERSION") or "")'`
X+
X+if test x"${PYTHON_LDVERSION}" = x""; then
X+    PYTHON_LDVERSION=${PYTHON_VERSION}
X+fi
X 
X CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \
X     from distutils import sysconfig; \
X@@ -1823,12 +1831,28 @@
X     from distutils import sysconfig; \
X     stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'`
X 
X+if test "${PYTHON_LDVERSION}" != "${PYTHON_VERSION}"; then
X+    PYTHONCFGDIR="${PYTHONCFGDIR}-${PYTHON_LDVERSION}"
X+fi
X+
X if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \
X         "${ENABLE_FRAMEWORK}" != "yes"; then
X     LDFLAGS1="-L${PYTHONLIBDIR}"
X     LDFLAGS2="-L${PYTHONCFGDIR}"
X 
X-    LDLIBS1="-lpython${PYTHON_VERSION}"
X+    LDLIBS1="-lpython${PYTHON_LDVERSION}"
X+
X+    # MacOS X seems to be broken and doesn't use ABIFLAGS suffix
X+    # so add a check to try and work out what we need to do.
X+
X+    if test -f "${PYTHONLIBDIR}/libpython${PYTHON_VERSION}.a"; then
X+        LDLIBS1="-lpython${PYTHON_VERSION}"
X+    fi
X+
X+    if test -f "${PYTHONCFGDIR}/libpython${PYTHON_VERSION}.a"; then
X+        LDLIBS1="-lpython${PYTHON_VERSION}"
X+    fi
X+
X     LDLIBS2=`${PYTHON} -c 'from sys import stdout; \
X         from distutils import sysconfig; \
X         stdout.write(sysconfig.get_config_var("LIBS"))'`
7640b27d67afd22fa751412add85f2d5
echo x - mod_wsgi3/files/patch-configure.ac
sed 's/^X//' >mod_wsgi3/files/patch-configure.ac << '824faaa9d368c333aabe577b4d8cd8ff'
X--- configure.ac.orig	Thu Oct 18 21:12:46 2012 +1100
X+++ configure.ac	Thu Oct 18 21:14:28 2012 +1100
X@@ -75,7 +75,15 @@
X 
X PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \
X     from distutils import sysconfig; \
X-    stdout.write((sysconfig.get_config_var("VERSION")))'`
X+    stdout.write(sysconfig.get_config_var("VERSION"))'`
X+
X+PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \
X+    from distutils import sysconfig; \
X+    stdout.write(sysconfig.get_config_var("LDVERSION") or "")'`
X+
X+if test x"${PYTHON_LDVERSION}" = x""; then
X+    PYTHON_LDVERSION=${PYTHON_VERSION}
X+fi
X 
X CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \
X     from distutils import sysconfig; \
X@@ -113,12 +121,28 @@
X     from distutils import sysconfig; \
X     stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'`
X 
X+if test "${PYTHON_LDVERSION}" != "${PYTHON_VERSION}"; then
X+    PYTHONCFGDIR="${PYTHONCFGDIR}-${PYTHON_LDVERSION}"
X+fi
X+
X if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \
X         "${ENABLE_FRAMEWORK}" != "yes"; then
X     LDFLAGS1="-L${PYTHONLIBDIR}"
X     LDFLAGS2="-L${PYTHONCFGDIR}"
X 
X-    LDLIBS1="-lpython${PYTHON_VERSION}"
X+    LDLIBS1="-lpython${PYTHON_LDVERSION}"
X+
X+    # MacOS X seems to be broken and doesn't use ABIFLAGS suffix
X+    # so add a check to try and work out what we need to do.
X+
X+    if test -f "${PYTHONLIBDIR}/libpython${PYTHON_VERSION}.a"; then
X+        LDLIBS1="-lpython${PYTHON_VERSION}"
X+    fi
X+
X+    if test -f "${PYTHONCFGDIR}/libpython${PYTHON_VERSION}.a"; then
X+        LDLIBS1="-lpython${PYTHON_VERSION}"
X+    fi
X+
X     LDLIBS2=`${PYTHON} -c 'from sys import stdout; \
X         from distutils import sysconfig; \
X         stdout.write(sysconfig.get_config_var("LIBS"))'`
X
824faaa9d368c333aabe577b4d8cd8ff
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310270901.r9R91pGB051961>