1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
3 # Contributor: Jeremy Cowgar <jeremy@cowgar.com>
6 pkgname=(check check-docs)
9 pkgdesc="A unit testing framework for C"
10 url="https://libcheck.github.io/check/"
13 makedepends=(git texlive-bin texi2html doxygen awk cmake)
14 _commit=11970a7e112dfe243a2e68773f014687df2900e8 # tags/0.15.2
15 source=("git+https://github.com/libcheck/check#commit=$_commit"
18 '1151c40e5bfb08e77175f30f79daadc8c07021c980589a6b33c6f1cf224e48df')
22 git describe --tags | sed 's/-/+/g'
28 # https://bugs.archlinux.org/task/68076
29 patch -Np1 -i ../no-static.diff
35 CFLAGS+=" -Wno-format-extra-args"
37 cmake -Hcheck -Bcmake \
38 -DCMAKE_INSTALL_PREFIX=/usr \
39 -DCMAKE_BUILD_TYPE=None \
40 -DCHECK_ENABLE_TIMEOUT_TESTS=OFF \
41 -DAWK_GSUB_DBL_BSLASH='\\\\'
45 ./configure --prefix=/usr --disable-timeout-tests
46 make all doc/doxygen doc/check_html
50 CTEST_OUTPUT_ON_FAILURE=1 cmake --build cmake --target test
58 optdepends=('check-docs: Documentation')
59 provides=(libcheck.so)
61 DESTDIR="$pkgdir" cmake --build cmake --target install
63 DESTDIR="$srcdir/tmp" make -C check install
64 mv tmp/usr/share/{aclocal,info} "$pkgdir/usr/share"
65 mv tmp/usr/share/doc .
69 package_check-docs() {
70 pkgdesc+=" (documentation)"
72 cp -a check/doc/doxygen/html doc/check/doxygen
73 cp -a check/doc/check_html doc/check/manual
75 mkdir -p "$pkgdir/usr/share"
76 mv doc "$pkgdir/usr/share"