From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1259833-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 6E1D013835B
	for <garchives@archives.gentoo.org>; Thu, 11 Mar 2021 17:26:18 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 41412E0905;
	Thu, 11 Mar 2021 17:26:17 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 15067E0896
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 17:26:17 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id ED14D335D00
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 17:26:15 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9CD914AF
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 17:26:14 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1615483554.958317d35f6a0b38db5132e9b73095a0cf934217.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libavif/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-libs/libavif/libavif-0.9.0-r1.ebuild media-libs/libavif/libavif-0.9.0-r2.ebuild media-libs/libavif/libavif-9999.ebuild
X-VCS-Directories: media-libs/libavif/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 958317d35f6a0b38db5132e9b73095a0cf934217
X-VCS-Branch: master
Date: Thu, 11 Mar 2021 17:26:14 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ed797aa4-7572-4fd0-8983-6a88a0c056ca
X-Archives-Hash: aea132b72c8cc4aea446052b368c72a3

commit:     958317d35f6a0b38db5132e9b73095a0cf934217
Author:     Daniel Novomesky <dnovomesky <AT> gmail <DOT> com>
AuthorDate: Thu Mar 11 15:55:24 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 17:25:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=958317d3

media-libs/libavif: revbump to 0.9.0-r2 with multilib support

Closes: https://bugs.gentoo.org/774537
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Daniel Novomesky <dnovomesky <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/19881
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...vif-0.9.0-r1.ebuild => libavif-0.9.0-r2.ebuild} | 59 ++++++++++++++++------
 media-libs/libavif/libavif-9999.ebuild             |  6 +--
 2 files changed, 46 insertions(+), 19 deletions(-)

diff --git a/media-libs/libavif/libavif-0.9.0-r1.ebuild b/media-libs/libavif/libavif-0.9.0-r2.ebuild
similarity index 50%
rename from media-libs/libavif/libavif-0.9.0-r1.ebuild
rename to media-libs/libavif/libavif-0.9.0-r2.ebuild
index f2801c49a9c..87d63556573 100644
--- a/media-libs/libavif/libavif-0.9.0-r1.ebuild
+++ b/media-libs/libavif/libavif-0.9.0-r2.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=7
 
-inherit cmake gnome2-utils
+CMAKE_ECLASS=cmake
+inherit cmake-multilib gnome2-utils
 
 DESCRIPTION="Library for encoding and decoding .avif files"
 HOMEPAGE="https://github.com/AOMediaCodec/libavif"
@@ -14,12 +15,12 @@ SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
 IUSE="+aom dav1d examples extras gdk-pixbuf rav1e svt-av1"
 
-DEPEND="media-libs/libpng
-	sys-libs/zlib
-	virtual/jpeg
-	aom? ( >=media-libs/libaom-2.0.0 )
-	dav1d? ( media-libs/dav1d )
-	gdk-pixbuf? ( x11-libs/gdk-pixbuf:2 )
+DEPEND="media-libs/libpng[${MULTILIB_USEDEP}]
+	sys-libs/zlib[${MULTILIB_USEDEP}]
+	virtual/jpeg[${MULTILIB_USEDEP}]
+	aom? ( >=media-libs/libaom-2.0.0[${MULTILIB_USEDEP}] )
+	dav1d? ( media-libs/dav1d[${MULTILIB_USEDEP}] )
+	gdk-pixbuf? ( x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}] )
 	rav1e? ( media-video/rav1e[capi] )
 	svt-av1? ( >=media-libs/svt-av1-0.8.6 )"
 RDEPEND="${DEPEND}"
@@ -31,28 +32,50 @@ PATCHES=(
 	"${FILESDIR}/${P}-pkg-config.patch"
 )
 
-src_configure() {
+multilib_src_configure() {
 	local mycmakeargs=(
 		-DBUILD_SHARED_LIBS=ON
 		-DAVIF_CODEC_AOM=$(usex aom ON OFF)
 		-DAVIF_CODEC_DAV1D=$(usex dav1d ON OFF)
 		-DAVIF_CODEC_LIBGAV1=OFF
-		-DAVIF_CODEC_RAV1E=$(usex rav1e ON OFF)
-		-DAVIF_CODEC_SVT=$(usex svt-av1 ON OFF)
 
 		# Use system libraries.
 		-DAVIF_LOCAL_ZLIBPNG=OFF
 		-DAVIF_LOCAL_JPEG=OFF
 
-		-DAVIF_BUILD_EXAMPLES=$(usex examples ON OFF)
-		-DAVIF_BUILD_APPS=$(usex extras ON OFF)
-		-DAVIF_BUILD_TESTS=$(usex extras ON OFF)
-
 		-DAVIF_BUILD_GDK_PIXBUF=$(usex gdk-pixbuf ON OFF)
 
 		-DAVIF_ENABLE_WERROR=OFF
 	)
 
+	if multilib_is_native_abi; then
+		mycmakeargs+=(
+			-DAVIF_CODEC_RAV1E=$(usex rav1e ON OFF)
+			-DAVIF_CODEC_SVT=$(usex svt-av1 ON OFF)
+
+			-DAVIF_BUILD_EXAMPLES=$(usex examples ON OFF)
+			-DAVIF_BUILD_APPS=$(usex extras ON OFF)
+			-DAVIF_BUILD_TESTS=$(usex extras ON OFF)
+		)
+	else
+		mycmakeargs+=(
+			-DAVIF_CODEC_RAV1E=OFF
+			-DAVIF_CODEC_SVT=OFF
+
+			-DAVIF_BUILD_EXAMPLES=OFF
+			-DAVIF_BUILD_APPS=OFF
+			-DAVIF_BUILD_TESTS=OFF
+		)
+
+		if ! use aom ; then
+			if use rav1e || use svt-av1 ; then
+				ewarn "libavif on ${MULTILIB_ABI_FLAG} will work in read-only mode."
+				ewarn "Support for rav1e and/or svt-av1 is is not available on ${MULTILIB_ABI_FLAG}"
+				ewarn "Enable aom flag for full support on ${MULTILIB_ABI_FLAG}"
+			fi
+		fi
+	fi
+
 	cmake_src_configure
 }
 
@@ -70,12 +93,16 @@ pkg_postinst() {
 	fi
 
 	if use gdk-pixbuf ; then
-		gnome2_gdk_pixbuf_update
+		# causes segfault if set, see bug 375615
+		unset __GL_NO_DSO_FINALIZER
+		multilib_foreach_abi gnome2_gdk_pixbuf_update
 	fi
 }
 
 pkg_postrm() {
 	if use gdk-pixbuf ; then
-		gnome2_gdk_pixbuf_update
+		# causes segfault if set, see bug 375615
+		unset __GL_NO_DSO_FINALIZER
+		multilib_foreach_abi gnome2_gdk_pixbuf_update
 	fi
 }

diff --git a/media-libs/libavif/libavif-9999.ebuild b/media-libs/libavif/libavif-9999.ebuild
index 511e58cb03d..1cb15d73dc4 100644
--- a/media-libs/libavif/libavif-9999.ebuild
+++ b/media-libs/libavif/libavif-9999.ebuild
@@ -63,9 +63,9 @@ multilib_src_configure() {
 
 		if ! use aom ; then
 			if use rav1e || use svt-av1 ; then
-				ewarn "libavif on $MULTILIB_ABI_FLAG will work in read-only mode."
-				ewarn "Support for rav1e and/or svt-av1 is is not available on $MULTILIB_ABI_FLAG"
-				ewarn "Enable aom flag for full support on $MULTILIB_ABI_FLAG"
+				ewarn "libavif on ${MULTILIB_ABI_FLAG} will work in read-only mode."
+				ewarn "Support for rav1e and/or svt-av1 is is not available on ${MULTILIB_ABI_FLAG}"
+				ewarn "Enable aom flag for full support on ${MULTILIB_ABI_FLAG}"
 			fi
 		fi
 	fi