[packages/lib7zip] - updated to 3.0.0 release - removed outdated link,ac patches - added warnings patch (adjust gcc opt

qboosh qboosh at pld-linux.org
Mon Dec 31 14:19:26 CET 2018


commit eff01e2a4595ec034bd71111af1e248cdc2ceb0f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Dec 31 14:24:13 2018 +0100

    - updated to 3.0.0 release
    - removed outdated link,ac patches
    - added warnings patch (adjust gcc options)
    - added install patch (set soname and install libraries)

 lib7zip-ac.patch       | 55 --------------------------------------------------
 lib7zip-install.patch  | 17 ++++++++++++++++
 lib7zip-link.patch     | 10 ---------
 lib7zip-warnings.patch | 11 ++++++++++
 lib7zip.spec           | 55 +++++++++++++++++++-------------------------------
 5 files changed, 49 insertions(+), 99 deletions(-)
---
diff --git a/lib7zip.spec b/lib7zip.spec
index ab90d80..7f6d492 100644
--- a/lib7zip.spec
+++ b/lib7zip.spec
@@ -2,25 +2,21 @@
 Summary:	A library using 7z.dll/7z.so (from 7-Zip) to handle different archive types
 Summary(pl.UTF-8):	Biblioteka wykorzystująca 7z.dll/7z.so (z 7-zipa) do obsługi różnych rodzajów archiwów
 Name:		lib7zip
-Version:	2.0.0
-%define	snap	20151119
-%define	gitref	5bc54cab38656fd57df7736087ef6914ddb68c72
-Release:	1.%{snap}.1
-License:	MPL v1.1
+Version:	3.0.0
+Release:	1
+License:	MPL v2.0
 Group:		Libraries
 #Source0Download: https://github.com/stonewell/lib7zip/releases
-Source0:	https://github.com/stonewell/lib7zip/archive/%{gitref}/%{name}-%{snap}.tar.gz
-# Source0-md5:	58675fae32445e701ebf8716b973dc3f
+Source0:	https://github.com/stonewell/lib7zip/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	2e7b0ec5f609f46f89e205a040a4aa5a
 Source1:	http://downloads.sourceforge.net/p7zip/p7zip_%{p7zip_version}_src_all.tar.bz2
 # Source1-md5:	a0128d661cfe7cc8c121e73519c54fbf
-Patch0:		%{name}-link.patch
-Patch1:		%{name}-ac.patch
+Patch0:		%{name}-warnings.patch
+Patch1:		%{name}-install.patch
 URL:		https://github.com/stonewell/lib7zip
-BuildRequires:	autoconf >= 2.50
-BuildRequires:	automake
-BuildRequires:	libstdc++-devel
-BuildRequires:	libtool >= 2:2.0
-BuildRequires:	sed >= 4.0
+BuildRequires:	cmake >= 2.8
+# -std=c++14
+BuildRequires:	libstdc++-devel >= 6:5.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -36,7 +32,7 @@ Summary:	Development files for lib7zip library
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki lib7zip
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	libstdc++-devel
+Requires:	libstdc++-devel >= 6:5.0
 
 %description devel
 Development files for lib7zip library.
@@ -57,36 +53,28 @@ Static lib7zip library.
 Statyczna biblioteka lib7zip.
 
 %prep
-%setup -q -n %{name}-%{gitref} -a1
+%setup -q -a1
 %patch0 -p1
 %patch1 -p1
 
-# remove it when "linking libtool libraries using a non-POSIX archiver ..." warning is gone
-# (after lib7zip or libtool change)
-#%{__sed} -i -e '/AM_INIT_AUTOMAKE/s/-Werror//' configure.ac
-
 %build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__automake}
-export P7ZIP_SOURCE_DIR="$(pwd)/p7zip_%{p7zip_version}"
-# automake leaves some junk in includes dir
-#rm -rf includes/{C,CPP}
-%configure
+TOPDIR=$(pwd)
+install -d build
+cd build
+CXXFLAGS="%{rpmcxxflags} -Wno-error=unused-result"
+%cmake .. \
+	-DBUILD_SHARED_LIB=ON \
+	-DP7ZIP_SOURCE_DIR="${TOPDIR}/p7zip_%{p7zip_version}"
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_includedir}
 
-%{__make} install \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install -p Lib7Zip/lib7zip.h $RPM_BUILD_ROOT%{_includedir}
-
-# test programs
-%{__rm} $RPM_BUILD_ROOT%{_bindir}/test7z*
+cp -p src/lib7zip.h $RPM_BUILD_ROOT%{_includedir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -102,7 +90,6 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/lib7zip.so
-%{_libdir}/lib7zip.la
 %{_includedir}/lib7zip.h
 
 %files static
diff --git a/lib7zip-ac.patch b/lib7zip-ac.patch
deleted file mode 100644
index 7e94308..0000000
--- a/lib7zip-ac.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Create include/CPP symlink before running automake's "depfiles" commands, which would create includes/CPP directory.
---- lib7zip-5bc54cab38656fd57df7736087ef6914ddb68c72/configure.ac.orig	2015-11-18 05:00:38.000000000 +0100
-+++ lib7zip-5bc54cab38656fd57df7736087ef6914ddb68c72/configure.ac	2017-06-07 18:48:31.297434499 +0200
-@@ -1,5 +1,25 @@
- AC_INIT([lib7zip], [2.0.0], [jingnan.si at gmail.com])
- AC_CONFIG_SRCDIR(Lib7Zip/lib7zip.h)
-+
-+dnl check for p7zip source
-+AC_ARG_VAR([P7ZIP_SOURCE_DIR], [p7zip source directory, must be set before compile source])
-+
-+if test "x$P7ZIP_SOURCE_DIR" = "x"; then
-+AC_MSG_FAILURE(P7ZIP_SOURCE_DIR is not set)
-+fi
-+
-+if test ! -d "$P7ZIP_SOURCE_DIR/C"; then
-+AC_MSG_FAILURE($P7ZIP_SOURCE_DIR/C is invalid)
-+fi
-+
-+if test ! -d "$P7ZIP_SOURCE_DIR/CPP"; then
-+AC_MSG_FAILURE(P7ZIP_SOURCE_DIR is invalid)
-+fi
-+
-+dnl create link for p7zip source
-+AC_CONFIG_COMMANDS([p7zip_src_cpp_link], [ln -sf $P7ZIP_SOURCE_DIR/CPP includes/CPP])
-+AC_CONFIG_COMMANDS([p7zip_src_c_link], [ln -sf $P7ZIP_SOURCE_DIR/C includes/C])
-+
- AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
- AC_CONFIG_MACRO_DIR([m4])
- 
-@@ -38,25 +58,6 @@
- 
- AM_CONDITIONAL(WIN32, test x$is_win32 = xyes)
- 
--dnl check for p7zip source
--AC_ARG_VAR([P7ZIP_SOURCE_DIR], [p7zip source directory, must be set before compile source])
--
--if test "x$P7ZIP_SOURCE_DIR" = "x"; then
--AC_MSG_FAILURE(P7ZIP_SOURCE_DIR is not set)
--fi
--
--if test ! -d "$P7ZIP_SOURCE_DIR/C"; then
--AC_MSG_FAILURE($P7ZIP_SOURCE_DIR/C is invalid)
--fi
--
--if test ! -d "$P7ZIP_SOURCE_DIR/CPP"; then
--AC_MSG_FAILURE(P7ZIP_SOURCE_DIR is invalid)
--fi
--
--dnl create link for p7zip source
--AC_CONFIG_COMMANDS([p7zip_src_cpp_link], [ln -sf $P7ZIP_SOURCE_DIR/CPP includes/CPP])
--AC_CONFIG_COMMANDS([p7zip_src_c_link], [ln -sf $P7ZIP_SOURCE_DIR/C includes/C])
--
- AC_CONFIG_FILES([
- 	Makefile
- 	includes/Makefile
diff --git a/lib7zip-install.patch b/lib7zip-install.patch
new file mode 100644
index 0000000..dec6797
--- /dev/null
+++ b/lib7zip-install.patch
@@ -0,0 +1,17 @@
+--- lib7zip-3.0.0/src/CMakeLists.txt.orig	2018-09-04 07:35:37.000000000 +0200
++++ lib7zip-3.0.0/src/CMakeLists.txt	2018-12-31 13:48:18.138308162 +0100
+@@ -30,9 +30,13 @@
+    ${lib7zip_NODIST_SOURCES}
+ )
+ SET_TARGET_PROPERTIES(lib7zip_shared PROPERTIES
+-    OUTPUT_NAME "7zip"
++   OUTPUT_NAME "7zip" VERSION 0.0.0 SOVERSION 0
+ )
+ 
++TARGET_LINK_LIBRARIES (lib7zip_shared -ldl)
++INSTALL (TARGETS lib7zip ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++INSTALL (TARGETS lib7zip_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++
+ SET_TARGET_PROPERTIES(lib7zip_shared PROPERTIES LINKER_LANGUAGE CXX)
+ 
+ TARGET_INCLUDE_DIRECTORIES(lib7zip_shared PRIVATE
diff --git a/lib7zip-link.patch b/lib7zip-link.patch
deleted file mode 100644
index 9307730..0000000
--- a/lib7zip-link.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- lib7zip-1.6.3/Lib7Zip/Makefile.am.orig	2012-11-07 19:28:35.432245153 +0100
-+++ lib7zip-1.6.3/Lib7Zip/Makefile.am	2012-11-07 19:29:43.852242281 +0100
-@@ -70,6 +70,7 @@
- #LIB7ZIP_VERSION_INFO=1.6.0
- # -version-info @LIB7ZIP_VERSION_INFO@
- lib7zip_la_LDFLAGS = $(A_LIBS)
-+lib7zip_la_LIBADD = -ldl
- endif
- 
- EXTRA_DIST = Lib7Zip.vcproj 
diff --git a/lib7zip-warnings.patch b/lib7zip-warnings.patch
new file mode 100644
index 0000000..762528c
--- /dev/null
+++ b/lib7zip-warnings.patch
@@ -0,0 +1,11 @@
+--- 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/eff01e2a4595ec034bd71111af1e248cdc2ceb0f



More information about the pld-cvs-commit mailing list