diff options
author | Konstantin Podshumok <kpp.live+signed@gmail.com> | 2020-05-18 20:47:20 +0300 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-06-08 19:56:01 +0200 |
commit | fca729a33472e3af4d8d54acedfe6a7da3f70640 (patch) | |
tree | 826f50ba3f3b547988ab9fc73697af001e850c18 /net-libs/cppzmq | |
parent | net-libs/cppzmq: drop old (diff) | |
download | gentoo-fca729a33472e3af4d8d54acedfe6a7da3f70640.tar.gz gentoo-fca729a33472e3af4d8d54acedfe6a7da3f70640.tar.bz2 gentoo-fca729a33472e3af4d8d54acedfe6a7da3f70640.zip |
net-libs/cppzmq: bump v4.6.0, add tests
Closes: https://bugs.gentoo.org/634076
Closes: https://github.com/gentoo/gentoo/pull/15868
Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-libs/cppzmq')
-rw-r--r-- | net-libs/cppzmq/Manifest | 1 | ||||
-rw-r--r-- | net-libs/cppzmq/cppzmq-4.6.0.ebuild | 45 | ||||
-rw-r--r-- | net-libs/cppzmq/files/cppzmq-disable-static.patch | 35 | ||||
-rw-r--r-- | net-libs/cppzmq/files/cppzmq-use-system-catch2.patch | 27 |
4 files changed, 108 insertions, 0 deletions
diff --git a/net-libs/cppzmq/Manifest b/net-libs/cppzmq/Manifest index cc3967202d1e..7bf6243468d0 100644 --- a/net-libs/cppzmq/Manifest +++ b/net-libs/cppzmq/Manifest @@ -1 +1,2 @@ DIST cppzmq-0_pre150606.tar.xz 4032 BLAKE2B 80918dc148d22a4ddced41bd9dbec2a39f5d69d73724177b186fda490b899ed7dbeaa5aa67a348411b5a34948b167f8def6dfe688a9facd2d56ca6fe41df32d3 SHA512 d5ab584989f0eec7ce227de4534820f6e00582b8f45ebab5472c8244823a14a89e74005edb8ae933037a1df9684cc21641cd271a147f39577331b96474927efe +DIST cppzmq-4.6.0.tar.gz 35078 BLAKE2B 282cc8db524eb76a35835db12ae1d5f18d7729149979afb9e7a364497b8fb1db1f65b4df5c0aa905440e260cc797d45e839fc61694560cf60c20f855e34eb2c0 SHA512 f30b37c970790de2684086638084e65310396072c1c1d00415c9a36b7ef6d79fe500ce174fddab699a602a80341e2fb7f309dec2eb96252531b5ca5cf7ac5027 diff --git a/net-libs/cppzmq/cppzmq-4.6.0.ebuild b/net-libs/cppzmq/cppzmq-4.6.0.ebuild new file mode 100644 index 000000000000..477975337ae1 --- /dev/null +++ b/net-libs/cppzmq/cppzmq-4.6.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="High-level CPP Binding for ZeroMQ" +HOMEPAGE="https://github.com/zeromq/cppzmq" +SRC_URI="https://github.com/zeromq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="MIT" +KEYWORDS="~amd64 ~x86 ~x86-linux" + +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=">=net-libs/zeromq-4.3.1" +# Tests require cmake modules from catch2 and headers from older version of catch +DEPEND="${RDEPEND} + test? ( >=dev-cpp/catch-2.5.0 + <dev-cpp/catch-2 + )" + +PATCHES=( + "${FILESDIR}/${PN}-disable-static.patch" + "${FILESDIR}/${PN}-use-system-catch2.patch" +) + +src_configure() { + local mycmakeargs=( + -DCPPZMQ_CMAKECONFIG_INSTALL_DIR="/usr/$(get_libdir)/cmake/${PN}/" + -DCPPZMQ_BUILD_TESTS="$(usex test)" + ) + if has_version -d '>=net-libs/zeromq-4.3.1[drafts]'; then + mycmakeargs+=( -DENABLE_DRAFTS=on ) + fi + cmake_src_configure +} + +src_install() { + cmake_src_install + einstalldocs +} diff --git a/net-libs/cppzmq/files/cppzmq-disable-static.patch b/net-libs/cppzmq/files/cppzmq-disable-static.patch new file mode 100644 index 000000000000..12b1c2231205 --- /dev/null +++ b/net-libs/cppzmq/files/cppzmq-disable-static.patch @@ -0,0 +1,35 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,7 @@ + message(FATAL_ERROR "ZeroMQ was not found, neither as a CMake package nor via pkg-config") + endif() + +-if (ZeroMQ_FOUND AND (NOT TARGET libzmq OR NOT TARGET libzmq-static)) ++if (ZeroMQ_FOUND AND NOT TARGET libzmq) + message(FATAL_ERROR "ZeroMQ version not supported!") + endif() + +@@ -43,19 +43,20 @@ + zmq_addon.hpp + ) + +-foreach (target cppzmq cppzmq-static) ++set (cppzmq_targets cppzmq cppzmq-static) ++ ++foreach (target ${cppzmq_targets}) + add_library(${target} INTERFACE) + target_include_directories(${target} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> + $<INSTALL_INTERFACE:include>) + endforeach() + + target_link_libraries(cppzmq INTERFACE libzmq) +-target_link_libraries(cppzmq-static INTERFACE libzmq-static) + + include(GNUInstallDirs) + include(CMakePackageConfigHelpers) + +-install(TARGETS cppzmq cppzmq-static ++install(TARGETS ${cppzmq_targets} + EXPORT ${PROJECT_NAME}-targets) + + install(FILES ${CPPZMQ_HEADERS} diff --git a/net-libs/cppzmq/files/cppzmq-use-system-catch2.patch b/net-libs/cppzmq/files/cppzmq-use-system-catch2.patch new file mode 100644 index 000000000000..b15b9172ad43 --- /dev/null +++ b/net-libs/cppzmq/files/cppzmq-use-system-catch2.patch @@ -0,0 +1,27 @@ +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -9,9 +9,10 @@ + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) + ++find_package(Catch2 REQUIRED) + include(CTest) +-include(cmake/catch.cmake) +-include(${CATCH_MODULE_PATH}/Catch.cmake) ++include(Catch) ++find_path(CATCH_INCLUDE_DIR "catch.hpp" HINT /usr/include/catch/) + + find_package(Threads) + +@@ -31,9 +32,9 @@ + utilities.cpp + ) + +-add_dependencies(unit_tests catch) ++add_dependencies(unit_tests Catch2::Catch2) + +-target_include_directories(unit_tests PUBLIC ${CATCH_MODULE_PATH}) ++target_include_directories(unit_tests PUBLIC ${CATCH_INCLUDE_DIR}) + target_link_libraries( + unit_tests + PRIVATE cppzmq |