diff options
author | Julian Offenhäuser <offenhaeuser@protonmail.com> | 2023-02-08 12:12:44 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-08 19:06:42 +0000 |
commit | 1f207282a142b45077e635a01f0d9dca3233b9b6 (patch) | |
tree | ddb3f521b6e85f2e2be98dee73cd5fddbbb02127 /Ports | |
parent | 32e9293ce0e4964d5ba33f5c3d959b6e848a5620 (diff) | |
download | serenity-1f207282a142b45077e635a01f0d9dca3233b9b6.zip |
Ports: Add nlohmann-json
Diffstat (limited to 'Ports')
-rw-r--r-- | Ports/AvailablePorts.md | 1 | ||||
-rwxr-xr-x | Ports/nlohmann-json/package.sh | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index eea9144bac..90cdc07afa 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -180,6 +180,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`nethack`](nethack/) | nethack | 3.6.6 | https://www.nethack.org/ | | [`ninja`](ninja/) | Ninja | 1.11.0 | https://ninja-build.org/ | | [`nippon`](nippon/) | Nippon Safes Inc. | 1.0 | https://www.scummvm.org/games/#games-nippon | +| [`nlohmann-json`](nlohmann-json/) | JSON for Modern C++ | 3.11.2 | https://json.nlohmann.me/ | | [`npiet`](npiet/) | Piet language interpreter | 1.3f | https://www.bertnase.de/npiet/ | | [`npth`](npth/) | New GNU Portable Threads Library | 1.6 | https://gnupg.org/software/npth/index.html | | [`ntbtls`](ntbtls/) | The Not Too Bad TLS Library | 0.2.0 | https://gnupg.org/software/ntbtls/index.html | diff --git a/Ports/nlohmann-json/package.sh b/Ports/nlohmann-json/package.sh new file mode 100755 index 0000000000..bac9bbc033 --- /dev/null +++ b/Ports/nlohmann-json/package.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port='nlohmann-json' +version='3.11.2' +auth_type='sha256' +workdir="json-${version}" +files="https://github.com/nlohmann/json/archive/refs/tags/v${version}.tar.gz json-${version}.tar.gz d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273" +useconfigure='true' +configopts=( + "-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" + "-DJSON_BuildTests=OFF" +) + +configure() { + mkdir -p "${PORT_BUILD_DIR}/json-${version}-build" + cd "${PORT_BUILD_DIR}/json-${version}-build" + cmake "${configopts[@]}" "${PORT_BUILD_DIR}/json-${version}" +} + +build() { + cd "${PORT_BUILD_DIR}/json-${version}-build" + make "${makeopts[@]}" +} + +install() { + cd "${PORT_BUILD_DIR}/json-${version}-build" + make install +} |