mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Don't clober the environment CPPFLAGS
and LDFLAGS
(refs #168)
Because the variables specified via command-line arguments for the `./configure` will be favored than one in environment variables, setting those variables in `PACKAGE_CONFIGURE_OPTS_ARRAY` will hide existing environment variables. To avoid the problem, stop using `package_option()` to setup those variables.
This commit is contained in:
parent
21f44a130a
commit
7612f0391d
2 changed files with 12 additions and 8 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"
|
||||
|
|
|
@ -125,8 +125,8 @@ OUT
|
|||
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$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
|
||||
|
@ -150,8 +150,8 @@ 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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue