]> git.pld-linux.org Git - packages/lib7zip.git/commitdiff
- updated to 3.0.0 release
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 31 Dec 2018 13:24:13 +0000 (14:24 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 31 Dec 2018 13:24:13 +0000 (14:24 +0100)
- removed outdated link,ac patches
- added warnings patch (adjust gcc options)
- added install patch (set soname and install libraries)

lib7zip-ac.patch [deleted file]
lib7zip-install.patch [new file with mode: 0644]
lib7zip-link.patch [deleted file]
lib7zip-warnings.patch [new file with mode: 0644]
lib7zip.spec

diff --git a/lib7zip-ac.patch b/lib7zip-ac.patch
deleted file mode 100644 (file)
index 7e94308..0000000
+++ /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@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 (file)
index 0000000..dec6797
--- /dev/null
@@ -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 (file)
index 9307730..0000000
+++ /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\r
- # -version-info @LIB7ZIP_VERSION_INFO@\r
- lib7zip_la_LDFLAGS = $(A_LIBS)\r
-+lib7zip_la_LIBADD = -ldl\r
- endif\r
\r
- EXTRA_DIST = Lib7Zip.vcproj \r
diff --git a/lib7zip-warnings.patch b/lib7zip-warnings.patch
new file mode 100644 (file)
index 0000000..762528c
--- /dev/null
@@ -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")
index ab90d80759cb579a6737414f00602f0d0f29e06c..7f6d4929d23f8f86388b9328c19ee99435aa826e 100644 (file)
@@ -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
This page took 0.12079 seconds and 4 git commands to generate.