aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-04-03 12:20:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-04-03 12:20:35 +0000
commit4b77b1489cc2fb839d9c3de341f3037cc3a1e758 (patch)
tree6721aaa39033bf2f2ba425811466bc3ddbae4c1c
parent532db1ca9399b82633d362312d01ceff87b42306 (diff)
downloadaports-4b77b1489cc2fb839d9c3de341f3037cc3a1e758.tar.gz
aports-4b77b1489cc2fb839d9c3de341f3037cc3a1e758.tar.bz2
aports-4b77b1489cc2fb839d9c3de341f3037cc3a1e758.tar.xz
main/jsoncpp: claim maintainership and use --default-library both
meson supports --default-library both which will build and install both shared and static libraries. This way we avoid build same sources twice.
-rw-r--r--main/jsoncpp/APKBUILD20
1 files changed, 8 insertions, 12 deletions
diff --git a/main/jsoncpp/APKBUILD b/main/jsoncpp/APKBUILD
index e67ffc7bfc..5798050b18 100644
--- a/main/jsoncpp/APKBUILD
+++ b/main/jsoncpp/APKBUILD
@@ -1,5 +1,4 @@
-# Contributor:
-# Maintainer:
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=jsoncpp
pkgver=1.8.4
pkgrel=1
@@ -8,7 +7,7 @@ url="https://github.com/open-source-parsers/jsoncpp"
arch="all"
license="Public-Domain"
makedepends="meson"
-subpackages="$pkgname-dev $pkgname-static"
+subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/open-source-parsers/jsoncpp/archive/$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver
@@ -16,27 +15,24 @@ build() {
cd "$builddir"
# we cannot use cmake since jsoncpp is a dependency for cmake which
# means we would get circular buildtime deps
- meson --prefix /usr --libdir /usr/lib --buildtype release --default-library shared . build-shared
- ninja -C build-shared
- meson --prefix /usr --libdir /usr/lib --buildtype release --default-library static . build-static
- ninja -C build-static
+ meson --prefix /usr --libdir /usr/lib --buildtype release --default-library both . build
+ ninja -C build
}
check() {
cd "$builddir"
- ninja -C build-shared test
- ninja -C build-static test
+ ninja -C build test
}
package() {
cd "$builddir"
- DESTDIR="$pkgdir" ninja -C build-shared install
- cp "$builddir"/build-static/libjsoncpp.a "$pkgdir"/usr/lib
+ DESTDIR="$pkgdir" ninja -C build install
}
static() {
pkgdesc="JsonCpp static library"
mkdir -p "$subpkgdir"/usr/lib
- cp "$builddir"/build-static/libjsoncpp.a "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
+
sha512sums="f70361a3263dd8b9441374a9a409462be1426c0d6587c865171a80448ab73b3f69de2b4d70d2f0c541764e1e6cccc727dd53178347901f625ec6fb54fb94f4f1 jsoncpp-1.8.4.tar.gz"