Import mingw-w64-harfbuzz from AUR, use autotools
See https://aur.archlinux.org/pkgbase/mingw-w64-harfbuzz/#comment-824552
This commit is contained in:
parent
a1204cd899
commit
235f927e98
|
@ -1,50 +1,54 @@
|
||||||
# Contributor: Martchus <martchus@gmx.net>
|
# Maintainer: pingplug < aur at pingplug dot me >
|
||||||
|
# Contributor: Schala Zeal < schalaalexiazeal at gmail dot com >
|
||||||
|
|
||||||
|
_commit=9aa6f8a93f035dd0a1e3978da495d830049480c8 # tags/2.9.0
|
||||||
|
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
|
||||||
|
|
||||||
pkgbase=mingw-w64-harfbuzz
|
pkgbase=mingw-w64-harfbuzz
|
||||||
pkgname=(mingw-w64-harfbuzz mingw-w64-harfbuzz-icu)
|
pkgname=('mingw-w64-harfbuzz' 'mingw-w64-harfbuzz-icu')
|
||||||
pkgver=1.3.2
|
pkgver=2.9.0
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="OpenType text shaping engine (mingw-w64)"
|
pkgdesc="OpenType text shaping engine (mingw-w64)"
|
||||||
arch=(any)
|
arch=('any')
|
||||||
url="http://www.freedesktop.org/wiki/Software/HarfBuzz"
|
url="https://www.freedesktop.org/wiki/Software/HarfBuzz"
|
||||||
license=("MIT")
|
license=('MIT')
|
||||||
makedepends=(mingw-w64-configure mingw-w64-cairo mingw-w64-icu mingw-w64-graphite mingw-w64-freetype2)
|
depends=('mingw-w64-crt'
|
||||||
options=(!strip !buildflags staticlibs)
|
'mingw-w64-glib2'
|
||||||
source=("http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${pkgver}.tar.bz2")
|
'mingw-w64-graphite'
|
||||||
sha256sums=('8543a6372f08c5987c632dfaa86210c7edb3f43fbacd96095c609bc3539ce027')
|
'mingw-w64-freetype2')
|
||||||
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
|
makedepends=('mingw-w64-configure'
|
||||||
|
'mingw-w64-cairo'
|
||||||
|
'mingw-w64-icu'
|
||||||
|
'python'
|
||||||
|
'gtk-doc'
|
||||||
|
'ragel'
|
||||||
|
'git')
|
||||||
|
options=('!strip' 'staticlibs' '!buildflags')
|
||||||
|
source=("git+https://github.com/harfbuzz/harfbuzz.git#commit=${_commit}")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
prepare() {
|
pkgver() {
|
||||||
cd harfbuzz-${pkgver}
|
cd harfbuzz
|
||||||
# disable tests (thanks to chenxiaolong)
|
git describe --tags | sed 's/-/+/g'
|
||||||
sed -i '/SUBDIRS/s/test//' Makefile.am
|
|
||||||
autoreconf -fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd harfbuzz
|
||||||
|
# disable tests (thanks to chenxiaolong)
|
||||||
|
sed -i '/SUBDIRS/s/test//' Makefile.am
|
||||||
|
NOCONFIGURE=1 ./autogen.sh
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd harfbuzz-$pkgver
|
cd harfbuzz
|
||||||
unset LDFLAGS
|
|
||||||
for _arch in ${_architectures}; do
|
for _arch in ${_architectures}; do
|
||||||
# Build static and shared libs separately due to necessity of defining DGRAPHITE2_STATIC
|
# Build static and shared libs separately due to necessity of defining DGRAPHITE2_STATIC
|
||||||
# manually when building static version
|
# manually when building static version
|
||||||
|
|
||||||
# static build
|
# static build
|
||||||
mkdir -p build-${_arch}-static && pushd build-${_arch}-static
|
mkdir -p build-${_arch}-static && pushd build-${_arch}-static
|
||||||
CFLAGS=-DGRAPHITE2_STATIC CXXFLAGS=-DGRAPHITE2_STATIC ${_arch}-configure \
|
CFLAGS="${CFLAGS} -DGRAPHITE2_STATIC" \
|
||||||
--with-glib \
|
CXXFLAGS="${CXXFLAGS} -DGRAPHITE2_STATIC" \
|
||||||
--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 \
|
${_arch}-configure \
|
||||||
--with-glib \
|
--with-glib \
|
||||||
--with-freetype \
|
--with-freetype \
|
||||||
|
@ -52,7 +56,19 @@ build() {
|
||||||
--with-icu \
|
--with-icu \
|
||||||
--with-gobject \
|
--with-gobject \
|
||||||
--with-graphite2 \
|
--with-graphite2 \
|
||||||
--disable-introspection \
|
--enable-static=yes \
|
||||||
|
--enable-shared=no
|
||||||
|
make
|
||||||
|
popd
|
||||||
|
# shared build
|
||||||
|
mkdir -p build-${_arch}-shared && pushd build-${_arch}-shared
|
||||||
|
LDFLAGS=-lssp ${_arch}-configure \
|
||||||
|
--with-glib \
|
||||||
|
--with-freetype \
|
||||||
|
--with-cairo \
|
||||||
|
--with-icu \
|
||||||
|
--with-gobject \
|
||||||
|
--with-graphite2 \
|
||||||
--enable-static=no \
|
--enable-static=no \
|
||||||
--enable-shared=yes
|
--enable-shared=yes
|
||||||
make
|
make
|
||||||
|
@ -61,31 +77,32 @@ build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
package_mingw-w64-harfbuzz() {
|
package_mingw-w64-harfbuzz() {
|
||||||
depends=(mingw-w64-freetype2 mingw-w64-glib2 mingw-w64-graphite)
|
|
||||||
for _arch in ${_architectures}; do
|
for _arch in ${_architectures}; do
|
||||||
cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}-static"
|
cd "${srcdir}/harfbuzz/build-${_arch}-static"
|
||||||
make DESTDIR="${pkgdir}" install
|
make DESTDIR="${pkgdir}" install
|
||||||
cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}-shared"
|
cd "${srcdir}/harfbuzz/build-${_arch}-shared"
|
||||||
make DESTDIR="${pkgdir}" install
|
make DESTDIR="${pkgdir}" install
|
||||||
find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
|
find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec rm {} \;
|
||||||
find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
|
find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
|
||||||
find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
|
find "${pkgdir}/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
|
||||||
|
|
||||||
mkdir -p hb-icu/usr/${_arch}/{bin,include/harfbuzz,lib/pkgconfig}; cd hb-icu
|
mkdir -p hb-icu/usr/${_arch}/{bin,include/harfbuzz,lib/pkgconfig}; cd hb-icu
|
||||||
mv "$pkgdir"/usr/${_arch}/bin/libharfbuzz-icu* ./usr/${_arch}/bin
|
mv "${pkgdir}"/usr/${_arch}/bin/libharfbuzz-icu* ./usr/${_arch}/bin
|
||||||
mv "$pkgdir"/usr/${_arch}/lib/libharfbuzz-icu* ./usr/${_arch}/lib
|
mv "${pkgdir}"/usr/${_arch}/lib/libharfbuzz-icu* ./usr/${_arch}/lib
|
||||||
mv "$pkgdir"/usr/${_arch}/lib/pkgconfig/harfbuzz-icu.pc ./usr/${_arch}/lib/pkgconfig
|
mv "${pkgdir}"/usr/${_arch}/lib/pkgconfig/harfbuzz-icu.pc ./usr/${_arch}/lib/pkgconfig
|
||||||
mv "$pkgdir"/usr/${_arch}/include/harfbuzz/hb-icu.h ./usr/${_arch}/include/harfbuzz
|
mv "${pkgdir}"/usr/${_arch}/include/harfbuzz/hb-icu.h ./usr/${_arch}/include/harfbuzz
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
package_mingw-w64-harfbuzz-icu() {
|
package_mingw-w64-harfbuzz-icu() {
|
||||||
pkgdesc="OpenType text shaping engine (ICU integration) (mingw-w64)"
|
pkgdesc="OpenType text shaping engine (ICU integration, mingw-w64)"
|
||||||
depends=(mingw-w64-harfbuzz mingw-w64-icu)
|
depends=('mingw-w64-harfbuzz'
|
||||||
|
'mingw-w64-icu')
|
||||||
for _arch in ${_architectures}; do
|
for _arch in ${_architectures}; do
|
||||||
# shared build also includes static lib for ICU integration
|
cd "${srcdir}/harfbuzz/build-${_arch}-shared"
|
||||||
cd "${srcdir}/harfbuzz-${pkgver}/build-${_arch}-shared"
|
mkdir -p "${pkgdir}/usr/${_arch}"
|
||||||
mkdir -p "$pkgdir/usr/${_arch}"
|
mv hb-icu/usr/${_arch}/* "${pkgdir}/usr/${_arch}"
|
||||||
mv hb-icu/usr/${_arch}/* "$pkgdir/usr/${_arch}"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim:set ts=2 sw=2 et:
|
||||||
|
|
Loading…
Reference in New Issue