diff --git a/0-compile-with-catch2-3.patch b/0-compile-with-catch2-3.patch new file mode 100644 index 0000000..54e1c85 --- /dev/null +++ b/0-compile-with-catch2-3.patch @@ -0,0 +1,114 @@ +diff -Naur cppzmq-4.9.0_org/tests/buffer.cpp cppzmq-4.9.0/tests/buffer.cpp +--- cppzmq-4.9.0_org/tests/buffer.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/buffer.cpp 2023-04-28 20:40:22.307761489 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + + #ifdef ZMQ_CPP17 +diff -Naur cppzmq-4.9.0_org/tests/CMakeLists.txt cppzmq-4.9.0/tests/CMakeLists.txt +--- cppzmq-4.9.0_org/tests/CMakeLists.txt 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/CMakeLists.txt 2023-04-28 22:46:00.142119663 +0800 +@@ -35,7 +35,7 @@ + target_include_directories(unit_tests PUBLIC ${CATCH_MODULE_PATH}) + target_link_libraries( + unit_tests +- PRIVATE Catch2::Catch2 ++ PRIVATE Catch2::Catch2WithMain + PRIVATE cppzmq + PRIVATE ${CMAKE_THREAD_LIBS_INIT} + ) +diff -Naur cppzmq-4.9.0_org/tests/codec_multipart.cpp cppzmq-4.9.0/tests/codec_multipart.cpp +--- cppzmq-4.9.0_org/tests/codec_multipart.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/codec_multipart.cpp 2023-04-28 20:40:22.306761487 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + + #ifdef ZMQ_CPP11 +diff -Naur cppzmq-4.9.0_org/tests/context.cpp cppzmq-4.9.0/tests/context.cpp +--- cppzmq-4.9.0_org/tests/context.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/context.cpp 2023-04-28 20:40:22.308761491 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + + #if (__cplusplus >= 201703L) +diff -Naur cppzmq-4.9.0_org/tests/message.cpp cppzmq-4.9.0/tests/message.cpp +--- cppzmq-4.9.0_org/tests/message.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/message.cpp 2023-04-28 20:40:22.308761491 +0800 +@@ -1,5 +1,5 @@ + #define CATCH_CONFIG_MAIN +-#include ++#include + #include + + #if defined(ZMQ_CPP11) +diff -Naur cppzmq-4.9.0_org/tests/multipart.cpp cppzmq-4.9.0/tests/multipart.cpp +--- cppzmq-4.9.0_org/tests/multipart.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/multipart.cpp 2023-04-28 20:40:22.307761489 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + + #ifdef ZMQ_HAS_RVALUE_REFS +diff -Naur cppzmq-4.9.0_org/tests/recv_multipart.cpp cppzmq-4.9.0/tests/recv_multipart.cpp +--- cppzmq-4.9.0_org/tests/recv_multipart.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/recv_multipart.cpp 2023-04-28 20:40:22.306761487 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + #ifdef ZMQ_CPP11 + +diff -Naur cppzmq-4.9.0_org/tests/send_multipart.cpp cppzmq-4.9.0/tests/send_multipart.cpp +--- cppzmq-4.9.0_org/tests/send_multipart.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/send_multipart.cpp 2023-04-28 20:40:22.306761487 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + #ifdef ZMQ_CPP11 + +diff -Naur cppzmq-4.9.0_org/tests/socket.cpp cppzmq-4.9.0/tests/socket.cpp +--- cppzmq-4.9.0_org/tests/socket.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/socket.cpp 2023-04-28 20:40:22.305761485 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + #ifdef ZMQ_CPP11 + #include +diff -Naur cppzmq-4.9.0_org/tests/socket_ref.cpp cppzmq-4.9.0/tests/socket_ref.cpp +--- cppzmq-4.9.0_org/tests/socket_ref.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/socket_ref.cpp 2023-04-28 20:40:22.308761491 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + #ifdef ZMQ_CPP11 + +diff -Naur cppzmq-4.9.0_org/tests/testutil.hpp cppzmq-4.9.0/tests/testutil.hpp +--- cppzmq-4.9.0_org/tests/testutil.hpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/testutil.hpp 2023-04-28 20:40:22.307761489 +0800 +@@ -1,6 +1,6 @@ + #pragma once + +-#include ++#include + #include + + #if defined(ZMQ_CPP11) +diff -Naur cppzmq-4.9.0_org/tests/utilities.cpp cppzmq-4.9.0/tests/utilities.cpp +--- cppzmq-4.9.0_org/tests/utilities.cpp 2023-04-28 20:39:19.847637133 +0800 ++++ cppzmq-4.9.0/tests/utilities.cpp 2023-04-28 20:40:22.308761491 +0800 +@@ -1,4 +1,4 @@ +-#include ++#include + #include + + #if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL) diff --git a/cppzmq.spec b/cppzmq.spec new file mode 100644 index 0000000..081fec5 --- /dev/null +++ b/cppzmq.spec @@ -0,0 +1,60 @@ +# Header-only library. +%global debug_package %{nil} + +Name: cppzmq +Version: 4.9.0 +Release: 1 +Summary: Header-only C++ binding for libzmq + +License: MIT +URL: https://zeromq.org +Source0: v%{version}.tar.gz + +Patch0: 0-compile-with-catch2-3.patch + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(libzmq) +BuildRequires: Catch2-devel +BuildRequires: zeromq-devel + +%global _description \ +cppzmq is a C++ binding for libzmq. \ +\ +cppzmq maps the libzmq C API to C++ concepts. In particular, it is type-safe, \ +provides exception-based error handling, and provides RAII-style classes that \ +automate resource management. cppzmq is a light-weight, header-only binding. + +%description %{_description} + +%package devel +Summary: %{summary} +Provides: %{name}-static = %{version}-%{release} + +Requires: pkgconfig(libzmq) + +%description devel %{_description} + +%prep +%autosetup -p1 + +%build +%cmake . +%make_build + +%install +%make_install + +%check +make test + +%files devel +%doc README.md +%license LICENSE +%{_includedir}/zmq*.hpp +%{_datadir}/cmake/%{name} +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +* Fri Apr 28 2023 will_niutao - 4.9.0-1 +- init package for openEuler diff --git a/v4.9.0.tar.gz b/v4.9.0.tar.gz new file mode 100644 index 0000000..c81dd28 Binary files /dev/null and b/v4.9.0.tar.gz differ