diff options
author | Daniel Novomesky <dnovomesky@gmail.com> | 2020-09-27 10:55:23 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-09-27 13:27:27 +0300 |
commit | b73d8b20bf8c158dd20b80e17c59d4136744e0d9 (patch) | |
tree | 1fcd01416c45b6c9497bae478d0dfb18473dc154 /media-libs/libavif/libavif-9999.ebuild | |
parent | x11-misc/gpaste: stylize 3.36.3 (diff) | |
download | gentoo-b73d8b20bf8c158dd20b80e17c59d4136744e0d9.tar.gz gentoo-b73d8b20bf8c158dd20b80e17c59d4136744e0d9.tar.bz2 gentoo-b73d8b20bf8c158dd20b80e17c59d4136744e0d9.zip |
media-libs/libavif: Add gdk-pixbuf use flag, add live ebuild
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Daniel Novomesky <dnovomesky@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/17690
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs/libavif/libavif-9999.ebuild')
-rw-r--r-- | media-libs/libavif/libavif-9999.ebuild | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/media-libs/libavif/libavif-9999.ebuild b/media-libs/libavif/libavif-9999.ebuild new file mode 100644 index 000000000000..ffaba14b1959 --- /dev/null +++ b/media-libs/libavif/libavif-9999.ebuild @@ -0,0 +1,73 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake git-r3 gnome2-utils + +DESCRIPTION="Library for encoding and decoding .avif files" +HOMEPAGE="https://github.com/AOMediaCodec/libavif" +EGIT_REPO_URI="https://github.com/AOMediaCodec/libavif.git" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="" +IUSE="+aom dav1d examples extras gdk-pixbuf rav1e" + +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 ) + rav1e? ( media-video/rav1e[capi] )" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +REQUIRED_USE="|| ( aom dav1d )" + +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) + + # 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) + ) + + cmake_src_configure +} + +pkg_preinst() { + if use gdk-pixbuf ; then + gnome2_gdk_pixbuf_savelist + fi +} + +pkg_postinst() { + if ! use aom && ! use rav1e ; then + ewarn "aom and rav1e flags are not set," + ewarn "libavif will work in read-only mode." + ewarn "Enable aom or rav1e flag if you want to save .AVIF files." + fi + + if use gdk-pixbuf ; then + gnome2_gdk_pixbuf_update + fi +} + +pkg_postrm() { + if use gdk-pixbuf ; then + gnome2_gdk_pixbuf_update + fi +} |