diff options
Diffstat (limited to 'media-libs/libavif')
-rw-r--r-- | media-libs/libavif/Manifest | 6 | ||||
-rw-r--r-- | media-libs/libavif/files/libavif-0.9.3-dav1d-1.0.0.patch | 32 | ||||
-rw-r--r-- | media-libs/libavif/libavif-0.9.3-r2.ebuild (renamed from media-libs/libavif/libavif-0.9.3-r1.ebuild) | 2 | ||||
-rw-r--r-- | media-libs/libavif/libavif-0.9.3-r3.ebuild | 108 | ||||
-rw-r--r-- | media-libs/libavif/libavif-9999.ebuild | 4 |
5 files changed, 147 insertions, 5 deletions
diff --git a/media-libs/libavif/Manifest b/media-libs/libavif/Manifest index 57fe547dfff2..f96a4fc49a84 100644 --- a/media-libs/libavif/Manifest +++ b/media-libs/libavif/Manifest @@ -1,4 +1,6 @@ +AUX libavif-0.9.3-dav1d-1.0.0.patch 1428 BLAKE2B 51780bdeb22874bb23b8f461da1a98dad9b88f6e559ee9de60588a586c7009726d5b9a2db40d53ee660705110d1a61730b60c3caed876b359cdc1302e7a09c6e SHA512 905d5893d2a82717d0e488220a4e6e8dc46c0a3c04b2bea1feb5f618cddb9171e2c8d9fa72d6eabf898d0cc8abe41e3a9f510c7a1eef68c55cbe81b2736130e3 DIST libavif-0.9.3.tar.gz 2000521 BLAKE2B b9dbaf01e58058a1ab9191081242a0f669b714d319075b6330963bc8ae31f576fb77b108de4745125eb42d39682e74a3174d062a029ccb765b3030f4092a96b8 SHA512 8e95666c784d1badc7e18d27a7c21cae3b8ef3b8da9a762eb8f7216d77fba29b9ca309c01d13bcf4890e03c6bc335ba4baf3f5877396bd0584be9ea60018daa7 -EBUILD libavif-0.9.3-r1.ebuild 2715 BLAKE2B eb10e2a6db7b4ab3ac3a4708a4839a872061da25ae9b6a6dd95611d74e82c3caa3f4bfa7748b86d6ecc3878934ce031c2a13e733e7f0f5d7309b7d469c904fbc SHA512 9f981584d3751fd2e06704fad399e442f5f2091e0edd1b7a76b9ea0bf8b635444db8143d65d9de399d70e1645a0207cb53f9359a0abbac6fd75de9ca8323edc8 -EBUILD libavif-9999.ebuild 2663 BLAKE2B 1e85ce787146edafbaa33e9391a025e92761bdf86122438203479e72b2c90fae43e5d417981d7eb25c7212bea2035959cf293c81023617bf4319192f47e35710 SHA512 753acb2952f0f9e486d7776b058651c32242fc3045557fd207f1818dd1661546b5ec69c7275b5596acddb1e9625337a95bfb0664841cfe4b6799d52fe74ca54f +EBUILD libavif-0.9.3-r2.ebuild 2717 BLAKE2B 88dbe135fd388326eb14beb585e57d241760679839433bf7ba8dc6d2a195e4b5e266a50177b77d061d8c3824fa422613bd65b48bed42017592b50ef1582dff23 SHA512 ad18814f39af7148b016341f7a0a88cb343050a2f4c39acb4202999e2753d3921b3651780f4ead68b581c6ffe657c1e69dacab0da37b3e536acbb7611421eb97 +EBUILD libavif-0.9.3-r3.ebuild 2754 BLAKE2B f6dfc1db692f53625edbe69ae667dd31f1cd99a12d45e5503ea4c226dcc7894e32781923714deef7200f327dc81e4a6672e5ef4145a97adbb808a9cf0142ae01 SHA512 2a232a397fede6063ef17a6886ff3543675d4bd24a5723dd7157f0a41785cab58262454ba421df4a8a5348119f6b3d7184c7623c943b4242a247cb5bab69dd6b +EBUILD libavif-9999.ebuild 2665 BLAKE2B 24519aec2d7556da651acff664ec486fccbd88a0fa362ea6d06c34441a53cb2dc7d5cce56a3aa6d42a58aca59e385609aaba0fcfd82c74f3b46b19ef4e86f24d SHA512 e7d9bd31c3bbc293069809a6bb39664a474608b91a22a9fd6849e764e97e8d9a46ad40ed51c039a7a73fab4f1c38c73a4e0968d8bce89d642a40133a6272405c MISC metadata.xml 874 BLAKE2B dff9e32442e51d4a3ef60fc1059cb2303b3f0a8c0d026ee8703086509fbed4205e28f4bf043b90af2f57ccbaf7dc861dcefb633b1f306bea1d3f32a5373a5643 SHA512 9f5c37e9ebe71fe47512a7ccc493559bc46132874dc00f16b0b60ad108fee9eda6c2a2c87b21309505e46cce46776a9917ec587874906d1d62b1c2e28b0ea31f diff --git a/media-libs/libavif/files/libavif-0.9.3-dav1d-1.0.0.patch b/media-libs/libavif/files/libavif-0.9.3-dav1d-1.0.0.patch new file mode 100644 index 000000000000..a4358e7223cd --- /dev/null +++ b/media-libs/libavif/files/libavif-0.9.3-dav1d-1.0.0.patch @@ -0,0 +1,32 @@ +https://github.com/AOMediaCodec/libavif/commit/74a21444397e323a088fa1f274c9fc942ee7a870.patch +https://bugs.gentoo.org/834262 + +From: Jamaika1 <lukaszcz18@wp.pl> +Date: Wed, 26 Jan 2022 18:24:31 +0100 +Subject: [PATCH] Change function in SVT-AV1 0.9.0 (#807) + +--- a/src/codec_svt.c ++++ b/src/codec_svt.c +@@ -92,7 +92,9 @@ static avifResult svtCodecEncodeImage(avifCodec * codec, + } + svt_config->encoder_color_format = color_format; + svt_config->encoder_bit_depth = (uint8_t)image->depth; ++#if !SVT_AV1_CHECK_VERSION(0, 9, 0) + svt_config->is_16bit_pipeline = image->depth > 8; ++#endif + + // Follow comment in svt header: set if input is HDR10 BT2020 using SMPTE ST2084. + svt_config->high_dynamic_range_input = (image->depth == 10 && image->colorPrimaries == AVIF_COLOR_PRIMARIES_BT2020 && +@@ -104,8 +106,12 @@ static avifResult svtCodecEncodeImage(avifCodec * codec, + svt_config->logical_processors = encoder->maxThreads; + svt_config->enable_adaptive_quantization = AVIF_FALSE; + // disable 2-pass ++#if SVT_AV1_CHECK_VERSION(0, 9, 0) ++ svt_config->rc_stats_buffer = (SvtAv1FixedBuf) { NULL, 0 }; ++#else + svt_config->rc_firstpass_stats_out = AVIF_FALSE; + svt_config->rc_twopass_stats_in = (SvtAv1FixedBuf) { NULL, 0 }; ++#endif + + if (alpha) { + svt_config->min_qp_allowed = AVIF_CLAMP(encoder->minQuantizerAlpha, 0, 63); diff --git a/media-libs/libavif/libavif-0.9.3-r1.ebuild b/media-libs/libavif/libavif-0.9.3-r2.ebuild index fcbde27db210..672f5e5b162d 100644 --- a/media-libs/libavif/libavif-0.9.3-r1.ebuild +++ b/media-libs/libavif/libavif-0.9.3-r2.ebuild @@ -22,7 +22,7 @@ DEPEND="media-libs/libpng[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] virtual/jpeg[${MULTILIB_USEDEP}] aom? ( >=media-libs/libaom-3.1.2:=[${MULTILIB_USEDEP}] ) - dav1d? ( media-libs/dav1d[${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 )" diff --git a/media-libs/libavif/libavif-0.9.3-r3.ebuild b/media-libs/libavif/libavif-0.9.3-r3.ebuild new file mode 100644 index 000000000000..6af014af342c --- /dev/null +++ b/media-libs/libavif/libavif-0.9.3-r3.ebuild @@ -0,0 +1,108 @@ +# Copyright 2020-2022 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/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="+aom dav1d examples extras gdk-pixbuf rav1e svt-av1" + +REQUIRED_USE="|| ( aom dav1d )" + +DEPEND="media-libs/libpng[${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + virtual/jpeg[${MULTILIB_USEDEP}] + aom? ( >=media-libs/libaom-3.1.2:=[${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}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-dav1d-1.0.0.patch +) + +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 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 +} + +pkg_preinst() { + if use gdk-pixbuf ; then + gnome2_gdk_pixbuf_savelist + fi +} + +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 +} diff --git a/media-libs/libavif/libavif-9999.ebuild b/media-libs/libavif/libavif-9999.ebuild index 3b89a6e53244..80ef7d093431 100644 --- a/media-libs/libavif/libavif-9999.ebuild +++ b/media-libs/libavif/libavif-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -22,7 +22,7 @@ DEPEND="media-libs/libpng[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] virtual/jpeg[${MULTILIB_USEDEP}] aom? ( >=media-libs/libaom-3.1.2:=[${MULTILIB_USEDEP}] ) - dav1d? ( media-libs/dav1d[${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 )" |