Gentoo Archives: gentoo-commits

From: Luca Barbato <lu_zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/libav/
Date: Sun, 01 Oct 2017 09:07:57
Message-Id: 1506848869.cc7003048c5ad9953602626e144225470b8f9767.lu_zero@gentoo
1 commit: cc7003048c5ad9953602626e144225470b8f9767
2 Author: Luca Barbato <lu_zero <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 1 09:07:34 2017 +0000
4 Commit: Luca Barbato <lu_zero <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 1 09:07:49 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc700304
7
8 media-video/libav: New point release
9
10 Bugfixes as usual.
11
12 Package-Manager: Portage-2.3.8, Repoman-2.3.2
13
14 media-video/libav/Manifest | 1 +
15 media-video/libav/libav-12.2.ebuild | 355 ++++++++++++++++++++++++++++++++++++
16 2 files changed, 356 insertions(+)
17
18 diff --git a/media-video/libav/Manifest b/media-video/libav/Manifest
19 index fcef865fbb9..d9e7283d886 100644
20 --- a/media-video/libav/Manifest
21 +++ b/media-video/libav/Manifest
22 @@ -9,5 +9,6 @@ DIST libav-11.6.tar.xz 4860268 SHA256 542f30e4266d2d2226e681b888bc718c995f5438f2
23 DIST libav-11.7.tar.xz 4861984 SHA256 8c9a75c89c6df58dd5e3f6f735d1ba5448680e23013fd66a51b50b4f49913c46 SHA512 23c6ffd0efdfa6b22c7863bf440d7469eba03a7990382fe33c8c4c7871edf250641ac536572516225679b0934e5c250ee0e2e91ea093c770a0c4c32b4776e3c5 WHIRLPOOL adb106828ae1e3c802b719a5c9feede1c96d02d79512bf04e2bf29da3d24e969a044a887eeb94dc76d528582026aed6cb1e0e342115507aaa98a8918de358ecd
24 DIST libav-11.8.tar.xz 4865796 SHA256 7014b869570b9ea759e5c06beb3e9debd024a1c5af517655a9e1ccfe145baf4e SHA512 26f9a6bb7312acc08b6785c260220ada3ca2a8db0d0f2bd4621b47082c275fbdb7978457cb423693ba9a61dc4570b05d0dceb5861ff0bcce859c349a6a8f49be WHIRLPOOL e6ca039aa8919b9e6b593de8d99728980e32176fc33276b419e5d73cb36981f487e1c35eac1f07d2fc0f0672e1b0d59d9fda022e16afe96467f77226c95a34a0
25 DIST libav-12.1.tar.xz 5267292 SHA256 fad96aa265d3d64b9e53c159559621ec888effa022908da8372164fa4cbe5d2d SHA512 a0dd5fcc95cb62901b05b59a63ce4fcc6fb2943f0032a824ff6cfeeab2d13bd5edc65811aba1d06fe4d794119da049c52e5a9efbbc3599b445b61769992c9919 WHIRLPOOL 31c0f8c0451b81b48a0373f94fcde68f5f23fa7e71fd040f6d97e7e7b20995627a59b08d4f2dfa07e55df3d23e8313af275b38872d923f9455031b8ec66e80b1
26 +DIST libav-12.2.tar.xz 5268804 SHA256 7b5620261fb3e372bf3992736862f598967988502f7804c39c5246b62348c53b SHA512 4b37cfb18a6cf6f12eddb5175b1751c093f3a495ae1d1b588884c60157cb260479b1d8fa3a6e3e08c00d7a26422b1e78a750eb35cf7bc763c01790f3567cba03 WHIRLPOOL 02d4a8bc00262c9dcdc1fd30187b8ac3ce51dadf533ba9df7cd2875d5e83787e4dd91b84a096aa798788535bb964c0eecebd7ec50bc453079cf61902aa269159
27 DIST libav-12.tar.xz 5265280 SHA256 72291ec223b08716fe5204b7b79ea8b90d75003730caa1c575dbf4232277a90e SHA512 55f7dd171882d191c79c6ade10f02123b8b7d897cbbd13c77766c9af944c5ba4bfbc81487966bac1ee459bc61f7a2471ddd9a3ea29b412296e9044b98440c423 WHIRLPOOL 3e52280b09354fddcf35002010d35b19657756a5b2c77e5c35551f899c1fa2c4e939f97058a1a77801caf7c8a9e8955d7d556ae1874c78f210eaf26b368c20ec
28 DIST libav-9.17.tar.xz 4080028 SHA256 e32d5f152bce1de283c002a35eb6e71f265877633dee8a40db4d16381dd5d17c SHA512 20af83d4b6a23c159c2386b6592ba6a6acf3f2c54e8aeb16dd0c8a64d637fbde24f37b864698b1143c6802b64a7b5e8ddfe0e7601b35c35686a789e2b3232f5a WHIRLPOOL ec07b5dd116e87416a9841044e09a6ef9b124fe4882f53e88711a32813d3d3a1d71f5067854bbd553ecdadec401dbbb8b504bfc1c6966bfd5e2db79459fb9995
29
30 diff --git a/media-video/libav/libav-12.2.ebuild b/media-video/libav/libav-12.2.ebuild
31 new file mode 100644
32 index 00000000000..4d3632d6996
33 --- /dev/null
34 +++ b/media-video/libav/libav-12.2.ebuild
35 @@ -0,0 +1,355 @@
36 +# Copyright 1999-2017 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=5
40 +
41 +inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
42 +
43 +if [[ ${PV} == *9999 ]] ; then
44 + : ${EGIT_REPO_URI:="git://git.libav.org/libav.git"}
45 + if [[ ${PV%9999} != "" ]] ; then
46 + : ${EGIT_BRANCH:="release/${PV%.9999}"}
47 + fi
48 + inherit git-r3
49 +fi
50 +
51 +DESCRIPTION="Complete solution to record, convert and stream audio and video"
52 +HOMEPAGE="https://libav.org/"
53 +if [[ ${PV} == *9999 ]] ; then
54 + SRC_URI=""
55 +elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
56 + SRC_URI="https://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
57 + SRC_URI+=" test? ( https://dev.gentoo.org/~lu_zero/libav/fate-${PV}.tar.xz )"
58 +else # Official release
59 + SRC_URI="https://libav.org/releases/${P}.tar.xz"
60 + FATE_VER=${PV%%_*}
61 + SRC_URI+=" test? ( https://dev.gentoo.org/~lu_zero/libav/fate-12-r1.tar.xz )"
62 +fi
63 +
64 +# 9999 does not have fate-*.tar.xz
65 +
66 +LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
67 +SLOT="0/12"
68 +[[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64
69 +~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
70 +~x64-solaris ~x86-solaris"
71 +IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk
72 + frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k libressl mp3
73 + +network nvidia openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
74 + static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X
75 + wavpack webp x264 x265 xvid +zlib"
76 +
77 +# String for CPU features in the useflag[:configure_option] form
78 +# if :configure_option isn't set, it will use 'useflag' as configure option
79 +CPU_FEATURES="altivec armv5te armv6 armv6t2 armvfp:vfp neon"
80 +X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext mmx mmxext sse sse2 sse3 ssse3 sse4_1:sse4 sse4_2:sse42 avx xop fma3 fma4 avx2"
81 +for i in ${X86_CPU_FEATURES} ; do
82 + CPU_FEATURES+=" cpu_flags_x86_${i%:*}:${i#*:}"
83 +done
84 +for i in ${CPU_FEATURES} ; do
85 + IUSE+=" ${i%:*}"
86 +done
87 +
88 +RDEPEND="
89 + !media-video/ffmpeg:0
90 + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
91 + amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
92 + bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
93 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
94 + cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
95 + encode? (
96 + aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
97 + amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
98 + faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
99 + mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
100 + theora? (
101 + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
102 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
103 + )
104 + twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
105 + vorbis? (
106 + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
107 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
108 + )
109 + webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
110 + wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
111 + x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
112 + x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
113 + xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
114 + )
115 + nvidia? ( media-video/nvidia-video-codec )
116 + fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
117 + frei0r? ( media-plugins/frei0r-plugins )
118 + gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
119 + ieee1394? (
120 + >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
121 + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
122 + )
123 + jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
124 + jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
125 + opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
126 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
127 + rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
128 + ssl? (
129 + openssl? (
130 + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
131 + libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
132 + )
133 + !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
134 + )
135 + sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
136 + schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
137 + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
138 + truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
139 + fontconfig? ( >=media-libs/fontconfig-2.10[${MULTILIB_USEDEP}] )
140 + vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
141 + vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
142 + vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
143 + X? ( >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}] )
144 + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
145 +"
146 +
147 +DEPEND="${RDEPEND}
148 + >=sys-devel/make-3.81
149 + doc? ( app-text/texi2html )
150 + ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
151 + cpu_flags_x86_mmx? ( dev-lang/yasm )
152 + rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
153 + schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
154 + ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
155 + test? ( sys-devel/bc )
156 + truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
157 + fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
158 + v4l? ( sys-kernel/linux-headers )
159 +"
160 +
161 +RDEPEND="${RDEPEND}
162 + abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
163 + !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
164 +
165 +# faac can't be binary distributed
166 +# openssl support marked as nonfree
167 +# faac and aac are concurent implementations
168 +# amr and aac require at least lgpl3
169 +# x264 requires gpl2
170 +REQUIRED_USE="
171 + rtmp? ( network )
172 + amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) cdio? ( gpl ) x265? ( gpl )
173 + test? ( encode zlib )
174 + fontconfig? ( truetype )
175 +"
176 +RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist ) nvidia? ( bindist )"
177 +
178 +MULTILIB_WRAPPED_HEADERS=(
179 + /usr/include/libavutil/avconfig.h
180 +)
181 +
182 +src_unpack() {
183 + [[ ${PV} == *9999 ]] && git-r3_src_unpack
184 + # 9999 does not have fate-*.tar.xz
185 + [[ ${PV%9999} != "" ]] && default_src_unpack
186 +}
187 +
188 +src_prepare() {
189 + epatch_user
190 +
191 + # if we have snapshot then we need to hardcode the version
192 + if [[ ${PV%_p*} != ${PV} ]]; then
193 + sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
194 + fi
195 +
196 + TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
197 + use zlib && TOOLS+=( cws2fws )
198 +
199 + MAKEOPTS+=" V=1"
200 +}
201 +
202 +multilib_src_configure() {
203 + local myconf=( ${EXTRA_LIBAV_CONF} )
204 + local uses i
205 +
206 + # 9999 does not have fate-*.tar.xz
207 + [[ ${PV%9999} != "" ]] && use test && myconf+=( --samples="${WORKDIR}/fate" )
208 +
209 + myconf+=(
210 + $(use_enable gpl)
211 + $(use_enable gpl version3)
212 + --enable-avfilter
213 + )
214 +
215 + # enabled by default
216 + uses="debug doc network zlib"
217 + for i in ${uses}; do
218 + use ${i} || myconf+=( --disable-${i} )
219 + done
220 + use bzip2 || myconf+=( --disable-bzlib )
221 + use sdl || myconf+=( --disable-avplay )
222 +
223 + if use ssl; then
224 + use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
225 + || myconf+=( --enable-gnutls )
226 + fi
227 +
228 + use custom-cflags && myconf+=( --disable-optimizations )
229 + use cpudetection && myconf+=( --enable-runtime-cpudetect )
230 +
231 + use vdpau || myconf+=( --disable-vdpau )
232 +
233 + use vaapi && myconf+=( --enable-vaapi )
234 +
235 + NVIDIA_INCLUDES="-I/opt/nvidia-video-codec/include -I/opt/cuda/include"
236 + NVIDIA_LIBS="-L/opt/cuda/lib64"
237 + use nvidia && myconf+=( --enable-nonfree --enable-cuda --enable-libnpp
238 + --extra-cflags="$NVIDIA_INCLUDES" --extra-ldflags="$NVIDIA_LIBS" )
239 +
240 + # Encoders
241 + if use encode; then
242 + use faac && myconf+=( --enable-nonfree )
243 + use mp3 && myconf+=( --enable-libmp3lame )
244 + use amr && myconf+=( --enable-libvo-amrwbenc )
245 + use aac && myconf+=( --enable-libvo-aacenc )
246 + use nvidia && myconf+=( --enable-nvenc )
247 + uses="faac theora twolame vorbis wavpack webp x264 x265 xvid"
248 + for i in ${uses}; do
249 + use ${i} && myconf+=( --enable-lib${i} )
250 + done
251 + else
252 + myconf+=( --disable-encoders )
253 + fi
254 +
255 + # libavdevice options
256 + use cdio && myconf+=( --enable-libcdio )
257 + use ieee1394 && myconf+=( --enable-libdc1394 )
258 + use pulseaudio && myconf+=( --enable-libpulse )
259 +
260 + # Indevs
261 + # v4l1 is gone since linux-headers-2.6.38
262 + myconf+=( --disable-indev=v4l )
263 + use v4l || myconf+=( --disable-indev=v4l2 )
264 + for i in alsa oss jack; do
265 + use ${i} || myconf+=( --disable-indev=${i} )
266 + done
267 + use X && myconf+=( --enable-libxcb )
268 + # Outdevs
269 + for i in alsa oss ; do
270 + use ${i} || myconf+=( --disable-outdev=${i} )
271 + done
272 + # libavfilter options
273 + use bs2b && myconf+=( --enable-libbs2b )
274 + multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
275 + use truetype && myconf+=( --enable-libfreetype )
276 + use fontconfig && myconf+=( --enable-libfontconfig )
277 +
278 + # Threads; we only support pthread for now
279 + use threads && myconf+=( --enable-pthreads )
280 +
281 + # Decoders
282 + use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
283 + use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
284 + uses="gsm opus rtmp schroedinger speex vpx"
285 + for i in ${uses}; do
286 + use ${i} && myconf+=( --enable-lib${i} )
287 + done
288 + use jpeg2k && myconf+=( --enable-libopenjpeg )
289 +
290 + # CPU features
291 + for i in ${CPU_FEATURES}; do
292 + use ${i%:*} || myconf+=( --disable-${i#*:} )
293 + done
294 +
295 + # pass the right -mfpu as extra
296 + use neon && use arm && append-cflags -mfpu=neon
297 +
298 + # disable mmx accelerated code if PIC is required
299 + # as the provided asm decidedly is not PIC for x86.
300 + if use pic && [[ ${ABI} == x86 ]]; then
301 + myconf+=( --disable-mmx --disable-mmxext )
302 + fi
303 +
304 + # Option to force building pic
305 + use pic && myconf+=( --enable-pic )
306 +
307 + # cross compile support
308 + if tc-is-cross-compiler ; then
309 + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
310 + case ${CHOST} in
311 + *freebsd*)
312 + myconf+=( --target-os=freebsd )
313 + ;;
314 + mingw32*)
315 + myconf+=( --target-os=mingw32 )
316 + ;;
317 + *linux*)
318 + myconf+=( --target-os=linux )
319 + ;;
320 + esac
321 + fi
322 +
323 + # Misc stuff
324 + use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
325 +
326 + # Forcing arm would make the compiler break left and right
327 + if [[ ${ABI} == arm ]]; then
328 + filter-flags -marm
329 + fi
330 +
331 + # Specific workarounds for too-few-registers arch...
332 + if [[ ${ABI} == x86 ]]; then
333 + local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
334 + filter-flags -fforce-addr -momit-leaf-frame-pointer
335 + append-flags -fomit-frame-pointer
336 + is-flag -O? || append-flags -O2
337 + if use debug; then
338 + # no need to warn about debug if not using debug flag
339 + ewarn ""
340 + ewarn "Debug information will be almost useless as the frame pointer is omitted."
341 + ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
342 + ewarn "difficult to fix. Please have that in mind."
343 + ewarn ""
344 + fi
345 + fi
346 +
347 + set -- "${S}"/configure \
348 + --prefix="${EPREFIX}"/usr \
349 + --libdir="${EPREFIX}"/usr/$(get_libdir) \
350 + --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
351 + --mandir="${EPREFIX}"/usr/share/man \
352 + --enable-shared \
353 + --cc="$(tc-getCC)" \
354 + --ar="$(tc-getAR)" \
355 + --optflags="${CFLAGS}" \
356 + --extra-cflags="${CFLAGS}" \
357 + $(use_enable static-libs static) \
358 + "${myconf[@]}"
359 + echo "${@}"
360 + "${@}" || die
361 +}
362 +
363 +multilib_src_compile() {
364 + emake
365 +
366 + if use tools; then
367 + tc-export CC
368 +
369 + emake ${TOOLS[@]/#/tools/}
370 + fi
371 +}
372 +
373 +multilib_src_install() {
374 + emake DESTDIR="${D}" install install-man
375 + use doc && dodoc doc/*.html
376 +
377 + if use tools; then
378 + dobin ${TOOLS[@]/#/tools/}
379 + fi
380 +}
381 +
382 +multilib_src_install_all() {
383 + dodoc Changelog README.md INSTALL
384 +}
385 +
386 +multilib_src_test() {
387 + local _libs="$(for i in lib*/;do echo -n "${BUILD_DIR}/${i%/}:";done)"
388 + einfo "LD_LIBRARY_PATH is set to \"${_libs}\""
389 + LD_LIBRARY_PATH="${_libs}" make -j1 fate V=1
390 +}