[packages/lib7zip] - handle gcc both pre-8 and 8+
qboosh
qboosh at pld-linux.org
Mon Dec 31 16:34:39 CET 2018
commit 2b368111963ef7ab84b83c6a760069242052df6f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Dec 31 16:39:26 2018 +0100
- handle gcc both pre-8 and 8+
lib7zip-warnings.patch | 11 -----------
lib7zip.spec | 10 +++++++---
2 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/lib7zip.spec b/lib7zip.spec
index 7f6d492..12d6d0a 100644
--- a/lib7zip.spec
+++ b/lib7zip.spec
@@ -11,12 +11,12 @@ Source0: https://github.com/stonewell/lib7zip/archive/%{version}/%{name}-%{versi
# Source0-md5: 2e7b0ec5f609f46f89e205a040a4aa5a
Source1: http://downloads.sourceforge.net/p7zip/p7zip_%{p7zip_version}_src_all.tar.bz2
# Source1-md5: a0128d661cfe7cc8c121e73519c54fbf
-Patch0: %{name}-warnings.patch
-Patch1: %{name}-install.patch
+Patch0: %{name}-install.patch
URL: https://github.com/stonewell/lib7zip
BuildRequires: cmake >= 2.8
# -std=c++14
BuildRequires: libstdc++-devel >= 6:5.0
+BuildRequires: sed >= 4.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -55,7 +55,11 @@ Statyczna biblioteka lib7zip.
%prep
%setup -q -a1
%patch0 -p1
-%patch1 -p1
+
+%if "%{cc_version}" < "8"
+# earlier versions don't know it
+%{__sed} -i -e 's/ -Wno-class-memaccess//' CMakeLists.txt
+%endif
%build
TOPDIR=$(pwd)
diff --git a/lib7zip-warnings.patch b/lib7zip-warnings.patch
deleted file mode 100644
index 762528c..0000000
--- a/lib7zip-warnings.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib7zip-3.0.0/CMakeLists.txt.orig 2018-09-04 07:35:37.000000000 +0200
-+++ lib7zip-3.0.0/CMakeLists.txt 2018-12-31 13:09:02.058335061 +0100
-@@ -39,7 +39,7 @@
-
-
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-- set(warnings "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-class-memaccess")
-+ set(warnings "-Wall -Wextra -Werror -Wno-unused-parameter")
- set(no_undefined "-Wl,--no-undefined")
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set(warnings "-Wall -Wextra -Werror -Wno-inconsistent-missing-override -Wno-unused-parameter")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lib7zip.git/commitdiff/2b368111963ef7ab84b83c6a760069242052df6f
More information about the pld-cvs-commit
mailing list