From becd05b37b7c823a4b95ac55c68ff18111f0f0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 29 Mar 2024 21:11:35 +0700 Subject: [PATCH] mod_wsgi: simplify build process --- srcpkgs/mod_wsgi/template | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/srcpkgs/mod_wsgi/template b/srcpkgs/mod_wsgi/template index d47498d15ee..e6c4700d45c 100644 --- a/srcpkgs/mod_wsgi/template +++ b/srcpkgs/mod_wsgi/template @@ -3,7 +3,8 @@ pkgname=mod_wsgi version=4.9.4 revision=3 build_style=gnu-configure -hostmakedepends="python3 perl automake libtool apache-devel" +configure_args="--with-python=python3" +hostmakedepends="python3 perl automake libtool" makedepends="apache-devel python3-devel apr-devel" short_desc="Python WSGI adapter module for Apache" maintainer="Orphaned " @@ -17,12 +18,11 @@ lib32disabled=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} - cp -a "$("${XBPS_CROSS_BASE}/usr/bin/apr-1-config" --apr-libtool)" ./libtool + 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" # Modify libtool to use the right compiler and linker @@ -31,23 +31,10 @@ pre_configure() { -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 -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" + -e '/my [$]ltflags /s/=.*/= "--tag=CC";/' \ + -e "/my [$]destdir/s%=.*%= \"$XBPS_CROSS_BASE\";%" fi autoreconf -fi }