New package: cppdap-1.58.0+a
This commit is contained in:
parent
b5a4915f7c
commit
6c3584b055
@ -4326,3 +4326,4 @@ libmimalloc.so.2 mimalloc-2.1.2_1
|
||||
lib2geom.so.1.3.0 lib2geom-1.3_1
|
||||
libdbi.so.1 libdbi-0.9.0_1
|
||||
libchafa.so.0 libchafa-1.12.5_1
|
||||
libcppdap.so cppdap-1.58.0+a_1
|
||||
|
1
srcpkgs/cppdap-devel
Symbolic link
1
srcpkgs/cppdap-devel
Symbolic link
@ -0,0 +1 @@
|
||||
cppdap
|
32
srcpkgs/cppdap/patches/gtest.patch
Normal file
32
srcpkgs/cppdap/patches/gtest.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -59,13 +59,6 @@ set_if_not_defined(CPPDAP_GOOGLETEST_DIR
|
||||
###########################################################
|
||||
# Submodules
|
||||
###########################################################
|
||||
-if(CPPDAP_BUILD_TESTS)
|
||||
- if(NOT EXISTS ${CPPDAP_GOOGLETEST_DIR}/.git)
|
||||
- message(WARNING "third_party/googletest submodule missing.")
|
||||
- message(WARNING "Run: `git submodule update --init` to build tests.")
|
||||
- set(CPPDAP_BUILD_TESTS OFF)
|
||||
- endif()
|
||||
-endif(CPPDAP_BUILD_TESTS)
|
||||
|
||||
###########################################################
|
||||
# JSON library
|
||||
@@ -289,7 +282,6 @@ if(CPPDAP_BUILD_TESTS)
|
||||
${CPPDAP_SRC_DIR}/traits_test.cpp
|
||||
${CPPDAP_SRC_DIR}/typeinfo_test.cpp
|
||||
${CPPDAP_SRC_DIR}/variant_test.cpp
|
||||
- ${CPPDAP_GOOGLETEST_DIR}/googletest/src/gtest-all.cc
|
||||
)
|
||||
|
||||
set(DAP_TEST_INCLUDE_DIR
|
||||
@@ -312,6 +304,7 @@ if(CPPDAP_BUILD_TESTS)
|
||||
|
||||
cppdap_set_target_options(cppdap-unittests)
|
||||
target_link_libraries(cppdap-unittests PRIVATE cppdap)
|
||||
+ target_link_libraries(cppdap-unittests PRIVATE gtest_main gtest)
|
||||
endif(CPPDAP_BUILD_TESTS)
|
||||
|
||||
# fuzzer
|
26
srcpkgs/cppdap/patches/no-freeaddrinfo-null.patch
Normal file
26
srcpkgs/cppdap/patches/no-freeaddrinfo-null.patch
Normal file
@ -0,0 +1,26 @@
|
||||
src/socket.cpp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/socket.cpp b/src/socket.cpp
|
||||
index 1211310..e9402d3 100644
|
||||
--- a/src/socket.cpp
|
||||
+++ b/src/socket.cpp
|
||||
@@ -108,7 +108,6 @@ class dap::Socket::Shared : public dap::ReaderWriter {
|
||||
return out;
|
||||
}
|
||||
|
||||
- freeaddrinfo(info);
|
||||
term();
|
||||
return nullptr;
|
||||
}
|
||||
@@ -117,7 +116,9 @@ class dap::Socket::Shared : public dap::ReaderWriter {
|
||||
Shared(addrinfo* info, SOCKET socket) : info(info), s(socket) {}
|
||||
|
||||
~Shared() {
|
||||
- freeaddrinfo(info);
|
||||
+ if (info) {
|
||||
+ freeaddrinfo(info);
|
||||
+ }
|
||||
close();
|
||||
term();
|
||||
}
|
39
srcpkgs/cppdap/template
Normal file
39
srcpkgs/cppdap/template
Normal file
@ -0,0 +1,39 @@
|
||||
# Template file for 'cppdap'
|
||||
#
|
||||
# As much as I know about Google, their library's ABI ain't stable.
|
||||
# Rebuild all revdeps on update
|
||||
pkgname=cppdap
|
||||
version=1.58.0+a
|
||||
revision=1
|
||||
build_style=cmake
|
||||
configure_args="-DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=On
|
||||
-DCPPDAP_BUILD_TESTS=On -DBUILD_SHARED_LIBS=On"
|
||||
makedepends="json-c++ gtest-devel"
|
||||
short_desc="C++ library for the Debug Adapter Protocol"
|
||||
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
||||
license="Apache-2.0"
|
||||
homepage="https://github.com/google/cppdap"
|
||||
distfiles="https://github.com/google/cppdap/archive/refs/tags/dap-${version/+/-}.tar.gz"
|
||||
checksum=5d35ca5db78570b6bef698e3365f79bd82a4f78e8393546387f78d7bdb2a2a08
|
||||
|
||||
post_patch() {
|
||||
vsed -i -e "/project.*VERSION/s/VERSION [0-9.]* /VERSION ${version%+*} /" \
|
||||
-e "/add_library/s/ STATIC / /" \
|
||||
CMakeLists.txt
|
||||
}
|
||||
|
||||
do_check() {
|
||||
cd build
|
||||
./cppdap-unittests
|
||||
}
|
||||
|
||||
cppdap-devel_package() {
|
||||
short_desc+=" - development files"
|
||||
depends="${sourcepkg}>=${version}_${revision} json-c++"
|
||||
pkg_install() {
|
||||
vmove usr/include
|
||||
vmove usr/lib/cmake
|
||||
# vmove "usr/lib/*.a"
|
||||
# vmove "usr/lib/*.so"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user