python: use do_configure(); fixes cross-build with xbps-src/testing.

This commit is contained in:
Juan RP 2013-04-07 19:09:39 +02:00
parent eff888495a
commit a2c384b180

View file

@ -24,10 +24,10 @@ _confargs="--with-threads --enable-ipv6 --with-signal-module --enable-shared
if [ "$XBPS_CROSS_BUILD" ]; then if [ "$XBPS_CROSS_BUILD" ]; then
# cross build; have to build it in 2 stages: native and host. # cross build; have to build it in 2 stages: native and host.
do_build() { do_configure() {
# Native build # Native build
env CC=gcc LD=ld AS=as RANLIB=ranlib CFLAGS= LDFLAGS= OPT="-Os" \ env CC=gcc LD=ld AS=as RANLIB=ranlib CFLAGS= LDFLAGS= OPT="-Os" \
./configure && make ${makejobs} python Parser/pgen || return 1 ./configure && make ${makejobs} python Parser/pgen
mv python hostpython mv python hostpython
mv Parser/pgen Parser/hostpgen mv Parser/pgen Parser/hostpgen
make distclean make distclean
@ -38,13 +38,14 @@ if [ "$XBPS_CROSS_BUILD" ]; then
CFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/include" \ CFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/include" \
LDFLAGS="$LDFLAGS -L$XBPS_CROSS_BASE/lib" \ LDFLAGS="$LDFLAGS -L$XBPS_CROSS_BASE/lib" \
./configure ${CONFIGURE_SHARED_ARGS} \ ./configure ${CONFIGURE_SHARED_ARGS} \
${_confargs} ac_cv_buggy_getaddrinfo=no || return 1 ${_confargs} ac_cv_buggy_getaddrinfo=no
}
do_build() {
make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen \ make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen \
BLDSHARED="${XBPS_CROSS_TRIPLET}-gcc -shared" \ BLDSHARED="${XBPS_CROSS_TRIPLET}-gcc -shared" \
CROSS_COMPILE=$XBPS_CROSS_TARGET CROSS_COMPILE_TARGET=yes \ CROSS_COMPILE=$XBPS_CROSS_TARGET CROSS_COMPILE_TARGET=yes \
HOSTARCH=$XBPS_CROSS_TRIPLET BUILDARCH=$XBPS_MACHINE-unknown-linux-gnu \ HOSTARCH=$XBPS_CROSS_TRIPLET BUILDARCH=$XBPS_MACHINE-unknown-linux-gnu \
PYTHON_XCOMPILE_DEPENDENCIES_PREFIX="$XBPS_CROSS_BASE" \ PYTHON_XCOMPILE_DEPENDENCIES_PREFIX="$XBPS_CROSS_BASE" ${makejobs}
${makejobs} || return 1
} }
do_install() { do_install() {
# cross install # cross install