Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/vlc/files/, media-video/vlc/
Date: Thu, 31 May 2018 21:16:45
Message-Id: 1527801377.87ea358ab733755cd330c5d5191d79bf1be121e5.asturm@gentoo
1 commit: 87ea358ab733755cd330c5d5191d79bf1be121e5
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 31 21:04:35 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu May 31 21:16:17 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87ea358a
7
8 media-video/vlc: 3.0.3 version bump
9
10 Closes: https://bugs.gentoo.org/649798
11 Package-Manager: Portage-2.3.40, Repoman-2.3.9
12
13 media-video/vlc/Manifest | 1 +
14 .../vlc/files/vlc-3.0.3-fix-disable-vlm.patch | 42 ++
15 media-video/vlc/vlc-3.0.3.ebuild | 499 +++++++++++++++++++++
16 3 files changed, 542 insertions(+)
17
18 diff --git a/media-video/vlc/Manifest b/media-video/vlc/Manifest
19 index d3a85a7c167..86b22b14ecb 100644
20 --- a/media-video/vlc/Manifest
21 +++ b/media-video/vlc/Manifest
22 @@ -1,2 +1,3 @@
23 DIST vlc-2.2.8.tar.xz 22137276 BLAKE2B 10780f79a5c45c44b8fb76f229512da3932883da4a1b292745cabc8544ed251a080813ef233c9438766f3e635bee40ef64b929f3d43e0d457907093be1edd2f9 SHA512 adde16f4b4bd2d94f104bb3b99995df6bf4603bc67333c7615cb8d1d31ca63440b6b0aa93de9ccf0dba717cf905577c7d0bca7baba63caf401790b82eac3e04a
24 DIST vlc-3.0.2.tar.xz 25175492 BLAKE2B c0f2bebd9df491ff511f6bbdf27dc21b5676c5fbcb992a2d8e231ad7c1d276c4e50e39784e4fc1445af44ecf8a1a23f7fbc4e1cef200b2365b25eeb604fd5e8c SHA512 907a999dfa00fbc378e46689b2c32a09ea324b47a92b2183f2a1ade2c2c1ec205517580000a3c615d17b15d6885ee0ac51894944b90077968cb30ff58745497f
25 +DIST vlc-3.0.3.tar.xz 24941592 BLAKE2B dd6e27b10064ecae1c6f64459d2ed172d09f8dc1414c4d96bf66e8b3104154154229bb5d638955c855b6cf471b8630196b170db94b61506c7e0dd42bec8fbb20 SHA512 1569cefa6623b2631a832679bc9a63ebeba222901e5221d254e896a68d2ee467054da8de9eda566924e80a11bb29a673a9f0c4243793845547d8027b58a238ab
26
27 diff --git a/media-video/vlc/files/vlc-3.0.3-fix-disable-vlm.patch b/media-video/vlc/files/vlc-3.0.3-fix-disable-vlm.patch
28 new file mode 100644
29 index 00000000000..fe4eecb8e76
30 --- /dev/null
31 +++ b/media-video/vlc/files/vlc-3.0.3-fix-disable-vlm.patch
32 @@ -0,0 +1,42 @@
33 +From 49450a4ab90bba8530764c5cdb95d648aeda7d52 Mon Sep 17 00:00:00 2001
34 +From: =?utf8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@×××××××.fr>
35 +Date: Mon, 28 May 2018 18:25:15 +0200
36 +Subject: [PATCH] qt: Fix build with --disable-vlm
37 +MIME-Version: 1.0
38 +Content-Type: text/plain; charset=utf8
39 +Content-Transfer-Encoding: 8bit
40 +
41 +Fix #20495
42 +
43 +(cherry picked from commit 44a635bd4ae16fec5295f6f8aee4dd2ffd7e97d8)
44 +Signed-off-by: Hugo Beauzée-Luyssen <hugo@×××××××.fr>
45 +---
46 + modules/gui/qt/Makefile.am | 5 ++++-
47 + 1 file changed, 4 insertions(+), 1 deletion(-)
48 +
49 +diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
50 +index cb77b14d96..c67f4afc13 100644
51 +--- a/modules/gui/qt/Makefile.am
52 ++++ b/modules/gui/qt/Makefile.am
53 +@@ -191,7 +191,6 @@ nodist_libqt_plugin_la_SOURCES = \
54 + gui/qt/dialogs/open.moc.cpp \
55 + gui/qt/dialogs/openurl.moc.cpp \
56 + gui/qt/dialogs/podcast_configuration.moc.cpp \
57 +- gui/qt/dialogs/vlm.moc.cpp \
58 + gui/qt/dialogs/firstrun.moc.cpp \
59 + gui/qt/dialogs/extensions.moc.cpp \
60 + gui/qt/dialogs/fingerprintdialog.moc.cpp \
61 +@@ -445,6 +444,10 @@ EXTRA_DIST += gui/qt/vlc.qrc $(libqt_plugin_la_RES)
62 +
63 + nodist_libqt_plugin_la_SOURCES += gui/qt/resources.cpp
64 +
65 ++if ENABLE_VLM
66 ++nodist_libqt_plugin_la_SOURCES += gui/qt/dialogs/vlm.moc.cpp
67 ++endif
68 ++
69 + gui/qt/resources.cpp: gui/qt/vlc.qrc $(libqt_plugin_la_RES)
70 + $(AM_V_GEN)$(RCC) -name vlc -o $@ $<
71 +
72 +--
73 +2.11.0
74 +
75
76 diff --git a/media-video/vlc/vlc-3.0.3.ebuild b/media-video/vlc/vlc-3.0.3.ebuild
77 new file mode 100644
78 index 00000000000..e884279f947
79 --- /dev/null
80 +++ b/media-video/vlc/vlc-3.0.3.ebuild
81 @@ -0,0 +1,499 @@
82 +# Copyright 1999-2018 Gentoo Foundation
83 +# Distributed under the terms of the GNU General Public License v2
84 +
85 +EAPI=6
86 +
87 +MY_PV="${PV/_/-}"
88 +MY_PV="${MY_PV/-beta/-test}"
89 +MY_P="${PN}-${MY_PV}"
90 +if [[ ${PV} = *9999 ]] ; then
91 + if [[ ${PV%.9999} != ${PV} ]] ; then
92 + EGIT_REPO_URI="https://git.videolan.org/git/vlc/vlc-${PV%.9999}.git"
93 + else
94 + EGIT_REPO_URI="https://git.videolan.org/git/vlc.git"
95 + fi
96 + SCM="git-r3"
97 +else
98 + if [[ ${MY_P} = ${P} ]] ; then
99 + SRC_URI="https://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz"
100 + else
101 + SRC_URI="https://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz"
102 + fi
103 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd"
104 +fi
105 +inherit autotools flag-o-matic gnome2-utils toolchain-funcs versionator virtualx xdg-utils ${SCM}
106 +
107 +DESCRIPTION="Media player and framework with support for most multimedia files and streaming"
108 +HOMEPAGE="https://www.videolan.org/vlc/"
109 +
110 +LICENSE="LGPL-2.1 GPL-2"
111 +SLOT="0/5-9" # vlc - vlccore
112 +
113 +IUSE="a52 alsa altivec aom archive bidi bluray cddb chromaprint chromecast dbus dc1394
114 + debug directx dts +dvbpsi dvd +encode faad fdk +ffmpeg flac fluidsynth fontconfig
115 + +gcrypt gme gnome-keyring gstreamer ieee1394 jack jpeg kate libass libav libcaca
116 + libnotify +libsamplerate libtar libtiger linsys lirc live lua macosx-notifications
117 + macosx-qtkit matroska microdns modplug mp3 mpeg mtp musepack ncurses neon nfs ogg
118 + omxil opencv optimisememory opus png postproc projectm pulseaudio +qt5 rdp rtsp
119 + run-as-root samba schroedinger sdl-image sftp shout sid skins soxr speex srt ssl svg
120 + taglib theora tremor truetype twolame udev upnp vaapi v4l vcd vdpau vnc vorbis vpx
121 + wayland wma-fixed +X x264 x265 xml zeroconf zvbi cpu_flags_x86_mmx cpu_flags_x86_sse
122 +"
123 +REQUIRED_USE="
124 + chromecast? ( encode )
125 + directx? ( ffmpeg )
126 + fontconfig? ( truetype )
127 + libcaca? ( X )
128 + libtar? ( skins )
129 + libtiger? ( kate )
130 + postproc? ( ffmpeg )
131 + skins? ( qt5 truetype X xml )
132 + ssl? ( gcrypt )
133 + vaapi? ( ffmpeg X )
134 + vdpau? ( ffmpeg X )
135 +"
136 +RDEPEND="
137 + net-dns/libidn:=
138 + sys-libs/zlib:0[minizip]
139 + virtual/libintl:0
140 + virtual/opengl
141 + a52? ( media-libs/a52dec:0 )
142 + alsa? ( media-libs/alsa-lib:0 )
143 + aom? ( media-libs/libaom:= )
144 + archive? ( app-arch/libarchive:= )
145 + bidi? (
146 + dev-libs/fribidi:0
147 + media-libs/freetype:2[harfbuzz]
148 + media-libs/harfbuzz
149 + virtual/ttf-fonts:0
150 + )
151 + bluray? ( media-libs/libbluray:0= )
152 + cddb? ( media-libs/libcddb:0 )
153 + chromaprint? ( media-libs/chromaprint:0= )
154 + chromecast? ( >=dev-libs/protobuf-2.5.0:= )
155 + dbus? ( sys-apps/dbus:0 )
156 + dc1394? (
157 + media-libs/libdc1394:2
158 + sys-libs/libraw1394:0
159 + )
160 + dts? ( media-libs/libdca:0 )
161 + dvbpsi? ( >=media-libs/libdvbpsi-1.2.0:0= )
162 + dvd? (
163 + >=media-libs/libdvdnav-4.9:0
164 + >=media-libs/libdvdread-4.9:0
165 + )
166 + faad? ( media-libs/faad2:0 )
167 + fdk? ( media-libs/fdk-aac:0= )
168 + ffmpeg? (
169 + !libav? ( >=media-video/ffmpeg-3.1.3:0=[vaapi?,vdpau?] )
170 + libav? ( >=media-video/libav-11.8:0=[vaapi?,vdpau?] )
171 + )
172 + flac? (
173 + media-libs/flac:0
174 + media-libs/libogg:0
175 + )
176 + fluidsynth? ( media-sound/fluidsynth:0 )
177 + fontconfig? ( media-libs/fontconfig:1.0 )
178 + gcrypt? (
179 + dev-libs/libgcrypt:0=
180 + dev-libs/libgpg-error:0
181 + )
182 + gme? ( media-libs/game-music-emu:0 )
183 + gnome-keyring? ( app-crypt/libsecret )
184 + gstreamer? ( >=media-libs/gst-plugins-base-1.4.5:1.0 )
185 + ieee1394? (
186 + sys-libs/libavc1394:0
187 + sys-libs/libraw1394:0
188 + )
189 + jack? ( virtual/jack )
190 + jpeg? ( virtual/jpeg:0 )
191 + kate? ( media-libs/libkate:0 )
192 + libass? (
193 + media-libs/fontconfig:1.0
194 + media-libs/libass:0=
195 + )
196 + libcaca? ( media-libs/libcaca:0 )
197 + libnotify? (
198 + dev-libs/glib:2
199 + x11-libs/gdk-pixbuf:2
200 + x11-libs/gtk+:3
201 + x11-libs/libnotify:0
202 + )
203 + libsamplerate? ( media-libs/libsamplerate:0 )
204 + libtar? ( dev-libs/libtar:0 )
205 + libtiger? ( media-libs/libtiger:0 )
206 + linsys? ( media-libs/zvbi )
207 + lirc? ( app-misc/lirc:0 )
208 + live? ( media-plugins/live:0 )
209 + lua? ( >=dev-lang/lua-5.1:0 )
210 + matroska? (
211 + dev-libs/libebml:0=
212 + media-libs/libmatroska:0=
213 + )
214 + microdns? ( >=net-libs/libmicrodns-0.0.9:= )
215 + modplug? ( media-libs/libmodplug:0 )
216 + mp3? ( media-libs/libmad:0 )
217 + mpeg? ( media-libs/libmpeg2:0 )
218 + mtp? ( media-libs/libmtp:0= )
219 + musepack? ( media-sound/musepack-tools:0 )
220 + ncurses? ( sys-libs/ncurses:0=[unicode] )
221 + nfs? ( >=net-fs/libnfs-0.10.0:= )
222 + ogg? ( media-libs/libogg:0 )
223 + opencv? ( media-libs/opencv:0= )
224 + opus? ( >=media-libs/opus-1.0.3:0 )
225 + png? ( media-libs/libpng:0= )
226 + postproc? ( libav? ( media-libs/libpostproc:0= ) )
227 + projectm? (
228 + media-fonts/dejavu:0
229 + media-libs/libprojectm:0
230 + )
231 + pulseaudio? ( media-sound/pulseaudio:0 )
232 + qt5? (
233 + dev-qt/qtcore:5
234 + dev-qt/qtgui:5
235 + dev-qt/qtsvg:5
236 + dev-qt/qtwidgets:5
237 + X? (
238 + dev-qt/qtx11extras:5
239 + x11-libs/libX11
240 + )
241 + )
242 + rdp? ( >=net-misc/freerdp-2.0.0_rc0:0=[client] )
243 + samba? ( >=net-fs/samba-4.0.0:0[client,-debug(-)] )
244 + schroedinger? ( >=media-libs/schroedinger-1.0.10:0 )
245 + sdl-image? ( media-libs/sdl-image:0 )
246 + sftp? ( net-libs/libssh2:0 )
247 + shout? ( media-libs/libshout:0 )
248 + sid? ( media-libs/libsidplay:2 )
249 + skins? (
250 + x11-libs/libXext:0
251 + x11-libs/libXinerama:0
252 + x11-libs/libXpm:0
253 + )
254 + soxr? ( media-libs/soxr )
255 + speex? (
256 + >=media-libs/speex-1.2.0:0
257 + media-libs/speexdsp:0
258 + )
259 + srt? ( net-libs/srt )
260 + ssl? ( net-libs/gnutls:0 )
261 + svg? (
262 + gnome-base/librsvg:2
263 + x11-libs/cairo:0
264 + )
265 + taglib? ( >=media-libs/taglib-1.9:0 )
266 + theora? ( media-libs/libtheora:0 )
267 + tremor? ( media-libs/tremor:0 )
268 + truetype? (
269 + media-libs/freetype:2
270 + virtual/ttf-fonts:0
271 + !fontconfig? ( media-fonts/dejavu:0 )
272 + )
273 + twolame? ( media-sound/twolame:0 )
274 + udev? ( virtual/udev:0 )
275 + upnp? ( net-libs/libupnp:= )
276 + v4l? ( media-libs/libv4l:0 )
277 + vaapi? ( x11-libs/libva:0=[drm,wayland?,X?] )
278 + vcd? ( >=dev-libs/libcdio-0.78.2:0 )
279 + vdpau? ( x11-libs/libvdpau:0 )
280 + vnc? ( net-libs/libvncserver:0 )
281 + vorbis? ( media-libs/libvorbis:0 )
282 + vpx? ( media-libs/libvpx:0= )
283 + wayland? (
284 + dev-libs/wayland
285 + dev-libs/wayland-protocols
286 + )
287 + X? (
288 + x11-libs/libX11
289 + x11-libs/libxcb
290 + x11-libs/xcb-util
291 + x11-libs/xcb-util-keysyms
292 + )
293 + x264? ( media-libs/x264:0= )
294 + x265? ( media-libs/x265:0= )
295 + xml? ( dev-libs/libxml2:2 )
296 + zeroconf? ( net-dns/avahi:0[dbus] )
297 + zvbi? ( media-libs/zvbi )
298 +"
299 +DEPEND="${RDEPEND}
300 + >=sys-devel/gettext-0.19.8:*
301 + virtual/pkgconfig:*
302 + amd64? ( dev-lang/yasm:* )
303 + x86? ( dev-lang/yasm:* )
304 + X? ( x11-base/xorg-proto )
305 +"
306 +
307 +PATCHES=(
308 + "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch # build system
309 + "${FILESDIR}"/${PN}-2.2.4-libav-11.7.patch # bug #593460
310 + "${FILESDIR}"/${PN}-2.2.8-freerdp-2.patch # bug 590164
311 + "${FILESDIR}"/${PN}-3.0.1-qt-5.11.patch # TODO upstream
312 + "${FILESDIR}"/${P}-fix-disable-vlm.patch # bug 649798
313 +)
314 +
315 +DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt )
316 +
317 +S="${WORKDIR}/${MY_P}"
318 +
319 +pkg_pretend() {
320 + # https://bugs.gentoo.org/647668
321 + if use chromecast && ! use microdns; then
322 + einfo "USE=microdns is required for Chromecast autodetection support"
323 + fi
324 +}
325 +
326 +src_prepare() {
327 + default
328 +
329 + has_version '>=net-libs/libupnp-1.8.0' && \
330 + eapply "${FILESDIR}"/${PN}-2.2.8-libupnp-slot-1.8.patch
331 +
332 + # Bootstrap when we are on a git checkout.
333 + if [[ ${PV} = *9999 ]] ; then
334 + ./bootstrap
335 + fi
336 +
337 + # Make it build with libtool 1.5
338 + rm m4/lt* m4/libtool.m4 || die
339 +
340 + # We are not in a real git checkout due to the absence of a .git directory.
341 + touch src/revision.txt || die
342 +
343 + # Don't use --started-from-file when not using dbus.
344 + if ! use dbus ; then
345 + sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
346 + fi
347 +
348 + # Disable running of vlc-cache-gen, we do that in pkg_postinst
349 + sed -e "/test.*build.*host/s/\$(host)/nothanks/" \
350 + -i Makefile.am -i bin/Makefile.am || die "Failed to disable vlc-cache-gen"
351 +
352 + eautoreconf
353 +
354 + # Disable automatic running of tests.
355 + find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die
356 +}
357 +
358 +src_configure() {
359 + local myeconfargs=(
360 + --disable-aa
361 + --disable-dependency-tracking
362 + --disable-optimizations
363 + --disable-update-check
364 + --enable-fast-install
365 + --enable-screen
366 + --enable-vlc
367 + $(use_enable a52)
368 + $(use_enable alsa)
369 + $(use_enable altivec)
370 + $(use_enable aom)
371 + $(use_enable archive)
372 + $(use_enable bidi fribidi)
373 + $(use_enable bidi harfbuzz)
374 + $(use_enable bluray)
375 + $(use_enable cddb libcddb)
376 + $(use_enable chromaprint)
377 + $(use_enable chromecast)
378 + $(use_enable cpu_flags_x86_mmx mmx)
379 + $(use_enable cpu_flags_x86_sse sse)
380 + $(use_enable dbus)
381 + $(use_enable dbus kwallet)
382 + $(use_enable dc1394)
383 + $(use_enable debug)
384 + $(use_enable directx)
385 + $(use_enable directx d3d11va)
386 + $(use_enable directx dxva2)
387 + $(use_enable dts dca)
388 + $(use_enable dvbpsi)
389 + $(use_enable dvd dvdnav)
390 + $(use_enable dvd dvdread)
391 + $(use_enable encode sout)
392 + $(use_enable encode vlm)
393 + $(use_enable faad)
394 + $(use_enable fdk fdkaac)
395 + $(use_enable ffmpeg avcodec)
396 + $(use_enable ffmpeg avformat)
397 + $(use_enable ffmpeg swscale)
398 + $(use_enable flac)
399 + $(use_enable fluidsynth)
400 + $(use_enable fontconfig)
401 + $(use_enable gcrypt libgcrypt)
402 + $(use_enable gme)
403 + $(use_enable gnome-keyring secret)
404 + $(use_enable gstreamer gst-decode)
405 + $(use_enable ieee1394 dv1394)
406 + $(use_enable jack)
407 + $(use_enable jpeg)
408 + $(use_enable kate)
409 + $(use_enable libass)
410 + $(use_enable libcaca caca)
411 + $(use_enable libnotify notify)
412 + $(use_enable libsamplerate samplerate)
413 + $(use_enable libtar)
414 + $(use_enable libtiger tiger)
415 + $(use_enable linsys)
416 + $(use_enable lirc)
417 + $(use_enable live live555)
418 + $(use_enable lua)
419 + $(use_enable macosx-notifications osx-notifications)
420 + $(use_enable macosx-qtkit)
421 + $(use_enable matroska)
422 + $(use_enable microdns)
423 + $(use_enable modplug mod)
424 + $(use_enable mp3 mad)
425 + $(use_enable mpeg libmpeg2)
426 + $(use_enable mtp)
427 + $(use_enable musepack mpc)
428 + $(use_enable ncurses)
429 + $(use_enable neon)
430 + $(use_enable ogg)
431 + $(use_enable omxil)
432 + $(use_enable omxil omxil-vout)
433 + $(use_enable opencv)
434 + $(use_enable optimisememory optimize-memory)
435 + $(use_enable opus)
436 + $(use_enable png)
437 + $(use_enable postproc)
438 + $(use_enable projectm)
439 + $(use_enable pulseaudio pulse)
440 + $(use_enable qt5 qt)
441 + $(use_enable rdp freerdp)
442 + $(use_enable rtsp realrtsp)
443 + $(use_enable run-as-root)
444 + $(use_enable samba smbclient)
445 + $(use_enable schroedinger)
446 + $(use_enable sdl-image)
447 + $(use_enable sftp)
448 + $(use_enable shout)
449 + $(use_enable sid)
450 + $(use_enable skins skins2)
451 + $(use_enable soxr)
452 + $(use_enable speex)
453 + $(use_enable srt)
454 + $(use_enable ssl gnutls)
455 + $(use_enable svg)
456 + $(use_enable svg svgdec)
457 + $(use_enable taglib)
458 + $(use_enable theora)
459 + $(use_enable tremor)
460 + $(use_enable twolame)
461 + $(use_enable udev)
462 + $(use_enable upnp)
463 + $(use_enable v4l v4l2)
464 + $(use_enable vaapi libva)
465 + $(use_enable vcd)
466 + $(use_enable vdpau)
467 + $(use_enable vnc)
468 + $(use_enable vorbis)
469 + $(use_enable vpx)
470 + $(use_enable wayland)
471 + $(use_enable wma-fixed)
472 + $(use_with X x)
473 + $(use_enable X xcb)
474 + $(use_enable X xvideo)
475 + $(use_enable x264)
476 + $(use_enable x265)
477 + $(use_enable xml libxml2)
478 + $(use_enable zeroconf avahi)
479 + $(use_enable zvbi)
480 + $(use_enable !zvbi telx)
481 + --disable-asdcp
482 + --disable-coverage
483 + --disable-cprof
484 + --disable-crystalhd
485 + --disable-decklink
486 + --disable-gles2
487 + --disable-goom
488 + --disable-kai
489 + --disable-kva
490 + --disable-libplacebo
491 + --disable-maintainer-mode
492 + --disable-merge-ffmpeg
493 + --disable-mfx
494 + --disable-mmal
495 + --disable-opensles
496 + --disable-oss
497 + --disable-rpi-omxil
498 + --disable-shine
499 + --disable-sndio
500 + --disable-spatialaudio
501 + --disable-vsxu
502 + --disable-wasapi
503 + )
504 + # ^ We don't have these disabled libraries in the Portage tree yet.
505 +
506 + # Compatibility fix for Samba 4.
507 + use samba && append-cppflags "-I/usr/include/samba-4.0"
508 +
509 + if use x86; then
510 + # We need to disable -fstack-check if use >=gcc 4.8.0. bug #499996
511 + append-cflags $(test-flags-CC -fno-stack-check)
512 + # Bug 569774
513 + replace-flags -Os -O2
514 + fi
515 +
516 + # VLC now requires C++11 after commit 4b1c9dcdda0bbff801e47505ff9dfd3f274eb0d8
517 + append-cxxflags -std=c++11
518 +
519 + # FIXME: Needs libresid-builder from libsidplay:2 which is in another directory...
520 + append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/"
521 +
522 + xdg_environment_reset # bug 608256
523 +
524 + if use truetype || use bidi; then
525 + myeconfargs+=( --enable-freetype )
526 + else
527 + myeconfargs+=( --disable-freetype )
528 + fi
529 +
530 + if use truetype || use projectm; then
531 + local dejavu="/usr/share/fonts/dejavu/"
532 + myeconfargs+=(
533 + --with-default-font=${dejavu}/DejaVuSans.ttf
534 + --with-default-font-family=Sans
535 + --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf
536 + --with-default-monospace-font-family=Monospace
537 + )
538 + fi
539 +
540 + econf ${myeconfargs[@]}
541 +
542 + # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo.
543 + # Other values may break the build (bug 523144), so definition should not be removed.
544 + # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the start of config.h
545 + sed -i '1i#undef _FORTIFY_SOURCE' config.h || die
546 +}
547 +
548 +src_test() {
549 + virtx emake check-TESTS
550 +}
551 +
552 +src_install() {
553 + default
554 + find "${D}" -name '*.la' -delete || die
555 +}
556 +
557 +pkg_postinst() {
558 + if [[ "$ROOT" = "/" ]] && [[ -x "/usr/$(get_libdir)/vlc/vlc-cache-gen" ]] ; then
559 + einfo "Running /usr/$(get_libdir)/vlc/vlc-cache-gen on /usr/$(get_libdir)/vlc/plugins/"
560 + "/usr/$(get_libdir)/vlc/vlc-cache-gen" "/usr/$(get_libdir)/vlc/plugins/"
561 + else
562 + ewarn "We cannot run vlc-cache-gen (most likely ROOT!=/)"
563 + ewarn "Please run /usr/$(get_libdir)/vlc/vlc-cache-gen manually"
564 + ewarn "If you do not do it, vlc will take a long time to load."
565 + fi
566 +
567 + gnome2_icon_cache_update
568 + xdg_mimeinfo_database_update
569 + xdg_desktop_database_update
570 +}
571 +
572 +pkg_postrm() {
573 + if [[ -e /usr/$(get_libdir)/vlc/plugins/plugins.dat ]]; then
574 + rm /usr/$(get_libdir)/vlc/plugins/plugins.dat || die "Failed to rm plugins.dat"
575 + fi
576 +
577 + gnome2_icon_cache_update
578 + xdg_mimeinfo_database_update
579 + xdg_desktop_database_update
580 +}