diff --git a/dev-cpp/yaml_cpp/patches/yaml_cpp-0.7.0.patchset b/dev-cpp/yaml_cpp/patches/yaml_cpp-0.7.0.patchset new file mode 100644 index 000000000..b7a396ce1 --- /dev/null +++ b/dev-cpp/yaml_cpp/patches/yaml_cpp-0.7.0.patchset @@ -0,0 +1,68 @@ +From 1e60d382b985276760bf889cc08142d95fee9d8e Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sun, 7 Nov 2021 20:05:21 +0000 +Subject: pkg-config patch + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b230b9e..c5c2457 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -148,13 +148,13 @@ if (YAML_CPP_INSTALL) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING PATTERN "*.h") + install(EXPORT yaml-cpp-targets +- DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/yaml-cpp") + install(FILES + "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" + "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" +- DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/yaml-cpp") + install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp.pc" +- DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + endif() + + if(YAML_CPP_BUILD_TESTS) +-- +2.30.2 + + +From c40ddb0ecf2ded11913a598c31e3aef281534832 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sun, 7 Nov 2021 20:06:24 +0000 +Subject: gtest patch + + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 5ebc1a6..f02c2bb 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -1,13 +1,10 @@ + find_package(Threads REQUIRED) ++find_package(GTest REQUIRED CONFIG) + + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + set(BUILD_MOCK ON CACHE BOOL "" FORCE) + set(CMAKE_POLICY_DEFAULT_CMP0048 NEW) + +-add_subdirectory( +- "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0" +- "${CMAKE_CURRENT_BINARY_DIR}/prefix") +- + include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0/googletest/include") + + set(test-new-api-pattern "new-api/*.cpp") +@@ -38,7 +35,7 @@ target_link_libraries(yaml-cpp-tests + PRIVATE + Threads::Threads + yaml-cpp +- gmock) ++ GTest::gmock) + + set_property(TARGET yaml-cpp-tests PROPERTY CXX_STANDARD_REQUIRED ON) + if (NOT DEFINED CMAKE_CXX_STANDARD) +-- +2.30.2 + diff --git a/dev-cpp/yaml_cpp/yaml_cpp-0.5.3.recipe b/dev-cpp/yaml_cpp/yaml_cpp-0.5.3.recipe deleted file mode 100644 index beefec477..000000000 --- a/dev-cpp/yaml_cpp/yaml_cpp-0.5.3.recipe +++ /dev/null @@ -1,79 +0,0 @@ -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="2008 Jesse Beder" -LICENSE="MIT" -REVISION="2" -SOURCE_URI="https://github.com/jbeder/yaml-cpp/archive/release-$portVersion.tar.gz" -CHECKSUM_SHA256="3492d9c1f4319dfd5588f60caed7cec3f030f7984386c11ed4b39f8e3316d763" -SOURCE_DIR="yaml-cpp-release-$portVersion" - -ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - yaml_cpp$secondaryArchSuffix = $portVersion compat >= 0.5 - lib:libyaml_cpp$secondaryArchSuffix = $portVersion compat >= 0.5 - " -REQUIRES=" - haiku$secondaryArchSuffix - " - -PROVIDES_devel=" - yaml_cpp${secondaryArchSuffix}_devel = $portVersion compat >= 0.5 - devel:libyaml_cpp$secondaryArchSuffix = $portVersion compat >= 0.5 - " -REQUIRES_devel=" - yaml_cpp$secondaryArchSuffix == $portVersion - devel:libboost_system$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libboost_system$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:cmake - cmd:gcc${secondaryArchSuffix} - cmd:ld${secondaryArchSuffix} - cmd:make - " - -BUILD() -{ - cmake -DBUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TOOLS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$prefix . - make $jobArgs -} - -INSTALL() -{ - 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 - - prepareInstalledDevelLibs \ - 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) - cmake -DBUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TOOLS=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=$prefix . - make $jobArgs - cd test - ./run-tests -} diff --git a/dev-cpp/yaml_cpp/yaml_cpp-0.6.3.recipe b/dev-cpp/yaml_cpp/yaml_cpp-0.7.0.recipe similarity index 61% rename from dev-cpp/yaml_cpp/yaml_cpp-0.6.3.recipe rename to dev-cpp/yaml_cpp/yaml_cpp-0.7.0.recipe index 060722603..042f87b0e 100644 --- a/dev-cpp/yaml_cpp/yaml_cpp-0.6.3.recipe +++ b/dev-cpp/yaml_cpp/yaml_cpp-0.7.0.recipe @@ -4,15 +4,16 @@ DESCRIPTION="yaml-cpp is a YAML parser and emitter in C++ matching the YAML \ HOMEPAGE="https://github.com/jbeder/yaml-cpp" COPYRIGHT="2018 Jesse Beder" LICENSE="MIT" -REVISION="3" +REVISION="1" SOURCE_URI="https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-$portVersion.tar.gz" -CHECKSUM_SHA256="77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed" +CHECKSUM_SHA256="43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3" SOURCE_DIR="yaml-cpp-yaml-cpp-$portVersion" +PATCHES="yaml_cpp-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" -libVersion="0.6.0" +libVersion="$portVersion" libVersionCompat="$libVersion compat >= ${libVersion%.*}" PROVIDES=" @@ -41,32 +42,25 @@ BUILD_PREREQUIRES=" cmd:ld$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix + cmd:which " -PATCH() -{ - sed -i "/INCLUDE_INSTALL_ROOT_DIR/ \ - s|include|$relativeIncludeDir|" CMakeLists.txt -} - BUILD() { - mkdir -p build && cd "$_" - cmake .. \ + rm -r test/gtest-* + cmake -B build -S . \ + $cmakeDirArgs \ -DBUILD_SHARED_LIBS=ON \ -DYAML_BUILD_SHARED_LIBS=ON \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Release \ -DYAML_CPP_BUILD_TOOLS=OFF \ - -DYAML_CPP_BUILD_TESTS=OFF \ - -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ - -DLIB_SUFFIX="$secondaryArchSubDir" - make $jobArgs + -DYAML_CPP_BUILD_TESTS=ON + make -C build $jobArgs } INSTALL() { - cd build - make install + make -C build install prepareInstalledDevelLib libyaml-cpp fixPkgconfig @@ -77,19 +71,6 @@ INSTALL() 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) - - cd build - - 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 + cd build/test + ./yaml-cpp-tests }