diff --git a/dev-libs/jsoncpp/jsoncpp-1.8.3.recipe b/dev-libs/jsoncpp/jsoncpp-1.8.4.recipe similarity index 53% rename from dev-libs/jsoncpp/jsoncpp-1.8.3.recipe rename to dev-libs/jsoncpp/jsoncpp-1.8.4.recipe index 27ee1a81b..b429bbd9d 100644 --- a/dev-libs/jsoncpp/jsoncpp-1.8.3.recipe +++ b/dev-libs/jsoncpp/jsoncpp-1.8.4.recipe @@ -3,19 +3,23 @@ DESCRIPTION="JsonCpp is a C++ library that allows manipulating JSON values, \ including serialization and deserialization to and from strings. It can also \ preserve existing comment in unserialization/serialization steps, making it a \ convenient format to store user input files." -HOMEPAGE="https://github.com/open-source-parsers/jsoncpp/" -COPYRIGHT="2007-2010 Baptiste Lepilleur" +HOMEPAGE="https://github.com/open-source-parsers/jsoncpp" +COPYRIGHT="2007-2018 Baptiste Lepilleur and The JsonCpp Authors" LICENSE="MIT" REVISION="1" SOURCE_URI="https://github.com/open-source-parsers/jsoncpp/archive/$portVersion.tar.gz" -CHECKSUM_SHA256="3671ba6051e0f30849942cc66d1798fdf0362d089343a83f704c09ee7156604f" +CHECKSUM_SHA256="c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6" +SOURCE_FILENAME="jsoncpp-$portVersion.tar.gz" ARCHITECTURES="!x86_gcc2 ?x86 x86_64" -SECONDARY_ARCHITECTURES="?x86" +SECONDARY_ARCHITECTURES="x86" + +libVersion=20 +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" jsoncpp$secondaryArchSuffix = $portVersion - lib:libjsoncpp$secondaryArchSuffix = $portVersion + lib:libjsoncpp$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix @@ -23,8 +27,7 @@ REQUIRES=" PROVIDES_devel=" jsoncpp${secondaryArchSuffix}_devel = $portVersion - devel:libjsoncpp$secondaryArchSuffix = $portVersion - devel:libjsoncpp_static$secondaryArchSuffix = $portVersion + devel:libjsoncpp$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" jsoncpp$secondaryArchSuffix == $portVersion base @@ -34,32 +37,30 @@ BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" - cmd:cmake cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix - cmd:make + cmd:meson + cmd:ninja cmd:pkg_config$secondaryArchSuffix cmd:python2 " BUILD() { - mkdir -p build && cd build - - cmake $cmakeDirArgs \ - -DCMAKE_BUILD_TYPE='Release' \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DJSONCPP_WITH_TESTS=ON \ - .. - make $jobArgs + for i in shared static; do + meson --prefix="$prefix" --libdir="$libDir" --includedir="$includeDir" \ + --buildtype release \ + --default-library $i . build-$i + ninja -C build-$i $jobArgs + done } INSTALL() { - cd build - make install + ninja -C build-shared install + ninja -C build-static install - prepareInstalledDevelLib libjsoncpp* + prepareInstalledDevelLib libjsoncpp fixPkgconfig # devel package @@ -69,6 +70,6 @@ INSTALL() TEST() { - cd build - make jsoncpp_check + LIBRARY_PATH="$sourceDir/build-shared${LIBRARY_PATH:+:$LIBRARY_PATH}" \ + ninja -C build-shared test }