development/pkgconf: Use personality files and add symlink.

Signed-off-by: orbea <orbea@riseup.net>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
orbea 2020-09-29 15:48:42 -07:00 committed by Willy Sudiarto Raharjo
parent 70750288ce
commit e59d26bdcb
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 13 additions and 16 deletions

View File

@ -24,7 +24,7 @@
PRGNAM=pkgconf
VERSION=${VERSION:-1.7.3}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -89,6 +89,7 @@ make
make install DESTDIR=$PKG
( cd $PKG/usr/bin; ln -sf $PRGNAM pkg-config )
( cd $PKG/usr/man/man1; ln -s $PRGNAM.1 pkg-config.1 )
if [ "$ARCH" = x86_64 ]; then
if [ -f /usr/lib/libgcc_s.so ]; then
@ -102,7 +103,9 @@ fi
platform=slackware-linux-gnu
# adapted from fedora
mkdir -p $PKG/usr/share/pkgconfig/personality.d
# adapted from fedora and arch
eval "set -- $arch"
for i do
case "$i" in
@ -115,8 +118,8 @@ for i do
-e "s|@PKGCONF_SYSLIBDIR@|/usr/local/lib$libdir:/lib$libdir:/usr/lib$libdir|" \
-e "s|@PKGCONF_SYSINCDIR@|/usr/local/include:/usr/include|" \
< $CWD/platform-pkg-config.in \
> $PKG/usr/bin/$i-$platform-pkg-config
chmod 0755 $PKG/usr/bin/$i-$platform-pkg-config
> $PKG/usr/share/pkgconfig/personality.d/$i-$platform.personality
( cd $PKG/usr/bin; ln -s $PRGNAM $i-$platform-pkg-config )
done
if [ "$DEBUG" = 0 ]; then

View File

@ -1,14 +1,8 @@
#!/bin/sh
# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config
# pkgconf personality to behave as a platform-specific version of pkg-config
# Platform: @TARGET_PLATFORM@
PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS@}"
PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR@}"
PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR@}"
export PKG_CONFIG_LIBDIR
export PKG_CONFIG_SYSTEM_LIBRARY_PATH
export PKG_CONFIG_SYSTEM_INCLUDE_PATH
exec pkgconf "$@"
Triplet: @TARGET_PLATFORM@
SysrootDir: /
DefaultSearchPaths: @PKGCONF_LIBDIRS@
SystemIncludePaths: @PKGCONF_SYSINCDIR@
SystemLibraryPaths: @PKGCONF_SYSLIBDIR@