1 |
commit: abae5c30cf1d58923d8a4ec0e277544caae2ff64 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 1 08:12:33 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 1 08:25:57 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abae5c30 |
7 |
|
8 |
media-video/ffmpeg: bump to 2.8.6 |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
media-video/ffmpeg/Manifest | 1 + |
14 |
media-video/ffmpeg/ffmpeg-2.8.6.ebuild | 458 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 459 insertions(+) |
16 |
|
17 |
diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest |
18 |
index 139e91e..af74a2e 100644 |
19 |
--- a/media-video/ffmpeg/Manifest |
20 |
+++ b/media-video/ffmpeg/Manifest |
21 |
@@ -6,3 +6,4 @@ DIST ffmpeg-2.8.2.tar.bz2 8573586 SHA256 830ec647f7ad774fc0caf17ba47774bf5dee7a8 |
22 |
DIST ffmpeg-2.8.3.tar.bz2 8576798 SHA256 1bcf993a71839bb4a37eaa0c51daf315932b6dad6089f672294545cc51a5caf6 SHA512 aadfab7db84b85cbfe44a5c7b47e447a1711c3d78fa195f30d3f6644e95842c8d484172e4c98f75cbae5d3783f4dd2972a892123d9a9ff90be32db20b0dc8aa6 WHIRLPOOL c004fe02f300772b439ae070538d4ef4c5c514dd8a080de8e1a560597e79607b709319072f6120c35722481bc11f30077cc74a64800e390a7c5fabe82ded1718 |
23 |
DIST ffmpeg-2.8.4.tar.bz2 8579383 SHA256 83cc8136a7845546062a43cda9ae3cf0a02f43ef5e434d2f997f055231a75f8e SHA512 37f88c05fd0b8d1c4de83f5330f756cddd157ba78487d78436899d46a49a4e420eb086d263dd77c6c31a61c91f7839f40b07ed87817d686498b90caf9d870aa5 WHIRLPOOL 7e1a85a0eb00f33aad4d18b6a8d4d76c78aa0654c4ce10a864996239950fadd4a4995c481cd0e95a6f669c566cacd3da9ada4c66bb0fba011d4d942c8679eb99 |
24 |
DIST ffmpeg-2.8.5.tar.bz2 8580755 SHA256 3b6d9951533323ee64a21d0aa7667a780b3470bfe4e0fb7c1b33307ce290615a SHA512 2a46bef5ac99d114be7d3ece561ae71d09b87eaecba5da3c02ff1fe7e5cf4913e1b6feecca405540d1d70f9126591c209055edd7df1ad1d8bbf02f107701929e WHIRLPOOL 59ef96e7536a098ccf42526f64173df750558d489afb641c49168e2fc45672b160519d8a9e9e3093e1fd02a1af8ca1936de7f29c316685ac25946636890c760e |
25 |
+DIST ffmpeg-2.8.6.tar.bz2 8582420 SHA256 40611e329bc354592c6f8f1deb033c31b91f80e91f5707ca4f9afceca78d8e62 SHA512 68fb41884b95953025b9c56496b17e13062196800ff9834dac43a12e9a0048d4a763f50a2256418c91cc850b63713e1debbf9170737f29621f48946adef152dc WHIRLPOOL 20a4b12b5a03f187b753cca43c65bd75b49cc21c9ffabad31b8ac0ab47fc8e017931ad5076b701c303bb594b20acb403d3ec2dabdf647fd262c070c8dabf1eea |
26 |
|
27 |
diff --git a/media-video/ffmpeg/ffmpeg-2.8.6.ebuild b/media-video/ffmpeg/ffmpeg-2.8.6.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..8954632 |
30 |
--- /dev/null |
31 |
+++ b/media-video/ffmpeg/ffmpeg-2.8.6.ebuild |
32 |
@@ -0,0 +1,458 @@ |
33 |
+# Copyright 1999-2015 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI="5" |
38 |
+ |
39 |
+# Subslot: libavutil major.libavcodec major.libavformat major |
40 |
+# Since FFmpeg ships several libraries, subslot is kind of limited here. |
41 |
+# Most consumers will use those three libraries, if a "less used" library |
42 |
+# changes its soname, consumers will have to be rebuilt the old way |
43 |
+# (preserve-libs). |
44 |
+# If, for example, a package does not link to libavformat and only libavformat |
45 |
+# changes its ABI then this package will be rebuilt needlessly. Hence, such a |
46 |
+# package is free _not_ to := depend on FFmpeg but I would strongly encourage |
47 |
+# doing so since such a case is unlikely. |
48 |
+FFMPEG_SUBSLOT=54.56.56 |
49 |
+ |
50 |
+SCM="" |
51 |
+if [ "${PV#9999}" != "${PV}" ] ; then |
52 |
+ SCM="git-2" |
53 |
+ EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git" |
54 |
+fi |
55 |
+ |
56 |
+inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} |
57 |
+ |
58 |
+DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec" |
59 |
+HOMEPAGE="http://ffmpeg.org/" |
60 |
+if [ "${PV#9999}" != "${PV}" ] ; then |
61 |
+ SRC_URI="" |
62 |
+elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot |
63 |
+ SRC_URI="mirror://gentoo/${P}.tar.bz2" |
64 |
+else # Release |
65 |
+ SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2" |
66 |
+fi |
67 |
+FFMPEG_REVISION="${PV#*_p}" |
68 |
+ |
69 |
+SLOT="0/${FFMPEG_SUBSLOT}" |
70 |
+LICENSE=" |
71 |
+ !gpl? ( LGPL-2.1 ) |
72 |
+ gpl? ( GPL-2 ) |
73 |
+ amr? ( |
74 |
+ gpl? ( GPL-3 ) |
75 |
+ !gpl? ( LGPL-3 ) |
76 |
+ ) |
77 |
+ encode? ( |
78 |
+ aac? ( |
79 |
+ gpl? ( GPL-3 ) |
80 |
+ !gpl? ( LGPL-3 ) |
81 |
+ ) |
82 |
+ amrenc? ( |
83 |
+ gpl? ( GPL-3 ) |
84 |
+ !gpl? ( LGPL-3 ) |
85 |
+ ) |
86 |
+ ) |
87 |
+ samba? ( GPL-3 ) |
88 |
+" |
89 |
+if [ "${PV#9999}" = "${PV}" ] ; then |
90 |
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" |
91 |
+fi |
92 |
+ |
93 |
+# Options to use as use_enable in the foo[:bar] form. |
94 |
+# This will feed configure with $(use_enable foo bar) |
95 |
+# or $(use_enable foo foo) if no :bar is set. |
96 |
+# foo is added to IUSE. |
97 |
+FFMPEG_FLAG_MAP=( |
98 |
+ +bzip2:bzlib cpudetection:runtime-cpudetect debug doc gnutls +gpl |
99 |
+ +hardcoded-tables +iconv lzma +network openssl +postproc |
100 |
+ samba:libsmbclient sdl:ffplay sdl vaapi vdpau X:xlib xcb:libxcb |
101 |
+ xcb:libxcb-shm xcb:libxcb-xfixes +zlib |
102 |
+ # libavdevice options |
103 |
+ cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal |
104 |
+ opengl |
105 |
+ # indevs |
106 |
+ libv4l:libv4l2 pulseaudio:libpulse |
107 |
+ # decoders |
108 |
+ amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac |
109 |
+ jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm |
110 |
+ modplug:libmodplug opus:libopus quvi:libquvi librtmp ssh:libssh |
111 |
+ schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx |
112 |
+ zvbi:libzvbi |
113 |
+ # libavfilter options |
114 |
+ bs2b:libbs2b flite:libflite frei0r fribidi:libfribidi fontconfig ladspa |
115 |
+ libass truetype:libfreetype |
116 |
+ # libswresample options |
117 |
+ libsoxr |
118 |
+ # Threads; we only support pthread for now but ffmpeg supports more |
119 |
+ +threads:pthreads |
120 |
+) |
121 |
+ |
122 |
+# Same as above but for encoders, i.e. they do something only with USE=encode. |
123 |
+FFMPEG_ENCODER_FLAG_MAP=( |
124 |
+ aac:libvo-aacenc amrenc:libvo-amrwbenc mp3:libmp3lame |
125 |
+ aacplus:libaacplus faac:libfaac snappy:libsnappy theora:libtheora |
126 |
+ twolame:libtwolame wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 |
127 |
+ xvid:libxvid |
128 |
+) |
129 |
+ |
130 |
+IUSE=" |
131 |
+ alsa +encode examples jack libressl oss pic static-libs test v4l |
132 |
+ ${FFMPEG_FLAG_MAP[@]%:*} |
133 |
+ ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} |
134 |
+" |
135 |
+ |
136 |
+# Strings for CPU features in the useflag[:configure_option] form |
137 |
+# if :configure_option isn't set, it will use 'useflag' as configure option |
138 |
+ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp ) |
139 |
+MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu ) |
140 |
+PPC_CPU_FEATURES=( altivec ) |
141 |
+X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) |
142 |
+X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) |
143 |
+X86_CPU_REQUIRED_USE=" |
144 |
+ cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) |
145 |
+ cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) |
146 |
+ cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) |
147 |
+ cpu_flags_x86_xop? ( cpu_flags_x86_avx ) |
148 |
+ cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) |
149 |
+ cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) |
150 |
+ cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) |
151 |
+ cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) |
152 |
+ cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) |
153 |
+ cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) |
154 |
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) |
155 |
+ cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) |
156 |
+ cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) |
157 |
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) |
158 |
+" |
159 |
+ |
160 |
+IUSE="${IUSE} |
161 |
+ ${ARM_CPU_FEATURES[@]%:*} |
162 |
+ ${MIPS_CPU_FEATURES[@]%:*} |
163 |
+ ${PPC_CPU_FEATURES[@]%:*} |
164 |
+ ${X86_CPU_FEATURES[@]%:*} |
165 |
+" |
166 |
+ |
167 |
+CPU_REQUIRED_USE=" |
168 |
+ ${X86_CPU_REQUIRED_USE} |
169 |
+" |
170 |
+ |
171 |
+# "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to |
172 |
+# $(tc-arch). |
173 |
+CPU_FEATURES_MAP=" |
174 |
+ arm:ARM |
175 |
+ arm64:ARM |
176 |
+ mips:MIPS |
177 |
+ ppc:PPC |
178 |
+ ppc64:PPC |
179 |
+ x86:X86 |
180 |
+ amd64:X86 |
181 |
+" |
182 |
+ |
183 |
+FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) |
184 |
+IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" |
185 |
+ |
186 |
+RDEPEND=" |
187 |
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) |
188 |
+ amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) |
189 |
+ bluray? ( >=media-libs/libbluray-0.3.0-r1[${MULTILIB_USEDEP}] ) |
190 |
+ bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) |
191 |
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) |
192 |
+ cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) |
193 |
+ celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] ) |
194 |
+ encode? ( |
195 |
+ aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] ) |
196 |
+ aacplus? ( >=media-libs/libaacplus-2.0.2-r1[${MULTILIB_USEDEP}] ) |
197 |
+ amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) |
198 |
+ faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] ) |
199 |
+ mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) |
200 |
+ snappy? ( >=app-arch/snappy-1.1.2-r1[${MULTILIB_USEDEP}] ) |
201 |
+ theora? ( |
202 |
+ >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] |
203 |
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] |
204 |
+ ) |
205 |
+ twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) |
206 |
+ wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] ) |
207 |
+ webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] ) |
208 |
+ x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) |
209 |
+ x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) |
210 |
+ xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) |
211 |
+ ) |
212 |
+ fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) |
213 |
+ flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) |
214 |
+ fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) |
215 |
+ frei0r? ( media-plugins/frei0r-plugins ) |
216 |
+ fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) |
217 |
+ gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) |
218 |
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] ) |
219 |
+ gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) |
220 |
+ iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) |
221 |
+ iec61883? ( |
222 |
+ >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] |
223 |
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] |
224 |
+ >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] |
225 |
+ ) |
226 |
+ ieee1394? ( |
227 |
+ >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}] |
228 |
+ >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] |
229 |
+ ) |
230 |
+ jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] ) |
231 |
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] ) |
232 |
+ libass? ( >=media-libs/libass-0.10.2[${MULTILIB_USEDEP}] ) |
233 |
+ libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) |
234 |
+ libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) |
235 |
+ libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) |
236 |
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) |
237 |
+ modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) |
238 |
+ openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) |
239 |
+ opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] ) |
240 |
+ openssl? ( |
241 |
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] ) |
242 |
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] ) |
243 |
+ ) |
244 |
+ opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) |
245 |
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] ) |
246 |
+ quvi? ( media-libs/libquvi:0.4[${MULTILIB_USEDEP}] ) |
247 |
+ librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) |
248 |
+ samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] ) |
249 |
+ schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] ) |
250 |
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] ) |
251 |
+ speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) |
252 |
+ ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] ) |
253 |
+ truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] ) |
254 |
+ vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] ) |
255 |
+ vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) |
256 |
+ vorbis? ( |
257 |
+ >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] |
258 |
+ >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] |
259 |
+ ) |
260 |
+ vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) |
261 |
+ X? ( |
262 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
263 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
264 |
+ !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] ) |
265 |
+ >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] |
266 |
+ ) |
267 |
+ xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] ) |
268 |
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) |
269 |
+ zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) |
270 |
+ !media-video/qt-faststart |
271 |
+ postproc? ( !media-libs/libpostproc ) |
272 |
+" |
273 |
+ |
274 |
+DEPEND="${RDEPEND} |
275 |
+ >=sys-devel/make-3.81 |
276 |
+ doc? ( app-text/texi2html ) |
277 |
+ fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] ) |
278 |
+ gnutls? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] ) |
279 |
+ ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] ) |
280 |
+ ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) |
281 |
+ libv4l? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] ) |
282 |
+ cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 ) |
283 |
+ librtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] ) |
284 |
+ schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] ) |
285 |
+ test? ( net-misc/wget sys-devel/bc ) |
286 |
+ truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] ) |
287 |
+ v4l? ( sys-kernel/linux-headers ) |
288 |
+" |
289 |
+ |
290 |
+RDEPEND="${RDEPEND} |
291 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3 |
292 |
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )" |
293 |
+ |
294 |
+# Code requiring FFmpeg to be built under gpl license |
295 |
+GPL_REQUIRED_USE=" |
296 |
+ postproc? ( gpl ) |
297 |
+ frei0r? ( gpl ) |
298 |
+ cdio? ( gpl ) |
299 |
+ samba? ( gpl ) |
300 |
+ zvbi? ( gpl ) |
301 |
+ encode? ( |
302 |
+ x264? ( gpl ) |
303 |
+ x265? ( gpl ) |
304 |
+ xvid? ( gpl ) |
305 |
+ X? ( !xcb? ( gpl ) ) |
306 |
+ ) |
307 |
+" |
308 |
+REQUIRED_USE=" |
309 |
+ libv4l? ( v4l ) |
310 |
+ fftools_cws2fws? ( zlib ) |
311 |
+ test? ( encode ) |
312 |
+ ${GPL_REQUIRED_USE} |
313 |
+ ${CPU_REQUIRED_USE}" |
314 |
+RESTRICT=" |
315 |
+ encode? ( faac? ( bindist ) aacplus? ( bindist ) ) |
316 |
+ gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) |
317 |
+" |
318 |
+ |
319 |
+S=${WORKDIR}/${P/_/-} |
320 |
+ |
321 |
+MULTILIB_WRAPPED_HEADERS=( |
322 |
+ /usr/include/libavutil/avconfig.h |
323 |
+) |
324 |
+ |
325 |
+src_prepare() { |
326 |
+ if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot |
327 |
+ export revision=git-N-${FFMPEG_REVISION} |
328 |
+ fi |
329 |
+ epatch_user |
330 |
+} |
331 |
+ |
332 |
+multilib_src_configure() { |
333 |
+ local myconf=( ${EXTRA_FFMPEG_CONF} ) |
334 |
+ |
335 |
+ local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) |
336 |
+ use openssl && use gpl && myconf+=( --enable-nonfree ) |
337 |
+ use samba && myconf+=( --enable-version3 ) |
338 |
+ |
339 |
+ # Encoders |
340 |
+ if use encode ; then |
341 |
+ ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) |
342 |
+ |
343 |
+ # Licensing. |
344 |
+ if use aac || use amrenc ; then |
345 |
+ myconf+=( --enable-version3 ) |
346 |
+ fi |
347 |
+ if use aacplus || use faac ; then |
348 |
+ myconf+=( --enable-nonfree ) |
349 |
+ fi |
350 |
+ else |
351 |
+ myconf+=( --disable-encoders ) |
352 |
+ fi |
353 |
+ |
354 |
+ # Indevs |
355 |
+ use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) |
356 |
+ for i in alsa oss jack ; do |
357 |
+ use ${i} || myconf+=( --disable-indev=${i} ) |
358 |
+ done |
359 |
+ use xcb || ffuse+=( X:x11grab ) |
360 |
+ |
361 |
+ # Outdevs |
362 |
+ for i in alsa oss sdl ; do |
363 |
+ use ${i} || myconf+=( --disable-outdev=${i} ) |
364 |
+ done |
365 |
+ |
366 |
+ # Decoders |
367 |
+ use amr && myconf+=( --enable-version3 ) |
368 |
+ use fdk && use gpl && myconf+=( --enable-nonfree ) |
369 |
+ |
370 |
+ for i in "${ffuse[@]#+}" ; do |
371 |
+ myconf+=( $(use_enable ${i%:*} ${i#*:}) ) |
372 |
+ done |
373 |
+ |
374 |
+ # (temporarily) disable non-multilib deps |
375 |
+ if ! multilib_is_native_abi; then |
376 |
+ for i in frei0r ; do |
377 |
+ myconf+=( --disable-${i} ) |
378 |
+ done |
379 |
+ fi |
380 |
+ |
381 |
+ # CPU features |
382 |
+ for i in ${CPU_FEATURES_MAP} ; do |
383 |
+ if [ "$(tc-arch)" = "${i%:*}" ] ; then |
384 |
+ local var="${i#*:}_CPU_FEATURES[@]" |
385 |
+ for j in ${!var} ; do |
386 |
+ use ${j%:*} || myconf+=( --disable-${j#*:} ) |
387 |
+ done |
388 |
+ fi |
389 |
+ done |
390 |
+ |
391 |
+ if use pic ; then |
392 |
+ myconf+=( --enable-pic ) |
393 |
+ # disable asm code if PIC is required |
394 |
+ # as the provided asm decidedly is not PIC for x86. |
395 |
+ [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) |
396 |
+ fi |
397 |
+ [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 |
398 |
+ |
399 |
+ # Try to get cpu type based on CFLAGS. |
400 |
+ # Bug #172723 |
401 |
+ # We need to do this so that features of that CPU will be better used |
402 |
+ # If they contain an unknown CPU it will not hurt since ffmpeg's configure |
403 |
+ # will just ignore it. |
404 |
+ for i in $(get-flag mcpu) $(get-flag march) $(get-flag mtune) ; do |
405 |
+ [[ ${i} = native ]] && i="host" # bug #273421 |
406 |
+ myconf+=( --cpu=${i} ) |
407 |
+ break |
408 |
+ done |
409 |
+ |
410 |
+ # LTO support, bug #566282 |
411 |
+ is-flagq "-flto*" && myconf+=( "--enable-lto" ) |
412 |
+ |
413 |
+ # Mandatory configuration |
414 |
+ myconf=( |
415 |
+ --enable-avfilter |
416 |
+ --enable-avresample |
417 |
+ --disable-stripping |
418 |
+ "${myconf[@]}" |
419 |
+ ) |
420 |
+ |
421 |
+ # cross compile support |
422 |
+ if tc-is-cross-compiler ; then |
423 |
+ myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- ) |
424 |
+ case ${CHOST} in |
425 |
+ *freebsd*) |
426 |
+ myconf+=( --target-os=freebsd ) |
427 |
+ ;; |
428 |
+ mingw32*) |
429 |
+ myconf+=( --target-os=mingw32 ) |
430 |
+ ;; |
431 |
+ *linux*) |
432 |
+ myconf+=( --target-os=linux ) |
433 |
+ ;; |
434 |
+ esac |
435 |
+ fi |
436 |
+ |
437 |
+ set -- "${S}/configure" \ |
438 |
+ --prefix="${EPREFIX}/usr" \ |
439 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
440 |
+ --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ |
441 |
+ --mandir="${EPREFIX}/usr/share/man" \ |
442 |
+ --enable-shared \ |
443 |
+ --cc="$(tc-getCC)" \ |
444 |
+ --cxx="$(tc-getCXX)" \ |
445 |
+ --ar="$(tc-getAR)" \ |
446 |
+ --optflags="${CFLAGS}" \ |
447 |
+ $(use_enable static-libs static) \ |
448 |
+ "${myconf[@]}" |
449 |
+ echo "${@}" |
450 |
+ "${@}" || die |
451 |
+} |
452 |
+ |
453 |
+multilib_src_compile() { |
454 |
+ emake V=1 |
455 |
+ |
456 |
+ if multilib_is_native_abi; then |
457 |
+ for i in "${FFTOOLS[@]}" ; do |
458 |
+ if use fftools_${i} ; then |
459 |
+ emake V=1 tools/${i} |
460 |
+ fi |
461 |
+ done |
462 |
+ fi |
463 |
+} |
464 |
+ |
465 |
+multilib_src_install() { |
466 |
+ emake V=1 DESTDIR="${D}" install install-man |
467 |
+ |
468 |
+ if multilib_is_native_abi; then |
469 |
+ for i in "${FFTOOLS[@]}" ; do |
470 |
+ if use fftools_${i} ; then |
471 |
+ dobin tools/${i} |
472 |
+ fi |
473 |
+ done |
474 |
+ fi |
475 |
+} |
476 |
+ |
477 |
+multilib_src_install_all() { |
478 |
+ dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges |
479 |
+ [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" |
480 |
+ use doc && dohtml -r doc/* |
481 |
+ if use examples ; then |
482 |
+ dodoc -r doc/examples |
483 |
+ docompress -x /usr/share/doc/${PF}/examples |
484 |
+ fi |
485 |
+} |
486 |
+ |
487 |
+multilib_src_test() { |
488 |
+ LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \ |
489 |
+ emake V=1 fate |
490 |
+} |