ports: Add pkg-config wrapper
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-08-08 20:28:11 +02:00
parent c6a5a81a7a
commit 32fd6889b9
Signed by: apio
GPG Key ID: B8A7D06E42258954
3 changed files with 13 additions and 1 deletions

View File

@ -5,7 +5,7 @@ export LUNA_BASE=${LUNA_BASE:-$LUNA_ROOT/base}
[ -f "$LUNA_ROOT/env-local.sh" ] && source $LUNA_ROOT/env-local.sh
export LUNA_ARCH=${LUNA_ARCH:-x86_64}
export PATH=$LUNA_ROOT/toolchain/$LUNA_ARCH-luna/bin:$LUNA_ROOT/toolchain/dist:$PATH
export PATH=$LUNA_ROOT/toolchain/$LUNA_ARCH-luna/bin:$LUNA_ROOT/toolchain/dist:$LUNA_ROOT/tools/exec/:$PATH
if [ "$USE_MAKE" = "1" ]
then

View File

@ -0,0 +1,10 @@
#!/bin/sh
# Fill these in appropriately:
export PKG_CONFIG_SYSROOT_DIR=$LUNA_BASE
export PKG_CONFIG_LIBDIR=$LUNA_BASE/usr/lib/pkgconfig
# TODO: If it works this should probably just be set to the empty string.
export PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR
# Use --static here if your OS only has static linking.
# TODO: Perhaps it's a bug in the libraries if their pkg-config files doesn't
# record that only static libraries were built.
exec pkg-config --static "$@"

View File

@ -70,8 +70,10 @@ esac
export CC=x86_64-luna-gcc
export CXX=x86_64-luna-g++
export PKG_CONFIG=luna-pkg-config
export CC_FOR_BUILD=gcc
export CXX_FOR_BUILD=g++
export PKG_CONFIG_FOR_BUILD=pkg-config
mkdir -p $builddir
cd $builddir