commit: 1e42a247d4f56a54a80d76a77dfe3797967554f1 Author: Daniel Novomesky <dnovomesky <AT> gmail <DOT> com> AuthorDate: Thu Apr 23 12:58:05 2020 +0000 Commit: Daniel Novomesky <dnovomesky <AT> gmail <DOT> com> CommitDate: Thu Apr 23 12:58:05 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1e42a247
media-libs/libavif: add live build Package-Manager: Portage-2.3.89, Repoman-2.3.20 RepoMan-Options: --force Signed-off-by: Daniel Novomesky <dnovomesky <AT> gmail.com> media-libs/libavif/libavif-9999.ebuild | 63 ++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/media-libs/libavif/libavif-9999.ebuild b/media-libs/libavif/libavif-9999.ebuild new file mode 100644 index 0000000..8239377 --- /dev/null +++ b/media-libs/libavif/libavif-9999.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Library for encoding and decoding .avif files" +HOMEPAGE="https://github.com/AOMediaCodec/libavif" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/AOMediaCodec/libavif.git" +else + SRC_URI="https://github.com/AOMediaCodec/libavif/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="BSD-2" +SLOT="0" +IUSE="dav1d +libaom rav1e" + +REQUIRED_USE="|| ( dav1d libaom )" + +DEPEND="dav1d? ( media-libs/dav1d ) + libaom? ( >=media-libs/libaom-1.1 ) + rav1e? ( media-video/rav1e[capi] ) + media-libs/libpng + virtual/jpeg +" +RDEPEND="${DEPEND}" +BDEPEND="" + +src_configure() { + local mycmakeargs=( + -DAVIF_CODEC_DAV1D=$(usex dav1d ON OFF) + -DAVIF_CODEC_AOM=$(usex libaom ON OFF) + -DAVIF_CODEC_RAV1E=$(usex rav1e ON OFF) + -DBUILD_SHARED_LIBS=ON + -DAVIF_BUILD_APPS=ON + ) + cmake_src_configure +} + +pkg_postinst() { + if ! use libaom && ! use rav1e ; then + ewarn "libaom and rav1e flags are not set," + ewarn "libavif will work in read-only mode." + ewarn "Enable libaom or rav1e flag if you want to save .AVIF files." + fi + + if use libaom ; then + elog "When you upgrade libaom in the future," + elog " you may need to re-emerge libavif again" + elog " to ensure correct AVIF import/export functions." + fi + + if use rav1e ; then + elog "When you upgrade rav1e in the future," + elog " you may need to re-emerge libavif again" + elog " to ensure correct AVIF export function." + fi +}
