Update to 1.1

Current upstream version has changed the name of the library, include
paths, and CMake module names. To allow other packages to still build
using the old paths, add compat symlinks and the old CMake modules to
the -devel subpackages. These compat hacks can be removed once all
dependent packages have switched to use the new pkgconfig or CMake
files.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
epel9
Ondrej Mosnacek 4 years ago
parent 6071e4b49c
commit a63557c563

@ -0,0 +1,43 @@
# QUAZIP_FOUND - QuaZip library was found
# QUAZIP_INCLUDE_DIR - Path to QuaZip include dir
# QUAZIP_INCLUDE_DIRS - Path to QuaZip and zlib include dir (combined from QUAZIP_INCLUDE_DIR + ZLIB_INCLUDE_DIR)
# QUAZIP_LIBRARIES - List of QuaZip libraries
# QUAZIP_ZLIB_INCLUDE_DIR - The include dir of zlib headers
IF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
# in cache already
SET(QUAZIP_FOUND TRUE)
ELSE (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)
IF (Qt5Core_FOUND)
set(QUAZIP_LIB_VERSION_SUFFIX 5)
ENDIF()
IF (WIN32)
FIND_PATH(QUAZIP_LIBRARY_DIR
WIN32_DEBUG_POSTFIX d
NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll
HINTS "C:/Programme/" "C:/Program Files"
PATH_SUFFIXES QuaZip/lib
)
FIND_LIBRARY(QUAZIP_LIBRARIES NAMES libquazip${QUAZIP_LIB_VERSION_SUFFIX}.dll HINTS ${QUAZIP_LIBRARY_DIR})
FIND_PATH(QUAZIP_INCLUDE_DIR NAMES quazip.h HINTS ${QUAZIP_LIBRARY_DIR}/../ PATH_SUFFIXES include/quazip)
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR NAMES zlib.h)
ELSE(WIN32)
FIND_PACKAGE(PkgConfig)
# pkg_check_modules(PC_QCA2 QUIET qca2)
pkg_check_modules(PC_QUAZIP quazip)
FIND_LIBRARY(QUAZIP_LIBRARIES
WIN32_DEBUG_POSTFIX d
NAMES quazip${QUAZIP_LIB_VERSION_SUFFIX}
HINTS /usr/lib /usr/lib64
)
FIND_PATH(QUAZIP_INCLUDE_DIR quazip.h
HINTS /usr/include /usr/local/include
PATH_SUFFIXES quazip${QUAZIP_LIB_VERSION_SUFFIX}
)
FIND_PATH(QUAZIP_ZLIB_INCLUDE_DIR zlib.h HINTS /usr/include /usr/local/include)
ENDIF (WIN32)
INCLUDE(FindPackageHandleStandardArgs)
SET(QUAZIP_INCLUDE_DIRS ${QUAZIP_INCLUDE_DIR} ${QUAZIP_ZLIB_INCLUDE_DIR})
find_package_handle_standard_args(QUAZIP DEFAULT_MSG QUAZIP_LIBRARIES QUAZIP_INCLUDE_DIR QUAZIP_ZLIB_INCLUDE_DIR QUAZIP_INCLUDE_DIRS)
ENDIF (QUAZIP_INCLUDE_DIRS AND QUAZIP_LIBRARIES)

@ -1,25 +0,0 @@
diff -up quazip/quazip/CMakeLists.txt.orig quazip/quazip/CMakeLists.txt
--- quazip/quazip/CMakeLists.txt.orig 2018-07-17 11:06:16.243887366 +0200
+++ quazip/quazip/CMakeLists.txt 2018-07-17 11:17:10.088864720 +0200
@@ -15,18 +15,16 @@ qt_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS})
set(SRCS ${SRCS} ${MOC_SRCS})
add_library(${QUAZIP_LIB_TARGET_NAME} SHARED ${SRCS})
-add_library(quazip_static STATIC ${SRCS})
# Windows uses .lib extension for both static and shared library
# *nix systems use different extensions for SHARED and STATIC library and by convention both libraries have the same name
if (NOT WIN32)
- set_target_properties(quazip_static PROPERTIES OUTPUT_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX})
+ set_target_properties(${QUAZIP_LIB_TARGET_NAME} PROPERTIES OUTPUT_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX})
endif ()
-set_target_properties(${QUAZIP_LIB_TARGET_NAME} quazip_static PROPERTIES VERSION 1.0.0 SOVERSION 1 DEBUG_POSTFIX d)
+set_target_properties(${QUAZIP_LIB_TARGET_NAME} PROPERTIES VERSION 1.0.0 SOVERSION 1 DEBUG_POSTFIX d)
# Link against ZLIB_LIBRARIES if needed (on Windows this variable is empty)
target_link_libraries(${QUAZIP_LIB_TARGET_NAME} ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES})
-target_link_libraries(quazip_static ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES})
install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip${QUAZIP_LIB_VERSION_SUFFIX})
-install(TARGETS ${QUAZIP_LIB_TARGET_NAME} quazip_static LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION})
+install(TARGETS ${QUAZIP_LIB_TARGET_NAME} LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION})

@ -1,22 +0,0 @@
From f323e478b1c05f470393bb57b486c0d871cf4736 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Thu, 31 Jan 2019 18:19:30 +0100
Subject: [PATCH] Install the FindQuaZip.cmake in the right prefix
It should go wherever CMAKE_INSTALL_PREFIX is installing.
This fixes the build on flatpak and should also fix it for other cross
compilation setups.
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 539caa4..a43fefe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,4 +60,4 @@ set(QUAZIP_LIB_TARGET_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX} CACHE
add_subdirectory(quazip)
-install(FILES FindQuaZip.cmake RENAME FindQuaZip${QUAZIP_LIB_VERSION_SUFFIX}.cmake DESTINATION ${CMAKE_ROOT}/Modules)
+install(FILES FindQuaZip.cmake RENAME FindQuaZip${QUAZIP_LIB_VERSION_SUFFIX}.cmake DESTINATION ${SHARE_INSTALL_PREFIX}/cmake/Modules)

@ -1,14 +1,14 @@
%undefine __cmake_in_source_build
Name: quazip
Version: 0.7.6
Release: 11%{?dist}
Version: 1.1
Release: 1%{?dist}
Summary: Qt/C++ wrapper for the minizip library
License: GPLv2+ or LGPLv2+
URL: https://github.com/stachenov/quazip
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: quazip-0.7.6-fix_static.patch
Patch1: quazip-0.7.6-install-right-prefix.patch
Source0: %{url}/archive/v%{version}/%{name}-v%{version}.tar.gz
# pre-1.0 compat CMake module
Source1: FindQuaZip.cmake
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: qt4-devel
@ -66,11 +66,11 @@ for developing applications that use %{name}.
%build
%global _vpath_builddir build-qt4
%cmake -DBUILD_WITH_QT4:BOOL=ON
%cmake -DQUAZIP_QT_MAJOR_VERSION=4
%cmake_build
%global _vpath_builddir build-qt5
%cmake -DBUILD_WITH_QT4:BOOL=OFF
%cmake -DQUAZIP_QT_MAJOR_VERSION=5
%cmake_build
doxygen Doxyfile
@ -84,32 +84,63 @@ done
%global _vpath_builddir build-qt5
%cmake_install
# Create compat symlinks/files so that packages that use the old (pre-1.0)
# library location, include paths, or CMake module still build against the
# devel package. Note that the resulting binaries will refer to the new
# library name, though.
#
# These symlinks should probably be removed once all dependent packages are
# switched to use the new pkgconfig or CMake modules.
ln -s libquazip1-qt4.so %{buildroot}%{_libdir}/libquazip.so
ln -s libquazip1-qt5.so %{buildroot}%{_libdir}/libquazip5.so
ln -s QuaZip-Qt4-1.1/quazip %{buildroot}%{_includedir}/quazip
ln -s QuaZip-Qt5-1.1/quazip %{buildroot}%{_includedir}/quazip5
install -d %{buildroot}%{_datadir}/cmake/Modules
install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/cmake/Modules/FindQuaZip.cmake
install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/cmake/Modules/FindQuaZip5.cmake
%ldconfig_scriptlets
%files
%doc NEWS.txt README.md
%license COPYING
%{_libdir}/libquazip.so.1*
%{_libdir}/libquazip1-qt4.so.1*
%files devel
%doc doc/html
%{_includedir}/quazip/
%{_includedir}/QuaZip-Qt4-1.1/
%{_libdir}/libquazip1-qt4.so
%{_libdir}/cmake/QuaZip-Qt4-1.1/
%{_libdir}/pkgconfig/quazip1-qt4.pc
# pre-1.0 compat files
%{_includedir}/quazip
%{_libdir}/libquazip.so
%{_datadir}/cmake/Modules/FindQuaZip.cmake
%files qt5
%doc NEWS.txt README.md
%license COPYING
%{_libdir}/libquazip5.so.1*
%{_libdir}/libquazip1-qt5.so.1*
%files qt5-devel
%doc doc/html
%{_includedir}/quazip5/
%{_includedir}/QuaZip-Qt5-1.1/
%{_libdir}/libquazip1-qt5.so
%{_libdir}/cmake/QuaZip-Qt5-1.1/
%{_libdir}/pkgconfig/quazip1-qt5.pc
# pre-1.0 compat files
%{_includedir}/quazip5
%{_libdir}/libquazip5.so
%{_datadir}/cmake/Modules/FindQuaZip5.cmake
%changelog
* Sat Jul 31 2021 Ondrej Mosnacek <omosnace@rehdat.com> - 1.1-1
- Update to 1.1
- Resolves: rhbz#1895170
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

@ -1 +1 @@
SHA512 (quazip-0.7.6.tar.gz) = 4325a69918216bb66c6a7c53589ef73473c3752151522a135dd9c92dbf722b29656aea7be0314c84399a214391eca79296ecda5811ab31845d8cf53c010110d1
SHA512 (quazip-v1.1.tar.gz) = 418516759e993c2e5636422c6a14e2caf95f836698b91d2188df5ef9b97879ee326255273793fc802325e14f378cbe2baad7e6ec2e1732e19bf238f70891f22c

Loading…
Cancel
Save