vlc: tweaks for musl and portability patch from Alpine.

This commit is contained in:
Juan RP 2015-05-09 11:02:23 +02:00
parent 88c39611f1
commit e580005fda
2 changed files with 77 additions and 21 deletions

View File

@ -0,0 +1,58 @@
--- modules/misc/inhibit/xdg.c 2015-02-28 08:48:24.264968381 -0200
+++ 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",
--- modules/stream_filter/decomp.c 2015-02-28 08:48:24.264968381 -0200
+++ 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)
--- src/posix/netconf.c 2015-02-28 08:48:24.264968381 -0200
+++ 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;

View File

@ -1,7 +1,7 @@
# Template file for 'vlc' # Template file for 'vlc'
pkgname=vlc pkgname=vlc
version=2.2.1 version=2.2.1
revision=1 revision=2
build_style=gnu-configure build_style=gnu-configure
configure_args="--disable-gme --disable-libtar --enable-jack configure_args="--disable-gme --disable-libtar --enable-jack
--disable-lua --disable-live555 --disable-fluidsynth --disable-lua --disable-live555 --disable-fluidsynth
@ -34,29 +34,27 @@ makedepends="videoproto libudev-devel libpng-devel libupnp-devel
$(vopt_if qt qt-devel) $(vopt_if svg librsvg-devel) $(vopt_if v4l v4l-utils-devel)" $(vopt_if qt qt-devel) $(vopt_if svg librsvg-devel) $(vopt_if v4l v4l-utils-devel)"
depends="freefont-ttf hicolor-icon-theme desktop-file-utils" depends="freefont-ttf hicolor-icon-theme desktop-file-utils"
if [ "$XBPS_TARGET_MACHINE" = "i686" ] || [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
configure_args+=" --enable-vdpau --enable-libva"
makedepends+=" libvdpau-devel libva-devel MesaLib-devel"
fi
if [ "$XBPS_TARGET_MACHINE" = "armv6l" ] || [ "$XBPS_TARGET_MACHINE" = "armv7l" ]; then
# XXX only for rpi
configure_args+=" --enable-omxil --enable-omxil-vout --enable-rpi-omxil"
makedepends+=" rpi-firmware"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vmcs_host/linux"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos/pthreads"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/opt/vc/lib -lbcm_host -lvcos -lvchiq_arm"
fi
# Package build options # Package build options
build_options="notify opengl qt svg v4l2" build_options="notify opengl qt svg v4l2"
# Enable opengl by default on x86. case "$XBPS_TARGET_MACHINE" in
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then i686*|x86_64*)
build_options_default="opengl" # Enable opengl by default on x86.
fi build_options_default="opengl"
configure_args+=" --enable-vdpau --enable-libva"
makedepends+=" libvdpau-devel libva-devel MesaLib-devel"
;;
armv[67]l*)
# XXX only for rpi
configure_args+=" --enable-omxil --enable-omxil-vout --enable-rpi-omxil"
makedepends+=" rpi-firmware"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vmcs_host/linux"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos/pthreads"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/opt/vc/lib -lbcm_host -lvcos -lvchiq_arm"
;;
esac
if [ -z "$CROSS_BUILD" ]; then if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" qt" build_options_default+=" qt"