Ports: Make sure pkg-config only picks up packages from the target

This commit is contained in:
Gunnar Beutner 2021-04-11 16:20:53 +02:00 committed by Andreas Kling
parent d8787e0e12
commit 8874b4b4fe
2 changed files with 12 additions and 0 deletions

View file

@ -8,3 +8,6 @@ export AR="${SERENITY_ARCH}-pc-serenity-ar"
export RANLIB="${SERENITY_ARCH}-pc-serenity-ranlib"
export PATH="${SERENITY_ROOT}/Toolchain/Local/${SERENITY_ARCH}/bin:${PATH}"
export DESTDIR="${SERENITY_BUILD_DIR}/Root"
export PKG_CONFIG_DIR=""
export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/lib/pkgconfig/:${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig"

View file

@ -3,6 +3,15 @@ set -eu
SCRIPT="$(dirname "${0}")"
export SERENITY_ARCH="${SERENITY_ARCH:-i686}"
export SERENITY_BUILD_DIR="${SERENITY_ROOT}/Build/${SERENITY_ARCH}"
export CC="${SERENITY_ARCH}-pc-serenity-gcc"
export CXX="${SERENITY_ARCH}-pc-serenity-g++"
export AR="${SERENITY_ARCH}-pc-serenity-ar"
export RANLIB="${SERENITY_ARCH}-pc-serenity-ranlib"
export PATH="${SERENITY_ROOT}/Toolchain/Local/${SERENITY_ARCH}/bin:${PATH}"
export PKG_CONFIG_DIR=""
export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/lib/pkgconfig/:${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig/"
maybe_source() {
if [ -f "$1" ]; then