mod_wsgi: simplify build process
This commit is contained in:
parent
c7009dc3dd
commit
becd05b37b
|
@ -3,7 +3,8 @@ pkgname=mod_wsgi
|
||||||
version=4.9.4
|
version=4.9.4
|
||||||
revision=3
|
revision=3
|
||||||
build_style=gnu-configure
|
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"
|
makedepends="apache-devel python3-devel apr-devel"
|
||||||
short_desc="Python WSGI adapter module for Apache"
|
short_desc="Python WSGI adapter module for Apache"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
|
@ -17,12 +18,11 @@ lib32disabled=yes
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
cp -a ${XBPS_CROSS_BASE}/usr/bin/apxs ${wrksrc}
|
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)" \
|
||||||
cp -a "$("${XBPS_CROSS_BASE}/usr/bin/apr-1-config" --apr-libtool)" ./libtool
|
./libtool
|
||||||
|
|
||||||
# Use the modified apxs
|
# Use the modified apxs
|
||||||
configure_args+=" --with-apxs=${wrksrc}/apxs"
|
configure_args+=" --with-apxs=${wrksrc}/apxs"
|
||||||
configure_args+=" --with-python=$XBPS_WRAPPERDIR/python3"
|
|
||||||
configure_args+=" PYTHON_VERSION=$py3_ver PYTHON_LDVERSION=$py3_ver"
|
configure_args+=" PYTHON_VERSION=$py3_ver PYTHON_LDVERSION=$py3_ver"
|
||||||
|
|
||||||
# Modify libtool to use the right compiler and linker
|
# Modify libtool to use the right compiler and linker
|
||||||
|
@ -31,23 +31,10 @@ pre_configure() {
|
||||||
-e "s/^LD=.*/LD='${LD}'/" \
|
-e "s/^LD=.*/LD='${LD}'/" \
|
||||||
-e "s/^LTCC=.*/LTCC='${CC}'/"
|
-e "s/^LTCC=.*/LTCC='${CC}'/"
|
||||||
|
|
||||||
# Use the ${wrksrc}/config_vars.mk and a modified libtool
|
|
||||||
vsed -i apxs \
|
vsed -i apxs \
|
||||||
-e 's|my \$libtool =.*|my $libtool = "./libtool";|' \
|
-e 's|my \$libtool =.*|my $libtool = "./libtool";|' \
|
||||||
-e "/config_vars[.]mk/s;[$]installbuilddir;${wrksrc};g" \
|
-e '/my [$]ltflags /s/=.*/= "--tag=CC";/' \
|
||||||
-e "s;[$]installbuilddir/instdso[.]sh;$XBPS_CROSS_BASE/&;g" \
|
-e "/my [$]destdir/s%=.*%= \"$XBPS_CROSS_BASE\";%"
|
||||||
|
|
||||||
# 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"
|
|
||||||
fi
|
fi
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue