head	1.2;
access;
symbols
	pkgsrc-2018Q1:1.1.0.22
	pkgsrc-2018Q1-base:1.1
	pkgsrc-2017Q4:1.1.0.20
	pkgsrc-2017Q4-base:1.1
	pkgsrc-2017Q3:1.1.0.18
	pkgsrc-2017Q3-base:1.1
	pkgsrc-2017Q2:1.1.0.14
	pkgsrc-2017Q2-base:1.1
	pkgsrc-2017Q1:1.1.0.12
	pkgsrc-2017Q1-base:1.1
	pkgsrc-2016Q4:1.1.0.10
	pkgsrc-2016Q4-base:1.1
	pkgsrc-2016Q3:1.1.0.8
	pkgsrc-2016Q3-base:1.1
	pkgsrc-2016Q2:1.1.0.6
	pkgsrc-2016Q2-base:1.1
	pkgsrc-2016Q1:1.1.0.4
	pkgsrc-2016Q1-base:1.1
	pkgsrc-2015Q4:1.1.0.2
	pkgsrc-2015Q4-base:1.1;
locks; strict;
comment	@# @;


1.2
date	2018.04.25.21.42.05;	author kamil;	state dead;
branches;
next	1.1;
commitid	OKxmMnBtA7R6ZRzA;

1.1
date	2015.10.25.10.52.24;	author wiz;	state Exp;
branches;
next	;
commitid	YdVGq20ss7mCKtGy;


desc
@@


1.2
log
@vlc20: Removed

This is a legacy version of VLC 2.0.x.

Reasons:
 - It uses FFMPEG 2.x with old OpenSSL.
 - It uses legacy x264 incompatible with the pkgsrc one.

There is a newer version multimedia/vlc for 2.2.x and 3.0.x released
upstream.
@
text
@$NetBSD: patch-as,v 1.1 2015/10/25 10:52:24 wiz Exp $

--- modules/misc/inhibit/xscreensaver.c~	2010-04-13 09:22:27.000000000 +0900
+++ modules/misc/inhibit/xscreensaver.c	2011-01-08 23:03:09.000000000 +0900
@@@@ -39,7 +39,9 @@@@
 #include <sys/wait.h>
 #include <fcntl.h>
 #include <signal.h>
+#ifdef _POSIX_SPAWN 
 #include <spawn.h>
+#endif
 
 /*****************************************************************************
  * Local prototypes
@@@@ -53,12 +55,16 @@@@
 struct vlc_inhibit_sys
 {
     vlc_timer_t timer;
+#ifdef _POSIX_SPAWN
     posix_spawn_file_actions_t actions;
     posix_spawnattr_t attr;
     int nullfd;
+#endif
 };
 
+#ifdef _POSIX_SPAWN 
 extern char **environ;
+#endif
 
 /*****************************************************************************
  * Module descriptor
@@@@ -88,6 +94,7 @@@@
     }
     p_ih->inhibit = Inhibit;
 
+#ifdef _POSIX_SPAWN 
     int fd = vlc_open ("/dev/null", O_WRONLY);
     posix_spawn_file_actions_init (&p_sys->actions);
     if (fd != -1)
@@@@ -103,6 +110,7 @@@@
     sigemptyset (&set);
     posix_spawnattr_setsigmask (&p_sys->attr, &set);
    
+#endif
     return VLC_SUCCESS;
 }
 
@@@@ -115,10 +123,12 @@@@
     vlc_inhibit_sys_t *p_sys = p_ih->p_sys;
 
     vlc_timer_destroy( p_sys->timer );
+#ifdef _POSIX_SPAWN
     if (p_sys->nullfd != -1)
         close (p_sys->nullfd);
     posix_spawnattr_destroy (&p_sys->attr);
     posix_spawn_file_actions_destroy (&p_sys->actions);
+#endif
     free( p_sys );
 }
 
@@@@ -131,15 +141,49 @@@@
 /*****************************************************************************
  * Execute: Spawns a process using execv()
  *****************************************************************************/
+#ifdef _POSIX_SPAWN 
 static void Execute (vlc_inhibit_t *p_ih, const char *const *argv)
+# else
+static void Execute (vlc_inhibit_t *p_ih, const char *const *ppsz_args)
+#endif
 {
+#ifdef _POSIX_SPAWN
     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)
+#else
+      pid_t pid = fork();
+      switch ( pid )
+#endif
     {
+#ifdef _POSIX_SPAWN
         while (waitpid (pid, NULL, 0) != pid);
+#else
+        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;
+#endif
     }
 }
 
@


1.1
log
@Re-Import vlc-2.0.9nb21 (from vlc2) as multimedia/vlc20.

To better clarify which version this packages.

VideoLAN is a project of French students from the Ecole Centrale Paris
and developers from all over the world. Its main goals is MPEG streaming
on a network, but it also features a standalone multimedia player. The
VideoLAN Server can stream video read from a hard disk, a DVD player,
a satellite card or an MPEG 2 compression card, and unicast or multicast
it on a network. The VideoLAN Client can read the stream from the network
and display it. It can also be used to display video read locally on
the computer : DVDs, VCDs, MPEG and DivX files and from a satellite
card. It is multi-plaform : Linux, Windows, Mac OS X, BeOS, BSD, Solaris,
QNX, iPaq... The VideoLAN Client and Server now have a full IPv6 support.

This version is the last version with support for OSSv3, which is the
OSS version implemented in NetBSD before NetBSD 7.
@
text
@d1 1
a1 1
$NetBSD: patch-as,v 1.1.1.1 2012/02/21 12:49:43 drochner Exp $
@

