From 3d548530e525db7267fa4f2dcaca4486b3c70bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Sun, 19 Nov 2017 17:37:09 +0100 Subject: main/jsoncpp: upgrade to 1.8.3 and switch to meson --- main/jsoncpp/APKBUILD | 43 ++++++++++++---------------------------- main/jsoncpp/secure_memory.patch | 21 ++++++++++++++++++++ 2 files changed, 34 insertions(+), 30 deletions(-) create mode 100644 main/jsoncpp/secure_memory.patch (limited to 'main/jsoncpp') diff --git a/main/jsoncpp/APKBUILD b/main/jsoncpp/APKBUILD index f95fb0a187..ec555cbc19 100644 --- a/main/jsoncpp/APKBUILD +++ b/main/jsoncpp/APKBUILD @@ -1,53 +1,36 @@ # Contributor: William Pitcock # Maintainer: William Pitcock pkgname=jsoncpp -pkgver=1.8.1 -pkgrel=1 +pkgver=1.8.3 +pkgrel=0 pkgdesc="JSON C++ library" url="https://github.com/open-source-parsers/jsoncpp" arch="all" license="PublicDomain" -makedepends="scons python2-dev" +makedepends="meson" subpackages="$pkgname-dev" -source="$pkgname-$pkgver.tar.gz::https://github.com/open-source-parsers/jsoncpp/archive/$pkgver.tar.gz" -builddir="$srcdir"/jsoncpp-$pkgver +source="$pkgname-$pkgver.tar.gz::https://github.com/open-source-parsers/jsoncpp/archive/$pkgver.tar.gz + secure_memory.patch + " +builddir="$srcdir"/$pkgname-$pkgver build() { cd "$builddir" # we cannot use cmake since jsoncpp is a dependency for cmake which # means we would get circular buildtime deps - scons platform=linux-gcc - - # build a proper shared lib - g++ -o libjsoncpp.so.0.0.0 -shared -Wl,-soname,libjsoncpp.so.0 \ - buildscons/linux-gcc-*/src/lib_json/*.os -lpthread - + meson --prefix /usr --libdir /usr/lib --buildtype release --default-library shared . build + ninja -C build } check() { cd "$builddir" - scons check platform=linux-gcc + ninja -C build test } package() { cd "$builddir" - - mkdir -p "$pkgdir"/usr/lib - cp "$builddir"/libjsoncpp.so.0.0.0 "$pkgdir"/usr/lib/ - ln -s libjsoncpp.so.0.0.0 "$pkgdir"/usr/lib/libjsoncpp.so.0 - ln -s libjsoncpp.so.0.0.0 "$pkgdir"/usr/lib/libjsoncpp.so - - mkdir -p "$pkgdir"/usr/include/jsoncpp - cp -r "$builddir"/include/json/* "$pkgdir"/usr/include/jsoncpp/ - ln -s jsoncpp "$pkgdir"/usr/include/json - - mkdir -p "$pkgdir"/usr/lib/pkgconfig - sed -e 's:@CMAKE_INSTALL_PREFIX@:/usr:g' \ - -e 's:@LIBRARY_INSTALL_DIR@:lib:g' \ - -e 's:@INCLUDE_INSTALL_DIR@:include/jsoncpp:g'\ - -e "s:@JSONCPP_VERSION@:$pkgver:g"\ - pkg-config/jsoncpp.pc.in \ - > "$pkgdir"/usr/lib/pkgconfig/jsoncpp.pc + DESTDIR="$pkgdir" ninja -C build install } -sha512sums="4203826fca4c366b51d28ffc928399c914ffaba8be1cada64ff118b5742e6b469d3fc3e59344587d851447857b479794c5697d4fd11a9a55b32a3a7a801b745b jsoncpp-1.8.1.tar.gz" +sha512sums="a5170ccbc440c1bd2b365e34f7367a55731d4fa86b2d323d11431cead771127364bad9d8e2e59dcbe41bc111d11a5da94988dec5e40b9119f793f43e487d7429 jsoncpp-1.8.3.tar.gz +65aefb90d9df23c44600cfa483d3eb4eb9c7d657650facff61aef11030361fd386003306e7d2e7ffbd0bea00dfda0ef4be10ce6396b6bf858ee1b65157331beb secure_memory.patch" diff --git a/main/jsoncpp/secure_memory.patch b/main/jsoncpp/secure_memory.patch new file mode 100644 index 0000000000..baee14a178 --- /dev/null +++ b/main/jsoncpp/secure_memory.patch @@ -0,0 +1,21 @@ +From 49da91c786855228158cb8937c972cd741bd4c79 Mon Sep 17 00:00:00 2001 +From: Martin Dagarin +Date: Mon, 4 Sep 2017 21:10:15 +0200 +Subject: [PATCH] Fixed compile bug + +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/meson.build b/meson.build +index f2a6800f..f193fec5 100644 +--- a/meson.build ++++ b/meson.build +@@ -18,6 +18,7 @@ jsoncpp_cdata.set('JSONCPP_VERSION', meson.project_version()) + jsoncpp_cdata.set('JSONCPP_VERSION_MAJOR', jsoncpp_major_version) + jsoncpp_cdata.set('JSONCPP_VERSION_MINOR', jsoncpp_minor_version) + jsoncpp_cdata.set('JSONCPP_VERSION_PATCH', jsoncpp_patch_version) ++jsoncpp_cdata.set('JSONCPP_USE_SECURE_MEMORY',0) + + jsoncpp_gen_sources = configure_file( + input : 'src/lib_json/version.h.in', -- cgit v1.2.3