build_style/python-module: pyyaml ignores our {C,LD}FLAGS, so force them via CC.

This commit is contained in:
Juan RP 2014-02-17 16:59:30 +01:00
parent 6d37bfe920
commit 879cfeda03
1 changed files with 8 additions and 8 deletions

View File

@ -5,11 +5,11 @@ XBPS_PYVER="2.7" # currently 2.7 is the default python
do_build() { do_build() {
if [ -n "$CROSS_BUILD" ]; then if [ -n "$CROSS_BUILD" ]; then
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread"
LDSHARED="${CC} -shared"
PYPREFIX="$XBPS_CROSS_BASE" PYPREFIX="$XBPS_CROSS_BASE"
CFLAGS="$CFLAGS -I${XBPS_CROSS_BASE}/include/python${XBPS_PYVER} -I${XBPS_CROSS_BASE}/usr/include" CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${XBPS_PYVER} -I${XBPS_CROSS_BASE}/usr/include"
LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/lib/python${XBPS_PYVER} -L${XBPS_CROSS_BASE}/lib" LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${XBPS_PYVER} -L${XBPS_CROSS_BASE}/usr/lib"
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
LDSHARED="${CC} -shared $LDFLAGS"
env CC="$CC" LDSHARED="$LDSHARED" \ env CC="$CC" LDSHARED="$LDSHARED" \
PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" python setup.py build ${make_build_args} LDFLAGS="$LDFLAGS" python setup.py build ${make_build_args}
@ -22,11 +22,11 @@ do_install() {
make_install_args+=" --prefix=/usr --root=$DESTDIR" make_install_args+=" --prefix=/usr --root=$DESTDIR"
if [ -n "$CROSS_BUILD" ]; then if [ -n "$CROSS_BUILD" ]; then
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread"
LDSHARED="${CC} -shared"
PYPREFIX="$XBPS_CROSS_BASE" PYPREFIX="$XBPS_CROSS_BASE"
CFLAGS="$CFLAGS -I${XBPS_CROSS_BASE}/include/python${XBPS_PYVER} -I${XBPS_CROSS_BASE}/usr/include" CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${XBPS_PYVER} -I${XBPS_CROSS_BASE}/usr/include"
LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/lib/python${XBPS_PYVER} -L${XBPS_CROSS_BASE}/lib" LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${XBPS_PYVER} -L${XBPS_CROSS_BASE}/usr/lib"
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
LDSHARED="${CC} -shared $LDFLAGS"
env CC="$CC" LDSHARED="$LDSHARED" \ env CC="$CC" LDSHARED="$LDSHARED" \
PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" python setup.py install ${make_install_args} LDFLAGS="$LDFLAGS" python setup.py install ${make_install_args}