1 # Maintainer: David Runge <dvzrv@archlinux.org>
4 pkgname=(fltk fltk-docs)
7 pkgdesc="Graphical user interface toolkit for X"
10 url="https://www.fltk.org/"
27 source=(https://github.com/$pkgbase/$pkgbase/archive/release-$pkgver/$pkgbase-release-$pkgver.tar.gz)
28 sha512sums=('197848d3b80a65cca936daf4f0b74609f0fe8332a4cd11af53385fb2aa45ad698b1e239a48732b118cd3cb189bc531711b72fb2eeeb85be887dc6c5a558fa4b3')
29 b2sums=('d0a963a38b62ea8cf1d5fe57fab6664fc64083ff41f17847d737f71bfff08578c682deefb9847a9ab5b93210fce2afbfc2020bdfcde714947beac9b3f7c84358')
32 local p="$1" f d; shift
34 d="$srcdir/$p/${f#$pkgdir/}"
35 mkdir -p "$(dirname "$d")"
37 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
44 -D CMAKE_INSTALL_PREFIX=/usr
45 -D CMAKE_BUILD_TYPE=None
46 -D FLTK_LIBDIR=/usr/lib
47 -D OPTION_BUILD_SHARED_LIBS=ON
48 -D OPTION_BUILD_HTML_DOCUMENTATION=ON
49 -D OPTION_INSTALL_HTML_DOCUMENTATION=ON
50 -S $pkgbase-release-$pkgver
54 # fat-lto-objects is required for non-mangled .a files in fltk
55 CFLAGS+=" -ffat-lto-objects"
56 CXXFLAGS+=" -ffat-lto-objects"
58 cmake "${cmake_options[@]}"
59 cmake --build build --verbose
60 # build documentation explicitly as it is otherwise not generated/ installed
61 make VERBOSE=1 -C build/documentation html
65 ctest --test-dir build --output-on-failure
73 fontconfig libfontconfig.so
97 DESTDIR="$pkgdir" cmake --install build
98 install -vDm 644 $pkgbase-release-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
100 # remove man pages of examples
101 rm -rvf "$pkgdir/usr/share/man/man6"
105 _pick $pkgbase-docs usr/share/doc/$pkgname/html
109 package_fltk-docs() {
110 pkgdesc+=" - documentation"
112 mv -v $pkgname/* "$pkgdir"
113 install -vDm 644 $pkgbase-release-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"