archrelease: copy trunk to extra-x86_64
[arch-packages.git] / graphite / repos / extra-x86_64 / PKGBUILD
blob7715030e068eab42481ccd3b0180cb31be55b492
1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
3 pkgbase=graphite
4 pkgname=(graphite graphite-docs)
5 pkgver=1.3.14
6 pkgrel=3
7 epoch=1
8 arch=('x86_64')
9 url="https://github.com/silnrsi/graphite"
10 pkgdesc='reimplementation of the SIL Graphite text processing engine'
11 license=('LGPL' 'GPL' 'custom')
12 depends=('gcc-libs')
13 makedepends=('cmake' 'freetype2' 'python'
14              # for documentation
15              'doxygen' 'dblatex' 'graphviz' 'asciidoc')
16 checkdepends=('python-fonttools')
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')
21 build() {
22   local cmake_options=(
23     -DCMAKE_BUILD_TYPE=None
24     -DCMAKE_INSTALL_PREFIX=/usr
25     -DCMAKE_SKIP_INSTALL_RPATH=ON
26     -DGRAPHITE2_COMPARE_RENDERER=OFF
27     -DGRAPHITE2_VM_TYPE=direct
28   )
30   cmake -S graphite2-${pkgver} -B build "${cmake_options[@]}"
31   cmake --build build
32   cmake --build build -t docs -j1
35 check() {
36   cd build
37   ctest --output-on-failure --stop-on-failure -j$(nproc)
40 package_graphite() {
41   optdepends=('graphite-docs: Documentation')
42   provides=('libgraphite2.so')
44   DESTDIR="$pkgdir" cmake --install build
46   # licenses
47   install -Dm644 graphite2-${pkgver}/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
50 package_graphite-docs() {
51   pkgdesc+=" (documentation)"
52   depends=()
54   local docdir="${pkgdir}/usr/share/doc/${pkgbase}"
55   mkdir -p "${docdir}/api"
56   cp -vrf build/doc/doxygen/{html,latex/refman.pdf} "${docdir}/api"
57   cp -vrf build/doc/{GTF,manual}.html "${docdir}"
59   # licenses
60   install -Dm644 graphite2-${pkgver}/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
63 # vim:set sw=2 sts=-1 et: