aboutsummaryrefslogtreecommitdiffstats
path: root/community/capnproto/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/capnproto/APKBUILD')
-rw-r--r--community/capnproto/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/community/capnproto/APKBUILD b/community/capnproto/APKBUILD
new file mode 100644
index 0000000000..8cf4f2e52e
--- /dev/null
+++ b/community/capnproto/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Nick Black <dankamongmen@gmail.com>
+# Maintainer: Luca Weiss <luca@z3ntu.xyz>
+pkgname=capnproto
+pkgver=0.8.0
+pkgrel=1
+pkgdesc="Tools for working with the Cap'n Proto format"
+url="https://capnproto.org/"
+arch="all"
+license="MIT"
+depends_dev="libucontext-dev"
+makedepends="$depends_dev cmake linux-headers"
+subpackages="$pkgname-dev"
+source="https://capnproto.org/$pkgname-c++-$pkgver.tar.gz
+ ucontext.patch"
+builddir="$srcdir/$pkgname-c++-$pkgver"
+
+case "$CARCH" in
+ mips*|s390x|armhf|armv7) options="!check";; # FAIL: capnp-test
+esac
+
+build() {
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=None \
+ .
+ cmake --build build
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+}
+
+# We want to move the schema compilers into the dev package.
+# See https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#dev.28.29
+dev() {
+ default_dev
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin
+}
+
+sha512sums="a32dbe6556a95761a5edc55237bd5558cb0ec08127f2fef1712076d5be4cd63e165a5d83b522307336bd3afeed1241f2c1e507830e8f12ac5dec78703a85417f capnproto-c++-0.8.0.tar.gz
+d2a3bd6a639356437a86e5e7fb4fe620a78b417cd20afd5b5b6fe672b95bdfa831cfaf176487cbbc2aed6345aa40dd5d7912ed05b3777b2407a0fd5bc89244f0 ucontext.patch"