Date: Mon, 28 Oct 2013 20:00:01 GMT From: Douglas Thrift <douglas.thrift@rightscale.com> To: apache@FreeBSD.org Subject: Re: ports/183353: [patch] www/mod_wsgi3 doesn't build under python3 Message-ID: <201310282000.r9SK01hO082371@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/183353; it has been noted by GNATS. From: Douglas Thrift <douglas.thrift@rightscale.com> To: bug-followup@FreeBSD.org, trevor@bitba.se Cc: Subject: Re: ports/183353: [patch] www/mod_wsgi3 doesn't build under python3 Date: Mon, 28 Oct 2013 12:50:46 -0700 This is a multi-part message in MIME format. --------------070208060807090405060404 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello, For port updates the preferred format is a unified diff. I have used your shar to make a patch in this format and attached it. I also added STAGE support. I also tested the changes with RedPorts: https://redports.org/buildarchive/20131028183000-46975/ https://redports.org/buildarchive/20131028184135-85773/ Thanks! -- Douglas Thrift RightScale - Linux Systems Engineer <douglas.thrift@rightscale.com> <http://www.rightscale.com/> --------------070208060807090405060404 Content-Type: text/x-diff; name="mod_wsgi3.2013-10-28T183938Z.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mod_wsgi3.2013-10-28T183938Z.diff" diff -Nrux .svn -x work /usr/ports/www/mod_wsgi3/Makefile mod_wsgi3/Makefile --- /usr/ports/www/mod_wsgi3/Makefile 2013-09-20 16:36:50.000000000 -0700 +++ mod_wsgi3/Makefile 2013-10-28 11:19:42.000000000 -0700 @@ -2,7 +2,7 @@ PORTNAME= mod_wsgi PORTVERSION= 3.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www python MASTER_SITES= GOOGLE_CODE PKGNAMEPREFIX= ${APACHE_PKGNAMEPREFIX} @@ -25,7 +25,6 @@ SUB_FILES= pkg-message -NO_STAGE= yes .include <bsd.port.pre.mk> .if ${PYTHON_REL} >= 300 && ${PYTHON_REL} < 310 diff -Nrux .svn -x work /usr/ports/www/mod_wsgi3/files/patch-configure mod_wsgi3/files/patch-configure --- /usr/ports/www/mod_wsgi3/files/patch-configure 1969-12-31 16:00:00.000000000 -0800 +++ mod_wsgi3/files/patch-configure 2013-10-28 11:17:45.644919745 -0700 @@ -0,0 +1,49 @@ +--- configure.orig Thu Oct 18 21:12:46 2012 +1100 ++++ configure Thu Oct 18 21:14:28 2012 +1100 +@@ -1785,7 +1785,15 @@ + + PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \ + from distutils import sysconfig; \ +- stdout.write((sysconfig.get_config_var("VERSION")))'` ++ stdout.write(sysconfig.get_config_var("VERSION"))'` ++ ++PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \ ++ from distutils import sysconfig; \ ++ stdout.write(sysconfig.get_config_var("LDVERSION") or "")'` ++ ++if test x"${PYTHON_LDVERSION}" = x""; then ++ PYTHON_LDVERSION=${PYTHON_VERSION} ++fi + + CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \ + from distutils import sysconfig; \ +@@ -1823,12 +1831,28 @@ + from distutils import sysconfig; \ + stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'` + ++if test "${PYTHON_LDVERSION}" != "${PYTHON_VERSION}"; then ++ PYTHONCFGDIR="${PYTHONCFGDIR}-${PYTHON_LDVERSION}" ++fi ++ + if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \ + "${ENABLE_FRAMEWORK}" != "yes"; then + LDFLAGS1="-L${PYTHONLIBDIR}" + LDFLAGS2="-L${PYTHONCFGDIR}" + +- LDLIBS1="-lpython${PYTHON_VERSION}" ++ LDLIBS1="-lpython${PYTHON_LDVERSION}" ++ ++ # MacOS X seems to be broken and doesn't use ABIFLAGS suffix ++ # so add a check to try and work out what we need to do. ++ ++ if test -f "${PYTHONLIBDIR}/libpython${PYTHON_VERSION}.a"; then ++ LDLIBS1="-lpython${PYTHON_VERSION}" ++ fi ++ ++ if test -f "${PYTHONCFGDIR}/libpython${PYTHON_VERSION}.a"; then ++ LDLIBS1="-lpython${PYTHON_VERSION}" ++ fi ++ + LDLIBS2=`${PYTHON} -c 'from sys import stdout; \ + from distutils import sysconfig; \ + stdout.write(sysconfig.get_config_var("LIBS"))'` diff -Nrux .svn -x work /usr/ports/www/mod_wsgi3/files/patch-configure.ac mod_wsgi3/files/patch-configure.ac --- /usr/ports/www/mod_wsgi3/files/patch-configure.ac 1969-12-31 16:00:00.000000000 -0800 +++ mod_wsgi3/files/patch-configure.ac 2013-10-28 11:17:45.654936940 -0700 @@ -0,0 +1,50 @@ +--- configure.ac.orig Thu Oct 18 21:12:46 2012 +1100 ++++ configure.ac Thu Oct 18 21:14:28 2012 +1100 +@@ -75,7 +75,15 @@ + + PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \ + from distutils import sysconfig; \ +- stdout.write((sysconfig.get_config_var("VERSION")))'` ++ stdout.write(sysconfig.get_config_var("VERSION"))'` ++ ++PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \ ++ from distutils import sysconfig; \ ++ stdout.write(sysconfig.get_config_var("LDVERSION") or "")'` ++ ++if test x"${PYTHON_LDVERSION}" = x""; then ++ PYTHON_LDVERSION=${PYTHON_VERSION} ++fi + + CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \ + from distutils import sysconfig; \ +@@ -113,12 +121,28 @@ + from distutils import sysconfig; \ + stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'` + ++if test "${PYTHON_LDVERSION}" != "${PYTHON_VERSION}"; then ++ PYTHONCFGDIR="${PYTHONCFGDIR}-${PYTHON_LDVERSION}" ++fi ++ + if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \ + "${ENABLE_FRAMEWORK}" != "yes"; then + LDFLAGS1="-L${PYTHONLIBDIR}" + LDFLAGS2="-L${PYTHONCFGDIR}" + +- LDLIBS1="-lpython${PYTHON_VERSION}" ++ LDLIBS1="-lpython${PYTHON_LDVERSION}" ++ ++ # MacOS X seems to be broken and doesn't use ABIFLAGS suffix ++ # so add a check to try and work out what we need to do. ++ ++ if test -f "${PYTHONLIBDIR}/libpython${PYTHON_VERSION}.a"; then ++ LDLIBS1="-lpython${PYTHON_VERSION}" ++ fi ++ ++ if test -f "${PYTHONCFGDIR}/libpython${PYTHON_VERSION}.a"; then ++ LDLIBS1="-lpython${PYTHON_VERSION}" ++ fi ++ + LDLIBS2=`${PYTHON} -c 'from sys import stdout; \ + from distutils import sysconfig; \ + stdout.write(sysconfig.get_config_var("LIBS"))'` + --------------070208060807090405060404--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310282000.r9SK01hO082371>