commit: c48daa4231f7497051c9ecd72e9d9709b6588c05 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Feb 15 03:18:19 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Feb 15 03:30:05 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c48daa42
dev-libs/quazip: bump to 1.1 (new slot) Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/quazip/Manifest | 1 + .../files/quazip-1.1-conditional-tests.patch | 40 +++++++++++++++++ dev-libs/quazip/quazip-1.1.ebuild | 52 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/dev-libs/quazip/Manifest b/dev-libs/quazip/Manifest index 1a64e045769..8ca86518b22 100644 --- a/dev-libs/quazip/Manifest +++ b/dev-libs/quazip/Manifest @@ -1 +1,2 @@ DIST quazip-0.9.1.tar.gz 155775 BLAKE2B 76710f94d055e86e1885f74b85f3e6b25f053eedbb73b4b11163e243d003ea3bad50cf1568fd2dbd37bc5db05fd0a6f8d49f48bd5df22d30b1aad3747e8ab780 SHA512 db31f3c7e3d7e95c25090ceb8379643e0b49ed69ece009dd015bee120b2b60f42e73408f580caed3138fa19ca64dcd23a05f16435abb54e2b8df21105c7b42c0 +DIST quazip-1.1.tar.gz 153870 BLAKE2B c784d21d7c9623472fabf9bbf68c9d191dd0765f6b7114f0ea0b2597bbb31a9957feaea4d0325f98116d71acc4a7057f5c28ce5b84c6317cd25fdade30a279da SHA512 418516759e993c2e5636422c6a14e2caf95f836698b91d2188df5ef9b97879ee326255273793fc802325e14f378cbe2baad7e6ec2e1732e19bf238f70891f22c diff --git a/dev-libs/quazip/files/quazip-1.1-conditional-tests.patch b/dev-libs/quazip/files/quazip-1.1-conditional-tests.patch new file mode 100644 index 00000000000..68520a4b3b9 --- /dev/null +++ b/dev-libs/quazip/files/quazip-1.1-conditional-tests.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 14230a6..22c1421 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,34 +26,25 @@ set(QUAZIP_LIB_FILE_NAME quazip${QuaZip_VERSION_MAJOR}-qt${QUAZIP_QT_MAJOR_VERSI + set(QUAZIP_LIB_TARGET_NAME QuaZip) + set(QUAZIP_DIR_NAME QuaZip-Qt${QUAZIP_QT_MAJOR_VERSION}-${QUAZIP_LIB_VERSION}) + set(QUAZIP_PACKAGE_NAME QuaZip-Qt${QUAZIP_QT_MAJOR_VERSION}) +-set(QUAZIP_ENABLE_TESTS OFF) ++option(QUAZIP_ENABLE_TESTS "" OFF) + if(QUAZIP_QT_MAJOR_VERSION EQUAL 6) + find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat + OPTIONAL_COMPONENTS Network Test) + set(QUAZIP_LIB_QT_LIBRARIES Qt6::Core Qt6::Core5Compat) + set(QUAZIP_TEST_QT_LIBRARIES Qt6::Core Qt6::Core5Compat Qt6::Network Qt6::Test) + set(QUAZIP_PKGCONFIG_REQUIRES Qt6Core) +- if (Qt6Network_FOUND AND Qt6Test_FOUND) +- set(QUAZIP_ENABLE_TESTS ON) +- endif() + elseif(QUAZIP_QT_MAJOR_VERSION EQUAL 5) + find_package(Qt5 REQUIRED COMPONENTS Core + OPTIONAL_COMPONENTS Network Test) + set(QUAZIP_LIB_QT_LIBRARIES Qt5::Core) + set(QUAZIP_TEST_QT_LIBRARIES Qt5::Core Qt5::Network Qt5::Test) + set(QUAZIP_PKGCONFIG_REQUIRES Qt5Core) +- if (Qt5Network_FOUND AND Qt5Test_FOUND) +- set(QUAZIP_ENABLE_TESTS ON) +- endif() + elseif(QUAZIP_QT_MAJOR_VERSION EQUAL 4) + find_package(Qt4 4.5.0 REQUIRED COMPONENTS QtCore + OPTIONAL_COMPONENTS QtNetwork QtTest) + set(QUAZIP_LIB_QT_LIBRARIES Qt4::QtCore) + set(QUAZIP_TEST_QT_LIBRARIES Qt4::QtCore Qt4::QtNetwork Qt4::QtTest) + set(QUAZIP_PKGCONFIG_REQUIRES QtCore) +- if (QT_QTNETWORK_FOUND AND QT_QTTEST_FOUND) +- set(QUAZIP_ENABLE_TESTS ON) +- endif() + else() + message(FATAL_ERROR "Qt version ${QUAZIP_QT_MAJOR_VERSION} is not supported") + endif() diff --git a/dev-libs/quazip/quazip-1.1.ebuild b/dev-libs/quazip/quazip-1.1.ebuild new file mode 100644 index 00000000000..491c9969ee3 --- /dev/null +++ b/dev-libs/quazip/quazip-1.1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake flag-o-matic + +# Note: Please check if upstream want 2.x and so on to be slotted when released. +if ver_test ${PV} -ge 2.0 ; then + # Sanity check to avoid naive copy-bumps + # Upstream expect parallel installation of 0.x/1.x/2.x/... + # https://github.com/stachenov/quazip/blob/master/QuaZip-1.x-migration.md + die "Upstream want 0.x, 1.x, 2.x, ... to be slotted" +fi + +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" +SLOT="1" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-qt/qtcore:5 + dev-qt/qtnetwork:5 + sys-libs/zlib[minizip] +" +DEPEND=" + ${RDEPEND} + test? ( dev-qt/qttest:5 ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.1-conditional-tests.patch" +) + +src_configure() { + local mycmakeargs=( + -DQUAZIP_ENABLE_TESTS=$(usex test) + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + use test && cmake_src_compile qztest +}