From 1878b72042b58a325b550484e30c6711ab75ba5e Mon Sep 17 00:00:00 2001 From: miqlas Date: Sat, 10 Jun 2017 09:12:41 +0200 Subject: [PATCH] jsoncpp: new recipe (#1404) --- dev-libs/jsoncpp/jsoncpp-1.8.0.recipe | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 dev-libs/jsoncpp/jsoncpp-1.8.0.recipe diff --git a/dev-libs/jsoncpp/jsoncpp-1.8.0.recipe b/dev-libs/jsoncpp/jsoncpp-1.8.0.recipe new file mode 100644 index 000000000..29962d90e --- /dev/null +++ b/dev-libs/jsoncpp/jsoncpp-1.8.0.recipe @@ -0,0 +1,74 @@ +SUMMARY="A C++ library for interacting with JSON" +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" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/open-source-parsers/jsoncpp/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="5deb2462cbf0c0121c9d6c9823ec72fe71417e34242e3509bc7c003d526465bc" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + jsoncpp$secondaryArchSuffix = $portVersion + lib:libjsoncpp$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + jsoncpp${secondaryArchSuffix}_devel = $portVersion + devel:libjsoncpp$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + jsoncpp$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix +# cmd:python2 + " + +BUILD() +{ + mkdir -p build && cd build + + cmake -DCMAKE_INSTALL_PREFIX=$prefix \ + -DCMAKE_BUILD_TYPE='Release' \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + .. + make $jobArgs +} + +INSTALL() +{ + cd build + make install + + mkdir -p $includeDir + mv $prefix/include/* $includeDir/ + rm -rf $prefix/include + + mkdir -p $developLibDir/pkgconfig + mv $libDir/pkgconfig/*.pc $developLibDir/pkgconfig/ + rm -rf $libDir/pkgconfig + + fixPkgconfig + prepareInstalledDevelLib libjsoncpp + + # devel package + packageEntries devel \ + $developDir +}