diff --git a/dev-cpp/cppdap/cppdap-1.58.0.recipe b/dev-cpp/cppdap/cppdap-1.58.0.recipe new file mode 100644 index 000000000..e36004866 --- /dev/null +++ b/dev-cpp/cppdap/cppdap-1.58.0.recipe @@ -0,0 +1,75 @@ +SUMMARY="C++ library for the Debug Adapter Protocol" +DESCRIPTION="cppdap is a C++11 library implementation of the Debug Adapter Protocol, providing \ +an API for implementing a DAP client or server." +HOMEPAGE="https://github.com/google/cppdap/" +COPYRIGHT="2019-2023 Google LLC" +LICENSE="Apache v2" +REVISION="1" +SOURCE_URI="https://github.com/google/cppdap/archive/dap-$portVersion-a.tar.gz" +CHECKSUM_SHA256="5d35ca5db78570b6bef698e3365f79bd82a4f78e8393546387f78d7bdb2a2a08" +SOURCE_DIR="cppdap-dap-$portVersion-a" +PATCHES="cppdap-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion}" + +PROVIDES=" + cppdap$secondaryArchSuffix = $portVersion + lib:libcppdap$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libstdc++$secondaryArchSuffix + " + +PROVIDES_devel=" + cppdap${secondaryArchSuffix}_devel = $portVersion + devel:libcppdap$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + cppdap$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:nlohmann_json + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +defineDebugInfoPackage cppdap$secondaryArchSuffix \ + $libDir/libcppdap.so + +BUILD() +{ + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ + -DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON \ + -DBUILD_SHARED_LIBS=ON \ + $cmakeDirArgs + cmake --build build $jobArgs +} + +INSTALL() +{ + cmake --install build + + prepareInstalledDevelLib libcppdap + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir \ + $libDir/cmake +} + +TEST() +{ + make -C build test +} diff --git a/dev-cpp/cppdap/patches/cppdap-1.58.0.patchset b/dev-cpp/cppdap/patches/cppdap-1.58.0.patchset new file mode 100644 index 000000000..e7b17cff2 --- /dev/null +++ b/dev-cpp/cppdap/patches/cppdap-1.58.0.patchset @@ -0,0 +1,24 @@ +From ddf570d8f6fb2bc6f7b5f9246de6eefa8af2efce Mon Sep 17 00:00:00 2001 +From: Julien Schueller +Date: Thu, 13 Jul 2023 19:36:52 +0200 +Subject: CMake: Allow to build dynamic lib + +This allows taking cmake BUILD_SHARED_LIBS option to decide whether to build a shared or static lib +This does not change the default (static) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 717f02e..3a14f59 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -226,7 +226,7 @@ endfunction(cppdap_set_target_options) + ########################################################### + + # dap +-add_library(cppdap STATIC ${CPPDAP_LIST}) ++add_library(cppdap ${CPPDAP_LIST}) + set_target_properties(cppdap PROPERTIES POSITION_INDEPENDENT_CODE 1) + + cppdap_set_target_options(cppdap) +-- +2.42.1 +