!2 next
From: @davidhan008 Reviewed-by: @anchuanxu Signed-off-by: @anchuanxu
This commit is contained in:
commit
e8704f98da
114
0-compile-with-catch2-3.patch
Normal file
114
0-compile-with-catch2-3.patch
Normal file
@ -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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq.hpp>
|
||||
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq_addon.hpp>
|
||||
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq.hpp>
|
||||
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq.hpp>
|
||||
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq_addon.hpp>
|
||||
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq_addon.hpp>
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq_addon.hpp>
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq.hpp>
|
||||
#ifdef ZMQ_CPP11
|
||||
#include <future>
|
||||
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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq.hpp>
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq.hpp>
|
||||
|
||||
#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 <catch2/catch.hpp>
|
||||
+#include <catch2/catch_all.hpp>
|
||||
#include <zmq.hpp>
|
||||
|
||||
#if defined(ZMQ_CPP11) && !defined(ZMQ_CPP11_PARTIAL)
|
||||
60
cppzmq.spec
Normal file
60
cppzmq.spec
Normal file
@ -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 <niutao2@huawei.com> - 4.9.0-1
|
||||
- init package for openEuler
|
||||
BIN
v4.9.0.tar.gz
Normal file
BIN
v4.9.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user