1 |
commit: 315cd1cf34c962f988d7a7806a0e9843da0ff77e |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 24 17:22:27 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 24 18:01:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=315cd1cf |
7 |
|
8 |
media-video/vlc: Fix build with libvpx-1.8.0, fdk-aac-2.0.0 |
9 |
|
10 |
Thanks-to: jospezial <jospezial <AT> gmx.de> |
11 |
Bug: https://bugs.gentoo.org/677606 |
12 |
Bug: https://bugs.gentoo.org/672290 |
13 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
.../vlc/files/vlc-3.0.6-fdk-aac-2.0.0.patch | 84 ++++ |
17 |
media-video/vlc/files/vlc-3.0.6-libvpx-1.8.0.patch | 35 ++ |
18 |
media-video/vlc/vlc-3.0.6-r1.ebuild | 501 +++++++++++++++++++++ |
19 |
3 files changed, 620 insertions(+) |
20 |
|
21 |
diff --git a/media-video/vlc/files/vlc-3.0.6-fdk-aac-2.0.0.patch b/media-video/vlc/files/vlc-3.0.6-fdk-aac-2.0.0.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..a5104d1df6d |
24 |
--- /dev/null |
25 |
+++ b/media-video/vlc/files/vlc-3.0.6-fdk-aac-2.0.0.patch |
26 |
@@ -0,0 +1,84 @@ |
27 |
+From 6ea9b13fe82fae2b25b7371c6c36d6296db28ccb Mon Sep 17 00:00:00 2001 |
28 |
+From: Antonio Larrosa <antonio.larrosa@×××××.com> |
29 |
+Date: Thu, 14 Feb 2019 10:09:30 +0100 |
30 |
+Subject: [PATCH] Fix building vlc with libfdk-aac v2 |
31 |
+ |
32 |
+When flushing the encoder, we now need to provide non-null buffer |
33 |
+parameters for everything, even if they are unused. |
34 |
+ |
35 |
+The encoderDelay parameter has been replaced by two, nDelay and |
36 |
+nDelayCore. |
37 |
+ |
38 |
+This is based on: |
39 |
+https://git.libav.org/?p=libav.git;a=commitdiff_plain;h=141c960e21d2860e354f9b90df136184dd00a9a8;hp=c8bca9fe466f810fd484e2c6db7ef7bc83b5a943 |
40 |
+ |
41 |
+Signed-off-by: Jean-Baptiste Kempf <jb@××××××××.org> |
42 |
+--- |
43 |
+ modules/codec/fdkaac.c | 27 +++++++++++++++++++++------ |
44 |
+ 1 file changed, 21 insertions(+), 6 deletions(-) |
45 |
+ |
46 |
+diff --git a/modules/codec/fdkaac.c b/modules/codec/fdkaac.c |
47 |
+index e0b3088c4a..3ac7b756a3 100644 |
48 |
+--- a/modules/codec/fdkaac.c |
49 |
++++ b/modules/codec/fdkaac.c |
50 |
+@@ -92,6 +92,11 @@ static void CloseEncoder(vlc_object_t *); |
51 |
+ #define SIGNALING_COMPATIBLE 1 |
52 |
+ #define SIGNALING_HIERARCHICAL 2 |
53 |
+ |
54 |
++#define FDKENC_VER_AT_LEAST(vl0, vl1) \ |
55 |
++ (defined(AACENCODER_LIB_VL0) && \ |
56 |
++ ((AACENCODER_LIB_VL0 > vl0) || \ |
57 |
++ (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1))) |
58 |
++ |
59 |
+ static const int pi_aot_values[] = { PROFILE_AAC_LC, PROFILE_AAC_HE, PROFILE_AAC_HE_v2, PROFILE_AAC_LD, PROFILE_AAC_ELD }; |
60 |
+ static const char *const ppsz_aot_descriptions[] = |
61 |
+ { N_("AAC-LC"), N_("HE-AAC"), N_("HE-AAC-v2"), N_("AAC-LD"), N_("AAC-ELD") }; |
62 |
+@@ -288,7 +293,11 @@ static int OpenEncoder(vlc_object_t *p_this) |
63 |
+ p_sys->i_maxoutputsize = 768*p_enc->fmt_in.audio.i_channels; |
64 |
+ p_enc->fmt_in.audio.i_bitspersample = 16; |
65 |
+ p_sys->i_frame_size = info.frameLength; |
66 |
++#if FDKENC_VER_AT_LEAST(4, 0) |
67 |
++ p_sys->i_encoderdelay = info.nDelay; |
68 |
++#else |
69 |
+ p_sys->i_encoderdelay = info.encoderDelay; |
70 |
++#endif |
71 |
+ |
72 |
+ p_enc->fmt_out.i_extra = info.confSize; |
73 |
+ if (p_enc->fmt_out.i_extra) { |
74 |
+@@ -351,21 +360,27 @@ static block_t *EncodeAudio(encoder_t *p_enc, block_t *p_aout_buf) |
75 |
+ int out_identifier = OUT_BITSTREAM_DATA; |
76 |
+ int out_size, out_elem_size; |
77 |
+ void *in_ptr, *out_ptr; |
78 |
++ uint8_t dummy_buf[1]; |
79 |
+ |
80 |
+ if (unlikely(i_samples == 0)) { |
81 |
+ // this forces the encoder to purge whatever is left in the internal buffer |
82 |
++ /* Must be a non-null pointer, even if it's a dummy. We could use |
83 |
++ * the address of anything else on the stack as well. */ |
84 |
++ in_ptr = dummy_buf; |
85 |
++ in_size = 0; |
86 |
++ |
87 |
+ in_args.numInSamples = -1; |
88 |
+ } else { |
89 |
+ in_ptr = p_buffer + (i_samples - i_samples_left)*p_enc->fmt_in.audio.i_channels; |
90 |
+ in_size = 2*p_enc->fmt_in.audio.i_channels*i_samples_left; |
91 |
+- in_elem_size = 2; |
92 |
+ in_args.numInSamples = p_enc->fmt_in.audio.i_channels*i_samples_left; |
93 |
+- in_buf.numBufs = 1; |
94 |
+- in_buf.bufs = &in_ptr; |
95 |
+- in_buf.bufferIdentifiers = &in_identifier; |
96 |
+- in_buf.bufSizes = &in_size; |
97 |
+- in_buf.bufElSizes = &in_elem_size; |
98 |
+ } |
99 |
++ in_elem_size = 2; |
100 |
++ in_buf.numBufs = 1; |
101 |
++ in_buf.bufs = &in_ptr; |
102 |
++ in_buf.bufferIdentifiers = &in_identifier; |
103 |
++ in_buf.bufSizes = &in_size; |
104 |
++ in_buf.bufElSizes = &in_elem_size; |
105 |
+ block_t *p_block; |
106 |
+ p_block = block_Alloc(p_sys->i_maxoutputsize); |
107 |
+ p_block->i_buffer = p_sys->i_maxoutputsize; |
108 |
+-- |
109 |
+2.11.0 |
110 |
+ |
111 |
|
112 |
diff --git a/media-video/vlc/files/vlc-3.0.6-libvpx-1.8.0.patch b/media-video/vlc/files/vlc-3.0.6-libvpx-1.8.0.patch |
113 |
new file mode 100644 |
114 |
index 00000000000..1b58a03cc8c |
115 |
--- /dev/null |
116 |
+++ b/media-video/vlc/files/vlc-3.0.6-libvpx-1.8.0.patch |
117 |
@@ -0,0 +1,35 @@ |
118 |
+From 5575fe3eb3fd46bada8662268b74d03493476a84 Mon Sep 17 00:00:00 2001 |
119 |
+From: Danny Milosavljevic <dannym@×××××××××××.org> |
120 |
+Date: Mon, 11 Feb 2019 16:07:12 +0100 |
121 |
+Subject: [PATCH] codec: vpx: Detect libvpx 1.8.0 and, if detected, use fewer |
122 |
+ frame formats in the chroma_table |
123 |
+ |
124 |
+Signed-off-by: Steve Lhomme <robux4@×××××.xyz> |
125 |
+--- |
126 |
+ modules/codec/vpx.c | 3 ++- |
127 |
+ 1 file changed, 2 insertions(+), 1 deletion(-) |
128 |
+ |
129 |
+diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c |
130 |
+index f03c7fae62..59b3acdef7 100644 |
131 |
+--- a/modules/codec/vpx.c |
132 |
++++ b/modules/codec/vpx.c |
133 |
+@@ -117,6 +117,7 @@ static const struct |
134 |
+ { VLC_CODEC_I440, VPX_IMG_FMT_I440, 8, 0 }, |
135 |
+ |
136 |
+ { VLC_CODEC_YV12, VPX_IMG_FMT_YV12, 8, 0 }, |
137 |
++#if VPX_IMAGE_ABI_VERSION < 5 |
138 |
+ { VLC_CODEC_YUVA, VPX_IMG_FMT_444A, 8, 0 }, |
139 |
+ { VLC_CODEC_YUYV, VPX_IMG_FMT_YUY2, 8, 0 }, |
140 |
+ { VLC_CODEC_UYVY, VPX_IMG_FMT_UYVY, 8, 0 }, |
141 |
+@@ -129,7 +130,7 @@ static const struct |
142 |
+ |
143 |
+ { VLC_CODEC_ARGB, VPX_IMG_FMT_ARGB, 8, 0 }, |
144 |
+ { VLC_CODEC_BGRA, VPX_IMG_FMT_ARGB_LE, 8, 0 }, |
145 |
+- |
146 |
++#endif |
147 |
+ { VLC_CODEC_GBR_PLANAR, VPX_IMG_FMT_I444, 8, 1 }, |
148 |
+ { VLC_CODEC_GBR_PLANAR_10L, VPX_IMG_FMT_I44416, 10, 1 }, |
149 |
+ |
150 |
+-- |
151 |
+2.11.0 |
152 |
+ |
153 |
|
154 |
diff --git a/media-video/vlc/vlc-3.0.6-r1.ebuild b/media-video/vlc/vlc-3.0.6-r1.ebuild |
155 |
new file mode 100644 |
156 |
index 00000000000..b803e74a18e |
157 |
--- /dev/null |
158 |
+++ b/media-video/vlc/vlc-3.0.6-r1.ebuild |
159 |
@@ -0,0 +1,501 @@ |
160 |
+# Copyright 1999-2019 Gentoo Authors |
161 |
+# Distributed under the terms of the GNU General Public License v2 |
162 |
+ |
163 |
+EAPI=7 |
164 |
+ |
165 |
+MY_PV="${PV/_/-}" |
166 |
+MY_PV="${MY_PV/-beta/-test}" |
167 |
+MY_P="${PN}-${MY_PV}" |
168 |
+if [[ ${PV} = *9999 ]] ; then |
169 |
+ if [[ ${PV%.9999} != ${PV} ]] ; then |
170 |
+ EGIT_REPO_URI="https://git.videolan.org/git/vlc/vlc-${PV%.9999}.git" |
171 |
+ else |
172 |
+ EGIT_REPO_URI="https://git.videolan.org/git/vlc.git" |
173 |
+ fi |
174 |
+ inherit git-r3 |
175 |
+else |
176 |
+ if [[ ${MY_P} = ${P} ]] ; then |
177 |
+ SRC_URI="https://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz" |
178 |
+ else |
179 |
+ SRC_URI="https://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz" |
180 |
+ fi |
181 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd" |
182 |
+fi |
183 |
+inherit autotools flag-o-matic toolchain-funcs virtualx xdg |
184 |
+ |
185 |
+DESCRIPTION="Media player and framework with support for most multimedia files and streaming" |
186 |
+HOMEPAGE="https://www.videolan.org/vlc/" |
187 |
+ |
188 |
+LICENSE="LGPL-2.1 GPL-2" |
189 |
+SLOT="0/5-9" # vlc - vlccore |
190 |
+ |
191 |
+IUSE="a52 alsa altivec aom archive aribsub bidi bluray cddb chromaprint chromecast |
192 |
+ dav1d dbus dc1394 debug directx dts +dvbpsi dvd +encode faad fdk +ffmpeg flac |
193 |
+ fluidsynth fontconfig +gcrypt gme gnome-keyring gstreamer ieee1394 jack jpeg kate |
194 |
+ libass libav libcaca libnotify +libsamplerate libtar libtiger linsys lirc live lua |
195 |
+ macosx-notifications macosx-qtkit mad matroska modplug mp3 mpeg mtp musepack ncurses |
196 |
+ neon nfs ogg omxil opencv optimisememory opus png postproc projectm pulseaudio +qt5 |
197 |
+ rdp run-as-root samba sdl-image sftp shout sid skins soxr speex srt ssl |
198 |
+ svg taglib theora tremor truetype twolame udev upnp vaapi v4l vdpau vnc vorbis vpx |
199 |
+ wayland wma-fixed +X x264 x265 xml zeroconf zvbi cpu_flags_x86_mmx cpu_flags_x86_sse |
200 |
+" |
201 |
+REQUIRED_USE=" |
202 |
+ chromecast? ( encode ) |
203 |
+ directx? ( ffmpeg ) |
204 |
+ fontconfig? ( truetype ) |
205 |
+ libcaca? ( X ) |
206 |
+ libtar? ( skins ) |
207 |
+ libtiger? ( kate ) |
208 |
+ postproc? ( ffmpeg ) |
209 |
+ skins? ( qt5 truetype X xml ) |
210 |
+ ssl? ( gcrypt ) |
211 |
+ vaapi? ( ffmpeg X ) |
212 |
+ vdpau? ( ffmpeg X ) |
213 |
+" |
214 |
+BDEPEND=" |
215 |
+ >=sys-devel/gettext-0.19.8 |
216 |
+ virtual/pkgconfig |
217 |
+ amd64? ( dev-lang/yasm ) |
218 |
+ x86? ( dev-lang/yasm ) |
219 |
+" |
220 |
+RDEPEND=" |
221 |
+ net-dns/libidn:= |
222 |
+ sys-libs/zlib[minizip] |
223 |
+ virtual/libintl |
224 |
+ virtual/opengl |
225 |
+ a52? ( media-libs/a52dec ) |
226 |
+ alsa? ( media-libs/alsa-lib ) |
227 |
+ aom? ( media-libs/libaom:= ) |
228 |
+ archive? ( app-arch/libarchive:= ) |
229 |
+ aribsub? ( media-libs/aribb24 ) |
230 |
+ bidi? ( |
231 |
+ dev-libs/fribidi |
232 |
+ media-libs/freetype:2[harfbuzz] |
233 |
+ media-libs/harfbuzz |
234 |
+ virtual/ttf-fonts |
235 |
+ ) |
236 |
+ bluray? ( media-libs/libbluray:= ) |
237 |
+ cddb? ( media-libs/libcddb ) |
238 |
+ chromaprint? ( media-libs/chromaprint:= ) |
239 |
+ chromecast? ( |
240 |
+ >=dev-libs/protobuf-2.5.0:= |
241 |
+ >=net-libs/libmicrodns-0.0.9:= |
242 |
+ ) |
243 |
+ dav1d? ( media-libs/dav1d ) |
244 |
+ dbus? ( sys-apps/dbus ) |
245 |
+ dc1394? ( |
246 |
+ media-libs/libdc1394:2 |
247 |
+ sys-libs/libraw1394 |
248 |
+ ) |
249 |
+ dts? ( media-libs/libdca ) |
250 |
+ dvbpsi? ( >=media-libs/libdvbpsi-1.2.0:= ) |
251 |
+ dvd? ( |
252 |
+ >=media-libs/libdvdnav-4.9 |
253 |
+ >=media-libs/libdvdread-4.9 |
254 |
+ ) |
255 |
+ faad? ( media-libs/faad2 ) |
256 |
+ fdk? ( media-libs/fdk-aac:= ) |
257 |
+ ffmpeg? ( |
258 |
+ !libav? ( >=media-video/ffmpeg-3.1.3:0=[vaapi?,vdpau?] ) |
259 |
+ libav? ( >=media-video/libav-12.2:0=[vaapi?,vdpau?] ) |
260 |
+ ) |
261 |
+ flac? ( |
262 |
+ media-libs/flac |
263 |
+ media-libs/libogg |
264 |
+ ) |
265 |
+ fluidsynth? ( media-sound/fluidsynth:= ) |
266 |
+ fontconfig? ( media-libs/fontconfig:1.0 ) |
267 |
+ gcrypt? ( |
268 |
+ dev-libs/libgcrypt:0= |
269 |
+ dev-libs/libgpg-error |
270 |
+ ) |
271 |
+ gme? ( media-libs/game-music-emu ) |
272 |
+ gnome-keyring? ( app-crypt/libsecret ) |
273 |
+ gstreamer? ( >=media-libs/gst-plugins-base-1.4.5:1.0 ) |
274 |
+ ieee1394? ( |
275 |
+ sys-libs/libavc1394 |
276 |
+ sys-libs/libraw1394 |
277 |
+ ) |
278 |
+ jack? ( virtual/jack ) |
279 |
+ jpeg? ( virtual/jpeg:0 ) |
280 |
+ kate? ( media-libs/libkate ) |
281 |
+ libass? ( |
282 |
+ media-libs/fontconfig:1.0 |
283 |
+ media-libs/libass:= |
284 |
+ ) |
285 |
+ libcaca? ( media-libs/libcaca ) |
286 |
+ libnotify? ( |
287 |
+ dev-libs/glib:2 |
288 |
+ x11-libs/gdk-pixbuf:2 |
289 |
+ x11-libs/gtk+:3 |
290 |
+ x11-libs/libnotify |
291 |
+ ) |
292 |
+ libsamplerate? ( media-libs/libsamplerate ) |
293 |
+ libtar? ( dev-libs/libtar ) |
294 |
+ libtiger? ( media-libs/libtiger ) |
295 |
+ linsys? ( media-libs/zvbi ) |
296 |
+ lirc? ( app-misc/lirc ) |
297 |
+ live? ( media-plugins/live:= ) |
298 |
+ lua? ( >=dev-lang/lua-5.1:0= ) |
299 |
+ mad? ( media-libs/libmad ) |
300 |
+ matroska? ( |
301 |
+ dev-libs/libebml:= |
302 |
+ media-libs/libmatroska:= |
303 |
+ ) |
304 |
+ modplug? ( media-libs/libmodplug ) |
305 |
+ mp3? ( media-sound/mpg123 ) |
306 |
+ mpeg? ( media-libs/libmpeg2 ) |
307 |
+ mtp? ( media-libs/libmtp:= ) |
308 |
+ musepack? ( media-sound/musepack-tools ) |
309 |
+ ncurses? ( sys-libs/ncurses:0=[unicode] ) |
310 |
+ nfs? ( >=net-fs/libnfs-0.10.0:= ) |
311 |
+ ogg? ( media-libs/libogg ) |
312 |
+ opencv? ( media-libs/opencv:= ) |
313 |
+ opus? ( >=media-libs/opus-1.0.3 ) |
314 |
+ png? ( media-libs/libpng:0= ) |
315 |
+ postproc? ( libav? ( media-libs/libpostproc ) ) |
316 |
+ projectm? ( |
317 |
+ media-fonts/dejavu |
318 |
+ media-libs/libprojectm |
319 |
+ ) |
320 |
+ pulseaudio? ( media-sound/pulseaudio ) |
321 |
+ qt5? ( |
322 |
+ dev-qt/qtcore:5 |
323 |
+ dev-qt/qtgui:5 |
324 |
+ dev-qt/qtsvg:5 |
325 |
+ dev-qt/qtwidgets:5 |
326 |
+ X? ( |
327 |
+ dev-qt/qtx11extras:5 |
328 |
+ x11-libs/libX11 |
329 |
+ ) |
330 |
+ ) |
331 |
+ rdp? ( >=net-misc/freerdp-2.0.0_rc0:=[client] ) |
332 |
+ samba? ( >=net-fs/samba-4.0.0:0[client,-debug(-)] ) |
333 |
+ sdl-image? ( media-libs/sdl-image ) |
334 |
+ sftp? ( net-libs/libssh2 ) |
335 |
+ shout? ( media-libs/libshout ) |
336 |
+ sid? ( media-libs/libsidplay:2 ) |
337 |
+ skins? ( |
338 |
+ x11-libs/libXext |
339 |
+ x11-libs/libXinerama |
340 |
+ x11-libs/libXpm |
341 |
+ ) |
342 |
+ soxr? ( media-libs/soxr ) |
343 |
+ speex? ( |
344 |
+ >=media-libs/speex-1.2.0 |
345 |
+ media-libs/speexdsp |
346 |
+ ) |
347 |
+ srt? ( net-libs/srt ) |
348 |
+ ssl? ( net-libs/gnutls:= ) |
349 |
+ svg? ( |
350 |
+ gnome-base/librsvg:2 |
351 |
+ x11-libs/cairo |
352 |
+ ) |
353 |
+ taglib? ( >=media-libs/taglib-1.9 ) |
354 |
+ theora? ( media-libs/libtheora ) |
355 |
+ tremor? ( media-libs/tremor ) |
356 |
+ truetype? ( |
357 |
+ media-libs/freetype:2 |
358 |
+ virtual/ttf-fonts |
359 |
+ !fontconfig? ( media-fonts/dejavu ) |
360 |
+ ) |
361 |
+ twolame? ( media-sound/twolame ) |
362 |
+ udev? ( virtual/udev ) |
363 |
+ upnp? ( net-libs/libupnp:= ) |
364 |
+ v4l? ( media-libs/libv4l:= ) |
365 |
+ vaapi? ( x11-libs/libva:=[drm,wayland?,X?] ) |
366 |
+ vdpau? ( x11-libs/libvdpau ) |
367 |
+ vnc? ( net-libs/libvncserver ) |
368 |
+ vorbis? ( media-libs/libvorbis ) |
369 |
+ vpx? ( media-libs/libvpx:= ) |
370 |
+ wayland? ( |
371 |
+ >=dev-libs/wayland-1.15 |
372 |
+ dev-libs/wayland-protocols |
373 |
+ ) |
374 |
+ X? ( |
375 |
+ x11-libs/libX11 |
376 |
+ x11-libs/libxcb |
377 |
+ x11-libs/xcb-util |
378 |
+ x11-libs/xcb-util-keysyms |
379 |
+ ) |
380 |
+ x264? ( >=media-libs/x264-0.0.20160712:0= ) |
381 |
+ x265? ( media-libs/x265:= ) |
382 |
+ xml? ( dev-libs/libxml2:2 ) |
383 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
384 |
+ zvbi? ( media-libs/zvbi ) |
385 |
+" |
386 |
+DEPEND="${RDEPEND} |
387 |
+ X? ( x11-base/xorg-proto ) |
388 |
+" |
389 |
+ |
390 |
+PATCHES=( |
391 |
+ "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch # build system |
392 |
+ "${FILESDIR}"/${PN}-2.2.4-libav-11.7.patch # bug #593460 |
393 |
+ "${FILESDIR}"/${PN}-2.2.8-freerdp-2.patch # bug 590164 |
394 |
+ "${FILESDIR}"/${P}-libvpx-1.8.0.patch # bug 677606 |
395 |
+ "${FILESDIR}"/${P}-fdk-aac-2.0.0.patch # bug 672290 |
396 |
+) |
397 |
+ |
398 |
+DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt ) |
399 |
+ |
400 |
+S="${WORKDIR}/${MY_P}" |
401 |
+ |
402 |
+src_prepare() { |
403 |
+ xdg_src_prepare # bug 608256 |
404 |
+ |
405 |
+ has_version '>=net-libs/libupnp-1.8.0' && \ |
406 |
+ eapply "${FILESDIR}"/${PN}-2.2.8-libupnp-slot-1.8.patch |
407 |
+ |
408 |
+ # Bootstrap when we are on a git checkout. |
409 |
+ if [[ ${PV} = *9999 ]] ; then |
410 |
+ ./bootstrap |
411 |
+ fi |
412 |
+ |
413 |
+ # Make it build with libtool 1.5 |
414 |
+ rm m4/lt* m4/libtool.m4 || die |
415 |
+ |
416 |
+ # We are not in a real git checkout due to the absence of a .git directory. |
417 |
+ touch src/revision.txt || die |
418 |
+ |
419 |
+ # Don't use --started-from-file when not using dbus. |
420 |
+ if ! use dbus ; then |
421 |
+ sed -i 's/ --started-from-file//' share/vlc.desktop.in || die |
422 |
+ fi |
423 |
+ |
424 |
+ # Disable running of vlc-cache-gen, we do that in pkg_postinst |
425 |
+ sed -e "/test.*build.*host/s/\$(host)/nothanks/" \ |
426 |
+ -i Makefile.am -i bin/Makefile.am || die "Failed to disable vlc-cache-gen" |
427 |
+ |
428 |
+ eautoreconf |
429 |
+ |
430 |
+ # Disable automatic running of tests. |
431 |
+ find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die |
432 |
+} |
433 |
+ |
434 |
+src_configure() { |
435 |
+ local myeconfargs=( |
436 |
+ --disable-aa |
437 |
+ --disable-dependency-tracking |
438 |
+ --disable-optimizations |
439 |
+ --disable-rpath |
440 |
+ --disable-update-check |
441 |
+ --enable-fast-install |
442 |
+ --enable-screen |
443 |
+ --enable-vcd |
444 |
+ --enable-vlc |
445 |
+ $(use_enable a52) |
446 |
+ $(use_enable alsa) |
447 |
+ $(use_enable altivec) |
448 |
+ $(use_enable aom) |
449 |
+ $(use_enable archive) |
450 |
+ $(use_enable aribsub) |
451 |
+ $(use_enable bidi fribidi) |
452 |
+ $(use_enable bidi harfbuzz) |
453 |
+ $(use_enable bluray) |
454 |
+ $(use_enable cddb libcddb) |
455 |
+ $(use_enable chromaprint) |
456 |
+ $(use_enable chromecast) |
457 |
+ $(use_enable chromecast microdns) |
458 |
+ $(use_enable cpu_flags_x86_mmx mmx) |
459 |
+ $(use_enable cpu_flags_x86_sse sse) |
460 |
+ $(use_enable dav1d) |
461 |
+ $(use_enable dbus) |
462 |
+ $(use_enable dbus kwallet) |
463 |
+ $(use_enable dc1394) |
464 |
+ $(use_enable debug) |
465 |
+ $(use_enable directx) |
466 |
+ $(use_enable directx d3d11va) |
467 |
+ $(use_enable directx dxva2) |
468 |
+ $(use_enable dts dca) |
469 |
+ $(use_enable dvbpsi) |
470 |
+ $(use_enable dvd dvdnav) |
471 |
+ $(use_enable dvd dvdread) |
472 |
+ $(use_enable encode sout) |
473 |
+ $(use_enable encode vlm) |
474 |
+ $(use_enable faad) |
475 |
+ $(use_enable fdk fdkaac) |
476 |
+ $(use_enable ffmpeg avcodec) |
477 |
+ $(use_enable ffmpeg avformat) |
478 |
+ $(use_enable ffmpeg swscale) |
479 |
+ $(use_enable flac) |
480 |
+ $(use_enable fluidsynth) |
481 |
+ $(use_enable fontconfig) |
482 |
+ $(use_enable gcrypt libgcrypt) |
483 |
+ $(use_enable gme) |
484 |
+ $(use_enable gnome-keyring secret) |
485 |
+ $(use_enable gstreamer gst-decode) |
486 |
+ $(use_enable ieee1394 dv1394) |
487 |
+ $(use_enable jack) |
488 |
+ $(use_enable jpeg) |
489 |
+ $(use_enable kate) |
490 |
+ $(use_enable libass) |
491 |
+ $(use_enable libcaca caca) |
492 |
+ $(use_enable libnotify notify) |
493 |
+ $(use_enable libsamplerate samplerate) |
494 |
+ $(use_enable libtar) |
495 |
+ $(use_enable libtiger tiger) |
496 |
+ $(use_enable linsys) |
497 |
+ $(use_enable lirc) |
498 |
+ $(use_enable live live555) |
499 |
+ $(use_enable lua) |
500 |
+ $(use_enable macosx-notifications osx-notifications) |
501 |
+ $(use_enable macosx-qtkit) |
502 |
+ $(use_enable mad) |
503 |
+ $(use_enable matroska) |
504 |
+ $(use_enable modplug mod) |
505 |
+ $(use_enable mp3 mpg123) |
506 |
+ $(use_enable mpeg libmpeg2) |
507 |
+ $(use_enable mtp) |
508 |
+ $(use_enable musepack mpc) |
509 |
+ $(use_enable ncurses) |
510 |
+ $(use_enable neon) |
511 |
+ $(use_enable ogg) |
512 |
+ $(use_enable omxil) |
513 |
+ $(use_enable omxil omxil-vout) |
514 |
+ $(use_enable opencv) |
515 |
+ $(use_enable optimisememory optimize-memory) |
516 |
+ $(use_enable opus) |
517 |
+ $(use_enable png) |
518 |
+ $(use_enable postproc) |
519 |
+ $(use_enable projectm) |
520 |
+ $(use_enable pulseaudio pulse) |
521 |
+ $(use_enable qt5 qt) |
522 |
+ $(use_enable rdp freerdp) |
523 |
+ $(use_enable run-as-root) |
524 |
+ $(use_enable samba smbclient) |
525 |
+ $(use_enable sdl-image) |
526 |
+ $(use_enable sftp) |
527 |
+ $(use_enable shout) |
528 |
+ $(use_enable sid) |
529 |
+ $(use_enable skins skins2) |
530 |
+ $(use_enable soxr) |
531 |
+ $(use_enable speex) |
532 |
+ $(use_enable srt) |
533 |
+ $(use_enable ssl gnutls) |
534 |
+ $(use_enable svg) |
535 |
+ $(use_enable svg svgdec) |
536 |
+ $(use_enable taglib) |
537 |
+ $(use_enable theora) |
538 |
+ $(use_enable tremor) |
539 |
+ $(use_enable twolame) |
540 |
+ $(use_enable udev) |
541 |
+ $(use_enable upnp) |
542 |
+ $(use_enable v4l v4l2) |
543 |
+ $(use_enable vaapi libva) |
544 |
+ $(use_enable vdpau) |
545 |
+ $(use_enable vnc) |
546 |
+ $(use_enable vorbis) |
547 |
+ $(use_enable vpx) |
548 |
+ $(use_enable wayland) |
549 |
+ $(use_enable wma-fixed) |
550 |
+ $(use_with X x) |
551 |
+ $(use_enable X xcb) |
552 |
+ $(use_enable X xvideo) |
553 |
+ $(use_enable x264) |
554 |
+ $(use_enable x265) |
555 |
+ $(use_enable xml libxml2) |
556 |
+ $(use_enable zeroconf avahi) |
557 |
+ $(use_enable zvbi) |
558 |
+ $(use_enable !zvbi telx) |
559 |
+ --with-kde-solid=/usr/share/solid/actions |
560 |
+ --disable-asdcp |
561 |
+ --disable-coverage |
562 |
+ --disable-cprof |
563 |
+ --disable-crystalhd |
564 |
+ --disable-decklink |
565 |
+ --disable-gles2 |
566 |
+ --disable-goom |
567 |
+ --disable-kai |
568 |
+ --disable-kva |
569 |
+ --disable-libplacebo |
570 |
+ --disable-maintainer-mode |
571 |
+ --disable-merge-ffmpeg |
572 |
+ --disable-mfx |
573 |
+ --disable-mmal |
574 |
+ --disable-opensles |
575 |
+ --disable-oss |
576 |
+ --disable-rpi-omxil |
577 |
+ --disable-schroedinger |
578 |
+ --disable-shine |
579 |
+ --disable-sndio |
580 |
+ --disable-spatialaudio |
581 |
+ --disable-vsxu |
582 |
+ --disable-wasapi |
583 |
+ ) |
584 |
+ # ^ We don't have these disabled libraries in the Portage tree yet. |
585 |
+ |
586 |
+ if use x264 && has_version ">=media-libs/x264-0.0.20190214"; then |
587 |
+ myeconfargs+=( --enable-x26410b ) |
588 |
+ else |
589 |
+ myeconfargs+=( --disable-x26410b ) |
590 |
+ fi |
591 |
+ |
592 |
+ # Compatibility fix for Samba 4. |
593 |
+ use samba && append-cppflags "-I/usr/include/samba-4.0" |
594 |
+ |
595 |
+ if use x86; then |
596 |
+ # We need to disable -fstack-check if use >=gcc 4.8.0. bug #499996 |
597 |
+ append-cflags $(test-flags-CC -fno-stack-check) |
598 |
+ # Bug 569774 |
599 |
+ replace-flags -Os -O2 |
600 |
+ fi |
601 |
+ |
602 |
+ # VLC now requires C++11 after commit 4b1c9dcdda0bbff801e47505ff9dfd3f274eb0d8 |
603 |
+ append-cxxflags -std=c++11 |
604 |
+ |
605 |
+ # FIXME: Needs libresid-builder from libsidplay:2 which is in another directory... |
606 |
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/" |
607 |
+ |
608 |
+ if use truetype || use bidi; then |
609 |
+ myeconfargs+=( --enable-freetype ) |
610 |
+ else |
611 |
+ myeconfargs+=( --disable-freetype ) |
612 |
+ fi |
613 |
+ |
614 |
+ if use truetype || use projectm; then |
615 |
+ local dejavu="/usr/share/fonts/dejavu/" |
616 |
+ myeconfargs+=( |
617 |
+ --with-default-font=${dejavu}/DejaVuSans.ttf |
618 |
+ --with-default-font-family=Sans |
619 |
+ --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf |
620 |
+ --with-default-monospace-font-family=Monospace |
621 |
+ ) |
622 |
+ fi |
623 |
+ |
624 |
+ econf "${myeconfargs[@]}" |
625 |
+ |
626 |
+ # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo. |
627 |
+ # Other values may break the build (bug 523144), so definition should not be removed. |
628 |
+ # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the start of config.h |
629 |
+ sed -i '1i#undef _FORTIFY_SOURCE' config.h || die |
630 |
+} |
631 |
+ |
632 |
+src_test() { |
633 |
+ virtx emake check-TESTS |
634 |
+} |
635 |
+ |
636 |
+src_install() { |
637 |
+ default |
638 |
+ find "${D}" -name '*.la' -delete || die |
639 |
+} |
640 |
+ |
641 |
+pkg_postinst() { |
642 |
+ if [[ -z ${ROOT} ]] && [[ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ]] ; then |
643 |
+ einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/" |
644 |
+ "/usr/$(get_libdir)/vlc/vlc-cache-gen" "/usr/$(get_libdir)/vlc/plugins/" |
645 |
+ else |
646 |
+ ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)" |
647 |
+ ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually" |
648 |
+ ewarn "If you do not do it, vlc will take a long time to load." |
649 |
+ fi |
650 |
+ |
651 |
+ xdg_pkg_postinst |
652 |
+} |
653 |
+ |
654 |
+pkg_postrm() { |
655 |
+ if [[ -e /usr/$(get_libdir)/vlc/plugins/plugins.dat ]]; then |
656 |
+ rm /usr/$(get_libdir)/vlc/plugins/plugins.dat || die "Failed to rm plugins.dat" |
657 |
+ fi |
658 |
+ |
659 |
+ xdg_pkg_postrm |
660 |
+} |