diff --git a/dev-cpp/yaml_cpp/yaml_cpp-0.6.1.recipe b/dev-cpp/yaml_cpp/yaml_cpp-0.6.1.recipe new file mode 100644 index 000000000..5bfac9289 --- /dev/null +++ b/dev-cpp/yaml_cpp/yaml_cpp-0.6.1.recipe @@ -0,0 +1,94 @@ +SUMMARY="A YAML parser and emitter in C++" +DESCRIPTION="yaml-cpp is a YAML parser and emitter in C++ matching the YAML \ +1.2 spec." +HOMEPAGE="https://github.com/jbeder/yaml-cpp" +COPYRIGHT="2018 Jesse Beder" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-$portVersion.tar.gz" +CHECKSUM_SHA256="25ec37e6d82ab8c485926d69a5567741c7263515f8631e5dcb3fb4708e6b0d0d" +SOURCE_DIR="yaml-cpp-yaml-cpp-$portVersion" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +libVersion="0.6.0" +libVersionCompat="$libVersion compat >= ${libVersion%.*}" + +PROVIDES=" + yaml_cpp$secondaryArchSuffix = $portVersion + lib:libyaml_cpp$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + yaml_cpp${secondaryArchSuffix}_devel = $portVersion + devel:libyaml_cpp$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + yaml_cpp$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgtest$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + mkdir -p build && cd "$_" + cmake .. \ + -DBUILD_SHARED_LIBS=ON \ + -DYAML_CPP_BUILD_TOOLS=OFF \ + -DYAML_CPP_BUILD_TESTS=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH=$prefix + make $jobArgs +} + +INSTALL() +{ + cd build + make install + + mkdir -p `dirname $includeDir` $libDir + mv $prefix/include $includeDir + + if [ -n "$secondaryArchSuffix" ]; then + mv $prefix/lib/libyaml-cpp* $prefix/lib/pkgconfig $libDir/ + fi + + prepareInstalledDevelLib libyaml-cpp + fixPkgconfig + + packageEntries devel \ + $developDir +} + +TEST() +{ + # tests make the build considerably longer + # TODO: fail with: The current thread is not holding the mutex @0xf96b94 + # probably because gtest is not ported (also it uses bundled one) + + cp -r build build_test + cd build_test + + cmake .. \ + -DBUILD_SHARED_LIBS=ON \ + -DYAML_CPP_BUILD_TOOLS=ON \ + -DYAML_CPP_BUILD_TESTS=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=$prefix + + make $jobArgs + cd test + ./run-tests +}