core/harfbuzz/PKGBUILD

71 lines
1.6 KiB
Bash
Raw Normal View History

2015-12-17 18:29:35 +08:00
pkgbase=(harfbuzz)
pkgname=(harfbuzz harfbuzz-icu)
2017-07-30 11:36:21 +08:00
pkgver=1.4.7
pkgrel=2
2015-12-17 18:29:35 +08:00
pkgdesc="OpenType text shaping engine"
url="http://www.freedesktop.org/wiki/Software/HarfBuzz"
2017-07-30 11:36:21 +08:00
arch=(x86_64)
2015-12-17 18:29:35 +08:00
license=(MIT)
2017-07-30 11:36:21 +08:00
makedepends=(glib2 freetype2 graphite cairo icu gobject-introspection gtk-doc ragel git
python2)
_commit=fc15e60eadfc89aca5b8815262b8ee888f285169 # tags/1.4.7^0
source=("git+https://anongit.freedesktop.org/git/harfbuzz#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd $pkgbase
git describe --tags | sed 's/-/+/g'
}
2015-12-17 18:29:35 +08:00
prepare() {
mkdir path
ln -s /usr/bin/python2 path/python
2017-07-30 11:36:21 +08:00
cd $pkgbase
2016-03-15 08:00:20 +08:00
NOCONFIGURE=1 ./autogen.sh
2015-12-17 18:29:35 +08:00
}
2015-12-17 18:29:35 +08:00
build() {
2017-07-30 11:36:21 +08:00
cd $pkgbase
./configure \
--prefix=/usr \
--with-cairo \
--with-freetype \
--with-glib \
--with-gobject \
--with-graphite2 \
--with-icu \
--enable-gtk-doc
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
2015-12-17 18:29:35 +08:00
check() {
2017-07-30 11:36:21 +08:00
cd $pkgbase
make check
2015-12-17 18:29:35 +08:00
}
package_harfbuzz() {
2016-03-29 02:36:09 +08:00
depends=(glib2 freetype2 graphite)
2015-12-17 18:29:35 +08:00
optdepends=('cairo: hb-view program')
2017-07-30 11:36:21 +08:00
cd $pkgbase
2015-12-17 18:29:35 +08:00
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/harfbuzz/COPYING"
# Split harfbuzz-icu
mkdir -p ../hb-icu/usr/{include/harfbuzz,lib/pkgconfig}; cd ../hb-icu
mv "$pkgdir"/usr/lib/libharfbuzz-icu* ./usr/lib
mv "$pkgdir"/usr/lib/pkgconfig/harfbuzz-icu.pc ./usr/lib/pkgconfig
mv "$pkgdir"/usr/include/harfbuzz/hb-icu.h ./usr/include/harfbuzz
}
2017-07-30 11:36:21 +08:00
package_harfbuzz-icu() {
2015-12-17 18:29:35 +08:00
pkgdesc="$pkgdesc (ICU integration)"
depends=(harfbuzz icu)
mv hb-icu/* "$pkgdir"
2017-07-30 11:36:21 +08:00
install -Dm644 $pkgbase/COPYING "$pkgdir/usr/share/licenses/harfbuzz-icu/COPYING"
}