From 2e78b545169fd1f3df931e4dc45234fec07f8634 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sat, 23 Sep 2023 21:03:45 -0400 Subject: [PATCH] mod_wsgi: rebuild for Python 3.12 --- srcpkgs/mod_wsgi/template | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/srcpkgs/mod_wsgi/template b/srcpkgs/mod_wsgi/template index 0e809221294..d47498d15ee 100644 --- a/srcpkgs/mod_wsgi/template +++ b/srcpkgs/mod_wsgi/template @@ -1,7 +1,7 @@ # Template file for 'mod_wsgi' pkgname=mod_wsgi version=4.9.4 -revision=2 +revision=3 build_style=gnu-configure hostmakedepends="python3 perl automake libtool apache-devel" makedepends="apache-devel python3-devel apr-devel" @@ -18,23 +18,34 @@ 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} + cp -a "$("${XBPS_CROSS_BASE}/usr/bin/apr-1-config" --apr-libtool)" ./libtool # Use the modified apxs configure_args+=" --with-apxs=${wrksrc}/apxs" configure_args+=" --with-python=$XBPS_WRAPPERDIR/python3" configure_args+=" PYTHON_VERSION=$py3_ver PYTHON_LDVERSION=$py3_ver" - # Use the ${wrksrc}/config_vars.mk + # Modify libtool to use the right compiler and linker + vsed -i libtool \ + -e "s/^CC=.*/CC='${CC}'/" \ + -e "s/^LD=.*/LD='${LD}'/" \ + -e "s/^LTCC=.*/LTCC='${CC}'/" + + # Use the ${wrksrc}/config_vars.mk and a modified libtool vsed -i apxs \ + -e 's|my \$libtool =.*|my $libtool = "./libtool";|' \ -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 \ + vsed -i config_vars.mk -e "/LDFLAGS = /a LD = ${CC}" \ -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" + + # Tell libtool these are C files + export LTFLAGS="--tag=CC" else configure_args+=" --with-python=/usr/bin/python3" fi