summaryrefslogtreecommitdiff
path: root/media-libs/libavif
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libavif')
-rw-r--r--media-libs/libavif/Manifest4
-rw-r--r--media-libs/libavif/libavif-0.11.1.ebuild107
-rw-r--r--media-libs/libavif/libavif-9999.ebuild9
3 files changed, 116 insertions, 4 deletions
diff --git a/media-libs/libavif/Manifest b/media-libs/libavif/Manifest
index efb787229c7c..b3cd5c2fe559 100644
--- a/media-libs/libavif/Manifest
+++ b/media-libs/libavif/Manifest
@@ -1,4 +1,6 @@
DIST libavif-0.10.1.tar.gz 2085698 BLAKE2B 5be3f9adf7e0a5747e42c90ce2768eba90053c821805cc8e39915d6cbc4cd42554b1473118b41eb25010d20a2b5a3c141b9cbd6ff55c46abd79eb97cdee6b0e5 SHA512 2f6f248c56c983761149d3c201fc2a2ea5072a32516578a7fdb2c66e3cd22491540f400e23581f873b15454250eeec8d433924ae2c1de9371b7924a5d82bef6b
+DIST libavif-0.11.1.tar.gz 5826813 BLAKE2B 8fcbc9e1655546b7f4e62882b44d07b8bcfceef599e0feb5658c475cbc35cbb27bae0ad58475c2657351a890ccb957fa8a0e28328bbb5664cd8a57cedfb58019 SHA512 4a9e2711fccddf35c477db6e2fa2f76c0648aafaa98b4e3f34df62c0fbd02ddcd57762f1f8149822da4f1bc3757ee75ec1d9ced5e56a54dbe9d0b43265aacd4c
EBUILD libavif-0.10.1.ebuild 2721 BLAKE2B 25a3e3e1f51f322a4c2caa239869a1edbe9096c3ef24fd3df36c3bff0758e0b4daa91606f2f71af3aa85c03a12b91fe8fefc42630c765faaeedd36357b13fd7b SHA512 abf588f95ff289955357179bc2b6bc03f4294a6294fd476011af95fe2668d86b543c5aefcf3dd6a9f91bfb18dfa5f236ddc731e3deb0e45263fffa33ceaffff3
-EBUILD libavif-9999.ebuild 2662 BLAKE2B 68435d43e38208d1e9a836c7da8c6aa1545da5d7da271b2d422bd93e41df8298262a6f85629cd8d4327f84efb376648bd6af10f6a5af7452d58439a0fcbff9c4 SHA512 a21ba858eab8456af19751fb00d3776f849d32da8d51f98fb70708e1efdf90fb09191a53c6eb2c4253a66a2f22882d4994790116e87d1297501cb541de619210
+EBUILD libavif-0.11.1.ebuild 2837 BLAKE2B 311aa3ce056dc38f630e615a2f1b018ade67bfd6e1ccf504a02cfa63ac31102edb0119db0ae315ef4e2856c9e23cd61a2950478a530cb802ba7718a3259e8966 SHA512 b27f79b8c6faa999f2be8b63d2069e67780249f261a345655f6a4e65f4cd9027ce7bfce3a40bff5f8591f4d015551e9bb709c92acbc553b543f0408f4f0c4bd4
+EBUILD libavif-9999.ebuild 2773 BLAKE2B c333ff449cb423cb892430681cac5cbdfb5c6c2ecd52a197f6d59e79f0b379ed6cd612dbf18a3efeea073ce341551c1df7eb6558a8cc7ab2e8884eba11143204 SHA512 061baa76df4c5b5632f1985fcf2a60d487cd57bd52d7f7d1f9cff6e3d8ef8980fa34e3572dcffa0393302a52ac0c84c8d66266ec2e4184955c1d94c739a8514d
MISC metadata.xml 874 BLAKE2B dff9e32442e51d4a3ef60fc1059cb2303b3f0a8c0d026ee8703086509fbed4205e28f4bf043b90af2f57ccbaf7dc861dcefb633b1f306bea1d3f32a5373a5643 SHA512 9f5c37e9ebe71fe47512a7ccc493559bc46132874dc00f16b0b60ad108fee9eda6c2a2c87b21309505e46cce46776a9917ec587874906d1d62b1c2e28b0ea31f
diff --git a/media-libs/libavif/libavif-0.11.1.ebuild b/media-libs/libavif/libavif-0.11.1.ebuild
new file mode 100644
index 000000000000..fa2b62da179c
--- /dev/null
+++ b/media-libs/libavif/libavif-0.11.1.ebuild
@@ -0,0 +1,107 @@
+# 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 ~loong ~ppc64 ~riscv ~x86"
+IUSE="+aom dav1d examples extras gdk-pixbuf rav1e svt-av1"
+
+REQUIRED_USE="|| ( aom dav1d )"
+
+DEPEND="media-libs/libjpeg-turbo[${MULTILIB_USEDEP}]
+ media-libs/libpng[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ aom? ( >=media-libs/libaom-3.3.0:=[${MULTILIB_USEDEP}] )
+ dav1d? ( >=media-libs/dav1d-1.0.0:=[${MULTILIB_USEDEP}] )
+ extras? ( dev-cpp/gtest )
+ gdk-pixbuf? ( 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 extras ON OFF)
+ -DAVIF_ENABLE_GTEST=$(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
+ -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_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 4dab63b81130..23f729dccf74 100644
--- a/media-libs/libavif/libavif-9999.ebuild
+++ b/media-libs/libavif/libavif-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit cmake-multilib git-r3 gnome2-utils
@@ -17,11 +17,12 @@ IUSE="+aom dav1d examples extras gdk-pixbuf rav1e svt-av1"
REQUIRED_USE="|| ( aom dav1d )"
-DEPEND="media-libs/libpng[${MULTILIB_USEDEP}]
+DEPEND="media-libs/libjpeg-turbo[${MULTILIB_USEDEP}]
+ media-libs/libpng[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
- virtual/jpeg[${MULTILIB_USEDEP}]
aom? ( >=media-libs/libaom-3.3.0:=[${MULTILIB_USEDEP}] )
dav1d? ( >=media-libs/dav1d-1.0.0:=[${MULTILIB_USEDEP}] )
+ extras? ( dev-cpp/gtest )
gdk-pixbuf? ( x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}] )
rav1e? ( >=media-video/rav1e-0.5.1[capi] )
svt-av1? ( >=media-libs/svt-av1-0.9.1 )"
@@ -52,6 +53,7 @@ multilib_src_configure() {
-DAVIF_BUILD_EXAMPLES=$(usex examples ON OFF)
-DAVIF_BUILD_APPS=$(usex extras ON OFF)
-DAVIF_BUILD_TESTS=$(usex extras ON OFF)
+ -DAVIF_ENABLE_GTEST=$(usex extras ON OFF)
)
else
mycmakeargs+=(
@@ -61,6 +63,7 @@ multilib_src_configure() {
-DAVIF_BUILD_EXAMPLES=OFF
-DAVIF_BUILD_APPS=OFF
-DAVIF_BUILD_TESTS=OFF
+ -DAVIF_ENABLE_GTEST=OFF
)
if ! use aom ; then