mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge branch 'dont_clober_ldflags_cppflags' (fixes #168)
This commit is contained in:
commit
67324465fa
2 changed files with 23 additions and 6 deletions
|
@ -1047,7 +1047,8 @@ needs_yaml() {
|
|||
use_homebrew_yaml() {
|
||||
local libdir="$(brew --prefix libyaml 2>/dev/null || true)"
|
||||
if [ -d "$libdir" ]; then
|
||||
package_option python configure CPPFLAGS="-I$libdir/include" LDFLAGS="-L$libdir/lib"
|
||||
export CPPFLAGS="-I$libdir/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L$libdir/lib ${LDFLAGS}"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
|
@ -1079,7 +1080,8 @@ use_homebrew_readline() {
|
|||
if ! configured_with_readline_dir; then
|
||||
local libdir="$(brew --prefix readline 2>/dev/null || true)"
|
||||
if [ -d "$libdir" ]; then
|
||||
package_option python configure CPPFLAGS="-I$libdir/include" LDFLAGS="-L$libdir/lib"
|
||||
export CPPFLAGS="-I$libdir/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L$libdir/lib ${LDFLAGS}"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
|
@ -1095,7 +1097,8 @@ has_broken_mac_openssl() {
|
|||
use_homebrew_openssl() {
|
||||
local ssldir="$(brew --prefix openssl 2>/dev/null || true)"
|
||||
if [ -d "$ssldir" ]; then
|
||||
package_option python configure CPPFLAGS="-I$ssldir/include" LDFLAGS="-L$ssldir/lib"
|
||||
export CPPFLAGS="-I$ssldir/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L$ssldir/lib ${LDFLAGS}"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
|
@ -1109,7 +1112,8 @@ build_package_mac_openssl() {
|
|||
OPENSSLDIR="${OPENSSLDIR:-$OPENSSL_PREFIX_PATH/ssl}"
|
||||
|
||||
# Tell Python to use this openssl for its extension.
|
||||
package_option python configure CPPFLAGS="-I${OPENSSL_PREFIX_PATH}/include" LDFLAGS="-L${OPENSSL_PREFIX_PATH}/lib"
|
||||
export CPPFLAGS="-I${OPENSSL_PREFIX_PATH}/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L${OPENSSL_PREFIX_PATH}/lib ${LDFLAGS}"
|
||||
|
||||
# Hint OpenSSL that we prefer a 64-bit build.
|
||||
export KERNEL_BITS="64"
|
||||
|
|
|
@ -33,6 +33,7 @@ tarball() {
|
|||
|
||||
executable "$configure" <<OUT
|
||||
#!$BASH
|
||||
echo "$name: CPPFLAGS=\\"\$CPPFLAGS\\" LDFLAGS=\\"\$LDFLAGS\\"" >> build.log
|
||||
echo "$name: \$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log
|
||||
OUT
|
||||
|
||||
|
@ -69,9 +70,11 @@ assert_build_log() {
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
yaml-0.1.6: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
|
@ -94,10 +97,12 @@ OUT
|
|||
unstub patch
|
||||
|
||||
assert_build_log <<OUT
|
||||
yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
yaml-0.1.6: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
patch -p0 -i -
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
|
@ -120,7 +125,8 @@ OUT
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib CPPFLAGS=-I$brew_libdir/include LDFLAGS=-L$brew_libdir/lib
|
||||
Python-3.2.1: CPPFLAGS="-I$brew_libdir/include -I${TMP}/install/include " LDFLAGS="-L$brew_libdir/lib -L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
|
@ -144,7 +150,8 @@ DEF
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib
|
||||
Python-3.2.1: CPPFLAGS="-I$readline_libdir/include -I${TMP}/install/include " LDFLAGS="-L$readline_libdir/lib -L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
OUT
|
||||
|
@ -171,6 +178,7 @@ DEF
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib CPPFLAGS=-I$readline_libdir/include LDFLAGS=-L$readline_libdir/lib
|
||||
make -j 2
|
||||
make install
|
||||
|
@ -194,6 +202,7 @@ DEF
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
|
@ -218,6 +227,7 @@ DEF
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 4
|
||||
make install
|
||||
|
@ -238,6 +248,7 @@ DEF
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install DOGE="such wow"
|
||||
|
@ -258,6 +269,7 @@ DEF
|
|||
unstub make
|
||||
|
||||
assert_build_log <<OUT
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install DOGE="such wow"
|
||||
|
@ -309,6 +321,7 @@ DEF
|
|||
|
||||
assert_build_log <<OUT
|
||||
apply -p1 -i /my/patch.diff
|
||||
Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib "
|
||||
Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib
|
||||
make -j 2
|
||||
make install
|
||||
|
|
Loading…
Reference in a new issue