# Contributor: Carlo Landmeter # Maintainer: pkgname=graphite2 pkgver=1.2.4 pkgrel=1 pkgdesc="reimplementation of the SIL Graphite text processing engine" url="http://projects.palaso.org/projects/graphitedev/" arch="all" license="LGPL" depends="" depends_dev="freetype-dev" makedepends="$depends_dev python cmake" install="" subpackages="$pkgname-dev" source="http://downloads.sourceforge.net/project/silgraphite/graphite2/graphite2-$pkgver.tgz" _builddir="$srcdir"/graphite2-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" mkdir build && cd build cmake -G "Unix Makefiles" .. \ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DGRAPHITE2_COMPARE_RENDERER=OFF \ -DGRAPHITE2_NFILEFACE=ON \ -DGRAPHITE2_NSEGCACHE=ON || return 1 # fix unwanted -O3 cflag (taken form Debian) find . -type f ! -name "rules" ! -name "changelog" -exec sed -i -e 's/\-O3//g' {} \; make || return 1 } package() { cd "$_builddir"/build make DESTDIR="$pkgdir/" install rm -f "$pkgdir"/usr/lib/*.la } md5sums="2ef839348fe28e3b923bf8cced440227 graphite2-1.2.4.tgz" sha256sums="4bc3d5168029bcc0aa00eb2c973269d29407be2796ff56f9c80e10736bd8b003 graphite2-1.2.4.tgz" sha512sums="fb4a7bfd5656233975ce339e4e155ccb4fd401b87e30440edab98739355596e41abf5dccf6487d53f6353840a7c87b8270ee33e79c6630cf13a25ac2cb2114de graphite2-1.2.4.tgz"