summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Novomeský <dnovomesky@gmail.com>2024-03-07 20:18:45 +0100
committerMichał Górny <mgorny@gentoo.org>2024-03-23 06:39:18 +0100
commitbdeba3b62a87871a651e26800cbf51518fb6b282 (patch)
treec6ecbbc0634a678de3ba416c42977912985e002f /media-libs/libavif
parentmedia-libs/libjxl: drop 0.9.1-r1 (diff)
downloadgentoo-bdeba3b62a87871a651e26800cbf51518fb6b282.tar.gz
gentoo-bdeba3b62a87871a651e26800cbf51518fb6b282.tar.bz2
gentoo-bdeba3b62a87871a651e26800cbf51518fb6b282.zip
media-libs/libavif: add 1.0.4
Signed-off-by: Daniel Novomeský <dnovomesky@gmail.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'media-libs/libavif')
-rw-r--r--media-libs/libavif/Manifest1
-rw-r--r--media-libs/libavif/libavif-1.0.4.ebuild112
2 files changed, 113 insertions, 0 deletions
diff --git a/media-libs/libavif/Manifest b/media-libs/libavif/Manifest
index 5acefc8ee30d..a704bccb7b97 100644
--- a/media-libs/libavif/Manifest
+++ b/media-libs/libavif/Manifest
@@ -2,3 +2,4 @@ DIST libavif-0.10.1.tar.gz 2085698 BLAKE2B 5be3f9adf7e0a5747e42c90ce2768eba90053
DIST libavif-0.11.1.tar.gz 5826813 BLAKE2B 8fcbc9e1655546b7f4e62882b44d07b8bcfceef599e0feb5658c475cbc35cbb27bae0ad58475c2657351a890ccb957fa8a0e28328bbb5664cd8a57cedfb58019 SHA512 4a9e2711fccddf35c477db6e2fa2f76c0648aafaa98b4e3f34df62c0fbd02ddcd57762f1f8149822da4f1bc3757ee75ec1d9ced5e56a54dbe9d0b43265aacd4c
DIST libavif-1.0.1.tar.gz 10569767 BLAKE2B a50ade5ac9a05c987f8f10806d2f749af89a5fb5cb5ef01648a398bcd5a2f568abe4fa646b2a8f33aa2b5b0a718f80f140d9f1f87c524c805d970d5517ec667c SHA512 f7c35e40f9214314afeae69d5da6ab345e6dbd025e737a920ea4270452cdf7ff7010d7af5cc18d27e93b217114eb6b613cd349703d0e1bb7814dbeb84a9fd70f
DIST libavif-1.0.3.tar.gz 10573846 BLAKE2B 220f5ebfcae82e521cb13231dca478f480987b8eb80451edb9f9769ac1561ee18ebaaaa7f552fe9cb9094d141815ac6cdba1f544ebfbcc932f60b8f1233d58c6 SHA512 b713f35fd3e54e105e16f46012becdada86f522b4ed8ab7097a93fd437524b4f2c997c42d6f06828f93b53253b1d90302417afdb0bd8e09d176f64f19c7a0faa
+DIST libavif-1.0.4.tar.gz 10575992 BLAKE2B 69b7f376e8254f1f6b5df727e572e6aeef02710d8a09ad3289a71a38c2632b2cfdbee9284fcf08fccc5f072dc3aa2109f44b41ae10f0dad8cb299040ffc71c23 SHA512 37f0de757180c6414778e688006940395960b316c25192d6beb97a07942aff4bd3b712dec2eff52cd26f5d72c352731442175dfeb90e2e1381133539760142b0
diff --git a/media-libs/libavif/libavif-1.0.4.ebuild b/media-libs/libavif/libavif-1.0.4.ebuild
new file mode 100644
index 000000000000..e9f32be578ca
--- /dev/null
+++ b/media-libs/libavif/libavif-1.0.4.ebuild
@@ -0,0 +1,112 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib gnome2-utils
+
+DESCRIPTION="Library for encoding and decoding .avif files"
+HOMEPAGE="https://github.com/AOMediaCodec/libavif"
+SRC_URI="
+ https://github.com/AOMediaCodec/libavif/archive/v${PV}.tar.gz
+ -> ${P}.tar.gz
+"
+
+LICENSE="BSD-2"
+# See bug #822336 re subslot
+SLOT="0/16"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc64 ~riscv ~sparc ~x86"
+IUSE="+aom dav1d examples extras gdk-pixbuf rav1e svt-av1 test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( aom dav1d )"
+
+DEPEND="
+ media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
+ media-libs/libpng:=[${MULTILIB_USEDEP}]
+ aom? ( >=media-libs/libaom-3.3.0:=[${MULTILIB_USEDEP}] )
+ dav1d? ( >=media-libs/dav1d-1.0.0:=[${MULTILIB_USEDEP}] )
+ extras? ( test? ( dev-cpp/gtest ) )
+ gdk-pixbuf? (
+ dev-libs/glib:2[${MULTILIB_USEDEP}]
+ x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}]
+ )
+ rav1e? ( >=media-video/rav1e-0.5.1:=[capi] )
+ svt-av1? ( >=media-libs/svt-av1-0.9.1 )
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+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
+
+ # Use system libraries.
+ -DAVIF_LOCAL_ZLIBPNG=OFF
+ -DAVIF_LOCAL_JPEG=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 test ON OFF)
+ -DAVIF_ENABLE_GTEST=$(usex extras $(usex test ON OFF) OFF)
+ )
+ else
+ mycmakeargs+=(
+ -DAVIF_CODEC_RAV1E=OFF
+ -DAVIF_CODEC_SVT=OFF
+
+ -DAVIF_BUILD_EXAMPLES=OFF
+ -DAVIF_BUILD_APPS=OFF
+ -DAVIF_BUILD_TESTS=OFF
+ -DAVIF_ENABLE_GTEST=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
+}
+
+pkg_postinst() {
+ if ! use aom && ! use rav1e && ! use svt-av1 ; then
+ ewarn "No AV1 encoder is set,"
+ ewarn "libavif will work in read-only mode."
+ ewarn "Enable aom, rav1e or svt-av1 flag if you want to save .AVIF files."
+ fi
+
+ if use gdk-pixbuf ; then
+ # 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
+ # causes segfault if set, see bug 375615
+ unset __GL_NO_DSO_FINALIZER
+ multilib_foreach_abi gnome2_gdk_pixbuf_update
+ fi
+}