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
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 +1 @@
|
||||
SHA512 (quazip-0.7.6.tar.gz) = 4325a69918216bb66c6a7c53589ef73473c3752151522a135dd9c92dbf722b29656aea7be0314c84399a214391eca79296ecda5811ab31845d8cf53c010110d1
|
||||
SHA512 (quazip-v1.1.tar.gz) = 418516759e993c2e5636422c6a14e2caf95f836698b91d2188df5ef9b97879ee326255273793fc802325e14f378cbe2baad7e6ec2e1732e19bf238f70891f22c
|
||||
|
Loading…
Reference in new issue