summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2016-02-02 20:45:24 +0100
committerMichel Zou2016-02-02 20:45:24 +0100
commitc3732ae536cae13288305f92913d50fc01ffd069 (patch)
treea4d87f9eaa6484c397e23e10d9e3c7fae84ae4fe
parent5e239f87761bb76f6ab41e556228e5db7658b23f (diff)
downloadaur-c3732ae536cae13288305f92913d50fc01ffd069.tar.gz
unify scripts
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD13
-rw-r--r--mingw-pkgconfig.sh (renamed from i686-w64-mingw32-pkg-config)4
-rw-r--r--x86_64-w64-mingw32-pkg-config21
4 files changed, 14 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 92004893a69c..e0ef063d5af6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Tue Feb 2 19:35:49 UTC 2016
+# Tue Feb 2 19:45:24 UTC 2016
pkgbase = mingw-w64-pkg-config
pkgdesc = Support pkg-config script (does not depend on any particular version of pkg-config). Useful for pkg-config powered cross-compiling with mingw-w64, see http://tinyurl.com/pkg-config-cross for more info
pkgver = 2
@@ -10,10 +10,8 @@ pkgbase = mingw-w64-pkg-config
license = zlib
depends = pkg-config
depends = mingw-w64-crt
- source = x86_64-w64-mingw32-pkg-config
- source = i686-w64-mingw32-pkg-config
- md5sums = 7a828d6aa57390613679edb208610045
- md5sums = 18530650bb2ef89bf91176cedd4ce20b
+ source = mingw-pkgconfig.sh
+ md5sums = ac8ea293618b2b94d7db14b52db5cf72
pkgname = mingw-w64-pkg-config
diff --git a/PKGBUILD b/PKGBUILD
index c2da4b8e9b8c..2a3b292930cd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,16 +6,21 @@ arch=('any')
url='http://pkg-config.freedesktop.org/'
license=('zlib')
depends=('pkg-config' 'mingw-w64-crt')
-source=('x86_64-w64-mingw32-pkg-config' 'i686-w64-mingw32-pkg-config')
+source=('mingw-pkgconfig.sh')
install='mingw-w64-pkg-config.install'
-md5sums=('7a828d6aa57390613679edb208610045'
- '18530650bb2ef89bf91176cedd4ce20b')
+md5sums=('ac8ea293618b2b94d7db14b52db5cf72')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+build() {
+ for _arch in ${_architectures}; do
+ sed "s|@TRIPLE@|${_arch}|g" mingw-pkgconfig.sh > ${_arch}-pkg-config
+ done
+}
+
package() {
# This indeed has to go to the "normal" directory tree
- install -d -m755 ${pkgdir}/usr/bin
+ install -d ${pkgdir}/usr/bin
for _arch in ${_architectures}; do
install -m755 ${_arch}-pkg-config ${pkgdir}/usr/bin
done
diff --git a/i686-w64-mingw32-pkg-config b/mingw-pkgconfig.sh
index 72bde110f24b..e1601d732617 100644
--- a/i686-w64-mingw32-pkg-config
+++ b/mingw-pkgconfig.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Taken from
# http://www.mega-nerd.com/erikd/Blog/CodeHacking/MinGWCross/pkg-config.html
@@ -10,7 +10,7 @@
# When using the mingw32msvc cross compiler tools, the native Linux
# pkg-config executable works fine as long as the default PKG_CONFIG_LIBDIR
# is overridden.
-export PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/lib/pkgconfig
+export PKG_CONFIG_LIBDIR=/usr/@TRIPLE@/lib/pkgconfig
# Also want to override the standard user defined PKG_CONFIG_PATH with
# a mingw32msvc specific one.
diff --git a/x86_64-w64-mingw32-pkg-config b/x86_64-w64-mingw32-pkg-config
deleted file mode 100644
index 4101da30e9b7..000000000000
--- a/x86_64-w64-mingw32-pkg-config
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-# Taken from
-# http://www.mega-nerd.com/erikd/Blog/CodeHacking/MinGWCross/pkg-config.html
-# Thanks, Erik
-
-# This file has no copyright assigned and is placed in the Public Domain.
-# No warranty is given.
-
-# When using the mingw32msvc cross compiler tools, the native Linux
-# pkg-config executable works fine as long as the default PKG_CONFIG_LIBDIR
-# is overridden.
-export PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig
-
-# Also want to override the standard user defined PKG_CONFIG_PATH with
-# a mingw32msvc specific one.
-# You can use PKG_CONFIG_PATH_CUSTOM to tweak pkg-config behavior further
-export PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR:$PKG_CONFIG_PATH_CUSTOM
-
-# Now just execute pkg-config with the given command line args.
-pkg-config $@