diff options
author | 2021-06-11 12:28:54 +0200 | |
---|---|---|
committer | 2021-06-11 12:28:54 +0200 | |
commit | e74a5f5226dd76d0a189ad252389c81503643a9c (patch) | |
tree | 553ab3a55a4b6c3cad3c9c48f3c444454b4f39e1 /media-video | |
parent | net-im/teams-insiders: Remove 1.4.00.4855-r2 ebuild (diff) | |
download | seden-e74a5f5226dd76d0a189ad252389c81503643a9c.tar.gz seden-e74a5f5226dd76d0a189ad252389c81503643a9c.tar.bz2 seden-e74a5f5226dd76d0a189ad252389c81503643a9c.zip |
media-video/vlc: 9999-r1 version with fixed LUA patch
Only stored here until the 9999 variant patch is in the tree.
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch | 11 | ||||
-rw-r--r-- | media-video/vlc/files/vlc-2.2.8-freerdp-2.patch | 131 | ||||
-rw-r--r-- | media-video/vlc/files/vlc-9999-configure_lua_version.patch | 55 | ||||
-rw-r--r-- | media-video/vlc/files/vlc-9999-libupnp-slot-1.8.patch | 24 | ||||
-rw-r--r-- | media-video/vlc/metadata.xml | 59 | ||||
-rw-r--r-- | media-video/vlc/vlc-9999-r1.ebuild | 509 |
6 files changed, 789 insertions, 0 deletions
diff --git a/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch b/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch new file mode 100644 index 0000000..8a58969 --- /dev/null +++ b/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch @@ -0,0 +1,11 @@ +--- a/modules/codec/Makefile.am ++++ b/modules/codec/Makefile.am +@@ -215,7 +215,7 @@ + libtremor_plugin_la_SOURCES = codec/vorbis.c + libtremor_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_tremor + libtremor_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' +-libtremor_plugin_la_LIBADD = -lvorbisdec -logg ++libtremor_plugin_la_LIBADD = $(VORBIS_LIBS) $(OGG_LIBS) + EXTRA_LTLIBRARIES += libtremor_plugin.la + codec_LTLIBRARIES += $(LTLIBtremor) + diff --git a/media-video/vlc/files/vlc-2.2.8-freerdp-2.patch b/media-video/vlc/files/vlc-2.2.8-freerdp-2.patch new file mode 100644 index 0000000..5cee133 --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.8-freerdp-2.patch @@ -0,0 +1,131 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1957,7 +1957,7 @@ PKG_ENABLE_MODULES_VLC([VNC], [vnc], [li + + dnl RDP/Remote Desktop access module + dnl +-PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) ) ++PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp2 >= 1.0.1], (RDP/Remote Desktop client support) ) + + dnl + dnl Real RTSP plugin +--- a/modules/access/rdp.c 2017-12-25 17:45:32.964429170 +0100 ++++ b/modules/access/rdp.c 2017-12-25 17:53:15.114093670 +0100 +@@ -45,18 +45,6 @@ + # include <freerdp/version.h> + #endif + +-#if !defined(FREERDP_VERSION_MAJOR) || \ +- (defined(FREERDP_VERSION_MAJOR) && !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1))) +-# define SoftwareGdi sw_gdi +-# define Fullscreen fullscreen +-# define ServerHostname hostname +-# define Username username +-# define Password password +-# define ServerPort port +-# define EncryptionMethods encryption +-# define ContextSize context_size +-#endif +- + #include <errno.h> + #ifdef HAVE_POLL + # include <poll.h> +@@ -140,6 +128,7 @@ + vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_context; + demux_sys_t *p_sys = p_vlccontext->p_demux->p_sys; + rdpGdi *p_gdi = p_context->gdi; ++ unsigned bytesPerPixel; + + if ( p_sys->es ) + { +@@ -149,19 +138,23 @@ + + /* Now init and fill es format */ + vlc_fourcc_t i_chroma; +- switch( p_gdi->bytesPerPixel ) ++ switch( p_gdi->dstFormat ) + { + default: +- case 16: ++ msg_Dbg( p_vlccontext->p_demux, "unhandled dstFormat %x bpp", p_gdi->dstFormat); ++ case PIXEL_FORMAT_BGR16: + i_chroma = VLC_CODEC_RGB16; ++ bytesPerPixel = 16; + break; +- case 24: ++ case PIXEL_FORMAT_BGR24: + i_chroma = VLC_CODEC_RGB24; ++ bytesPerPixel = 24; + break; +- case 32: ++ case PIXEL_FORMAT_BGRA32: + i_chroma = VLC_CODEC_RGB32; ++ bytesPerPixel = 32; + break; + } + es_format_t fmt; + es_format_Init( &fmt, VIDEO_ES, i_chroma ); + +@@ -172,7 +165,7 @@ + fmt.video.i_height = p_gdi->height; + fmt.video.i_frame_rate_base = 1000; + fmt.video.i_frame_rate = 1000 * p_sys->f_fps; +- p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * p_gdi->bytesPerPixel; ++ p_sys->i_framebuffersize = p_gdi->width * p_gdi->height * bytesPerPixel; + + if ( p_sys->p_block ) + p_sys->p_block = block_Realloc( p_sys->p_block, 0, p_sys->i_framebuffersize ); +@@ -233,28 +226,19 @@ + vlcrdp_context_t * p_vlccontext = (vlcrdp_context_t *) p_instance->context; + + msg_Dbg( p_vlccontext->p_demux, "connected to desktop %dx%d (%d bpp)", +-#if defined(FREERDP_VERSION_MAJOR) && (FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 1)) + p_instance->settings->DesktopWidth, + p_instance->settings->DesktopHeight, + p_instance->settings->ColorDepth +-#else +- p_instance->settings->width, +- p_instance->settings->height, +- p_instance->settings->color_depth +-#endif + ); + + p_instance->update->DesktopResize = desktopResizeHandler; + p_instance->update->BeginPaint = beginPaintHandler; + p_instance->update->EndPaint = endPaintHandler; + +- gdi_init( p_instance, +- CLRBUF_16BPP | +-#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \ +- !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2)) +- CLRBUF_24BPP | +-#endif +- CLRBUF_32BPP, NULL ); ++ if ( p_instance->settings->ColorDepth > 16 ) ++ gdi_init( p_instance, PIXEL_FORMAT_XRGB32); ++ else ++ gdi_init( p_instance, PIXEL_FORMAT_RGB16); + + desktopResizeHandler( p_instance->context ); + return true; +@@ -428,10 +412,6 @@ + if ( p_sys->f_fps <= 0 ) p_sys->f_fps = 1.0; + p_sys->i_frame_interval = 1000000 / p_sys->f_fps; + +-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 +- freerdp_channels_global_init(); +-#endif +- + p_sys->p_instance = freerdp_new(); + if ( !p_sys->p_instance ) + { +@@ -506,9 +486,6 @@ + + freerdp_disconnect( p_sys->p_instance ); + freerdp_free( p_sys->p_instance ); +-#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR < 2 +- freerdp_channels_global_uninit(); +-#endif + + if ( p_sys->p_block ) + block_Release( p_sys->p_block ); diff --git a/media-video/vlc/files/vlc-9999-configure_lua_version.patch b/media-video/vlc/files/vlc-9999-configure_lua_version.patch new file mode 100644 index 0000000..2628075 --- /dev/null +++ b/media-video/vlc/files/vlc-9999-configure_lua_version.patch @@ -0,0 +1,55 @@ +Only look for one single version of Lua: the one pointed to by the +pkgconfig package 'lua'. The wrapper set up by lua eclasses will take care +of the rest. + +--- a/configure.ac 2021-06-11 12:20:01.222417096 +0200 ++++ b/configure.ac 2021-06-11 12:21:00.257419197 +0200 +@@ -1907,44 +1907,10 @@ + [disable LUA scripting support (default enabled)])) + if test "${enable_lua}" != "no" + then +- PKG_CHECK_MODULES(LUA, lua5.2, [ have_lua=yes ], [:]) +- +- AS_IF([test "${have_lua}" != "yes"], [ +- AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead]) +- PKG_CHECK_MODULES(LUA, lua5.1, [ have_lua=yes ], [:]) ]) +- +- AS_IF([test "${have_lua}" != "yes"], [ +- AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead]) +- PKG_CHECK_MODULES(LUA, lua >= 5.1, [ have_lua=yes ], [:]) ]) +- +- AS_IF([test "${have_lua}" != "yes"], [ +- AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead]) +- have_lua_lib=no +- AC_CHECK_LIB( lua5.2 , luaL_newstate, [ +- LUA_LIBS="-llua5.2" +- have_lua_lib=yes], []) +- +- AS_IF([test "${have_lua_lib}" != "yes"], [ +- AC_CHECK_LIB( lua5.1 , luaL_newstate, [ +- LUA_LIBS="-llua5.1" +- have_lua_lib=yes], [] ) ]) +- +- AS_IF([test "${have_lua_lib}" != "yes"], [ +- AC_CHECK_LIB( lua51 , luaL_newstate, [ +- LUA_LIBS="-llua51" +- have_lua_lib=yes], [] ) ]) +- +- AS_IF([test "${have_lua_lib}" != "yes"], [ +- AC_CHECK_LIB( lua , luaL_newstate, +- [LUA_LIBS="-llua" +- have_lua_lib=yes], +- [ have_lua=no ], [-lm] ) ]) +- +- dnl If we found any lib, check that we have the headers too +- AS_IF([test "${have_lua_lib}" = "yes"], [ +- AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h], [ have_lua=yes ], []) ]) +- ]) +- ++ PKG_CHECK_MODULES(LUA, lua, ++ [ have_lua=yes ], ++ [ have_lua=no ] ++ ) + if test "x${have_lua}" != "xyes" ; then + AC_MSG_ERROR([Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.]) + fi diff --git a/media-video/vlc/files/vlc-9999-libupnp-slot-1.8.patch b/media-video/vlc/files/vlc-9999-libupnp-slot-1.8.patch new file mode 100644 index 0000000..15ffc6a --- /dev/null +++ b/media-video/vlc/files/vlc-9999-libupnp-slot-1.8.patch @@ -0,0 +1,24 @@ +--- a/modules/services_discovery/upnp-wrapper.hpp 2017-12-25 18:17:33.358015500 +0100 ++++ b/modules/services_discovery/upnp-wrapper.hpp 2017-12-25 18:30:45.158167813 +0100 +@@ -35,8 +35,8 @@ + #include <algorithm> + #include <assert.h> + +-#include <upnp.h> +-#include <upnptools.h> ++#include <upnp-1.8/upnp.h> ++#include <upnp-1.8/upnptools.h> + + #if UPNP_VERSION < 10800 + typedef void* UpnpEventPtr; + +--- a/configure.ac 2017-12-09 14:09:12.956370304 +0100 ++++ b/configure.ac 2017-12-09 14:13:25.236710362 +0100 +@@ -4046,7 +4046,7 @@ + dnl + dnl UPnP Plugin (Intel SDK) + dnl +-PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto]) ++PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp-1.8], [Intel UPNP SDK],[auto]) + + EXTEND_HELP_STRING([Misc options:]) diff --git a/media-video/vlc/metadata.xml b/media-video/vlc/metadata.xml new file mode 100644 index 0000000..0e81872 --- /dev/null +++ b/media-video/vlc/metadata.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>media-video@gentoo.org</email> + <name>Gentoo Video project</name> + </maintainer> + <use> + <flag name="aom">Enable AV1 encoding/decoding support using <pkg>media-libs/libaom</pkg></flag> + <flag name="archive">Enable support for libarchive stream extractor</flag> + <flag name="aribsub">Enable support for decoding ARIB STD-B24 subtitles</flag> + <flag name="bluray">Enable libbluray for Blu-ray disc support</flag> + <flag name="chromaprint">Enable libchromaprint for Chromaprint based audio fingerprinter support</flag> + <flag name="chromecast">Enable experimental support for Google Chromecast</flag> + <flag name="dav1d">Enable support for <pkg>media-libs/dav1d</pkg> AV1 decoder</flag> + <flag name="dc1394">Enable IIDC cameras support</flag> + <flag name="directx">Enable Win32 DirectX, D3D11va and DxVA2 support</flag> + <flag name="dvbpsi">Enable support for Mpeg-TS files (.ts, .m2ts, .mts) via <pkg>media-libs/libdvbpsi</pkg></flag> + <flag name="encode">Enable streaming-output support and videolan manager to control multiple streams from within one instance</flag> + <flag name="faad">Enable AAC audio decoding library support via media-libs/faad2</flag> + <flag name="fdk">Enable the Fraunhofer AAC codec library</flag> + <flag name="fluidsynth">Enable Fluidsynth MIDI software synthesis (with external sound fonts)</flag> + <flag name="gcrypt">Enable cryptography support via libgcrypt</flag> + <flag name="gme">Enable support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats</flag> + <flag name="gstreamer">Enable GStreamer based decoding support (currently supports only video decoding)</flag> + <flag name="kate">Adds support for Ogg Kate subtitles via libkate</flag> + <flag name="kms">Enable kernel mode setting video output plugin via <pkg>x11-libs/libdrm</pkg></flag> + <flag name="libplacebo">Enable support for GPU accelerated video rendering with <pkg>media-libs/libplacebo</pkg></flag> + <flag name="libtar">Uses libtar instead of the built-in tar reader for reading custom skins</flag> + <flag name="libtiger">Enable Ogg Kate subtitles rendering using libtiger</flag> + <flag name="linsys">Enable support for Linux Linear Systems Ltd. SDI and HD-SDI input cards</flag> + <flag name="live">Enable live555 streaming media support (client support for rtsp)</flag> + <flag name="loudness">Enable loudness normalisation according to the EBU R128 standard using <pkg>media-libs/libebur128</pkg></flag> + <flag name="lua">Enable Lua scripting support, needed for including support for Jamendo (online music platform) and similar things</flag> + <flag name="macosx-notifications">Enable Mac OS X notifications module (formerly growl)</flag> + <flag name="matroska">Enable matroska support using reference libraries (fallback on other existing matroska support if disabled, i.e., matroska enabled FFmpeg)</flag> + <flag name="mpeg">Add libmpeg2 support for mpeg-1 and mpeg-2 video streams</flag> + <flag name="nfs">Enable support for nfs protocol via <pkg>net-fs/libnfs</pkg></flag> + <flag name="omxil">Enable OpenMAX Integration Layer codec module</flag> + <flag name="optimisememory">Enable optimisation for memory rather than performance</flag> + <flag name="projectm">Enable the projectM visualization plugin</flag> + <flag name="run-as-root">Allows vlc to start for root. Don't enable this unless you have a very specific (e.g. embedded) need for it!</flag> + <flag name="sdl-image">Enable sdl image video decoder (depends on sdl)</flag> + <flag name="sftp">Enable libssh2 to support SFTP file transfer</flag> + <flag name="shout">Enable libshout output</flag> + <flag name="sid">Adds support for playing C64 SID files through <pkg>media-libs/libsidplay</pkg>:2</flag> + <flag name="skins">Enable support for the skins2 interface</flag> + <flag name="soxr">Enable SoX Resampler support via <pkg>media-libs/soxr</pkg></flag> + <flag name="srt">Enable support for Secure Reliable Transport (SRT) via <pkg>net-libs/srt</pkg></flag> + <flag name="tremor">Enable tremor, a fixed-point version of the Ogg Vorbis decoder</flag> + <flag name="twolame">Enable twolame support (MPEG Audio Layer 2 encoder)</flag> + <flag name="upnp">Enable support for the Intel SDK stack based UPnP discovery module instead of CyberLink</flag> + <flag name="vpx">Enable the decoder(s) from the WebM VP8 / VP9 Codec SDK</flag> + <flag name="X">Enable support for e.g. fullscreen mode via X and the X C-language binding. It does not build a graphical interface</flag> + <flag name="x265">Support X265 Encoder</flag> + <flag name="zeroconf">Enable support for zero-configuration networking via avahi</flag> + <flag name="zvbi">Enable support for teletext subtitles via the zvbi library</flag> + </use> +</pkgmetadata> diff --git a/media-video/vlc/vlc-9999-r1.ebuild b/media-video/vlc/vlc-9999-r1.ebuild new file mode 100644 index 0000000..010d1ea --- /dev/null +++ b/media-video/vlc/vlc-9999-r1.ebuild @@ -0,0 +1,509 @@ +# Copyright 2000-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..2} ) + +MY_PV="${PV/_/-}" +MY_PV="${MY_PV/-beta/-test}" +MY_P="${PN}-${MY_PV}" +if [[ ${PV} = *9999 ]] ; then + if [[ ${PV%.9999} != ${PV} ]] ; then + EGIT_REPO_URI="https://git.videolan.org/git/vlc/vlc-${PV%.9999}.git" + else + EGIT_REPO_URI="https://git.videolan.org/git/vlc.git" + fi + inherit git-r3 +else + if [[ ${MY_P} = ${P} ]] ; then + SRC_URI="https://download.videolan.org/pub/videolan/${PN}/${PV}/${P}.tar.xz" + else + SRC_URI="https://download.videolan.org/pub/videolan/testing/${MY_P}/${MY_P}.tar.xz" + fi + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 -sparc ~x86" +fi +inherit autotools flag-o-matic lua-single toolchain-funcs virtualx xdg + +DESCRIPTION="Media player and framework with support for most multimedia files and streaming" +HOMEPAGE="https://www.videolan.org/vlc/" + +LICENSE="LGPL-2.1 GPL-2" +SLOT="0/12-9" # vlc - vlccore + +IUSE="a52 alsa aom archive aribsub bidi bluray cddb chromaprint chromecast dav1d dbus + dc1394 debug directx dts +dvbpsi dvd +encode faad fdk +ffmpeg flac fluidsynth + fontconfig +gcrypt gme gnome-keyring gstreamer +gui ieee1394 jack jpeg kate kms + libass libcaca libnotify libplacebo +libsamplerate libtar libtiger linsys lirc live + loudness lua macosx-notifications mad matroska modplug mp3 mpeg mtp musepack ncurses + nfs ogg omxil optimisememory opus png projectm pulseaudio rdp run-as-root samba + sdl-image sftp shout sid skins soxr speex srt ssl svg taglib theora tremor truetype + twolame udev upnp vaapi v4l vdpau vnc vpx wayland +X x264 x265 xml zeroconf + zvbi cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_x86_mmx cpu_flags_x86_sse +" +REQUIRED_USE=" + chromecast? ( encode ) + directx? ( ffmpeg ) + fontconfig? ( truetype ) + libcaca? ( X ) + libtar? ( skins ) + libtiger? ( kate ) + lua? ( ${LUA_REQUIRED_USE} ) + skins? ( gui truetype X xml ) + ssl? ( gcrypt ) + vaapi? ( ffmpeg X ) + vdpau? ( ffmpeg X ) +" +BDEPEND=" + >=sys-devel/gettext-0.19.8 + virtual/pkgconfig + lua? ( ${LUA_DEPS} ) + amd64? ( dev-lang/yasm ) + x86? ( dev-lang/yasm ) +" +RDEPEND=" + media-libs/libvorbis + net-dns/libidn:= + sys-libs/zlib[minizip] + virtual/libintl + virtual/opengl + a52? ( media-libs/a52dec ) + alsa? ( media-libs/alsa-lib ) + aom? ( media-libs/libaom:= ) + archive? ( app-arch/libarchive:= ) + aribsub? ( media-libs/aribb24 ) + bidi? ( + dev-libs/fribidi + media-libs/freetype:2[harfbuzz] + media-libs/harfbuzz + virtual/ttf-fonts + ) + bluray? ( >=media-libs/libbluray-1.3.0:= ) + cddb? ( media-libs/libcddb ) + chromaprint? ( media-libs/chromaprint:= ) + chromecast? ( + >=dev-libs/protobuf-2.5.0:= + >=net-libs/libmicrodns-0.1.2:= + ) + dav1d? ( >=media-libs/dav1d-0.5.0:= ) + dbus? ( sys-apps/dbus ) + dc1394? ( + media-libs/libdc1394:2 + sys-libs/libraw1394 + ) + dts? ( media-libs/libdca ) + dvbpsi? ( >=media-libs/libdvbpsi-1.2.0:= ) + dvd? ( + >=media-libs/libdvdnav-6.1.1:0= + >=media-libs/libdvdread-6.1.2:0= + ) + faad? ( media-libs/faad2 ) + fdk? ( media-libs/fdk-aac:= ) + ffmpeg? ( >=media-video/ffmpeg-3.1.3:0=[postproc,vaapi?,vdpau?] ) + flac? ( + media-libs/flac + media-libs/libogg + ) + fluidsynth? ( media-sound/fluidsynth:= ) + fontconfig? ( media-libs/fontconfig:1.0 ) + gcrypt? ( + dev-libs/libgcrypt:0= + dev-libs/libgpg-error + ) + gme? ( media-libs/game-music-emu ) + gnome-keyring? ( app-crypt/libsecret ) + gstreamer? ( >=media-libs/gst-plugins-base-1.4.5:1.0 ) + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + X? ( + dev-qt/qtx11extras:5 + x11-libs/libX11 + ) + ) + ieee1394? ( + sys-libs/libavc1394 + sys-libs/libraw1394 + ) + jack? ( virtual/jack ) + jpeg? ( virtual/jpeg:0 ) + kate? ( media-libs/libkate ) + kms? ( x11-libs/libdrm ) + libass? ( + media-libs/fontconfig:1.0 + media-libs/libass:= + ) + libcaca? ( media-libs/libcaca ) + libnotify? ( + dev-libs/glib:2 + x11-libs/gdk-pixbuf:2 + x11-libs/libnotify + ) + libplacebo? ( media-libs/libplacebo ) + libsamplerate? ( media-libs/libsamplerate ) + libtar? ( dev-libs/libtar ) + libtiger? ( media-libs/libtiger ) + linsys? ( media-libs/zvbi ) + lirc? ( app-misc/lirc ) + live? ( media-plugins/live:= ) + loudness? ( >=media-libs/libebur128-1.2.4:= ) + lua? ( ${LUA_DEPS} ) + mad? ( media-libs/libmad ) + matroska? ( + >=dev-libs/libebml-1.4.2:= + media-libs/libmatroska:= + ) + modplug? ( >=media-libs/libmodplug-0.8.9.0 ) + mp3? ( media-sound/mpg123 ) + mpeg? ( media-libs/libmpeg2 ) + mtp? ( media-libs/libmtp:= ) + musepack? ( media-sound/musepack-tools ) + ncurses? ( sys-libs/ncurses:0=[unicode] ) + nfs? ( >=net-fs/libnfs-0.10.0:= ) + ogg? ( media-libs/libogg ) + opus? ( >=media-libs/opus-1.0.3 ) + png? ( media-libs/libpng:0= ) + projectm? ( + media-fonts/dejavu + media-libs/libprojectm:0= + ) + pulseaudio? ( media-sound/pulseaudio ) + rdp? ( >=net-misc/freerdp-2.0.0_rc0:=[client(+)] ) + samba? ( >=net-fs/samba-4.0.0:0[client,-debug(-)] ) + sdl-image? ( media-libs/sdl-image ) + sftp? ( net-libs/libssh2 ) + shout? ( media-libs/libshout ) + sid? ( media-libs/libsidplay:2 ) + skins? ( + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXpm + ) + soxr? ( >=media-libs/soxr-0.1.2 ) + speex? ( + >=media-libs/speex-1.2.0 + media-libs/speexdsp + ) + srt? ( >=net-libs/srt-1.4.2 ) + ssl? ( net-libs/gnutls:= ) + svg? ( + gnome-base/librsvg:2 + x11-libs/cairo + ) + taglib? ( >=media-libs/taglib-1.9 ) + theora? ( media-libs/libtheora ) + tremor? ( media-libs/tremor ) + truetype? ( + media-libs/freetype:2 + virtual/ttf-fonts + !fontconfig? ( media-fonts/dejavu ) + ) + twolame? ( media-sound/twolame ) + udev? ( virtual/udev ) + upnp? ( net-libs/libupnp:=[ipv6] ) + v4l? ( media-libs/libv4l:= ) + vaapi? ( x11-libs/libva:=[drm,wayland?,X?] ) + vdpau? ( x11-libs/libvdpau ) + vnc? ( net-libs/libvncserver ) + vpx? ( media-libs/libvpx:= ) + wayland? ( + >=dev-libs/wayland-1.15 + >=dev-libs/wayland-protocols-1.12 + ) + X? ( + x11-libs/libX11 + x11-libs/libxcb[xkb] + x11-libs/libXcursor + x11-libs/libxkbcommon[X] + x11-libs/xcb-util + x11-libs/xcb-util-keysyms + ) + x264? ( >=media-libs/x264-0.0.20190214:= ) + x265? ( media-libs/x265:= ) + xml? ( dev-libs/libxml2:2 ) + zeroconf? ( net-dns/avahi[dbus] ) + zvbi? ( media-libs/zvbi ) +" +DEPEND="${RDEPEND} + X? ( x11-base/xorg-proto ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch # build system + "${FILESDIR}"/${PN}-2.2.8-freerdp-2.patch # bug 590164 + "${FILESDIR}"/${P}-configure_lua_version.patch +) + +DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt ) + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use lua; then + lua-single_pkg_setup + fi +} + +src_prepare() { + xdg_src_prepare # bug 608256 + + has_version 'net-libs/libupnp:1.8' && \ + eapply "${FILESDIR}"/${P}-libupnp-slot-1.8.patch + + # Bootstrap when we are on a git checkout. + if [[ ${PV} = *9999 ]] ; then + ./bootstrap + fi + + # Make it build with libtool 1.5 + rm m4/lt* m4/libtool.m4 || die + + # We are not in a real git checkout due to the absence of a .git directory. + touch src/revision.txt || die + + # Don't use --started-from-file when not using dbus. + if ! use dbus ; then + sed -i 's/ --started-from-file//' share/vlc.desktop.in || die + fi + + # Disable running of vlc-cache-gen, we do that in pkg_postinst + sed -e "/test.*build.*host/s/\$(host)/nothanks/" \ + -i Makefile.am -i bin/Makefile.am || die "Failed to disable vlc-cache-gen" + + # Fix gettext version mismatch errors. + sed -i -e s/GETTEXT_VERSION/GETTEXT_REQUIRE_VERSION/ configure.ac || die + + eautoreconf + + # Disable automatic running of tests. + find . -name 'Makefile.in' -exec sed -i 's/\(..*\)check-TESTS/\1/' {} \; || die +} + +src_configure() { + local -x BUILDCC=$(tc-getBUILD_CC) + + local myeconfargs=( + --disable-optimizations + --disable-rpath + --disable-update-check + --enable-fast-install + --enable-screen + --enable-vcd + --enable-vlc + --enable-vorbis + $(use_enable a52) + $(use_enable alsa) + $(use_enable aom) + $(use_enable archive) + $(use_enable aribsub) + $(use_enable bidi fribidi) + $(use_enable bidi harfbuzz) + $(use_enable bluray) + $(use_enable cddb libcddb) + $(use_enable chromaprint) + $(use_enable chromecast) + $(use_enable chromecast microdns) + $(use_enable cpu_flags_arm_neon neon) + $(use_enable cpu_flags_ppc_altivec altivec) + $(use_enable cpu_flags_x86_mmx mmx) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable dav1d) + $(use_enable dbus) + $(use_enable dbus kwallet) + $(use_enable dc1394) + $(use_enable debug) + $(use_enable directx) + $(use_enable directx d3d11va) + $(use_enable directx dxva2) + $(use_enable dts dca) + $(use_enable dvbpsi) + $(use_enable dvd dvdnav) + $(use_enable dvd dvdread) + $(use_enable encode sout) + $(use_enable encode vlm) + $(use_enable faad) + $(use_enable fdk fdkaac) + $(use_enable ffmpeg avcodec) + $(use_enable ffmpeg avformat) + $(use_enable ffmpeg postproc) + $(use_enable ffmpeg swscale) + $(use_enable flac) + $(use_enable fluidsynth) + $(use_enable fontconfig) + $(use_enable gcrypt libgcrypt) + $(use_enable gme) + $(use_enable gnome-keyring secret) + $(use_enable gstreamer gst-decode) + $(use_enable gui qt) + $(use_enable ieee1394 dv1394) + $(use_enable jack) + $(use_enable jpeg) + $(use_enable kate) + $(use_enable kms) + $(use_enable libass) + $(use_enable libcaca caca) + $(use_enable libnotify notify) + $(use_enable libplacebo) + $(use_enable libsamplerate samplerate) + $(use_enable libtar) + $(use_enable libtiger tiger) + $(use_enable linsys) + $(use_enable lirc) + $(use_enable live live555) + $(use_enable loudness ebur128) + $(use_enable lua) + $(use_enable macosx-notifications osx-notifications) + $(use_enable mad) + $(use_enable matroska) + $(use_enable modplug mod) + $(use_enable mp3 mpg123) + $(use_enable mpeg libmpeg2) + $(use_enable mtp) + $(use_enable musepack mpc) + $(use_enable ncurses) + $(use_enable nfs) + $(use_enable ogg) + $(use_enable omxil) + $(use_enable optimisememory optimize-memory) + $(use_enable opus) + $(use_enable png) + $(use_enable projectm) + $(use_enable pulseaudio pulse) + $(use_enable rdp freerdp) + $(use_enable run-as-root) + $(use_enable samba smbclient) + $(use_enable sdl-image) + $(use_enable sftp) + $(use_enable shout) + $(use_enable sid) + $(use_enable skins skins2) + $(use_enable soxr) + $(use_enable speex) + $(use_enable srt) + $(use_enable ssl gnutls) + $(use_enable svg) + $(use_enable svg svgdec) + $(use_enable taglib) + $(use_enable theora) + $(use_enable tremor) + $(use_enable twolame) + $(use_enable udev) + $(use_enable upnp) + $(use_enable v4l v4l2) + $(use_enable vaapi libva) + $(use_enable vdpau) + $(use_enable vnc) + $(use_enable vpx) + $(use_enable wayland) + $(use_with X x) + $(use_enable X xcb) + $(use_enable x264) + $(use_enable x264 x26410b) + $(use_enable x265) + $(use_enable xml libxml2) + $(use_enable zeroconf avahi) + $(use_enable zvbi) + $(use_enable !zvbi telx) + --with-kde-solid="${EPREFIX}"/usr/share/solid/actions + --disable-asdcp + --disable-coverage + --disable-cprof + --disable-decklink + --disable-gles2 + --disable-goom + --disable-kai + --disable-kva + --disable-maintainer-mode + --disable-merge-ffmpeg + --disable-mfx + --disable-mmal + --disable-opencv + --disable-opensles + --disable-oss + --disable-rpi-omxil + --disable-schroedinger + --disable-shine + --disable-sndio + --disable-spatialaudio + --disable-vsxu + --disable-wasapi + ) + # ^ We don't have these disabled libraries in the Portage tree yet. + + # Compatibility fix for Samba 4. + use samba && append-cppflags "-I/usr/include/samba-4.0" + + if use x86; then + # We need to disable -fstack-check if use >=gcc 4.8.0. bug #499996 + append-cflags $(test-flags-CC -fno-stack-check) + # Bug 569774 + replace-flags -Os -O2 + fi + + # VLC now requires C++11 after commit 4b1c9dcdda0bbff801e47505ff9dfd3f274eb0d8 + append-cxxflags -std=c++11 + + if use omxil; then + # bug #723006 + # https://trac.videolan.org/vlc/ticket/24617 + append-cflags -fcommon + fi + + # FIXME: Needs libresid-builder from libsidplay:2 which is in another directory... + append-ldflags "-L/usr/$(get_libdir)/sidplay/builders/" + + if use truetype || use bidi; then + myeconfargs+=( --enable-freetype ) + else + myeconfargs+=( --disable-freetype ) + fi + + if use truetype || use projectm; then + local dejavu="${EPREFIX}/usr/share/fonts/dejavu/" + myeconfargs+=( + --with-default-font=${dejavu}/DejaVuSans.ttf + --with-default-font-family=Sans + --with-default-monospace-font=${dejavu}/DejaVuSansMono.ttf + --with-default-monospace-font-family=Monospace + ) + fi + + econf "${myeconfargs[@]}" + + # _FORTIFY_SOURCE is set to 2 in config.h, which is also the default value on Gentoo. + # Other values may break the build (bug 523144), so definition should not be removed. + # To prevent redefinition warnings, we undefine _FORTIFY_SOURCE at the start of config.h + sed -i '1i#undef _FORTIFY_SOURCE' config.h || die +} + +src_test() { + virtx emake check-TESTS +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + if [[ -z "${ROOT}" ]] && [[ -x "${EROOT}/usr/libexec/vlc/vlc-cache-gen" ]] ; then + einfo "Running ${EROOT}/usr/libexec/vlc/vlc-cache-gen on ${EROOT}/usr/libexec/vlc/plugins/" + "${EROOT}/usr/libexec/vlc/vlc-cache-gen" "${EROOT}/usr/libexec/vlc/plugins/" + else + ewarn "We cannot run vlc-cache-gen (most likely ROOT != /)" + ewarn "Please run ${EROOT}/usr/libexec/vlc/vlc-cache-gen manually" + ewarn "If you do not do it, vlc will take a long time to load." + fi + + xdg_pkg_postinst +} + +pkg_postrm() { + if [[ -e "${EROOT}"/usr/libexec/vlc/plugins/plugins.dat ]]; then + rm "${EROOT}"/usr/libexec/vlc/plugins/plugins.dat || die "Failed to rm plugins.dat" + fi + + xdg_pkg_postrm +} |