Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/libav/
Date: Wed, 24 Jan 2018 23:45:37
Message-Id: 1516837526.db00746d6fe4a6c65bcc2efef8a0f3807b275f58.bman@gentoo
1 commit: db00746d6fe4a6c65bcc2efef8a0f3807b275f58
2 Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 24 23:45:26 2018 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 24 23:45:26 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db00746d
7
8 media-video/libav: cleanup vulnerable wrt bug #626344
9
10 media-video/libav/Manifest | 3 -
11 media-video/libav/libav-12.1.ebuild | 358 ------------------------------------
12 media-video/libav/libav-12.ebuild | 358 ------------------------------------
13 3 files changed, 719 deletions(-)
14
15 diff --git a/media-video/libav/Manifest b/media-video/libav/Manifest
16 index 849ca82e11e..72221bb9fe7 100644
17 --- a/media-video/libav/Manifest
18 +++ b/media-video/libav/Manifest
19 @@ -1,5 +1,4 @@
20 DIST 0001-x86-Put-COPY3_IF_LT-under-HAVE_6REGS.patch.gz 736 BLAKE2B 04e7b9f1b26e3df50e89e9af4663a2765ca6a71bf52b9f931b2d194366526642cdf15b96b1bba98167c1fe1304da71528b05a4504df6153d0cbf4e3b219c0bb7 SHA512 dbdfdf7fc1d42ebd93b0853e85ba0c07d816035c126a9303e6a5656bb9faeea16f16068d7e4aa67c7c4ade8ca09f64669e67f52d7d0a2a65518fa3897d586311
21 -DIST 0001-xcb-Add-all-the-libraries-to-the-link-line-explicitl.patch 1017 BLAKE2B ec5947dc258c03a4077da898b0895693de3a35979f086d0551696616ab2f2df1e7e122ad53f93ff0fbf78782acfd0ef2a9f664a1a33f4a4d40d9072733638a1f SHA512 8cf8d1dd46a423381e70ab046e5843f13028c1d2ee14877e96339ea6a7d80d3ae5b2441b5b41ca23ba0104a5ff2d1b7e871f43680967bad0b7f242952d7b0be9
22 DIST fate-11.tar.xz 691009480 BLAKE2B 01e1e8125d34a623b5bd4bf1da0daee96d045e73fd069cf438f471970ad4cf71df8bd3235306b3493cb547fb5ac4bb8fce416e194fec9a7e9b9de68a5a15d572 SHA512 f9dc152964e3f19cf32d5d4cbc923a2bd05ba3b0f8f3880122df79d32852ee9d4795a0bfd66d7a2925299e9e9533888df6103e212ea3e5cbfe799d17ffa2b433
23 DIST fate-12-r1.tar.xz 763758260 BLAKE2B 299e1a2a773e49c7a51c1222ac34eaea24f77420570a1b0c0b18db5517736656f52ad0a7ca807f65f5e9f9597709265fcd950cf989ad995aa4289ba0e364950e SHA512 084f584c34d34b66c1f4d4742a11376ee2b90f6a07529b5aba6d50421dc8f863fded73dd57ad2c201aadfd529f0f923fa531ea9b41aaaa7b682846ef565a1018
24 DIST fate-12.tar.xz 755165356 BLAKE2B 031cef24bcfae6205cd6546f453cddb17387176ae837086dd38c8c7132ad9b8dee5367be5fb1b8c604b2203a1e2a55f0c3be2a62f825a95a7ace1aceb4593b70 SHA512 f6ffb3b673b01debd71d7c79cd5c3c4d6f6adb975ed0bdb7c791d674efd8a84ac98f7db3943dfbe3756a3f8819ceab2bdf4633c15fefddf0f8e10adfc805c1e1
25 @@ -9,8 +8,6 @@ DIST libav-11.4.tar.xz 4860264 BLAKE2B 3e56751b806cdf542bf078e790085bb0599696df0
26 DIST libav-11.6.tar.xz 4860268 BLAKE2B 52bd7cce7c1bbf7550d8ebfc00b735903bad1aefe0ecff6bfe80eb23deec6702974f63ec4b50d6956a6511f8dbeb9c6ee57b74786e6f8155b958c3c507391c8d SHA512 bff3e22de93e4ab357715ae20e25b6435df52d1868c5164426a693d14fe7f54e47a46c4c62a36fbf27bd204e12f6a29a6f58016c7deaa838915d424b5ce530bd
27 DIST libav-11.7.tar.xz 4861984 BLAKE2B 4191e47808b4e2827594398c33f4cd95c789379c0ec1256a18385d4570139054fbb0549c2ab45f3c20c41d2a5cb861ea439a7e76939ccfa856ea2101fc181f55 SHA512 23c6ffd0efdfa6b22c7863bf440d7469eba03a7990382fe33c8c4c7871edf250641ac536572516225679b0934e5c250ee0e2e91ea093c770a0c4c32b4776e3c5
28 DIST libav-11.8.tar.xz 4865796 BLAKE2B fb0e8f129edee0423252f334b12485d514f9fdfb3d916877d83141e0985ec4efb4de0f5b65d6e3e6d94b835f317a52116b849eec99d023ebb109bdbc2b7a8c5c SHA512 26f9a6bb7312acc08b6785c260220ada3ca2a8db0d0f2bd4621b47082c275fbdb7978457cb423693ba9a61dc4570b05d0dceb5861ff0bcce859c349a6a8f49be
29 -DIST libav-12.1.tar.xz 5267292 BLAKE2B 4b8e5c9175aa34b2195238e16af4a21706ef18babb491c0c08d4432cb73ad576eaea55b5231af9033dc252a66b1fd51c5964b1d8ad80c85fe2600c27c332c3da SHA512 a0dd5fcc95cb62901b05b59a63ce4fcc6fb2943f0032a824ff6cfeeab2d13bd5edc65811aba1d06fe4d794119da049c52e5a9efbbc3599b445b61769992c9919
30 DIST libav-12.2.tar.xz 5268804 BLAKE2B e25b3dfe1026b9e69c89cbec2090070088a7004dc03e8cc23da2da03824a627c733c16c67e5fc65ec9f19942d93405d5ba6926de83cae04c497597f55220f004 SHA512 4b37cfb18a6cf6f12eddb5175b1751c093f3a495ae1d1b588884c60157cb260479b1d8fa3a6e3e08c00d7a26422b1e78a750eb35cf7bc763c01790f3567cba03
31 -DIST libav-12.tar.xz 5265280 BLAKE2B 2fca534267537343ae51bf07ce226057ec0ecef81163c81559c7492a1591b611f393b2e8026733a733c715a890137b353140743a53227f030806a1c35418c910 SHA512 55f7dd171882d191c79c6ade10f02123b8b7d897cbbd13c77766c9af944c5ba4bfbc81487966bac1ee459bc61f7a2471ddd9a3ea29b412296e9044b98440c423
32 DIST libav-13_pre20171219.tar.xz 5427904 BLAKE2B 074dc5d071aeb656fc14a015c2e3c168aa81d25e2fb08d99e300dc47d7ea28f61500fcfab0b16fa136261a5af27631b7536eb3aefa0e1feb4d615af57f9f5a36 SHA512 0c9b59957f1fbbff8f5b95b02c11014a4efdddf4b7e1b158cd0fda3af8b89bd90d48263ed0239915adfb7abcd7a8b22c278cd5cf1d01822bd22df65cc7f69689
33 DIST libav-9.17.tar.xz 4080028 BLAKE2B 206e80835292af9f4c1c65539e69981b6993679c11e8a1feef1e37dc32174e47744ebce319b8709bcd60804f493fab1e524c781e174d60d9ebe35ad01f6fbc60 SHA512 20af83d4b6a23c159c2386b6592ba6a6acf3f2c54e8aeb16dd0c8a64d637fbde24f37b864698b1143c6802b64a7b5e8ddfe0e7601b35c35686a789e2b3232f5a
34
35 diff --git a/media-video/libav/libav-12.1.ebuild b/media-video/libav/libav-12.1.ebuild
36 deleted file mode 100644
37 index e3d51f05375..00000000000
38 --- a/media-video/libav/libav-12.1.ebuild
39 +++ /dev/null
40 @@ -1,358 +0,0 @@
41 -# Copyright 1999-2017 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI=5
45 -
46 -inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
47 -
48 -if [[ ${PV} == *9999 ]] ; then
49 - : ${EGIT_REPO_URI:="git://git.libav.org/libav.git"}
50 - if [[ ${PV%9999} != "" ]] ; then
51 - : ${EGIT_BRANCH:="release/${PV%.9999}"}
52 - fi
53 - inherit git-r3
54 -fi
55 -
56 -DESCRIPTION="Complete solution to record, convert and stream audio and video"
57 -HOMEPAGE="https://libav.org/"
58 -if [[ ${PV} == *9999 ]] ; then
59 - SRC_URI=""
60 -elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
61 - SRC_URI="https://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
62 - SRC_URI+=" test? ( https://dev.gentoo.org/~lu_zero/libav/fate-${PV}.tar.xz )"
63 -else # Official release
64 - SRC_URI="https://libav.org/releases/${P}.tar.xz"
65 - FATE_VER=${PV%%_*}
66 - SRC_URI+=" test? ( https://dev.gentoo.org/~lu_zero/libav/fate-12-r1.tar.xz )"
67 -fi
68 -
69 -SRC_URI+=" https://dev.gentoo.org/~lu_zero/libav/0001-xcb-Add-all-the-libraries-to-the-link-line-explicitl.patch"
70 -# 9999 does not have fate-*.tar.xz
71 -
72 -LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
73 -SLOT="0/12"
74 -[[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64
75 -~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
76 -~x64-solaris ~x86-solaris"
77 -IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk
78 - frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k libressl mp3
79 - +network nvidia openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
80 - static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X
81 - wavpack webp x264 x265 xvid +zlib"
82 -
83 -# String for CPU features in the useflag[:configure_option] form
84 -# if :configure_option isn't set, it will use 'useflag' as configure option
85 -CPU_FEATURES="altivec armv5te armv6 armv6t2 armvfp:vfp neon"
86 -X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext mmx mmxext sse sse2 sse3 ssse3 sse4_1:sse4 sse4_2:sse42 avx xop fma3 fma4 avx2"
87 -for i in ${X86_CPU_FEATURES} ; do
88 - CPU_FEATURES+=" cpu_flags_x86_${i%:*}:${i#*:}"
89 -done
90 -for i in ${CPU_FEATURES} ; do
91 - IUSE+=" ${i%:*}"
92 -done
93 -
94 -RDEPEND="
95 - !media-video/ffmpeg:0
96 - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
97 - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
98 - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
99 - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
100 - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
101 - encode? (
102 - aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
103 - amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
104 - faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
105 - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
106 - theora? (
107 - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
108 - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
109 - )
110 - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
111 - vorbis? (
112 - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
113 - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
114 - )
115 - webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
116 - wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
117 - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
118 - x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
119 - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
120 - )
121 - nvidia? ( media-video/nvidia-video-codec )
122 - fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
123 - frei0r? ( media-plugins/frei0r-plugins )
124 - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
125 - ieee1394? (
126 - >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
127 - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
128 - )
129 - jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
130 - jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
131 - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
132 - pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
133 - rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
134 - ssl? (
135 - openssl? (
136 - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
137 - libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
138 - )
139 - !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
140 - )
141 - sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
142 - schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
143 - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
144 - truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
145 - fontconfig? ( >=media-libs/fontconfig-2.10[${MULTILIB_USEDEP}] )
146 - vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
147 - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
148 - vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
149 - X? ( >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}] )
150 - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
151 -"
152 -
153 -DEPEND="${RDEPEND}
154 - >=sys-devel/make-3.81
155 - doc? ( app-text/texi2html )
156 - ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
157 - cpu_flags_x86_mmx? ( dev-lang/yasm )
158 - rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
159 - schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
160 - ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
161 - test? ( sys-devel/bc )
162 - truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
163 - fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
164 - v4l? ( sys-kernel/linux-headers )
165 -"
166 -
167 -RDEPEND="${RDEPEND}
168 - abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
169 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
170 -
171 -# faac can't be binary distributed
172 -# openssl support marked as nonfree
173 -# faac and aac are concurent implementations
174 -# amr and aac require at least lgpl3
175 -# x264 requires gpl2
176 -REQUIRED_USE="
177 - rtmp? ( network )
178 - amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) cdio? ( gpl ) x265? ( gpl )
179 - test? ( encode zlib )
180 - fontconfig? ( truetype )
181 -"
182 -RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist ) nvidia? ( bindist )"
183 -
184 -MULTILIB_WRAPPED_HEADERS=(
185 - /usr/include/libavutil/avconfig.h
186 -)
187 -
188 -src_unpack() {
189 - [[ ${PV} == *9999 ]] && git-r3_src_unpack
190 - # 9999 does not have fate-*.tar.xz
191 - [[ ${PV%9999} != "" ]] && default_src_unpack
192 -}
193 -
194 -src_prepare() {
195 - epatch_user
196 -
197 - epatch "${DISTDIR}/0001-xcb-Add-all-the-libraries-to-the-link-line-explicitl.patch"
198 -
199 - # if we have snapshot then we need to hardcode the version
200 - if [[ ${PV%_p*} != ${PV} ]]; then
201 - sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
202 - fi
203 -
204 - TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
205 - use zlib && TOOLS+=( cws2fws )
206 -
207 - MAKEOPTS+=" V=1"
208 -}
209 -
210 -multilib_src_configure() {
211 - local myconf=( ${EXTRA_LIBAV_CONF} )
212 - local uses i
213 -
214 - # 9999 does not have fate-*.tar.xz
215 - [[ ${PV%9999} != "" ]] && use test && myconf+=( --samples="${WORKDIR}/fate" )
216 -
217 - myconf+=(
218 - $(use_enable gpl)
219 - $(use_enable gpl version3)
220 - --enable-avfilter
221 - )
222 -
223 - # enabled by default
224 - uses="debug doc network zlib"
225 - for i in ${uses}; do
226 - use ${i} || myconf+=( --disable-${i} )
227 - done
228 - use bzip2 || myconf+=( --disable-bzlib )
229 - use sdl || myconf+=( --disable-avplay )
230 -
231 - if use ssl; then
232 - use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
233 - || myconf+=( --enable-gnutls )
234 - fi
235 -
236 - use custom-cflags && myconf+=( --disable-optimizations )
237 - use cpudetection && myconf+=( --enable-runtime-cpudetect )
238 -
239 - use vdpau || myconf+=( --disable-vdpau )
240 -
241 - use vaapi && myconf+=( --enable-vaapi )
242 -
243 - NVIDIA_INCLUDES="-I/opt/nvidia-video-codec/include -I/opt/cuda/include"
244 - NVIDIA_LIBS="-L/opt/cuda/lib64"
245 - use nvidia && myconf+=( --enable-nonfree --enable-cuda --enable-libnpp
246 - --extra-cflags="$NVIDIA_INCLUDES" --extra-ldflags="$NVIDIA_LIBS" )
247 -
248 - # Encoders
249 - if use encode; then
250 - use faac && myconf+=( --enable-nonfree )
251 - use mp3 && myconf+=( --enable-libmp3lame )
252 - use amr && myconf+=( --enable-libvo-amrwbenc )
253 - use aac && myconf+=( --enable-libvo-aacenc )
254 - use nvidia && myconf+=( --enable-nvenc )
255 - uses="faac theora twolame vorbis wavpack webp x264 x265 xvid"
256 - for i in ${uses}; do
257 - use ${i} && myconf+=( --enable-lib${i} )
258 - done
259 - else
260 - myconf+=( --disable-encoders )
261 - fi
262 -
263 - # libavdevice options
264 - use cdio && myconf+=( --enable-libcdio )
265 - use ieee1394 && myconf+=( --enable-libdc1394 )
266 - use pulseaudio && myconf+=( --enable-libpulse )
267 -
268 - # Indevs
269 - # v4l1 is gone since linux-headers-2.6.38
270 - myconf+=( --disable-indev=v4l )
271 - use v4l || myconf+=( --disable-indev=v4l2 )
272 - for i in alsa oss jack; do
273 - use ${i} || myconf+=( --disable-indev=${i} )
274 - done
275 - use X && myconf+=( --enable-libxcb )
276 - # Outdevs
277 - for i in alsa oss ; do
278 - use ${i} || myconf+=( --disable-outdev=${i} )
279 - done
280 - # libavfilter options
281 - use bs2b && myconf+=( --enable-libbs2b )
282 - multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
283 - use truetype && myconf+=( --enable-libfreetype )
284 - use fontconfig && myconf+=( --enable-libfontconfig )
285 -
286 - # Threads; we only support pthread for now
287 - use threads && myconf+=( --enable-pthreads )
288 -
289 - # Decoders
290 - use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
291 - use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
292 - uses="gsm opus rtmp schroedinger speex vpx"
293 - for i in ${uses}; do
294 - use ${i} && myconf+=( --enable-lib${i} )
295 - done
296 - use jpeg2k && myconf+=( --enable-libopenjpeg )
297 -
298 - # CPU features
299 - for i in ${CPU_FEATURES}; do
300 - use ${i%:*} || myconf+=( --disable-${i#*:} )
301 - done
302 -
303 - # pass the right -mfpu as extra
304 - use neon && use arm && append-cflags -mfpu=neon
305 -
306 - # disable mmx accelerated code if PIC is required
307 - # as the provided asm decidedly is not PIC for x86.
308 - if use pic && [[ ${ABI} == x86 ]]; then
309 - myconf+=( --disable-mmx --disable-mmxext )
310 - fi
311 -
312 - # Option to force building pic
313 - use pic && myconf+=( --enable-pic )
314 -
315 - # cross compile support
316 - if tc-is-cross-compiler ; then
317 - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
318 - case ${CHOST} in
319 - *freebsd*)
320 - myconf+=( --target-os=freebsd )
321 - ;;
322 - mingw32*)
323 - myconf+=( --target-os=mingw32 )
324 - ;;
325 - *linux*)
326 - myconf+=( --target-os=linux )
327 - ;;
328 - esac
329 - fi
330 -
331 - # Misc stuff
332 - use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
333 -
334 - # Forcing arm would make the compiler break left and right
335 - if [[ ${ABI} == arm ]]; then
336 - filter-flags -marm
337 - fi
338 -
339 - # Specific workarounds for too-few-registers arch...
340 - if [[ ${ABI} == x86 ]]; then
341 - local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
342 - filter-flags -fforce-addr -momit-leaf-frame-pointer
343 - append-flags -fomit-frame-pointer
344 - is-flag -O? || append-flags -O2
345 - if use debug; then
346 - # no need to warn about debug if not using debug flag
347 - ewarn ""
348 - ewarn "Debug information will be almost useless as the frame pointer is omitted."
349 - ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
350 - ewarn "difficult to fix. Please have that in mind."
351 - ewarn ""
352 - fi
353 - fi
354 -
355 - set -- "${S}"/configure \
356 - --prefix="${EPREFIX}"/usr \
357 - --libdir="${EPREFIX}"/usr/$(get_libdir) \
358 - --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
359 - --mandir="${EPREFIX}"/usr/share/man \
360 - --enable-shared \
361 - --cc="$(tc-getCC)" \
362 - --ar="$(tc-getAR)" \
363 - --optflags="${CFLAGS}" \
364 - --extra-cflags="${CFLAGS}" \
365 - $(use_enable static-libs static) \
366 - "${myconf[@]}"
367 - echo "${@}"
368 - "${@}" || die
369 -}
370 -
371 -multilib_src_compile() {
372 - emake
373 -
374 - if use tools; then
375 - tc-export CC
376 -
377 - emake ${TOOLS[@]/#/tools/}
378 - fi
379 -}
380 -
381 -multilib_src_install() {
382 - emake DESTDIR="${D}" install install-man
383 - use doc && dodoc doc/*.html
384 -
385 - if use tools; then
386 - dobin ${TOOLS[@]/#/tools/}
387 - fi
388 -}
389 -
390 -multilib_src_install_all() {
391 - dodoc Changelog README.md INSTALL
392 -}
393 -
394 -multilib_src_test() {
395 - local _libs="$(for i in lib*/;do echo -n "${BUILD_DIR}/${i%/}:";done)"
396 - einfo "LD_LIBRARY_PATH is set to \"${_libs}\""
397 - LD_LIBRARY_PATH="${_libs}" make -j1 fate V=1
398 -}
399
400 diff --git a/media-video/libav/libav-12.ebuild b/media-video/libav/libav-12.ebuild
401 deleted file mode 100644
402 index 35f9021007d..00000000000
403 --- a/media-video/libav/libav-12.ebuild
404 +++ /dev/null
405 @@ -1,358 +0,0 @@
406 -# Copyright 1999-2017 Gentoo Foundation
407 -# Distributed under the terms of the GNU General Public License v2
408 -
409 -EAPI=5
410 -
411 -inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs
412 -
413 -if [[ ${PV} == *9999 ]] ; then
414 - : ${EGIT_REPO_URI:="git://git.libav.org/libav.git"}
415 - if [[ ${PV%9999} != "" ]] ; then
416 - : ${EGIT_BRANCH:="release/${PV%.9999}"}
417 - fi
418 - inherit git-r3
419 -fi
420 -
421 -DESCRIPTION="Complete solution to record, convert and stream audio and video"
422 -HOMEPAGE="https://libav.org/"
423 -if [[ ${PV} == *9999 ]] ; then
424 - SRC_URI=""
425 -elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot
426 - SRC_URI="https://dev.gentoo.org/~lu_zero/libav/${P}.tar.xz"
427 - SRC_URI+=" test? ( https://dev.gentoo.org/~lu_zero/libav/fate-${PV}.tar.xz )"
428 -else # Official release
429 - SRC_URI="https://libav.org/releases/${P}.tar.xz"
430 - FATE_VER=${PV%%_*}
431 - SRC_URI+=" test? ( https://dev.gentoo.org/~lu_zero/libav/fate-12-r1.tar.xz )"
432 -fi
433 -
434 -SRC_URI+=" https://dev.gentoo.org/~lu_zero/libav/0001-xcb-Add-all-the-libraries-to-the-link-line-explicitl.patch"
435 -# 9999 does not have fate-*.tar.xz
436 -
437 -LICENSE="LGPL-2.1 gpl? ( GPL-3 )"
438 -SLOT="0/12"
439 -[[ ${PV} == *9999 ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64
440 -~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
441 -~x64-solaris ~x86-solaris"
442 -IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk
443 - frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k libressl mp3
444 - +network nvidia openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
445 - static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X
446 - wavpack webp x264 x265 xvid +zlib"
447 -
448 -# String for CPU features in the useflag[:configure_option] form
449 -# if :configure_option isn't set, it will use 'useflag' as configure option
450 -CPU_FEATURES="altivec armv5te armv6 armv6t2 armvfp:vfp neon"
451 -X86_CPU_FEATURES="3dnow:amd3dnow 3dnowext:amd3dnowext mmx mmxext sse sse2 sse3 ssse3 sse4_1:sse4 sse4_2:sse42 avx xop fma3 fma4 avx2"
452 -for i in ${X86_CPU_FEATURES} ; do
453 - CPU_FEATURES+=" cpu_flags_x86_${i%:*}:${i#*:}"
454 -done
455 -for i in ${CPU_FEATURES} ; do
456 - IUSE+=" ${i%:*}"
457 -done
458 -
459 -RDEPEND="
460 - !media-video/ffmpeg:0
461 - alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
462 - amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
463 - bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
464 - bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
465 - cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
466 - encode? (
467 - aac? ( >=media-libs/vo-aacenc-0.1.3[${MULTILIB_USEDEP}] )
468 - amr? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
469 - faac? ( >=media-libs/faac-1.28-r3[${MULTILIB_USEDEP}] )
470 - mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
471 - theora? (
472 - >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
473 - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
474 - )
475 - twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
476 - vorbis? (
477 - >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
478 - >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
479 - )
480 - webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
481 - wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
482 - x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
483 - x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
484 - xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
485 - )
486 - nvidia? ( media-video/nvidia-video-codec )
487 - fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
488 - frei0r? ( media-plugins/frei0r-plugins )
489 - gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
490 - ieee1394? (
491 - >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
492 - >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
493 - )
494 - jack? ( >=media-sound/jack-audio-connection-kit-0.121.3-r1[${MULTILIB_USEDEP}] )
495 - jpeg2k? ( >=media-libs/openjpeg-1.5.0:0[${MULTILIB_USEDEP}] )
496 - opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
497 - pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
498 - rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
499 - ssl? (
500 - openssl? (
501 - !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
502 - libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
503 - )
504 - !openssl? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] )
505 - )
506 - sdl? ( >=media-libs/libsdl-1.2.15-r4[sound,video,${MULTILIB_USEDEP}] )
507 - schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
508 - speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
509 - truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
510 - fontconfig? ( >=media-libs/fontconfig-2.10[${MULTILIB_USEDEP}] )
511 - vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
512 - vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
513 - vpx? ( >=media-libs/libvpx-1.2.0_pre20130625[${MULTILIB_USEDEP}] )
514 - X? ( >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}] )
515 - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
516 -"
517 -
518 -DEPEND="${RDEPEND}
519 - >=sys-devel/make-3.81
520 - doc? ( app-text/texi2html )
521 - ieee1394? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
522 - cpu_flags_x86_mmx? ( dev-lang/yasm )
523 - rtmp? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
524 - schroedinger? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
525 - ssl? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
526 - test? ( sys-devel/bc )
527 - truetype? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
528 - fontconfig? ( >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] )
529 - v4l? ( sys-kernel/linux-headers )
530 -"
531 -
532 -RDEPEND="${RDEPEND}
533 - abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
534 - !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
535 -
536 -# faac can't be binary distributed
537 -# openssl support marked as nonfree
538 -# faac and aac are concurent implementations
539 -# amr and aac require at least lgpl3
540 -# x264 requires gpl2
541 -REQUIRED_USE="
542 - rtmp? ( network )
543 - amr? ( gpl ) aac? ( gpl ) x264? ( gpl ) cdio? ( gpl ) x265? ( gpl )
544 - test? ( encode zlib )
545 - fontconfig? ( truetype )
546 -"
547 -RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist ) nvidia? ( bindist )"
548 -
549 -MULTILIB_WRAPPED_HEADERS=(
550 - /usr/include/libavutil/avconfig.h
551 -)
552 -
553 -src_unpack() {
554 - [[ ${PV} == *9999 ]] && git-r3_src_unpack
555 - # 9999 does not have fate-*.tar.xz
556 - [[ ${PV%9999} != "" ]] && default_src_unpack
557 -}
558 -
559 -src_prepare() {
560 - epatch_user
561 -
562 - epatch "${DISTDIR}/0001-xcb-Add-all-the-libraries-to-the-link-line-explicitl.patch"
563 -
564 - # if we have snapshot then we need to hardcode the version
565 - if [[ ${PV%_p*} != ${PV} ]]; then
566 - sed -i -e "s/UNKNOWN/DATE-${PV#*_pre}/" "${S}/version.sh" || die
567 - fi
568 -
569 - TOOLS=( aviocat graph2dot ismindex pktdumper qt-faststart trasher )
570 - use zlib && TOOLS+=( cws2fws )
571 -
572 - MAKEOPTS+=" V=1"
573 -}
574 -
575 -multilib_src_configure() {
576 - local myconf=( ${EXTRA_LIBAV_CONF} )
577 - local uses i
578 -
579 - # 9999 does not have fate-*.tar.xz
580 - [[ ${PV%9999} != "" ]] && use test && myconf+=( --samples="${WORKDIR}/fate" )
581 -
582 - myconf+=(
583 - $(use_enable gpl)
584 - $(use_enable gpl version3)
585 - --enable-avfilter
586 - )
587 -
588 - # enabled by default
589 - uses="debug doc network zlib"
590 - for i in ${uses}; do
591 - use ${i} || myconf+=( --disable-${i} )
592 - done
593 - use bzip2 || myconf+=( --disable-bzlib )
594 - use sdl || myconf+=( --disable-avplay )
595 -
596 - if use ssl; then
597 - use openssl && myconf+=( --enable-openssl --enable-nonfree ) \
598 - || myconf+=( --enable-gnutls )
599 - fi
600 -
601 - use custom-cflags && myconf+=( --disable-optimizations )
602 - use cpudetection && myconf+=( --enable-runtime-cpudetect )
603 -
604 - use vdpau || myconf+=( --disable-vdpau )
605 -
606 - use vaapi && myconf+=( --enable-vaapi )
607 -
608 - NVIDIA_INCLUDES="-I/opt/nvidia-video-codec/include -I/opt/cuda/include"
609 - NVIDIA_LIBS="-L/opt/cuda/lib64"
610 - use nvidia && myconf+=( --enable-nonfree --enable-cuda --enable-libnpp
611 - --extra-cflags="$NVIDIA_INCLUDES" --extra-ldflags="$NVIDIA_LIBS" )
612 -
613 - # Encoders
614 - if use encode; then
615 - use faac && myconf+=( --enable-nonfree )
616 - use mp3 && myconf+=( --enable-libmp3lame )
617 - use amr && myconf+=( --enable-libvo-amrwbenc )
618 - use aac && myconf+=( --enable-libvo-aacenc )
619 - use nvidia && myconf+=( --enable-nvenc )
620 - uses="faac theora twolame vorbis wavpack webp x264 x265 xvid"
621 - for i in ${uses}; do
622 - use ${i} && myconf+=( --enable-lib${i} )
623 - done
624 - else
625 - myconf+=( --disable-encoders )
626 - fi
627 -
628 - # libavdevice options
629 - use cdio && myconf+=( --enable-libcdio )
630 - use ieee1394 && myconf+=( --enable-libdc1394 )
631 - use pulseaudio && myconf+=( --enable-libpulse )
632 -
633 - # Indevs
634 - # v4l1 is gone since linux-headers-2.6.38
635 - myconf+=( --disable-indev=v4l )
636 - use v4l || myconf+=( --disable-indev=v4l2 )
637 - for i in alsa oss jack; do
638 - use ${i} || myconf+=( --disable-indev=${i} )
639 - done
640 - use X && myconf+=( --enable-libxcb )
641 - # Outdevs
642 - for i in alsa oss ; do
643 - use ${i} || myconf+=( --disable-outdev=${i} )
644 - done
645 - # libavfilter options
646 - use bs2b && myconf+=( --enable-libbs2b )
647 - multilib_is_native_abi && use frei0r && myconf+=( --enable-frei0r )
648 - use truetype && myconf+=( --enable-libfreetype )
649 - use fontconfig && myconf+=( --enable-libfontconfig )
650 -
651 - # Threads; we only support pthread for now
652 - use threads && myconf+=( --enable-pthreads )
653 -
654 - # Decoders
655 - use amr && myconf+=( --enable-libopencore-amrwb --enable-libopencore-amrnb )
656 - use fdk && myconf+=( --enable-nonfree --enable-libfdk-aac )
657 - uses="gsm opus rtmp schroedinger speex vpx"
658 - for i in ${uses}; do
659 - use ${i} && myconf+=( --enable-lib${i} )
660 - done
661 - use jpeg2k && myconf+=( --enable-libopenjpeg )
662 -
663 - # CPU features
664 - for i in ${CPU_FEATURES}; do
665 - use ${i%:*} || myconf+=( --disable-${i#*:} )
666 - done
667 -
668 - # pass the right -mfpu as extra
669 - use neon && append-cflags -mfpu=neon
670 -
671 - # disable mmx accelerated code if PIC is required
672 - # as the provided asm decidedly is not PIC for x86.
673 - if use pic && [[ ${ABI} == x86 ]]; then
674 - myconf+=( --disable-mmx --disable-mmxext )
675 - fi
676 -
677 - # Option to force building pic
678 - use pic && myconf+=( --enable-pic )
679 -
680 - # cross compile support
681 - if tc-is-cross-compiler ; then
682 - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
683 - case ${CHOST} in
684 - *freebsd*)
685 - myconf+=( --target-os=freebsd )
686 - ;;
687 - mingw32*)
688 - myconf+=( --target-os=mingw32 )
689 - ;;
690 - *linux*)
691 - myconf+=( --target-os=linux )
692 - ;;
693 - esac
694 - fi
695 -
696 - # Misc stuff
697 - use hardcoded-tables && myconf+=( --enable-hardcoded-tables )
698 -
699 - # Forcing arm would make the compiler break left and right
700 - if [[ ${ABI} == arm ]]; then
701 - filter-flags -marm
702 - fi
703 -
704 - # Specific workarounds for too-few-registers arch...
705 - if [[ ${ABI} == x86 ]]; then
706 - local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
707 - filter-flags -fforce-addr -momit-leaf-frame-pointer
708 - append-flags -fomit-frame-pointer
709 - is-flag -O? || append-flags -O2
710 - if use debug; then
711 - # no need to warn about debug if not using debug flag
712 - ewarn ""
713 - ewarn "Debug information will be almost useless as the frame pointer is omitted."
714 - ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
715 - ewarn "difficult to fix. Please have that in mind."
716 - ewarn ""
717 - fi
718 - fi
719 -
720 - set -- "${S}"/configure \
721 - --prefix="${EPREFIX}"/usr \
722 - --libdir="${EPREFIX}"/usr/$(get_libdir) \
723 - --shlibdir="${EPREFIX}"/usr/$(get_libdir) \
724 - --mandir="${EPREFIX}"/usr/share/man \
725 - --enable-shared \
726 - --cc="$(tc-getCC)" \
727 - --ar="$(tc-getAR)" \
728 - --optflags="${CFLAGS}" \
729 - --extra-cflags="${CFLAGS}" \
730 - $(use_enable static-libs static) \
731 - "${myconf[@]}"
732 - echo "${@}"
733 - "${@}" || die
734 -}
735 -
736 -multilib_src_compile() {
737 - emake
738 -
739 - if use tools; then
740 - tc-export CC
741 -
742 - emake ${TOOLS[@]/#/tools/}
743 - fi
744 -}
745 -
746 -multilib_src_install() {
747 - emake DESTDIR="${D}" install install-man
748 - use doc && dodoc doc/*.html
749 -
750 - if use tools; then
751 - dobin ${TOOLS[@]/#/tools/}
752 - fi
753 -}
754 -
755 -multilib_src_install_all() {
756 - dodoc Changelog README.md INSTALL
757 -}
758 -
759 -multilib_src_test() {
760 - local _libs="$(for i in lib*/;do echo -n "${BUILD_DIR}/${i%/}:";done)"
761 - einfo "LD_LIBRARY_PATH is set to \"${_libs}\""
762 - LD_LIBRARY_PATH="${_libs}" make -j1 fate V=1
763 -}