summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSchala2016-10-21 17:54:47 -0700
committerSchala2016-10-21 17:54:47 -0700
commit3c6470a56aa540397b7aab22428727228fab7328 (patch)
treea1202408d299a59219ffdbc10ecb928b96e04929
parentb77a0535c47fa1c1ddc70cfdc5f44b40d4b317ef (diff)
downloadaur-3c6470a56aa540397b7aab22428727228fab7328.tar.gz
static build fix for graphite2 dep
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD52
2 files changed, 39 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f1bfc096f8c5..ea28919e0f4f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Wed Oct 12 10:24:05 UTC 2016
+# Sat Oct 22 00:54:27 UTC 2016
pkgbase = mingw-w64-harfbuzz
pkgdesc = OpenType text shaping engine (mingw-w64)
pkgver = 1.3.2
- pkgrel = 1
+ pkgrel = 2
url = http://www.freedesktop.org/wiki/Software/HarfBuzz
arch = any
license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index f55b5877117e..042609938242 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
pkgbase=mingw-w64-harfbuzz
pkgname=(mingw-w64-harfbuzz mingw-w64-harfbuzz-icu)
pkgver=1.3.2
-pkgrel=1
+pkgrel=2
pkgdesc="OpenType text shaping engine (mingw-w64)"
arch=(any)
url="http://www.freedesktop.org/wiki/Software/HarfBuzz"
@@ -25,25 +25,47 @@ build() {
cd harfbuzz-$pkgver
unset LDFLAGS
for _arch in ${_architectures}; do
- mkdir -p build-${_arch} && pushd build-${_arch}
- ${_arch}-configure \
- --with-glib \
- --with-freetype \
- --with-cairo \
- --with-icu \
- --with-gobject \
- --with-graphite2 \
- --disable-introspection
- make
- popd
+ # Build static and shared libs separately due to necessity of defining DGRAPHITE2_STATIC
+ # manually when building static version
+
+ # static build
+ mkdir -p build-${_arch}-static && pushd build-${_arch}-static
+ CFLAGS=-DGRAPHITE2_STATIC CXXFLAGS=-DGRAPHITE2_STATIC ${_arch}-configure \
+ --with-glib \
+ --with-freetype \
+ --with-cairo \
+ --with-icu \
+ --with-gobject \
+ --with-graphite2 \
+ --disable-introspection \
+ --enable-static=yes \
+ --enable-shared=no
+ make
+ popd
+ # shared build
+ mkdir -p build-${_arch}-shared && pushd build-${_arch}-shared
+ ${_arch}-configure \
+ --with-glib \
+ --with-freetype \
+ --with-cairo \
+ --with-icu \
+ --with-gobject \
+ --with-graphite2 \
+ --disable-introspection \
+ --enable-static=no \
+ --enable-shared=yes
+ make
+ popd
done
}
package_mingw-w64-harfbuzz() {
depends=(mingw-w64-freetype2 mingw-w64-glib2 mingw-w64-graphite)
for _arch in ${_architectures}; do
- cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}"
- make DESTDIR="${pkgdir}" install
+ cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}-static"
+ make DESTDIR="${pkgdir}" install
+ cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}-shared"
+ make DESTDIR="${pkgdir}" install
find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
@@ -60,7 +82,7 @@ package_mingw-w64-harfbuzz-icu() {
pkgdesc="OpenType text shaping engine (ICU integration) (mingw-w64)"
depends=(mingw-w64-harfbuzz mingw-w64-icu)
for _arch in ${_architectures}; do
- cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}"
+ cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}-shared"
mkdir -p "$pkgdir/usr/${_arch}"
mv hb-icu/usr/${_arch}/* "$pkgdir/usr/${_arch}"
done