1 |
commit: 6a4c411be4ede8ca3ccc8413e421199148d44f33 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 27 19:19:28 2017 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 27 19:19:28 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a4c411b |
7 |
|
8 |
media-video/ffmpeg: Backport new chromium feature to 3.3.3 |
9 |
|
10 |
This version is about to go stable but I have stable masked the |
11 |
chromium flag for now. |
12 |
|
13 |
Package-Manager: Portage-2.3.8, Repoman-2.3.2 |
14 |
|
15 |
media-video/ffmpeg/ffmpeg-3.3.3.ebuild | 36 ++++++++++++++++++++++++++++++++-- |
16 |
1 file changed, 34 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/media-video/ffmpeg/ffmpeg-3.3.3.ebuild b/media-video/ffmpeg/ffmpeg-3.3.3.ebuild |
19 |
index 616d77d5f31..00b6eb1f54b 100644 |
20 |
--- a/media-video/ffmpeg/ffmpeg-3.3.3.ebuild |
21 |
+++ b/media-video/ffmpeg/ffmpeg-3.3.3.ebuild |
22 |
@@ -96,7 +96,7 @@ FFMPEG_ENCODER_FLAG_MAP=( |
23 |
) |
24 |
|
25 |
IUSE=" |
26 |
- alsa doc +encode jack oss pic static-libs test v4l |
27 |
+ alsa chromium doc +encode jack oss pic static-libs test v4l |
28 |
${FFMPEG_FLAG_MAP[@]%:*} |
29 |
${FFMPEG_ENCODER_FLAG_MAP[@]%:*} |
30 |
" |
31 |
@@ -307,13 +307,17 @@ MULTILIB_WRAPPED_HEADERS=( |
32 |
/usr/include/libavutil/avconfig.h |
33 |
) |
34 |
|
35 |
-PATCHES=( "${FILESDIR}/openjpeg22.patch" ) |
36 |
+PATCHES=( |
37 |
+ "${FILESDIR}"/openjpeg22.patch |
38 |
+ "${FILESDIR}"/chromium.patch |
39 |
+) |
40 |
|
41 |
src_prepare() { |
42 |
if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot |
43 |
export revision=git-N-${FFMPEG_REVISION} |
44 |
fi |
45 |
default |
46 |
+ echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die |
47 |
} |
48 |
|
49 |
multilib_src_configure() { |
50 |
@@ -440,6 +444,20 @@ multilib_src_configure() { |
51 |
"${myconf[@]}" |
52 |
echo "${@}" |
53 |
"${@}" || die |
54 |
+ |
55 |
+ if multilib_is_native_abi && use chromium; then |
56 |
+ einfo "Configuring for Chromium" |
57 |
+ mkdir -p ../chromium || die |
58 |
+ pushd ../chromium >/dev/null || die |
59 |
+ set -- "${@}" \ |
60 |
+ --disable-shared \ |
61 |
+ --enable-static \ |
62 |
+ --enable-pic \ |
63 |
+ --extra-cflags="-DFF_API_CONVERGENCE_DURATION=0" |
64 |
+ echo "${@}" |
65 |
+ "${@}" || die |
66 |
+ popd >/dev/null || die |
67 |
+ fi |
68 |
} |
69 |
|
70 |
multilib_src_compile() { |
71 |
@@ -451,6 +469,13 @@ multilib_src_compile() { |
72 |
emake V=1 tools/${i} |
73 |
fi |
74 |
done |
75 |
+ |
76 |
+ if use chromium; then |
77 |
+ einfo "Compiling for Chromium" |
78 |
+ pushd ../chromium >/dev/null || die |
79 |
+ emake V=1 libffmpeg |
80 |
+ popd >/dev/null || die |
81 |
+ fi |
82 |
fi |
83 |
} |
84 |
|
85 |
@@ -463,6 +488,13 @@ multilib_src_install() { |
86 |
dobin tools/${i} |
87 |
fi |
88 |
done |
89 |
+ |
90 |
+ if use chromium; then |
91 |
+ einfo "Installing for Chromium" |
92 |
+ pushd ../chromium >/dev/null || die |
93 |
+ emake V=1 DESTDIR="${D}" install-libffmpeg |
94 |
+ popd >/dev/null || die |
95 |
+ fi |
96 |
fi |
97 |
} |