summaryrefslogtreecommitdiff
path: root/user/json
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-11-25 09:24:05 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-11-29 04:55:35 -0600
commita45b7f9c5f1736c8dcb9e5a153bec776fe969dd8 (patch)
tree22278312b02cec2b4dfe16dbe8a39cc984c4a6c8 /user/json
parente8e4c45bebde294519a66b51ca6cf47c35e8f1bd (diff)
downloadpackages-a45b7f9c5f1736c8dcb9e5a153bec776fe969dd8.tar.gz
packages-a45b7f9c5f1736c8dcb9e5a153bec776fe969dd8.tar.bz2
packages-a45b7f9c5f1736c8dcb9e5a153bec776fe969dd8.tar.xz
packages-a45b7f9c5f1736c8dcb9e5a153bec776fe969dd8.zip
user/json: New package
Diffstat (limited to 'user/json')
-rw-r--r--user/json/APKBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/user/json/APKBUILD b/user/json/APKBUILD
new file mode 100644
index 000000000..750f3fbd1
--- /dev/null
+++ b/user/json/APKBUILD
@@ -0,0 +1,36 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=json
+pkgver=3.11.3
+pkgrel=0
+pkgdesc="JSON for Modern C++"
+url="https://json.nlohmann.me/"
+arch="noarch"
+license="MIT"
+depends=""
+makedepends="cmake"
+subpackages=""
+source="json-$pkgver.tar.gz::https://github.com/nlohmann/json/archive/refs/tags/v$pkgver.tar.gz"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ ${CMAKE_CROSSOPTS} \
+ -Bbuild
+ make DESTDIR="$pkgdir" -C build
+}
+
+check() {
+ cd build
+ CTEST_OUTPUT_ON_FAILURE=true ctest -E '(cmake_fetch*|test-unicode*)' -j${JOBS}
+}
+
+package() {
+ make DESTDIR="$pkgdir" -C build install
+}
+
+sha512sums="7df19b621de34f08d5d5c0a25e8225975980841ef2e48536abcf22526ed7fb99f88ad954a2cb823115db59ccc88d1dbe74fe6c281b5644b976b33fb78db9d717 json-3.11.3.tar.gz"