summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Gorski2018-06-06 15:22:46 +0200
committerPiotr Gorski2018-06-06 15:22:46 +0200
commit8dcebd0ee074e8d26eed20deece44150934d1544 (patch)
tree7add4fcacedabdf9cc6dfe18ea69ee3824eaff4a
parentc77f2b855c761084d5f3d320e54a3b00bb3ee6b7 (diff)
downloadaur-8dcebd0ee074e8d26eed20deece44150934d1544.tar.gz
Sync with Arch
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD69
-rw-r--r--platform-pkg-config.in11
3 files changed, 70 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9b9a575ec66..fd927129a3a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,24 @@
-# Generated by mksrcinfo v8
-# Sat Oct 8 16:07:15 UTC 2016
pkgbase = pkgconf-git
pkgdesc = pkg-config compatible utility which does not depend on glib
- pkgver = 1.0.1.27.ga05cc65
+ pkgver = 1.4.2.41.g390b020
pkgrel = 1
url = https://github.com/pkgconf/pkgconf
+ arch = i686
arch = x86_64
license = ISC
- makedepends = popt
- makedepends = git
+ depends = glibc
+ depends = sh
+ depends = git
provides = pkg-config
provides = pkgconfig
provides = pkgconf
conflicts = pkg-config
conflicts = pkgconfig
conflicts = pkgconf
- replaces = pkg-config
- replaces = pkgconfig
- replaces = pkgconf
source = git://github.com/pkgconf/pkgconf.git
+ source = platform-pkg-config.in
md5sums = SKIP
+ md5sums = 8208d56d649808fe561f088cd32c74e0
pkgname = pkgconf-git
diff --git a/PKGBUILD b/PKGBUILD
index 48291f2b381..94311647d01 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,37 +2,72 @@
# Contributor: Bartlomiej Piotrowski <nospam@bpiotrowski.pl>
pkgname=pkgconf-git
-pkgver=1.0.1.27.ga05cc65
+_pkgname=pkgconf
+pkgver=1.4.2.41.g390b020
pkgrel=1
pkgdesc='pkg-config compatible utility which does not depend on glib'
url='https://github.com/pkgconf/pkgconf'
-arch=('x86_64')
+arch=('i686' 'x86_64')
license=('ISC')
-makedepends=('popt' 'git')
+depends=(glibc sh git)
conflicts=('pkg-config' 'pkgconfig' 'pkgconf')
provides=('pkg-config' 'pkgconfig' 'pkgconf')
-replaces=('pkg-config' 'pkgconfig' 'pkgconf')
-source=(git://github.com/pkgconf/pkgconf.git)
-md5sums=('SKIP')
+source=(git://github.com/pkgconf/pkgconf.git
+ platform-pkg-config.in)
+md5sums=('SKIP'
+ '8208d56d649808fe561f088cd32c74e0')
+
+_pcdirs=/usr/lib/pkgconfig:/usr/share/pkgconfig
+_libdir=/usr/lib
+_includedir=/usr/include
pkgver() {
- cd pkgconf
- git describe --tags | sed 's/^v//;s/-/./g;s/pkgconf.//'
+ cd $_pkgname
+ git describe --tags --long | sed 's/^pkgconf-//;s/-/./g'
}
-build() {
- cd pkgconf
+prepare() {
+ mkdir build
+ cd $_pkgname
./autogen.sh
- ./configure --prefix=/usr \
+}
+
+build() {
+ cd build
+ ../$_pkgname/configure \
+ --prefix=/usr \
--sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --localstatedir=/var
+ --with-pkg-config-dir="$_pcdirs" \
+ --with-system-libdir="$_libdir" \
+ --with-system-includedir="$_includedir" \
+ --disable-static
make
}
package() {
- cd pkgconf
- make DESTDIR="$pkgdir" install
- ln -s /usr/bin/pkgconf "$pkgdir"/usr/bin/pkg-config
+ DESTDIR="$pkgdir" make -C build install
+
+ # From https://src.fedoraproject.org/rpms/pkgconf/
+ sed -e "s|@TARGET_PLATFORM@|$CHOST|g" \
+ -e "s|@PKGCONF_LIBDIRS@|$_pcdirs|g" \
+ -e "s|@PKGCONF_SYSLIBDIR@|$_libdir|g" \
+ -e "s|@PKGCONF_SYSINCDIR@|$_includedir|g" \
+ platform-pkg-config.in |
+ install -D /dev/stdin "$pkgdir/usr/bin/$CHOST-pkg-config"
+ ln -s $CHOST-pkg-config "$pkgdir/usr/bin/pkg-config"
+
+ # Multilib
+ if [[ $CARCH = x86_64 ]]; then
+ _host32=${CHOST/x86_64/i686}
+ sed -e "s|@TARGET_PLATFORM@|$_host32|g" \
+ -e "s|@PKGCONF_LIBDIRS@|${_pcdirs/lib/lib32}|g" \
+ -e "s|@PKGCONF_SYSLIBDIR@|${_libdir/lib/lib32}|g" \
+ -e "s|@PKGCONF_SYSINCDIR@|$_includedir|g" \
+ platform-pkg-config.in |
+ install -D /dev/stdin "$pkgdir/usr/bin/$_host32-pkg-config"
+ ln -s $_host32-pkg-config "$pkgdir/usr/bin/pkg-config-32"
+ fi
+
+ ln -s pkgconf.1 "$pkgdir/usr/share/man/man1/pkg-config.1"
+ install -Dt "$pkgdir/usr/share/licenses/$_pkgname" -m644 $_pkgname/COPYING
}
diff --git a/platform-pkg-config.in b/platform-pkg-config.in
new file mode 100644
index 00000000000..3f6b9a78a19
--- /dev/null
+++ b/platform-pkg-config.in
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config
+# Platform: @TARGET_PLATFORM@
+
+: ${PKG_CONFIG_LIBDIR=@PKGCONF_LIBDIRS@}
+: ${PKG_CONFIG_SYSTEM_LIBRARY_PATH=@PKGCONF_SYSLIBDIR@}
+: ${PKG_CONFIG_SYSTEM_INCLUDE_PATH=@PKGCONF_SYSINCDIR@}
+export PKG_CONFIG_LIBDIR PKG_CONFIG_SYSTEM_LIBRARY_PATH PKG_CONFIG_SYSTEM_INCLUDE_PATH
+
+exec pkgconf "$@"