From 30d36a898a5bf9a234ab47bfe68a0e0b197358ac Mon Sep 17 00:00:00 2001 From: wg Date: Mon, 28 Oct 2013 14:20:17 +0000 Subject: multimedia/vlc: remove extra patches for FreeBSD 8.0 - The oldest supported release is 8.3 Reported by: tijl --- multimedia/vlc/Makefile | 6 -- .../extra-patch-modules__misc__inhibit__xdg.c | 67 --------------- ...ra-patch-modules__misc__inhibit__xscreensaver.c | 98 ---------------------- 3 files changed, 171 deletions(-) delete mode 100644 multimedia/vlc/files/extra-patch-modules__misc__inhibit__xdg.c delete mode 100644 multimedia/vlc/files/extra-patch-modules__misc__inhibit__xscreensaver.c (limited to 'multimedia/vlc') diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile index c2cbecb9770b..e7a9c0339369 100644 --- a/multimedia/vlc/Makefile +++ b/multimedia/vlc/Makefile @@ -370,12 +370,6 @@ CONFIGURE_ARGS+=--without-x --disable-glx --disable-xcb --disable-xvideo .include -# OS specific hacks -.if (${OSVERSION} < 800040) -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-modules__misc__inhibit__xdg.c \ - ${FILESDIR}/extra-patch-modules__misc__inhibit__xscreensaver.c -.endif - # base clang in 9.0 builds a corrupted lib/vlc/plugins/gui/libqt4_plugin.so .if (${CC:T:Mclang} == "clang") && \ (${OSVERSION} >= 900014) && (${OSVERSION} < 900506) diff --git a/multimedia/vlc/files/extra-patch-modules__misc__inhibit__xdg.c b/multimedia/vlc/files/extra-patch-modules__misc__inhibit__xdg.c deleted file mode 100644 index 7355179899d3..000000000000 --- a/multimedia/vlc/files/extra-patch-modules__misc__inhibit__xdg.c +++ /dev/null @@ -1,67 +0,0 @@ ---- ./modules/misc/inhibit/xdg.c.orig 2011-11-22 15:30:36.000000000 -0500 -+++ ./modules/misc/inhibit/xdg.c 2012-01-08 15:29:41.000000000 -0500 -@@ -27,7 +27,6 @@ - #include - #include - #include --#include - #include - - static int Open (vlc_object_t *); -@@ -47,7 +46,6 @@ - vlc_thread_t thread; - vlc_cond_t update, inactive; - vlc_mutex_t lock; -- posix_spawnattr_t attr; - bool suspend, suspended; - }; - -@@ -67,18 +65,6 @@ - vlc_mutex_init (&p_sys->lock); - vlc_cond_init (&p_sys->update); - vlc_cond_init (&p_sys->inactive); -- posix_spawnattr_init (&p_sys->attr); -- /* Reset signal handlers to default and clear mask in the child process */ -- { -- sigset_t set; -- -- sigemptyset (&set); -- posix_spawnattr_setsigmask (&p_sys->attr, &set); -- sigaddset (&set, SIGPIPE); -- posix_spawnattr_setsigdefault (&p_sys->attr, &set); -- posix_spawnattr_setflags (&p_sys->attr, POSIX_SPAWN_SETSIGDEF -- | POSIX_SPAWN_SETSIGMASK); -- } - p_sys->suspend = false; - p_sys->suspended = false; - -@@ -106,7 +92,6 @@ - - vlc_cancel (p_sys->thread); - vlc_join (p_sys->thread, NULL); -- posix_spawnattr_destroy (&p_sys->attr); - vlc_cond_destroy (&p_sys->inactive); - vlc_cond_destroy (&p_sys->update); - vlc_mutex_destroy (&p_sys->lock); -@@ -149,20 +134,10 @@ - id, - NULL, - }; -- pid_t pid; - - vlc_mutex_unlock (&p_sys->lock); -- if (!posix_spawnp (&pid, "xdg-screensaver", NULL, &p_sys->attr, -- argv, environ)) -- { -- int status; - -- msg_Dbg (ih, "started xdg-screensaver (PID = %d)", (int)pid); -- /* Wait for command to complete */ -- while (waitpid (pid, &status, 0) == -1); -- } -- else/* We don't handle the error, but busy looping would be worse :( */ -- msg_Warn (ih, "could not start xdg-screensaver"); -+ msg_Warn (ih, "could not start xdg-screensaver"); - - vlc_mutex_lock (&p_sys->lock); - p_sys->suspended = p_sys->suspend; diff --git a/multimedia/vlc/files/extra-patch-modules__misc__inhibit__xscreensaver.c b/multimedia/vlc/files/extra-patch-modules__misc__inhibit__xscreensaver.c deleted file mode 100644 index bb57051bf5d6..000000000000 --- a/multimedia/vlc/files/extra-patch-modules__misc__inhibit__xscreensaver.c +++ /dev/null @@ -1,98 +0,0 @@ - --- ./modules/misc/inhibit/xscreensaver.c.ORIG 2010-04-13 02:22:27.000000000 +0200 - +++ ./modules/misc/inhibit/xscreensaver.c 2010-11-20 10:28:58.000000000 +0100 - @@ -39,7 +39,6 @@ - #include - #include - #include - -#include - - /***************************************************************************** - * Local prototypes - @@ -53,13 +52,8 @@ - struct vlc_inhibit_sys - { - vlc_timer_t timer; - - posix_spawn_file_actions_t actions; - - posix_spawnattr_t attr; - - int nullfd; - }; - - -extern char **environ; - - - /***************************************************************************** - * Module descriptor - *****************************************************************************/ - @@ -88,21 +82,6 @@ - } - p_ih->inhibit = Inhibit; - - - int fd = vlc_open ("/dev/null", O_WRONLY); - - posix_spawn_file_actions_init (&p_sys->actions); - - if (fd != -1) - - { - - posix_spawn_file_actions_adddup2 (&p_sys->actions, fd, 1); - - posix_spawn_file_actions_adddup2 (&p_sys->actions, fd, 2); - - posix_spawn_file_actions_addclose (&p_sys->actions, fd); - - } - - p_sys->nullfd = fd; - - - - sigset_t set; - - posix_spawnattr_init (&p_sys->attr); - - sigemptyset (&set); - - posix_spawnattr_setsigmask (&p_sys->attr, &set); - - - return VLC_SUCCESS; - } - - @@ -115,10 +94,6 @@ - vlc_inhibit_sys_t *p_sys = p_ih->p_sys; - - vlc_timer_destroy( p_sys->timer ); - - if (p_sys->nullfd != -1) - - close (p_sys->nullfd); - - posix_spawnattr_destroy (&p_sys->attr); - - posix_spawn_file_actions_destroy (&p_sys->actions); - free( p_sys ); - } - - @@ -131,15 +106,33 @@ - /***************************************************************************** - * Execute: Spawns a process using execv() - *****************************************************************************/ - -static void Execute (vlc_inhibit_t *p_ih, const char *const *argv) - +static void Execute( vlc_inhibit_t *p_ih, const char *const *ppsz_args ) - { - - vlc_inhibit_sys_t *p_sys = p_ih->p_sys; - - pid_t pid; - - - - if (posix_spawnp (&pid, argv[0], &p_sys->actions, &p_sys->attr, - - (char **)argv, environ) == 0) - + pid_t pid = fork(); - + switch( pid ) - { - - while (waitpid (pid, NULL, 0) != pid); - + case 0: /* we're the child */ - + { - + sigset_t set; - + sigemptyset (&set); - + pthread_sigmask (SIG_SETMASK, &set, NULL); - + - + /* We don't want output */ - + if( ( freopen( "/dev/null", "w", stdout ) != NULL ) - + && ( freopen( "/dev/null", "w", stderr ) != NULL ) ) - + execv( ppsz_args[0] , (char *const *)ppsz_args ); - + /* If the file we want to execute doesn't exist we exit() */ - + exit( EXIT_FAILURE ); - + } - + case -1: /* we're the error */ - + msg_Dbg( p_ih, "Couldn't fork() while launching %s", - + ppsz_args[0] ); - + break; - + default: /* we're the parent */ - + /* Wait for the child to exit. - + * We will not deadlock because we ran "/bin/sh &" */ - + while( waitpid( pid, NULL, 0 ) != pid); - + break; - } - } - -- cgit