aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-04-14 14:21:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-04-14 14:47:00 +0000
commit3685753335233dcf839f13341c66d09a78896bf6 (patch)
tree1a0a88dad03dcdc6e793d6ebf5b85abca1d98800 /community
parent929d8744c21a0a42705fa002d2d97bd37ef72f51 (diff)
downloadaports-3685753335233dcf839f13341c66d09a78896bf6.tar.bz2
aports-3685753335233dcf839f13341c66d09a78896bf6.tar.xz
community/vlc: move from main
Diffstat (limited to 'community')
-rw-r--r--community/vlc/APKBUILD337
-rw-r--r--community/vlc/fix-waitpid-usage.patch61
-rw-r--r--community/vlc/omxil-rpi-codecs.patch15
-rw-r--r--community/vlc/vlc-daemon.pre-install15
-rw-r--r--community/vlc/vlc-libs.trigger5
-rw-r--r--community/vlc/vlc.confd15
-rwxr-xr-xcommunity/vlc/vlc.initd32
7 files changed, 480 insertions, 0 deletions
diff --git a/community/vlc/APKBUILD b/community/vlc/APKBUILD
new file mode 100644
index 0000000000..83c90a3182
--- /dev/null
+++ b/community/vlc/APKBUILD
@@ -0,0 +1,337 @@
+# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=vlc
+pkgver=2.2.4
+_pkgver=${pkgver/_/-}
+_ver=${_pkgver%[a-z]}
+pkgrel=4
+pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
+triggers="vlc-libs.trigger=/usr/lib/vlc/plugins"
+pkgusers="vlc"
+pkggroups="vlc"
+url="http://www.videolan.org/vlc/"
+arch="all"
+license="GPL2+"
+subpackages="$pkgname-dev
+ $pkgname-doc
+ $pkgname-qt
+ $pkgname-xorg
+ $pkgname-daemon::noarch
+ $pkgname-libs
+ $pkgname-plugins
+
+ $pkgname-plugins-access:plugins_access
+ $pkgname-plugins-access_output:plugins_access_output
+ $pkgname-plugins-audio_filter:plugins_audio_filter
+ $pkgname-plugins-audio_mixer:plugins_audio_mixer
+ $pkgname-plugins-audio_output:plugins_audio_output
+ $pkgname-plugins-codec:plugins_codec
+ $pkgname-plugins-control:plugins_control
+ $pkgname-plugins-demux:plugins_demux
+ $pkgname-plugins-gui:plugins_gui
+ $pkgname-plugins-lua:plugins_lua
+ $pkgname-plugins-meta_engine:plugins_meta_engine
+ $pkgname-plugins-misc:plugins_misc
+ $pkgname-plugins-mux:plugins_mux
+ $pkgname-plugins-notify:plugins_notify
+ $pkgname-plugins-packetizer:plugins_packetizer
+ $pkgname-plugins-services_discovery:plugins_services_discovery
+ $pkgname-plugins-stream_filter:plugins_stream_filter
+ $pkgname-plugins-stream_out:plugins_stream_out
+ $pkgname-plugins-text_renderer:plugins_text_renderer
+ $pkgname-plugins-video_chroma:plugins_video_chroma
+ $pkgname-plugins-video_filter:plugins_video_filter
+ $pkgname-plugins-video_output:plugins_video_output
+ $pkgname-plugins-visualization:plugins_visualization"
+depends="ttf-dejavu $pkgname-plugins"
+makedepends="
+ a52dec-dev
+ alsa-lib-dev
+ automake
+ autoconf
+ avahi-dev
+ libtool
+ dbus-dev
+ faad2-dev
+ ffmpeg2.8-dev
+ flac-dev
+ freetype-dev
+ fribidi-dev
+ gtk+-dev
+ libbluray-dev>=0.2.1 libbluray-dev<20100000
+ libavc1394-dev
+ libcddb-dev
+ libdc1394-dev>=2.1.0
+ libdvbpsi-dev
+ libdvdnav-dev
+ libdvdread-dev
+ libgcrypt-dev
+ libice-dev
+ libmad-dev
+ libmatroska-dev
+ libmpeg2-dev
+ libnotify-dev
+ libogg-dev
+ libraw1394-dev>=2.0.1
+ libshout-dev
+ libsm-dev
+ libtheora-dev
+ libva-dev
+ libvdpau-dev
+ libvorbis-dev
+ libx11-dev
+ libxext-dev
+ libxinerama-dev
+ libxml2-dev
+ libxpm-dev
+ libxv-dev
+ live-media-dev>=2012.01.26
+ lua5.2-dev
+ ncurses-dev
+ mesa-dev
+ pkgconfig
+ qt5-qtbase-dev
+ sdl2-dev
+ speex-dev
+ sysfsutils-dev
+ taglib-dev
+ eudev-dev
+ v4l-utils-dev
+ x264-dev
+ xcb-util-renderutil-dev
+ xcb-util-keysyms-dev
+ xdg-utils
+ samba-dev
+ "
+source="http://download.videolan.org/pub/videolan/$pkgname/${_ver}/$pkgname-$_pkgver.tar.xz
+ fix-waitpid-usage.patch
+ omxil-rpi-codecs.patch
+ vlc-libs.trigger"
+
+builddir="$srcdir"/$pkgname-$_ver
+
+prepare() {
+ cd "$builddir"
+ sed -i -e "/^libxscreensaver_plugin_la_SOURCES/s/^/#/" \
+ modules/misc/Modules.am || return 1
+ ./bootstrap || return 1
+}
+
+build() {
+ local _arch_opts=
+ export CXXFLAGS="$CXXFLAGS -std=gnu++98"
+ cd "$builddir"
+ sed -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf:' \
+ -i modules/text_renderer/freetype.c
+
+ # -fpermissive is needed due to zlib 1.2.6 changing
+ # void* to gzFile on gz*() functions
+ export CFLAGS="$CFLAGS -D_GNU_SOURCE"
+ export CXXFLAGS="$CXXFLAGS -fpermissive"
+
+ case "$CARCH" in
+ arm*) _arch_opts="--enable-omxil --enable-omxil-vout --enable-rpi-omxil" ;;
+ esac
+
+ LUA=lua5.2 \
+ LUAC=luac5.2 \
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --disable-mmx \
+ --disable-sse \
+ --disable-nls \
+ --disable-optimizations \
+ --disable-rpath \
+ --enable-a52 \
+ --enable-avcodec \
+ --enable-avformat \
+ --enable-bluray \
+ --enable-dbus \
+ --enable-dc1394 \
+ --enable-dvbpsi \
+ --enable-dvdread \
+ --enable-dvdnav \
+ --enable-faad \
+ --enable-flac \
+ --enable-httpd \
+ --enable-libcddb \
+ --enable-libva \
+ --enable-live555 \
+ --enable-merge-ffmpeg \
+ --enable-ncurses \
+ --enable-realrtsp \
+ --enable-sdl \
+ --enable-shout \
+ --enable-skins2 \
+ --enable-speex \
+ --enable-sout \
+ --enable-taglib \
+ --enable-theora \
+ --enable-v4l2 \
+ --enable-vdpau \
+ --enable-vlm \
+ --enable-vorbis \
+ --enable-wma-fixed \
+ --enable-x264 \
+ --enable-xvideo \
+ $_arch_opts \
+ || return 1
+
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ # delete cache as it's autocreated by trigger
+ rm -rf "$pkgdir"/usr/lib/vlc/plugins/plugins.dat
+ # delete unneeded mozilla and kde support files
+ rm -rf "$pkgdir"/usr/lib/mozilla
+ rm -rf "$pkgdir"/usr/share/kde4
+}
+
+plugins() {
+ pkgdesc="$pkgname all plugins meta package"
+ depends="$pkgname-plugins-access
+ $pkgname-plugins-access_output
+ $pkgname-plugins-audio_filter
+ $pkgname-plugins-audio_mixer
+ $pkgname-plugins-audio_output
+ $pkgname-plugins-codec
+ $pkgname-plugins-control
+ $pkgname-plugins-demux
+ $pkgname-plugins-gui
+ $pkgname-plugins-lua
+ $pkgname-plugins-meta_engine
+ $pkgname-plugins-misc
+ $pkgname-plugins-mux
+ $pkgname-plugins-notify
+ $pkgname-plugins-packetizer
+ $pkgname-plugins-services_discovery
+ $pkgname-plugins-stream_filter
+ $pkgname-plugins-stream_out
+ $pkgname-plugins-text_renderer
+ $pkgname-plugins-video_chroma
+ $pkgname-plugins-video_filter
+ $pkgname-plugins-video_output
+ $pkgname-plugins-visualization"
+ mkdir -p "$subpkgdir"
+}
+
+_mv() {
+ local dir=${1%/*}
+ mkdir -p "$subpkgdir"/$dir
+ mv "$1" "$subpkgdir"/$dir/
+}
+
+qt() {
+ pkgdesc="Qt frontend for VLC"
+ depends="vlc-xorg=$pkgver-r$pkgrel"
+ cd "$pkgdir"
+ # scan for elf files that directly or indirectly depends on
+ # libQt* libraries
+ cd "$pkgdir"
+ for i in $(find . -type f ); do
+ if ldd $i 2>/dev/null | grep -q "libQt"; then
+ _mv "$i" || return 1
+ fi
+ done
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/qvlc \
+ "$subpkgdir"/usr/bin/
+}
+
+xorg() {
+ pkgdesc="Video LAN X.org support"
+ depends="xdg-utils vlc=$pkgver-r$pkgrel"
+
+ # scan for elf files that directly or indirectly depends on
+ # libX* libraries
+ cd "$pkgdir"
+ for i in $(find . -type f ); do
+ if ldd $i 2>/dev/null | grep -E -q "libX|x11|libxcb|libGL"; then
+ echo $i | grep libavcodec_plugin.so || _mv "$i" || return 1
+ fi
+ done
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/svlc \
+ "$subpkgdir"/usr/bin
+
+ mkdir -p "$subpkgdir"/usr/share/vlc
+ mv "$pkgdir"/usr/share/applications \
+ "$pkgdir"/usr/share/icons \
+ "$subpkgdir"/usr/share/
+
+ mv "$pkgdir"/usr/share/vlc/skins2 \
+ "$subpkgdir"/usr/share/vlc
+}
+
+daemon() {
+ pkgdesc="Support for running VLC as a daemon"
+ install="vlc-daemon.pre-install"
+ depends="vlc=$pkgver-r$pkgrel"
+
+ mkdir -p "$subpkgdir"
+ cd "$pkgdir"
+ install -D -m755 ../../vlc.initd $subpkgdir/etc/init.d/vlc
+ install -D -m664 ../../vlc.confd $subpkgdir/etc/conf.d/vlc
+ install -d -o vlc -g vlc "$subpkgdir"/var/log/vlc
+}
+
+libs() {
+ depends=
+ mkdir -p "$subpkgdir"/usr/lib/vlc
+ mv "$pkgdir"/usr/lib/vlc/vlc-cache-gen \
+ "$subpkgdir"/usr/lib/vlc/
+ default_libs
+}
+
+_mv_plugins() {
+ local plugin=$1
+ pkgdesc="$pkgname $plugin plugin"
+ depends=
+ mkdir -p "$subpkgdir"/usr/lib/vlc/plugins
+ mv "$pkgdir"/usr/lib/vlc/plugins/"$plugin" \
+ "$subpkgdir"/usr/lib/vlc/plugins
+}
+
+plugins_access() { _mv_plugins access; }
+plugins_access_output() { _mv_plugins access_output; }
+plugins_audio_filter() { _mv_plugins audio_filter; }
+plugins_audio_mixer() { _mv_plugins audio_mixer; }
+plugins_audio_output() { _mv_plugins audio_output; }
+plugins_codec() { _mv_plugins codec; }
+plugins_control() { _mv_plugins control; }
+plugins_demux() { _mv_plugins demux; }
+plugins_gui() { _mv_plugins gui; }
+plugins_lua() { _mv_plugins lua; }
+plugins_meta_engine() { _mv_plugins meta_engine; }
+plugins_misc() { _mv_plugins misc; }
+plugins_mux() { _mv_plugins mux; }
+plugins_notify() { _mv_plugins notify; }
+plugins_packetizer() { _mv_plugins packetizer; }
+plugins_services_discovery() { _mv_plugins services_discovery; }
+plugins_stream_filter() { _mv_plugins stream_filter; }
+plugins_stream_out() { _mv_plugins stream_out; }
+plugins_text_renderer() { _mv_plugins text_renderer; }
+plugins_video_chroma() { _mv_plugins video_chroma; }
+plugins_video_filter() { _mv_plugins video_filter; }
+plugins_video_output() { _mv_plugins video_output; }
+plugins_visualization() { _mv_plugins visualization; }
+
+md5sums="55666c9898f658c7fcca12725bf7dd1b vlc-2.2.4.tar.xz
+b28925fdf3d1b0bd13e3af89668995a4 fix-waitpid-usage.patch
+b90177830fe33b93849915752eb957ce omxil-rpi-codecs.patch
+dd899a9926ad84db9446d92890a5aa3e vlc-libs.trigger"
+sha256sums="1632e91d2a0087e0ef4c3fb4c95c3c2890f7715a9d1d43ffd46329f428cf53be vlc-2.2.4.tar.xz
+4f017a932d4177ba838ebd7bb0e36d8606103e62519805adff81e5edbda41026 fix-waitpid-usage.patch
+27e8f960ca091216b491980a6ffd4e35b28f2091677231ba1d317fc81b6ee039 omxil-rpi-codecs.patch
+1c93af2feb217a06f6adc3cd51def8f00eea431f9d26ace7b90c377f7e85fc7a vlc-libs.trigger"
+sha512sums="2fc1fe957ba7903f2e0c9640884ed850cb10a60132d80658dee8da0b5abaf4a6ccdf95fa2b8c0a4a827be5e7e40341318bce44662a5248e04442f4779010f85c vlc-2.2.4.tar.xz
+680cfa3eed5501ba6f06c51eae508204f4c77d2bdd07eead1a3da3939b433abfe84025d133e7a1c7a869e4ffac374bd5eba2bd3dd242ec4645e1d1c6122d0ffb fix-waitpid-usage.patch
+e13e398b7bfd977f6e099bcb6cf8dc5cd5bad6dea3eff715881826246dc4329468846084aff2576de2b7fd28d3f06e7c327a6e4511a28d22e5cd198a81146c89 omxil-rpi-codecs.patch
+b67b6e21e9d4027aef1006e6057f9ba8e65ce3895b08f7b911b1675cff9bc423f64ee2c187c584860e9e5d4635a30408a7781add9694d9bba753eac37f357406 vlc-libs.trigger"
diff --git a/community/vlc/fix-waitpid-usage.patch b/community/vlc/fix-waitpid-usage.patch
new file mode 100644
index 0000000000..dc64a4f3e1
--- /dev/null
+++ b/community/vlc/fix-waitpid-usage.patch
@@ -0,0 +1,61 @@
+diff -ru vlc-2.2.0.orig/modules/misc/inhibit/xdg.c vlc-2.2.0/modules/misc/inhibit/xdg.c
+--- vlc-2.2.0.orig/modules/misc/inhibit/xdg.c 2015-02-28 08:48:24.264968381 -0200
++++ vlc-2.2.0/modules/misc/inhibit/xdg.c 2015-02-28 08:48:43.081636013 -0200
+@@ -26,6 +26,7 @@
+ #include <vlc_plugin.h>
+ #include <vlc_inhibit.h>
+ #include <assert.h>
++#include <errno.h>
+ #include <signal.h>
+ #include <spawn.h>
+ #include <sys/wait.h>
+@@ -65,7 +66,7 @@
+ {
+ int status;
+
+- while (waitpid (pid, &status, 0) == -1);
++ while (waitpid (pid, &status, 0) == -1 && errno != ECHILD);
+ }
+ else
+ msg_Warn (ih, "error starting xdg-screensaver: %s",
+diff -ru vlc-2.2.0.orig/modules/stream_filter/decomp.c vlc-2.2.0/modules/stream_filter/decomp.c
+--- vlc-2.2.0.orig/modules/stream_filter/decomp.c 2015-02-28 08:48:24.264968381 -0200
++++ vlc-2.2.0/modules/stream_filter/decomp.c 2015-02-28 08:40:58.824945520 -0200
+@@ -404,7 +404,7 @@
+ return VLC_SUCCESS;
+
+ if (p_sys->pid != -1)
+- while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1);
++ while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1 && errno != ECHILD);
+ vlc_mutex_destroy (&p_sys->lock);
+ vlc_cond_destroy (&p_sys->wait);
+ free (p_sys);
+@@ -429,7 +429,7 @@
+ close (p_sys->write_fd);
+
+ msg_Dbg (obj, "waiting for PID %u", (unsigned)p_sys->pid);
+- while (waitpid (p_sys->pid, &status, 0) == -1);
++ while (waitpid (p_sys->pid, &status, 0) == -1 && errno != ECHILD);
+ msg_Dbg (obj, "exit status %d", status);
+
+ if (p_sys->peeked)
+diff -ru vlc-2.2.0.orig/src/posix/netconf.c vlc-2.2.0/src/posix/netconf.c
+--- vlc-2.2.0.orig/src/posix/netconf.c 2015-02-28 08:48:24.264968381 -0200
++++ vlc-2.2.0/src/posix/netconf.c 2015-02-28 08:40:58.824945520 -0200
+@@ -28,6 +28,7 @@
+
+ #include <sys/types.h>
+ #include <sys/wait.h>
++#include <errno.h>
+ #include <fcntl.h>
+ #include <spawn.h>
+ #include <unistd.h>
+@@ -94,7 +95,7 @@
+ while (len < sizeof (buf));
+
+ close(fd[0]);
+- while (waitpid(pid, &(int){ 0 }, 0) == -1);
++ while (waitpid(pid, &(int){ 0 }, 0) == -1 && errno != ECHILD);
+
+ if (len >= 9 && !strncasecmp(buf, "direct://", 9))
+ return NULL;
diff --git a/community/vlc/omxil-rpi-codecs.patch b/community/vlc/omxil-rpi-codecs.patch
new file mode 100644
index 0000000000..9b7accfe79
--- /dev/null
+++ b/community/vlc/omxil-rpi-codecs.patch
@@ -0,0 +1,15 @@
+--- vlc-2.2.0/modules/codec/omxil/omxil_core.c.orig 2015-02-28 08:37:54.044936036 -0200
++++ vlc-2.2.0/modules/codec/omxil/omxil_core.c 2015-02-28 08:38:38.738271654 -0200
+@@ -204,6 +204,12 @@
+ #ifdef RPI_OMX
+ { "video_decoder.avc", "OMX.broadcom.video_decode" },
+ { "video_decoder.mpeg2", "OMX.broadcom.video_decode" },
++ { "video_decoder.mpeg4", "OMX.broadcom.video_decode" },
++ { "video_decoder.vp6", "OMX.broadcom.video_decode" },
++ { "video_decoder.vp8", "OMX.broadcom.video_decode" },
++ { "video_decoder.theora", "OMX.broadcom.video_decode" },
++ { "video_decoder.mjpg", "OMX.broadcom.video_decode" },
++ { "video_decoder.vc1", "OMX.broadcom.video_decode" },
+ { "iv_renderer", "OMX.broadcom.video_render" },
+ #endif
+ { 0, 0 }
diff --git a/community/vlc/vlc-daemon.pre-install b/community/vlc/vlc-daemon.pre-install
new file mode 100644
index 0000000000..aed6c18932
--- /dev/null
+++ b/community/vlc/vlc-daemon.pre-install
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+groups="vlc audio video"
+
+for group in $groups; do
+ addgroup -S $group 2>/dev/null
+done
+adduser -S -D -h /home/vlc -s /bin/sh -G vlc -g vlc vlc 2>/dev/null
+
+# make sure vlc are in all groups
+for group in $groups; do
+ addgroup vlc $group 2>/dev/null
+done
+
+exit 0
diff --git a/community/vlc/vlc-libs.trigger b/community/vlc/vlc-libs.trigger
new file mode 100644
index 0000000000..c13bace998
--- /dev/null
+++ b/community/vlc/vlc-libs.trigger
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+exec /usr/lib/vlc/vlc-cache-gen "$@" >&/dev/null
+exit 0
+
diff --git a/community/vlc/vlc.confd b/community/vlc/vlc.confd
new file mode 100644
index 0000000000..9a58842bd6
--- /dev/null
+++ b/community/vlc/vlc.confd
@@ -0,0 +1,15 @@
+# Sample vlc params suitable for running as a daemon
+
+## --file-logging enable file logging
+## --logfile logfile name/path
+## -vvv verbose logging
+## -I dummy disable X11 interface
+## --sout PARAMS encoding parameters
+
+
+## Do NOT quote 'PARAMS' otherwise shell expansions will broke vlc
+##
+## The --daemon option will automatically be added so no need to add it
+## here.
+
+VLC_OPTS="--quiet -I dummy alsa://hw:0,0 --file-logging --logfile /var/log/vlc/vlc.log --sout #transcode{acodec=mp3,ab=48,channels=1,samplerate=22050}:std{access=http,mux=ogg,dst=:8080}"
diff --git a/community/vlc/vlc.initd b/community/vlc/vlc.initd
new file mode 100755
index 0000000000..541a071805
--- /dev/null
+++ b/community/vlc/vlc.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+
+description="VideoLAN daemon"
+pidfile="/var/run/vlc/${RC_SVCNAME}.pid"
+command="/usr/bin/vlc"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory --owner vlc:vlc --mode 775 ${pidfile%/*}
+}
+
+start() {
+ ebegin "Starting ${RC_SVCNAME}"
+ start-stop-daemon --start \
+ --user vlc \
+ --pidfile ${pidfile} \
+ --exec ${command} \
+ -- \
+ --daemon --pidfile ${pidfile} ${VLC_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop \
+ --pidfile ${pidfile}
+ eend $?
+}