diff --git a/bin/ruby-build b/bin/ruby-build index 646570231f..6fe1ca509f 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -1209,14 +1209,11 @@ build_package_openssl() { # Tell Ruby to use this openssl for its extension. package_option ruby configure --with-openssl-dir="$OPENSSL_PREFIX_PATH" - # Make sure pkg-config finds our build first. - export PKG_CONFIG_PATH="${OPENSSL_PREFIX_PATH}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" - local nokerberos [[ "$1" != openssl-1.0.* ]] || nokerberos=1 # Compile a shared lib with zlib dynamically linked. - package_option openssl configure --openssldir="$OPENSSLDIR" zlib-dynamic no-ssl3 shared ${nokerberos:+no-ssl2 no-krb5} + package_option openssl configure --openssldir="$OPENSSLDIR" --libdir="lib" zlib-dynamic no-ssl3 shared ${nokerberos:+no-ssl2 no-krb5} # Skip building OpenSSL docs, which is slow. local make_target="install_sw install_ssldirs" @@ -1224,6 +1221,9 @@ build_package_openssl() { OPENSSL_CONFIGURE="${OPENSSL_CONFIGURE:-./config}" MAKE_INSTALL_TARGET="$make_target" build_package_standard "$@" + # Make sure pkg-config finds the new OpenSSL installation. + export PKG_CONFIG_PATH="${OPENSSL_PREFIX_PATH}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" + local pem_file="$OPENSSLDIR/cert.pem" if is_mac; then # Extract root certs from the system keychain in .pem format. diff --git a/test/build.bats b/test/build.bats index aa9aa101ec..82be770ff0 100755 --- a/test/build.bats +++ b/test/build.bats @@ -397,8 +397,8 @@ DEF unstub make assert_build_log <