summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-07-19 23:17:45 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-07-20 00:13:27 +0200
commit65628e50c872561392b69ad4c863696ec5995697 (patch)
tree83aae16e44831c184159dce5a90a40ef07cbfd23 /dev-libs/quazip
parentnet-mail/notmuch: x86 stable (bug #732238) (diff)
downloadgentoo-65628e50c872561392b69ad4c863696ec5995697.tar.gz
gentoo-65628e50c872561392b69ad4c863696ec5995697.tar.bz2
gentoo-65628e50c872561392b69ad4c863696ec5995697.zip
dev-libs/quazip: Escalate pkgconfig patch to gnuinstalldirs patch
Drop src_configure() and fix pkgconfig paths at the same time. Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-libs/quazip')
-rw-r--r--dev-libs/quazip/files/quazip-0.9.1-gnuinstalldirs.patch90
-rw-r--r--dev-libs/quazip/files/quazip-0.9.1-pkgconfig.patch31
-rw-r--r--dev-libs/quazip/quazip-0.9.1.ebuild11
3 files changed, 91 insertions, 41 deletions
diff --git a/dev-libs/quazip/files/quazip-0.9.1-gnuinstalldirs.patch b/dev-libs/quazip/files/quazip-0.9.1-gnuinstalldirs.patch
new file mode 100644
index 000000000000..ee389da9d4e8
--- /dev/null
+++ b/dev-libs/quazip/files/quazip-0.9.1-gnuinstalldirs.patch
@@ -0,0 +1,90 @@
+From 3b1bf010e6f19908c90fdd51f01797dedb62fd53 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Thu, 9 Jul 2020 23:08:22 +0200
+Subject: [PATCH] Use GNUInstallDirs, fix pkgconfig libdir/includedir
+
+Dropping LIB_SUFFIX.
+---
+ CMakeLists.txt | 16 ++++++++--------
+ quazip.pc.cmakein | 6 +++---
+ quazip/CMakeLists.txt | 4 ++--
+ 3 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ed96b33..c3cce42 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 2.8.5)
+ project(QuaZip)
+
+ # CMP0042: Explicitly acknowledge MACOSX_RPATH
+@@ -11,6 +11,8 @@ set(QUAZIP_LIB_SOVERSION 1)
+
+ option(BUILD_WITH_QT4 "Build QuaZip with Qt4 no matter if Qt5 was found" OFF)
+
++include(GNUInstallDirs)
++
+ if(NOT BUILD_WITH_QT4)
+ # try Qt5 first, and prefer that if found
+ find_package(Qt5Core QUIET)
+@@ -48,18 +50,16 @@ find_package(ZLIB REQUIRED)
+ # All build libraries are moved to this directory
+ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
+
+-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
+-set(LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name" FORCE)
+-set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig" CACHE STRING "Installation directory for pkgconfig (.pc) files" FORCE)
+ set(QUAZIP_LIB_TARGET_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX} CACHE
+ INTERNAL "Target name of libquazip" FORCE)
+
+ add_subdirectory(quazip)
+
+ if(UNIX AND NOT APPLE)
+- configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/quazip.pc.cmakein
+- ${CMAKE_CURRENT_BINARY_DIR}/quazip.pc @ONLY)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/quazip.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}")
++ configure_file(quazip.pc.cmakein quazip.pc @ONLY)
++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/quazip.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+
+-install(FILES QuaZipConfig.cmake DESTINATION ${LIB_DESTINATION}/cmake/QuaZip${QUAZIP_LIB_VERSION_SUFFIX} RENAME QuaZip${QUAZIP_LIB_VERSION_SUFFIX}Config.cmake)
++install(FILES QuaZipConfig.cmake
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/QuaZip${QUAZIP_LIB_VERSION_SUFFIX}
++ RENAME QuaZip${QUAZIP_LIB_VERSION_SUFFIX}Config.cmake)
+diff --git a/quazip.pc.cmakein b/quazip.pc.cmakein
+index e46d4c6..50d280e 100644
+--- a/quazip.pc.cmakein
++++ b/quazip.pc.cmakein
+@@ -1,12 +1,12 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${prefix}/lib@LIB_SUFFIX@
+-includedir=${prefix}/include
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/quazip@QUAZIP_LIB_VERSION_SUFFIX@
+
+
+ Name: Quazip
+ Description: Quazip Library
+ Version: @QUAZIP_LIB_VERSION@
+ Libs: -lquazip@QUAZIP_LIB_VERSION_SUFFIX@
+-Cflags:
++Cflags: -I${includedir}
+ Requires: Qt5Core
+diff --git a/quazip/CMakeLists.txt b/quazip/CMakeLists.txt
+index 84607f6..74e02fe 100644
+--- a/quazip/CMakeLists.txt
++++ b/quazip/CMakeLists.txt
+@@ -18,5 +18,5 @@ set_target_properties(${QUAZIP_LIB_TARGET_NAME} PROPERTIES VERSION ${QUAZIP_LIB_
+ # 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})
+
+-install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip${QUAZIP_LIB_VERSION_SUFFIX})
+-install(TARGETS ${QUAZIP_LIB_TARGET_NAME} LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION})
++install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/quazip${QUAZIP_LIB_VERSION_SUFFIX})
++install(TARGETS ${QUAZIP_LIB_TARGET_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION $${CMAKE_INSTALL_LIBDIR})
+--
+2.27.0
+
diff --git a/dev-libs/quazip/files/quazip-0.9.1-pkgconfig.patch b/dev-libs/quazip/files/quazip-0.9.1-pkgconfig.patch
deleted file mode 100644
index 66de677611d9..000000000000
--- a/dev-libs/quazip/files/quazip-0.9.1-pkgconfig.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 94b18d81752490b694d262a4889085e9d55bc5d5 Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm@gentoo.org>
-Date: Thu, 9 Jul 2020 23:08:22 +0200
-Subject: [PATCH] Fix pkgconfig include dir
-
----
- quazip.pc.cmakein | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/quazip.pc.cmakein b/quazip.pc.cmakein
-index e46d4c6..4cd8c86 100644
---- a/quazip.pc.cmakein
-+++ b/quazip.pc.cmakein
-@@ -1,12 +1,12 @@
- prefix=@CMAKE_INSTALL_PREFIX@
- exec_prefix=${prefix}
- libdir=${prefix}/lib@LIB_SUFFIX@
--includedir=${prefix}/include
-+includedir=${prefix}/include/quazip@QUAZIP_LIB_VERSION_SUFFIX@
-
-
- Name: Quazip
- Description: Quazip Library
- Version: @QUAZIP_LIB_VERSION@
- Libs: -lquazip@QUAZIP_LIB_VERSION_SUFFIX@
--Cflags:
-+Cflags: -I${includedir}
- Requires: Qt5Core
---
-2.27.0
-
diff --git a/dev-libs/quazip/quazip-0.9.1.ebuild b/dev-libs/quazip/quazip-0.9.1.ebuild
index c7116322243d..dfd72df8e6f1 100644
--- a/dev-libs/quazip/quazip-0.9.1.ebuild
+++ b/dev-libs/quazip/quazip-0.9.1.ebuild
@@ -23,18 +23,9 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${P}-no-static-lib.patch"
- "${FILESDIR}/${P}-pkgconfig.patch"
+ "${FILESDIR}/${P}-gnuinstalldirs.patch"
)
-src_configure() {
- local libdir=$(get_libdir)
-
- local mycmakeargs=(
- -DLIB_SUFFIX=${libdir/lib/}
- )
- cmake_src_configure
-}
-
src_install() {
cmake_src_install