aboutsummaryrefslogtreecommitdiffstats
path: root/community/net-cpp/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/net-cpp/APKBUILD')
-rw-r--r--community/net-cpp/APKBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/community/net-cpp/APKBUILD b/community/net-cpp/APKBUILD
new file mode 100644
index 0000000000..64434223b9
--- /dev/null
+++ b/community/net-cpp/APKBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Luca Weiss <luca@z3ntu.xyz>
+pkgname=net-cpp
+pkgver=2.2.1
+pkgrel=1
+pkgdesc="A simple yet beautiful networking API for C++11"
+url="https://gitlab.com/ubports/core/lib-cpp/net-cpp"
+arch="all"
+license="LGPL-3.0-only"
+makedepends="cmake cmake-extras boost-dev curl-dev process-cpp-dev
+ properties-cpp-dev jsoncpp-dev gtest-dev"
+checkdepends="py3-httpbin"
+subpackages="$pkgname-dev"
+source="https://gitlab.com/ubports/core/lib-cpp/net-cpp/-/archive/$pkgver/net-cpp-$pkgver.tar.gz
+ 0001-Port-to-new-jsoncpp-API.patch
+ 0002-Don-t-bundle-httpbin-don-t-fail-silently.patch
+ 0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch
+ python-init.patch
+ "
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=None \
+ $CMAKE_CROSSOPTS .
+ cmake --build build
+}
+
+check() {
+ cd build
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+}
+
+sha512sums="bb2a3d1a142cdbac8cd797b76c66bfbf473f6de4d128c66c91c9bdcdcf81c19daaca2c10bb624fc9e029cb1ee37131baa6bfe8788b0f5c6f528d317c16a47710 net-cpp-2.2.1.tar.gz
+2893f20ef1028d016fccf77af6c24dbe1a7967a9e03cadbccc3cde18a0a0eb3b1f8ffb1f1b3afc7d9e4c046fb3b5d6cf907023638dcdb37273dd514c9139c99e 0001-Port-to-new-jsoncpp-API.patch
+ba4c2737504ddf9475a8a4c01fe31756dbc32d3bfb00c1a10e342cd2f7989cc87466c921d8430ff7003ebf48369d5daeb0ebeefc3d2b1955142d6a35681840e7 0002-Don-t-bundle-httpbin-don-t-fail-silently.patch
+357669776625f4476feaf76336a976c596572028e165d54eb5078baca42c2f8304e60a3898f4ce0b4494f9a40d303720e539a0da281f5f33159b8576b89d7d71 0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch
+28518bb713a4a93fde1e32d1ca57b028f0e71114799bbf62b104ebf263152ec4351f8c16d23cbf05b9b0b2fd568c5103500d0f58f9522abcb928cf1a30028593 python-init.patch"