commit:     2bbaee3e53fe2eeec15711de211ce1aeb649c009
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 16 01:41:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 01:41:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bbaee3e

sys-libs/minizip-ng: add multilib

If this is ever going to be a thing with compat, we obviously need this.

We could conditionalise stuff on USE=compat but I don't really see the value
in that; still possible we could want this for newly built 32-bit stuff anyway.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...-ng-4.0.0.ebuild => minizip-ng-4.0.0-r1.ebuild} | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/sys-libs/minizip-ng/minizip-ng-4.0.0.ebuild 
b/sys-libs/minizip-ng/minizip-ng-4.0.0-r1.ebuild
similarity index 87%
rename from sys-libs/minizip-ng/minizip-ng-4.0.0.ebuild
rename to sys-libs/minizip-ng/minizip-ng-4.0.0-r1.ebuild
index fd2a6d9b2507..a0229283ac8f 100644
--- a/sys-libs/minizip-ng/minizip-ng-4.0.0.ebuild
+++ b/sys-libs/minizip-ng/minizip-ng-4.0.0-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 # Worth keeping an eye on 'develop' branch upstream for possible backports,
 # as they copied this practice from sys-libs/zlib upstream.
 
-inherit cmake
+inherit cmake-multilib
 
 DESCRIPTION="Fork of the popular zip manipulation library found in the zlib 
distribution"
 HOMEPAGE="https://github.com/zlib-ng/minizip-ng";
@@ -21,20 +21,20 @@ RESTRICT="!test? ( test )"
 # Automagically prefers sys-libs/zlib-ng if installed, so let's
 # just depend on it as presumably it's better tested anyway.
 RDEPEND="
-       app-arch/bzip2
+       app-arch/bzip2[${MULTILIB_USEDEP}]
        app-arch/xz-utils
-       sys-libs/zlib-ng
+       sys-libs/zlib-ng[${MULTILIB_USEDEP}]
        virtual/libiconv
        compat? ( !sys-libs/zlib[minizip] )
-       openssl? ( dev-libs/openssl:= )
-       zstd? ( app-arch/zstd:= )
+       openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )
+       zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
 "
 DEPEND="
        ${RDEPEND}
        test? ( dev-cpp/gtest )
 "
 
-src_configure() {
+multilib_src_configure() {
        local mycmakeargs=(
                -DMZ_COMPAT=$(usex compat)
 
@@ -64,7 +64,7 @@ src_configure() {
        cmake_src_configure
 }
 
-src_test() {
+multilib_src_test() {
        local myctestargs=(
                # TODO: investigate
                -E 
"(raw-unzip-pkcrypt|raw-append-unzip-pkcrypt|raw-erase-unzip-pkcrypt|deflate-unzip-pkcrypt|deflate-append-unzip-pkcrypt|deflate-erase-unzip-pkcrypt|bzip2-unzip-pkcrypt|bzip2-append-unzip-pkcrypt|bzip2-erase-unzip-pkcrypt|lzma-unzip-pkcrypt|lzma-append-unzip-pkcrypt|lzma-erase-unzip-pkcrypt|xz-unzip-pkcrypt|xz-append-unzip-pkcrypt|xz-erase-unzip-pkcrypt|zstd-unzip-pkcrypt|zstd-append-unzip-pkcrypt|zstd-erase-unzip-pkcrypt)"
@@ -76,15 +76,15 @@ src_test() {
        cmake_src_test -j1
 }
 
-src_install() {
-       cmake_src_install
-
-       if use test ; then
+multilib_src_install_all() {
+       if ! use compat && use test ; then
                # Test binaries, bug #874591
                rm "${ED}"/usr/bin/minigzip || die
                rm "${ED}"/usr/bin/minizip-ng || die
        fi
+}
 
+pkg_postinst() {
        if use compat ; then
                ewarn "minizip-ng is experimental and replacing the system 
zlib[minizip] is dangerous"
                ewarn "Please be careful!"

Reply via email to