aports/testing/cmocka/APKBUILD
Jakub Jirutka bcbcb71d7a testing/cmocka: disable on aarch64 due to build error
[  1%] Building C object src/CMakeFiles/cmocka_shared.dir/cmocka.c.o
[  3%] Building C object src/CMakeFiles/cmocka_static.dir/cmocka.c.o
In file included from /home/buildozer/aports/testing/cmocka/src/cmocka-1.1.0/src/cmocka.c:61:0:
/home/buildozer/aports/testing/cmocka/src/cmocka-1.1.0/include/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
       typedef unsigned int uintptr_t;
                            ^~~~~~~~~
In file included from /home/buildozer/aports/testing/cmocka/src/cmocka-1.1.0/src/cmocka.c:61:0:
/home/buildozer/aports/testing/cmocka/src/cmocka-1.1.0/include/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
       typedef unsigned int uintptr_t;
                            ^~~~~~~~~
In file included from /usr/include/stdint.h:20:0,
                 from /usr/include/inttypes.h:9,
                 from /home/buildozer/aports/testing/cmocka/src/cmocka-1.1.0/src/cmocka.c:27:
/usr/include/bits/alltypes.h:109:24: note: previous declaration of 'uintptr_t' was here
 typedef unsigned _Addr uintptr_t;
                        ^~~~~~~~~
In file included from /usr/include/stdint.h:20:0,
                 from /usr/include/inttypes.h:9,
                 from /home/buildozer/aports/testing/cmocka/src/cmocka-1.1.0/src/cmocka.c:27:
/usr/include/bits/alltypes.h:109:24: note: previous declaration of 'uintptr_t' was here
 typedef unsigned _Addr uintptr_t;
2016-10-02 21:32:35 +02:00

38 lines
1.0 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=cmocka
pkgver=1.1.0
pkgrel=0
pkgdesc="An elegant unit testing framework for C with support for mock objects"
url="https://cmocka.org/"
arch="all !aarch64"
license="ASL-2.0"
depends=""
makedepends="cmake"
source="https://cmocka.org/files/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
mkdir build; cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DUNIT_TESTING=ON \
|| return 1
make && make test
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
md5sums="59c9aa5735d9387fb591925ec53523ec cmocka-1.1.0.tar.xz"
sha256sums="e960d3bf1be618634a4b924f18bb4d6f20a825c109a8ad6d1af03913ba421330 cmocka-1.1.0.tar.xz"
sha512sums="b45b6c6bf6c1a0e12cbbfa203afc0172aa53215e0bd43a21b30db04c0490609a7a262f1b4d87be9df0c5c486c4f4891d3432e0e053418d373d9750a6cf5adf70 cmocka-1.1.0.tar.xz"