Ports: Set PKG_CONFIG_PATH in host_env/target_env

This improves upon 06c42dfff5, which allows us to capture the host value
for this env var, which can then be restored as needed. Also reverts
some recent changes that dealt with the initial fallout of not stripping
PKG_CONFIG_PATH from the env (8497f17680, cc1cfa7a23), and drops it from
ports that were setting it before.

Lastly we can drop some SDL2/SDL_mixer build options that were only
working around host pkg-config leakage.
This commit is contained in:
Linus Groh authored and Lucas Chollet committed 2026-09-22 22:29:25 +02:00
1 parent 26732f76a2
commit e5cd17eab1
13 files changed
+3 -25

No files matched your search

+2
View File
@@ -24,6 +24,7 @@ if [ -z "${HOST_CC:=}" ]; then
export HOST_PKG_CONFIG_DIR="${PKG_CONFIG_DIR:=}"
export HOST_PKG_CONFIG_SYSROOT_DIR="${PKG_CONFIG_SYSROOT_DIR:=}"
export HOST_PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:=}"
export HOST_PKG_CONFIG_PATH="${PKG_CONFIG_PATH:=}"
fi
if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then
@@ -59,6 +60,7 @@ export PATH="${SERENITY_TOOLCHAIN_BINDIR}:${SERENITY_SOURCE_DIR}/Toolchain/Local
export PKG_CONFIG_DIR=""
export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig"
export PKG_CONFIG_PATH="${PKG_CONFIG_LIBDIR}"
export SERENITY_INSTALL_ROOT="${SERENITY_BUILD_DIR}/Root"
export SERENITY_PORT_DIRS="${SERENITY_PORT_DIRS:+${SERENITY_PORT_DIRS}:}${SERENITY_SOURCE_DIR}/Ports"
+1
View File
@@ -79,6 +79,7 @@ host_env() {
export PKG_CONFIG_DIR="${HOST_PKG_CONFIG_DIR}"
export PKG_CONFIG_SYSROOT_DIR="${HOST_PKG_CONFIG_SYSROOT_DIR}"
export PKG_CONFIG_LIBDIR="${HOST_PKG_CONFIG_LIBDIR}"
export PKG_CONFIG_PATH="${HOST_PKG_CONFIG_PATH}"
enable_ccache
}
-3
View File
@@ -8,9 +8,6 @@ files=(
configopts=(
"-DCMAKE_CXX_FLAGS=-I${SERENITY_BUILD_DIR}/Root/usr/include/Services/ -I${SERENITY_BUILD_DIR}/Root/usr/include/Userland/Services/"
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
"-DPULSEAUDIO=OFF"
"-DJACK=OFF"
"-DSDL_LIBSAMPLERATE=OFF" # Disabled to prevent potential collision with host libsamplerate
"-DEXTRA_LDFLAGS=-lcorebasic;-laudio;-liconv"
)
depends=("libiconv")
-5
View File
@@ -9,8 +9,3 @@ files=(
"https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-${version}.tar.gz#1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a"
)
depends=("libmikmod" "libvorbis" "sdl12-compat" "timidity")
# Explicitly point to the config binaries installed by our ports. Otherwise, it will
# only work if by chance your host machine has those binaries in $PATH.
export LIBMIKMOD_CONFIG="${SERENITY_INSTALL_ROOT}/usr/local/bin/libmikmod-config"
export SDL_CONFIG="${SERENITY_INSTALL_ROOT}/usr/local/bin/sdl-config"
-2
View File
@@ -12,8 +12,6 @@ depends=(
'zstd'
)
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
configure() {
mkdir -p curl-build
cmake \
-2
View File
@@ -18,5 +18,3 @@ configopts=(
'--enable-libxml2'
'LDFLAGS=-ldl -lxml2'
)
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
-2
View File
@@ -11,8 +11,6 @@ launcher_name='Half-Life'
launcher_category='&Games'
launcher_command='sh /home/anon/Games/halflife/hl.sh'
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
configure() {
run ./waf configure -T release
}
-2
View File
@@ -14,5 +14,3 @@ depends=(
'libpng'
'libtiff'
)
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
-2
View File
@@ -10,8 +10,6 @@ depends=(
'zlib'
)
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
configopts=(
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
'-DCRYPTO_BACKEND=OpenSSL'
-2
View File
@@ -8,5 +8,3 @@ files=(
depends=(
'openssl'
)
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
-2
View File
@@ -7,5 +7,3 @@ files=(
useconfigure='true'
configopts=("--disable-utf8")
depends=("ncurses")
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
-1
View File
@@ -9,7 +9,6 @@ depends=(
)
build() {
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig/"
run make
}
-2
View File
@@ -21,8 +21,6 @@ files=(
"https://github.com/FWGS/xash-extras/archive/${_extras_commit}.tar.gz#020b4c35f97fabbd70a7444a98451f0f5be4dcbf149e42e5e49598a5651805ab"
)
export PKG_CONFIG_PATH="${SERENITY_INSTALL_ROOT}/usr/local/lib/pkgconfig"
pre_patch() {
pushd "${workdir}"