[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pornview - mplayer flavor



Hi. Please test this diff that adds a mplayer flavor
to pornview. It allows you to watch movies in pornview's
gui. Thanks.

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/pornview/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	30 Jan 2004 08:39:48 -0000	1.2
+++ Makefile	6 Jul 2004 22:08:48 -0000
@@ -15,7 +15,15 @@
 PERMIT_DISTFILES_CDROM=	Yes
 PERMIT_DISTFILES_FTP=	Yes
 
+FLAVORS=	mplayer
+FLAVOR?=
+
 LIB_DEPENDS=	gdk_pixbuf.2::graphics/gdk-pixbuf
+
+.if ${FLAVOR:L:Mmplayer}
+CONFIGURE_ARGS+=--enable-mplayer
+RUN_DEPENDS=	:mplayer-*:x11/mplayer
+.endif
 
 USE_X11=	Yes
 CONFIGURE_STYLE=gnu
Index: patches/patch-src_support_widgets_gtkmplayer_c
===================================================================
RCS file: patches/patch-src_support_widgets_gtkmplayer_c
diff -N patches/patch-src_support_widgets_gtkmplayer_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_support_widgets_gtkmplayer_c	6 Jul 2004 22:08:48 -0000
@@ -0,0 +1,75 @@
+$OpenBSD$
+--- src/support/widgets/gtkmplayer.c.orig	Fri Dec 13 12:15:21 2002
++++ src/support/widgets/gtkmplayer.c	Tue Apr 13 12:50:51 2004
+@@ -30,6 +30,7 @@
+ #include <errno.h>
+ #include <ctype.h>
+ #include <math.h>
++#include <signal.h>
+ 
+ #include <gtk/gtk.h>
+ #include <gdk/gdkx.h>
+@@ -72,9 +73,9 @@
+     int     stderr_fd;
+     int     stdin_fd;
+ 
+-    gchar   stdout[GTK_MPLAYER_BUF_SIZE];
++    gchar   stdoutb[GTK_MPLAYER_BUF_SIZE];
+     gint    stdout_size;
+-    gchar   stderr[GTK_MPLAYER_BUF_SIZE];
++    gchar   stderrb[GTK_MPLAYER_BUF_SIZE];
+     gint    stderr_size;
+ 
+     ProcessLineFunc process_line_fn;
+@@ -1049,13 +1050,13 @@
+     context->stdout_fd = out_fd[0];
+     fcntl (context->stdout_fd, F_SETFL, O_NONBLOCK);
+     close (out_fd[1]);
+-    context->stdout[0] = '\0';
++    context->stdoutb[0] = '\0';
+     context->stdout_size = 0;
+ 
+     context->stderr_fd = err_fd[0];
+     fcntl (context->stderr_fd, F_SETFL, O_NONBLOCK);
+     close (err_fd[1]);
+-    context->stderr[0] = '\0';
++    context->stderrb[0] = '\0';
+     context->stderr_size = 0;
+ 
+     context->stdin_fd = in_fd[1];
+@@ -1193,7 +1194,7 @@
+ 
+     if (size > 0 && size < GTK_MPLAYER_BUF_SIZE)
+     {
+-	memcpy (buf, context->stderr, size);
++	memcpy (buf, context->stderrb, size);
+ 	next = buf + size;
+     }
+     else
+@@ -1211,7 +1212,7 @@
+ 	size += MIN (GTK_MPLAYER_BUF_SIZE - 1, n);
+ 
+ 	process_lines (context, buf, size,
+-		       context->stderr, &context->stderr_size, TRUE);
++		       context->stderrb, &context->stderr_size, TRUE);
+     }
+ 
+     /*
+@@ -1221,7 +1222,7 @@
+ 
+     if (size > 0 && size < GTK_MPLAYER_BUF_SIZE)
+     {
+-	memcpy (buf, context->stdout, size);
++	memcpy (buf, context->stdoutb, size);
+ 	next = buf + size;
+     }
+     else
+@@ -1240,7 +1241,7 @@
+     pos = context->player->pos;
+ 
+     process_lines (context, buf, size,
+-		   context->stdout, &context->stdout_size, FALSE);
++		   context->stdoutb, &context->stdout_size, FALSE);
+ 
+     if (fabs (context->player->pos - pos) > 0.1)
+ 	gtk_signal_emit (GTK_OBJECT (context->player),