diff --git a/zeromq-fix-cmake-warnings.patch b/zeromq-fix-cmake-warnings.patch new file mode 100644 index 0000000..8b228b6 --- /dev/null +++ b/zeromq-fix-cmake-warnings.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c64ccc1f..deae8efe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,12 +1,7 @@ + # CMake build script for ZeroMQ ++cmake_minimum_required(VERSION 3.5..3.27) + project(ZeroMQ) + +-if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin) +- cmake_minimum_required(VERSION 3.0.2) +-else() +- cmake_minimum_required(VERSION 2.8.12) +-endif() +- + include(CheckIncludeFiles) + include(CheckCCompilerFlag) + include(CheckCXXCompilerFlag) +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index c1bda3bd..ce157c1e 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,10 +1,15 @@ + # CMake build script for ZeroMQ tests +-cmake_minimum_required(VERSION "2.8.1") ++cmake_minimum_required(VERSION 3.5..3.27) + + # On Windows: solution file will be called tests.sln + project(tests) + + set(tests ++ test_bind_stream_fuzzer ++ test_bind_ws_fuzzer ++ test_connect_stream_fuzzer ++ test_connect_ws_fuzzer ++ test_socket_options_fuzzer + test_ancillaries + test_system + test_pair_inproc +diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt +index 7132f00b..f76c3a1b 100644 +--- a/unittests/CMakeLists.txt ++++ b/unittests/CMakeLists.txt +@@ -1,5 +1,5 @@ + # CMake build script for ZeroMQ unit tests +-cmake_minimum_required(VERSION "2.8.1") ++cmake_minimum_required(VERSION 3.5..3.27) + + set(unittests + unittest_ypipe diff --git a/zeromq.spec b/zeromq.spec index 97f48c5..0bc3d97 100644 --- a/zeromq.spec +++ b/zeromq.spec @@ -10,14 +10,12 @@ License: MPLv2.0 AND BSD-3-Clause AND MIT URL: https://zeromq.org Source0: https://github.com/%{name}/libzmq/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: make -BuildRequires: autoconf -BuildRequires: automake BuildRequires: gcc-c++ -BuildRequires: libtool +BuildRequires: cmake BuildRequires: asciidoc BuildRequires: xmlto BuildRequires: libsodium-devel +BuildRequires: gnutls-devel %if %{with unwind} BuildRequires: libunwind-devel @@ -28,6 +26,8 @@ BuildRequires: openpgm-devel BuildRequires: krb5-devel %endif +Patch0: zeromq-fix-cmake-warnings.patch + %description The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by @@ -60,37 +60,22 @@ chmod -x src/xsub.hpp %build -autoreconf -fi -%configure \ -%if %{with pgm} - --with-pgm \ - --with-libgssapi_krb5 \ -%endif - --with-libsodium \ -%if %{with unwind} - --enable-libunwind \ -%endif - --disable-Werror \ - --disable-static -%make_build +%cmake +#cmake -DENABLE_CURVE:BOOL=ON -DWITH_LIBSODIUM:BOOL=ON -DWITH_OPENPGM:BOOL=ON .. +%cmake_build %install -%make_install - -# remove *.la -rm %{buildroot}%{_libdir}/libzmq.la - +%cmake_install %check +%ifnarch s390x +%ctest +%endif %ifarch s390x make check V=1 || ( cat test-suite.log && exit 1 ) %endif - -%ldconfig_scriptlets - - %files %doc README.md AUTHORS NEWS %license LICENSE @@ -104,7 +89,7 @@ make check V=1 || ( cat test-suite.log && exit 1 ) %{_libdir}/libzmq.so %{_libdir}/pkgconfig/libzmq.pc %{_includedir}/zmq*.h - +%{_libdir}/cmake/ZeroMQ %changelog %autochangelog