1 |
commit: 1e42a247d4f56a54a80d76a77dfe3797967554f1 |
2 |
Author: Daniel Novomesky <dnovomesky <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Apr 23 12:58:05 2020 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> |
5 |
CommitDate: Thu Apr 23 12:58:05 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1e42a247 |
7 |
|
8 |
media-libs/libavif: add live build |
9 |
|
10 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
11 |
RepoMan-Options: --force |
12 |
Signed-off-by: Daniel Novomesky <dnovomesky <AT> gmail.com> |
13 |
|
14 |
media-libs/libavif/libavif-9999.ebuild | 63 ++++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 63 insertions(+) |
16 |
|
17 |
diff --git a/media-libs/libavif/libavif-9999.ebuild b/media-libs/libavif/libavif-9999.ebuild |
18 |
new file mode 100644 |
19 |
index 0000000..8239377 |
20 |
--- /dev/null |
21 |
+++ b/media-libs/libavif/libavif-9999.ebuild |
22 |
@@ -0,0 +1,63 @@ |
23 |
+# Copyright 1999-2020 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit cmake |
29 |
+ |
30 |
+DESCRIPTION="Library for encoding and decoding .avif files" |
31 |
+HOMEPAGE="https://github.com/AOMediaCodec/libavif" |
32 |
+ |
33 |
+if [[ ${PV} == *9999* ]]; then |
34 |
+ inherit git-r3 |
35 |
+ EGIT_REPO_URI="https://github.com/AOMediaCodec/libavif.git" |
36 |
+else |
37 |
+ SRC_URI="https://github.com/AOMediaCodec/libavif/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
38 |
+ KEYWORDS="~amd64" |
39 |
+fi |
40 |
+ |
41 |
+LICENSE="BSD-2" |
42 |
+SLOT="0" |
43 |
+IUSE="dav1d +libaom rav1e" |
44 |
+ |
45 |
+REQUIRED_USE="|| ( dav1d libaom )" |
46 |
+ |
47 |
+DEPEND="dav1d? ( media-libs/dav1d ) |
48 |
+ libaom? ( >=media-libs/libaom-1.1 ) |
49 |
+ rav1e? ( media-video/rav1e[capi] ) |
50 |
+ media-libs/libpng |
51 |
+ virtual/jpeg |
52 |
+" |
53 |
+RDEPEND="${DEPEND}" |
54 |
+BDEPEND="" |
55 |
+ |
56 |
+src_configure() { |
57 |
+ local mycmakeargs=( |
58 |
+ -DAVIF_CODEC_DAV1D=$(usex dav1d ON OFF) |
59 |
+ -DAVIF_CODEC_AOM=$(usex libaom ON OFF) |
60 |
+ -DAVIF_CODEC_RAV1E=$(usex rav1e ON OFF) |
61 |
+ -DBUILD_SHARED_LIBS=ON |
62 |
+ -DAVIF_BUILD_APPS=ON |
63 |
+ ) |
64 |
+ cmake_src_configure |
65 |
+} |
66 |
+ |
67 |
+pkg_postinst() { |
68 |
+ if ! use libaom && ! use rav1e ; then |
69 |
+ ewarn "libaom and rav1e flags are not set," |
70 |
+ ewarn "libavif will work in read-only mode." |
71 |
+ ewarn "Enable libaom or rav1e flag if you want to save .AVIF files." |
72 |
+ fi |
73 |
+ |
74 |
+ if use libaom ; then |
75 |
+ elog "When you upgrade libaom in the future," |
76 |
+ elog " you may need to re-emerge libavif again" |
77 |
+ elog " to ensure correct AVIF import/export functions." |
78 |
+ fi |
79 |
+ |
80 |
+ if use rav1e ; then |
81 |
+ elog "When you upgrade rav1e in the future," |
82 |
+ elog " you may need to re-emerge libavif again" |
83 |
+ elog " to ensure correct AVIF export function." |
84 |
+ fi |
85 |
+} |