diff options
author | Hunter Sezen <orbea@riseup.net> | 2019-02-28 22:58:53 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-02-28 22:58:53 +0700 |
commit | 1f11e0a0dbc82bc558200ce0b4e51c46a36f1db9 (patch) | |
tree | 4b4071c31091d04e17256f4f0e71f8854cd5eda1 /development | |
parent | 69212cd632e5b8ae039941b5a623c70b28398bca (diff) | |
download | slackbuilds-1f11e0a0dbc82bc558200ce0b4e51c46a36f1db9.tar.gz |
development/pkgconf: Add compatibility.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/pkgconf/pkgconf.SlackBuild | 33 | ||||
-rw-r--r-- | development/pkgconf/pkgconf.info | 2 | ||||
-rw-r--r-- | development/pkgconf/platform-pkg-config.in | 14 |
3 files changed, 46 insertions, 3 deletions
diff --git a/development/pkgconf/pkgconf.SlackBuild b/development/pkgconf/pkgconf.SlackBuild index 4a9a96bd6b..b4e00c689f 100644 --- a/development/pkgconf/pkgconf.SlackBuild +++ b/development/pkgconf/pkgconf.SlackBuild @@ -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 diff --git a/development/pkgconf/pkgconf.info b/development/pkgconf/pkgconf.info index fb885f1db6..edd04489cd 100644 --- a/development/pkgconf/pkgconf.info +++ b/development/pkgconf/pkgconf.info @@ -7,4 +7,4 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="%README%" MAINTAINER="Hunter Sezen" -EMAIL="orbea@fredslev.dk" +EMAIL="orbea@riseup.net" diff --git a/development/pkgconf/platform-pkg-config.in b/development/pkgconf/platform-pkg-config.in new file mode 100644 index 0000000000..1cc5917d5e --- /dev/null +++ b/development/pkgconf/platform-pkg-config.in @@ -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 "$@" |