archrelease: copy trunk to extra-x86_64
[arch-packages.git] / graphite / repos / extra-x86_64 / PKGBUILD
blobd6ad33fb610b5d93b49521c87e532b2685b0c798
1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
3 pkgname=graphite
4 pkgver=1.3.14
5 pkgrel=2
6 epoch=1
7 arch=('x86_64')
8 url="https://github.com/silnrsi/graphite"
9 pkgdesc='reimplementation of the SIL Graphite text processing engine'
10 license=('LGPL' 'GPL' 'custom')
11 depends=('gcc-libs')
12 makedepends=('cmake' 'freetype2' 'python'
13              # for documentation
14              'doxygen' 'dblatex' 'graphviz' 'asciidoc')
15 checkdepends=('python-fonttools')
16 options=('!emptydirs')
17 # https://github.com/silnrsi/graphite/releases/download/1.3.14/graphite2-1.3.14.sha256sum
18 source=(https://github.com/silnrsi/graphite/releases/download/${pkgver}/graphite2-${pkgver}.tgz)
19 sha256sums=('f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d')
22 build() {
23   mkdir build
24   cd build
25   cmake -G "Unix Makefiles" ../graphite2-${pkgver} \
26         -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
27         -DCMAKE_INSTALL_PREFIX=/usr \
28         -DCMAKE_BUILD_TYPE:STRING=Release \
29         -DGRAPHITE2_COMPARE_RENDERER=OFF \
31   # fix unwanted -O3 cflag (taken form Debian)
32   find . -type f ! -name "rules" ! -name "changelog" -exec sed -i -e 's/\-O3//g' {} \;
34   make 
35   make -j1 docs
38 check() {
39   cd "${srcdir}"/build
40   ctest || true
43 package() {
44   cd "${srcdir}"/build
45   make DESTDIR="$pkgdir/" install
46   # install doc files
47   mkdir -p "${pkgdir}"/usr/share/doc/graphite2/api
48   cp -vrf doc/doxygen/{html,latex/refman.pdf} "${pkgdir}"/usr/share/doc/graphite2/api
49   cp -vrf doc/{GTF,manual}.html "${pkgdir}"/usr/share/doc/graphite2
51   # licenses
52   mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
53   install -m644 "${srcdir}"/graphite2-${pkgver}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/