development/pkgconf: Add compatibility.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Hunter Sezen 2019-02-28 22:58:53 +07:00 committed by Willy Sudiarto Raharjo
parent 69212cd632
commit 1f11e0a0db
3 changed files with 46 additions and 3 deletions

View File

@ -24,7 +24,7 @@
PRGNAM=pkgconf
VERSION=${VERSION:-1.6.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -69,7 +69,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
[ "${DEBUG:=0}" != 0 ] && \
[ "${DEBUG:=0}" != 0 ] &&
SLKCFLAGS="$(printf %s "$SLKCFLAGS" | sed 's/-O2/-O0 -g/')"
autoreconf -fi
@ -90,6 +90,35 @@ make install DESTDIR=$PKG
( cd $PKG/usr/bin; ln -sf $PRGNAM pkg-config )
if [ "$ARCH" = x86_64 ]; then
if [ -f /usr/lib/libgcc_s.so ]; then
arch='i586 x86_64'
else
arch=x86_64
fi
else
arch=i586
fi
platform=slackware-linux-gnu
# adapted from fedora
eval "set -- $arch"
for i do
case "$i" in
i586) libdir= ;;
x86_64) libdir=64 ;;
esac
sed -e "s|@TARGET_PLATFORM@|$i-$platform|" \
-e "s|@PKGCONF_LIBDIRS@|/usr/local/lib$libdir/pkgconfig:/usr/local/share/pkgconfig:/usr/lib$libdir/pkgconfig:/usr/share/pkgconfig|" \
-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
done
if [ "$DEBUG" = 0 ]; then
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" |
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

View File

@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="%README%"
MAINTAINER="Hunter Sezen"
EMAIL="orbea@fredslev.dk"
EMAIL="orbea@riseup.net"

View File

@ -0,0 +1,14 @@
#!/bin/sh
# Simple wrapper to tell pkgconf 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 "$@"