summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-05-22 08:57:19 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-05-22 08:57:39 +0200
commit89f27fe6c532660666a694ce93758e20bced0bbe (patch)
treeffc149d9cfcea8f90060f32946481f19146834c0 /dev-libs/quazip
parentdev-python/ansible-compat: Stabilize 4.0.2 ALLARCHES, #906912 (diff)
downloadgentoo-89f27fe6c532660666a694ce93758e20bced0bbe.tar.gz
gentoo-89f27fe6c532660666a694ce93758e20bced0bbe.tar.bz2
gentoo-89f27fe6c532660666a694ce93758e20bced0bbe.zip
dev-libs/quazip: add 1.4
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'dev-libs/quazip')
-rw-r--r--dev-libs/quazip/Manifest1
-rw-r--r--dev-libs/quazip/files/quazip-1.4-cmake.patch76
-rw-r--r--dev-libs/quazip/quazip-1.4.ebuild88
3 files changed, 165 insertions, 0 deletions
diff --git a/dev-libs/quazip/Manifest b/dev-libs/quazip/Manifest
index f382b0c66d22..d8ac2a86ded3 100644
--- a/dev-libs/quazip/Manifest
+++ b/dev-libs/quazip/Manifest
@@ -1,2 +1,3 @@
DIST quazip-1.2.tar.gz 155878 BLAKE2B cfd5505509863dfdfcc88cf9f50aeff0ee0c1391412dc8aeb34ab020debd8a29279563323a0ca13a8d3b8b026518f5d079b8fa989aca20a9bec083c6dd4e3695 SHA512 3f4b1a4194ca286163b1c17880ea471a341dcc05d758ee8f3d1e540d0f6aed7ac18200450187034c46b4fab1da39111dca534d75859701259406a6dd50205386
DIST quazip-1.3.tar.gz 156138 BLAKE2B a9002bdfab39fc1516160b0073fd3d59a65a66eda98240b9a2936d4423b21b40dd9360122950a54dc18236bc2aaf4e1e2d761ba145f6dbd5014cf72a287fbb3b SHA512 3861a9084059576ff2690e8b911394b0286a60542ab021a4cc588537a60ea3a186ed7903c76544698001fa383dfd0de96bdfed433abaefc44158d3b30ab16fe2
+DIST quazip-1.4.tar.gz 157819 BLAKE2B bb0ec2ebd31d6ce5e2a19fc1b13570d57aa1438ff192621543ab6aec4e85f76677863d37efbe0bc59e3530ce023586440081cd47f069b4dcbac55118d12f8668 SHA512 38ce3aa77df1fd92229454e56b7290c066d1e319afa36a9f8ec8477004ae94df682e8f454f13cdaf586a1d0b0e033fe698081033a19536ecd53dd1e4b0204af9
diff --git a/dev-libs/quazip/files/quazip-1.4-cmake.patch b/dev-libs/quazip/files/quazip-1.4-cmake.patch
new file mode 100644
index 000000000000..d796c94026c7
--- /dev/null
+++ b/dev-libs/quazip/files/quazip-1.4-cmake.patch
@@ -0,0 +1,76 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f6719c6..e0520ae 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -14,12 +14,10 @@ if(EMSCRIPTEN)
+ option(BUILD_SHARED_LIBS "" OFF)
+ option(QUAZIP_INSTALL "" OFF)
+ option(QUAZIP_USE_QT_ZLIB "" OFF)
+- option(QUAZIP_ENABLE_TESTS "Build QuaZip tests" OFF)
+ else()
+ option(BUILD_SHARED_LIBS "" ON)
+ option(QUAZIP_INSTALL "" ON)
+ option(QUAZIP_USE_QT_ZLIB "" OFF)
+- option(QUAZIP_ENABLE_TESTS "Build QuaZip tests" OFF)
+ endif()
+
+ # Make BZIP2 optional
+@@ -56,6 +54,8 @@ else()
+ set(CMAKE_CXX_STANDARD 14)
+ endif()
+
++include(CTest)
++
+ if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE RELEASE)
+ endif()
+@@ -72,23 +72,29 @@ set(QUAZIP_DIR_NAME QuaZip-Qt${QUAZIP_QT_MAJOR_VERSION}-${QUAZIP_LIB_VERSION})
+ set(QUAZIP_PACKAGE_NAME QuaZip-Qt${QUAZIP_QT_MAJOR_VERSION})
+
+ if(QUAZIP_QT_MAJOR_VERSION EQUAL 6)
+- find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat
+- OPTIONAL_COMPONENTS Network Test)
++ find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat)
+ set(QUAZIP_LIB_LIBRARIES Qt6::Core Qt6::Core5Compat)
+- set(QUAZIP_TEST_QT_LIBRARIES Qt6::Core Qt6::Core5Compat Qt6::Network Qt6::Test)
+ set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt6Core")
++ if (BUILD_TESTING)
++ find_package(Qt6 REQUIRED COMPONENTS Network Test)
++ set(QUAZIP_TEST_QT_LIBRARIES Qt6::Core Qt6::Core5Compat Qt6::Network Qt6::Test)
++ endif()
+ elseif(QUAZIP_QT_MAJOR_VERSION EQUAL 5)
+- find_package(Qt5 REQUIRED COMPONENTS Core
+- OPTIONAL_COMPONENTS Network Test)
++ find_package(Qt5 REQUIRED COMPONENTS Core)
+ set(QUAZIP_LIB_LIBRARIES Qt5::Core)
+- set(QUAZIP_TEST_QT_LIBRARIES Qt5::Core Qt5::Network Qt5::Test)
+- set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt5Core")
++ set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt5Core")
++ if (BUILD_TESTING)
++ find_package(Qt5 REQUIRED COMPONENTS Network Test)
++ set(QUAZIP_TEST_QT_LIBRARIES Qt5::Core Qt5::Network Qt5::Test)
++ endif()
+ elseif(QUAZIP_QT_MAJOR_VERSION EQUAL 4)
+- find_package(Qt4 4.5.0 REQUIRED COMPONENTS QtCore
+- OPTIONAL_COMPONENTS QtNetwork QtTest)
++ find_package(Qt4 4.5.0 REQUIRED COMPONENTS QtCore)
+ set(QUAZIP_LIB_LIBRARIES Qt4::QtCore)
+- set(QUAZIP_TEST_QT_LIBRARIES Qt4::QtCore Qt4::QtNetwork Qt4::QtTest)
+ set(QUAZIP_PKGCONFIG_REQUIRES "zlib, QtCore")
++ if (BUILD_TESTING)
++ find_package(Qt4 REQUIRED COMPONENTS Network Test)
++ set(QUAZIP_TEST_QT_LIBRARIES Qt4::QtCore Qt4::QtNetwork Qt4::QtTest)
++ endif()
+ else()
+ message(FATAL_ERROR "Qt version ${QUAZIP_QT_MAJOR_VERSION} is not supported")
+ endif()
+@@ -191,8 +197,7 @@ endif()
+
+ add_subdirectory(quazip)
+
+-if(QUAZIP_ENABLE_TESTS)
++if(BUILD_TESTING)
+ message(STATUS "Building QuaZip tests")
+- enable_testing()
+ add_subdirectory(qztest)
+ endif()
diff --git a/dev-libs/quazip/quazip-1.4.ebuild b/dev-libs/quazip/quazip-1.4.ebuild
new file mode 100644
index 000000000000..8ad656566a6c
--- /dev/null
+++ b/dev-libs/quazip/quazip-1.4.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake multibuild
+
+DESCRIPTION="Simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package"
+HOMEPAGE="https://stachenov.github.io/quazip/"
+SRC_URI="https://github.com/stachenov/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+# SONAME of libquazip1-qt5.so, check QUAZIP_LIB_SOVERSION in CMakeLists.txt
+SLOT="0/1.4"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +qt5 qt6 test"
+REQUIRED_USE="|| ( qt5 qt6 )"
+
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
+ bzip2? ( app-alternatives/bzip2 )
+ qt5? ( dev-qt/qtcore:5 )
+ qt6? (
+ dev-qt/qtbase:6
+ dev-qt/qt5compat:6
+ )
+ sys-libs/zlib[minizip]
+"
+DEPEND="${COMMON_DEPEND}
+ test? (
+ qt5? (
+ dev-qt/qtnetwork:5
+ dev-qt/qttest:5
+ )
+ qt6? (
+ dev-qt/qtbase:6[network]
+ )
+ )
+"
+RDEPEND="${COMMON_DEPEND}"
+
+PATCHES=(
+ # Use CTest module provided BUILD_TESTING
+ "${FILESDIR}/${P}-cmake.patch"
+)
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) )
+}
+
+src_configure() {
+ my_src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TESTING=$(usex test)
+ -DQUAZIP_BZIP2=$(usex bzip2)
+ )
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
+ mycmakeargs+=(
+ -DQUAZIP_QT_MAJOR_VERSION=5
+ )
+ elif [[ ${MULTIBUILD_VARIANT} = qt6 ]]; then
+ mycmakeargs+=(
+ -DQUAZIP_QT_MAJOR_VERSION=6
+ )
+ fi
+ cmake_src_configure
+ }
+
+ multibuild_foreach_variant my_src_configure
+}
+
+src_compile() {
+ my_src_compile() {
+ cmake_src_compile
+ use test && cmake_build qztest
+ }
+
+ multibuild_foreach_variant my_src_compile
+}
+
+src_test() {
+ multibuild_foreach_variant cmake_src_test
+}
+
+src_install() {
+ multibuild_foreach_variant cmake_src_install
+}