Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] mod_wsgi: update to 4.7.1, change to python 3
Date: Fri, 22 May 2020 08:13:56 +0200	[thread overview]
Message-ID: <20200522061356.xRVb0ly6sV_PZyO-s92tqCumrRCzXy7BU2v0keDwpQc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22190@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages mod_wsgi-python3
https://github.com/void-linux/void-packages/pull/22190

mod_wsgi: update to 4.7.1, change to python 3


A patch file from https://github.com/void-linux/void-packages/pull/22190.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mod_wsgi-python3-22190.patch --]
[-- Type: text/x-diff, Size: 9449 bytes --]

From e0cf7459bb7805959b386a0dcd3eabb42812322f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 22 May 2020 12:22:44 +0700
Subject: [PATCH 1/3] curl: clear $XBPS_CROSS_BASE cruft

---
 srcpkgs/curl/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/curl/template b/srcpkgs/curl/template
index d4432ebaa7d..5eacb5a01dd 100644
--- a/srcpkgs/curl/template
+++ b/srcpkgs/curl/template
@@ -1,7 +1,7 @@
 # Template file for 'curl'
 pkgname=curl
 version=7.70.0
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="ac_cv_sizeof_off_t=8 --enable-threaded-resolver --enable-ipv6
  $(vopt_with rtmp) $(vopt_with gssapi) $(vopt_enable ldap) $(vopt_with gnutls)
@@ -33,6 +33,9 @@ pre_configure() {
 }
 
 post_install() {
+	# Don't touch --configure, it reflect how curl was built
+	vsed -e "/[	 ]*--static-libs)/,/[	 ]*;;/ s,-L$XBPS_CROSS_BASE,-L," \
+		-i $DESTDIR/usr/bin/curl-config
 	vlicense COPYING
 }
 

From e385bd7473403390f4d65579ee3641e9db715ae9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 22 May 2020 07:04:22 +0700
Subject: [PATCH 2/3] mod_wsgi: cross compile

---
 srcpkgs/mod_wsgi/patches/cross-python.patch | 107 ++++++++++++++++++++
 srcpkgs/mod_wsgi/template                   |  28 ++++-
 2 files changed, 133 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/mod_wsgi/patches/cross-python.patch

diff --git a/srcpkgs/mod_wsgi/patches/cross-python.patch b/srcpkgs/mod_wsgi/patches/cross-python.patch
new file mode 100644
index 00000000000..2821c1c4656
--- /dev/null
+++ b/srcpkgs/mod_wsgi/patches/cross-python.patch
@@ -0,0 +1,107 @@
+diff --git configure.ac configure.ac
+index 63d1bbc..543ecc0 100644
+--- configure.ac
++++ configure.ac
+@@ -100,26 +100,25 @@ fi
+ 
+ AC_SUBST(PYTHON)
+ 
+-PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \
++if test x"${PYTHON_VERSION}" = x""; then
++  PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \
+     from distutils import sysconfig; \
+     stdout.write(sysconfig.get_config_var("VERSION"))'`
++fi
+ 
+-PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \
++if test x"${PYTHON_LDVERSION}" = x""; then
++  PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \
+     from distutils import sysconfig; \
+     stdout.write(sysconfig.get_config_var("LDVERSION") or "")'`
++fi
+ 
+ if test x"${PYTHON_LDVERSION}" = x""; then
+     PYTHON_LDVERSION=${PYTHON_VERSION}
+ fi
+ 
+-CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \
+-    from distutils import sysconfig; \
+-    stdout.write("-I" + sysconfig.get_config_var("INCLUDEPY"))'`
++CPPFLAGS1=$($PYTHON-config --includes)
+ 
+-CPPFLAGS2=`${PYTHON} -c 'from sys import stdout; \
+-    from distutils import sysconfig; \
+-    stdout.write(" ".join(filter(lambda x: x.startswith("-D"), \
+-    sysconfig.get_config_var("CFLAGS").split())))'`
++CPPFLAGS2=$($PYTHON-config --cflags | tr ' \t' '\n\n' | grep '^-D' | tr '\n' ' ')
+ 
+ if test "${ENABLE_EMBEDDED}" != "yes"; then
+ CPPFLAGS3="-DMOD_WSGI_DISABLE_EMBEDDED"
+@@ -131,66 +130,7 @@ CPPFLAGS="${CPPFLAGS} ${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3}"
+ 
+ AC_SUBST(CPPFLAGS)
+ 
+-PYTHONLIBDIR=`${PYTHON} -c 'from sys import stdout; \
+-    from distutils import sysconfig; \
+-    stdout.write(sysconfig.get_config_var("LIBDIR"))'`
+-PYTHONCFGDIR=`${PYTHON} -c 'from sys import stdout; \
+-    import distutils.sysconfig; \
+-    stdout.write(distutils.sysconfig.get_python_lib(plat_specific=1, \
+-    standard_lib=1) +"/config")'`
+-PYTHONFRAMEWORKDIR=`${PYTHON} -c 'from sys import stdout; \
+-    from distutils import sysconfig; \
+-    stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORKDIR"))'`
+-PYTHONFRAMEWORKPREFIX=`${PYTHON} -c 'from sys import stdout; \
+-    from distutils import sysconfig; \
+-    stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORKPREFIX"))'`
+-PYTHONFRAMEWORK=`${PYTHON} -c 'from sys import stdout; \
+-    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_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"))'`
+-    LDLIBS3=`${PYTHON} -c 'from sys import stdout; \
+-        from distutils import sysconfig; \
+-        stdout.write(sysconfig.get_config_var("SYSLIBS"))'`
+-else
+-    LDFLAGS1="-Wl,-F${PYTHONFRAMEWORKPREFIX} -framework ${PYTHONFRAMEWORK}"
+-
+-    VERSION="${PYTHON_VERSION}"
+-    STRING="${PYTHONFRAMEWORKDIR}/Versions/${VERSION}/${PYTHONFRAMEWORK}"
+-    LDFLAGS2=`${PYTHON} -c "from sys import stdout; \
+-        from distutils import sysconfig; \
+-        stdout.write(sysconfig.get_config_var(
+-        \"LINKFORSHARED\").replace(\"${STRING}\", ''))" | \
+-        sed -e 's/-Wl,-stack_size,[[0-9]]*//'`
+-
+-    LDLIBS1=`${PYTHON} -c 'from sys import stdout; \
+-        from distutils import sysconfig; \
+-        stdout.write(sysconfig.get_config_var("LIBS"))'`
+-fi
++PYTHONLIBDIR=$($PYTHON-config --ldflags)
+ 
+ CFLAGS1=""
+ for arg in ${CFLAGS}
diff --git a/srcpkgs/mod_wsgi/template b/srcpkgs/mod_wsgi/template
index 21b9f940fac..a56eeda9b94 100644
--- a/srcpkgs/mod_wsgi/template
+++ b/srcpkgs/mod_wsgi/template
@@ -3,7 +3,7 @@ pkgname=mod_wsgi
 version=4.6.5
 revision=2
 build_style=gnu-configure
-hostmakedepends="python"
+hostmakedepends="python perl automake libtool"
 makedepends="apache-devel python-devel"
 short_desc="Python WSGI adapter module for Apache"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -13,4 +13,28 @@ changelog="https://modwsgi.readthedocs.io/en/latest/release-notes/version-${vers
 distfiles="https://github.com/GrahamDumpleton/${pkgname}/archive/${version}.tar.gz"
 checksum=5cbe05f8b9b21a9e40d5d7226f4976643b1ee5e23a2d114bceae34d9948be5e0
 lib32disabled=yes
-nocross=yes
+
+pre_configure() {
+	if [ "$CROSS_BUILD" ]; then
+		cp -a ${XBPS_CROSS_BASE}/usr/bin/apxs ${wrksrc}
+		cp -a ${XBPS_CROSS_BASE}/usr/share/apache/webroot/build/config_vars.mk ${wrksrc}
+
+		# Use the modified apxs
+		configure_args+=" --with-apxs=${wrksrc}/apxs"
+		configure_args+=" --with-python=$XBPS_WRAPPERDIR/python"
+		configure_args+=" PYTHON_VERSION=2.7 PYTHON_LDVERSION=2.7"
+
+		# Use the ${wrksrc}/config_vars.mk
+		vsed -i apxs \
+			-e "/config_vars[.]mk/s;[$]installbuilddir;${wrksrc};g" \
+			-e "s;[$]installbuilddir/instdso[.]sh;$XBPS_CROSS_BASE/&;g" \
+
+		# Use apr-1-config and apu-1-config wrappers
+		vsed -i config_vars.mk \
+			-e "/^APR_CONFIG/ s;=.*;= ${XBPS_WRAPPERDIR}/apr-1-config;" \
+			-e "/^APU_CONFIG/ s;=.*;= ${XBPS_WRAPPERDIR}/apu-1-config;" \
+			-e "/^includedir/ s;=.*;= $XBPS_CROSS_BASE/usr/include/httpd;" \
+			-e "s;\([I 	]\)/usr/include;\1$XBPS_CROSS_BASE/usr/include;g"
+	fi
+	autoreconf -fi
+}

From 4646b09348b0f421aff3222599899c3e7ee1ad30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 22 May 2020 06:37:25 +0700
Subject: [PATCH 3/3] mod_wsgi: update to 4.7.1, change to python 3

---
 srcpkgs/mod_wsgi/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/mod_wsgi/template b/srcpkgs/mod_wsgi/template
index a56eeda9b94..25cd45225dc 100644
--- a/srcpkgs/mod_wsgi/template
+++ b/srcpkgs/mod_wsgi/template
@@ -1,17 +1,17 @@
 # Template file for 'mod_wsgi'
 pkgname=mod_wsgi
-version=4.6.5
-revision=2
+version=4.7.1
+revision=1
 build_style=gnu-configure
-hostmakedepends="python perl automake libtool"
-makedepends="apache-devel python-devel"
+hostmakedepends="python3 perl automake libtool"
+makedepends="apache-devel python3-devel"
 short_desc="Python WSGI adapter module for Apache"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://modwsgi.readthedocs.io/en/develop/"
 changelog="https://modwsgi.readthedocs.io/en/latest/release-notes/version-${version}.html"
 distfiles="https://github.com/GrahamDumpleton/${pkgname}/archive/${version}.tar.gz"
-checksum=5cbe05f8b9b21a9e40d5d7226f4976643b1ee5e23a2d114bceae34d9948be5e0
+checksum=2674e506719afe60fbc0547c832e8948d6caa2e054d40d336309993e6e867d35
 lib32disabled=yes
 
 pre_configure() {
@@ -21,8 +21,8 @@ pre_configure() {
 
 		# Use the modified apxs
 		configure_args+=" --with-apxs=${wrksrc}/apxs"
-		configure_args+=" --with-python=$XBPS_WRAPPERDIR/python"
-		configure_args+=" PYTHON_VERSION=2.7 PYTHON_LDVERSION=2.7"
+		configure_args+=" --with-python=$XBPS_WRAPPERDIR/python3"
+		configure_args+=" PYTHON_VERSION=$py3_ver PYTHON_LDVERSION=$py3_ver"
 
 		# Use the ${wrksrc}/config_vars.mk
 		vsed -i apxs \

  parent reply	other threads:[~2020-05-22  6:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 23:38 [PR PATCH] " sgn
2020-05-22  1:01 ` sgn
2020-05-22  6:13 ` sgn [this message]
2020-05-22  6:48 ` sgn
2020-05-22  6:48 ` [PR PATCH] [Closed]: " sgn
2020-05-22  6:50 ` sgn
2020-05-22  6:50 ` [PR PATCH] [Updated] " sgn
2020-05-22  7:07 ` sgn
2020-05-22 17:32 ` Chocimier
2020-05-23  6:59 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522061356.xRVb0ly6sV_PZyO-s92tqCumrRCzXy7BU2v0keDwpQc@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).