db-move: moved xdg-desktop-portal-gnome from [testing] to [extra] (x86_64)
[arch-packages.git] / check / trunk / PKGBUILD
blob62b7a9ac3a24b6038f781d7cd04735c7612dc61c
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
3 # Contributor: Jeremy Cowgar <jeremy@cowgar.com>
5 pkgbase=check
6 pkgname=(check check-docs)
7 pkgver=0.15.2
8 pkgrel=2
9 pkgdesc="A unit testing framework for C"
10 url="https://libcheck.github.io/check/"
11 arch=(x86_64)
12 license=(LGPL)
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"
16         no-static.diff)
17 sha256sums=('SKIP'
18             '1151c40e5bfb08e77175f30f79daadc8c07021c980589a6b33c6f1cf224e48df')
20 pkgver() {
21   cd check
22   git describe --tags | sed 's/-/+/g'
25 prepare() {
26   cd check
28   # https://bugs.archlinux.org/task/68076
29   patch -Np1 -i ../no-static.diff
31   autoreconf -fvi
34 build() {
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='\\\\'
42   cmake --build cmake
44   cd check
45   ./configure --prefix=/usr --disable-timeout-tests
46   make all doc/doxygen doc/check_html
49 check() {
50   CTEST_OUTPUT_ON_FAILURE=1 cmake --build cmake --target test
52   cd check
53   make check
56 package_check() {
57   depends=(awk)
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 .
66   rm -rv tmp
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"