From 3190f662b6ada732441dbbb5e1f3ddf88da15320 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 27 May 2002 14:39:17 +0000 Subject: [PATCH] ogle_gui. A few tweaks mine, the rest from maintainer. --- x11/ogle_gui/Makefile | 32 ++++++++++++ x11/ogle_gui/distinfo | 3 ++ x11/ogle_gui/patches/patch-configure | 13 +++++ x11/ogle_gui/patches/patch-src_my_glade_c | 64 +++++++++++++++++++++++ x11/ogle_gui/patches/patch-src_xsniffer_c | 43 +++++++++++++++ x11/ogle_gui/pkg/DESCR | 1 + x11/ogle_gui/pkg/PLIST | 27 ++++++++++ 7 files changed, 183 insertions(+) create mode 100644 x11/ogle_gui/Makefile create mode 100644 x11/ogle_gui/distinfo create mode 100644 x11/ogle_gui/patches/patch-configure create mode 100644 x11/ogle_gui/patches/patch-src_my_glade_c create mode 100644 x11/ogle_gui/patches/patch-src_xsniffer_c create mode 100644 x11/ogle_gui/pkg/DESCR create mode 100644 x11/ogle_gui/pkg/PLIST diff --git a/x11/ogle_gui/Makefile b/x11/ogle_gui/Makefile new file mode 100644 index 00000000000..7e0522861f4 --- /dev/null +++ b/x11/ogle_gui/Makefile @@ -0,0 +1,32 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2002/05/27 14:39:17 espie Exp $ + +CATEGORIES= x11 + +COMMENT= "GUI for ogle" +DISTNAME= ogle_gui-0.8.2 +HOMEPAGE= http://www.dtek.chalmers.se/groups/dvd/ +# Authors can be reached at dvd@dtek.chalmers.se +MASTER_SITES= ${HOMEPAGE}dist/ + +MAINTAINER= Dan Weeks + +CONFIGURE_STYLE= gnu + +# GPL +PERMIT_DISTFILES_CDROM=Yes +PERMIT_DISTFILES_FTP=Yes +PERMIT_PACKAGE_CDROM=Yes +PERMIT_PACKAGE_FTP=Yes + +LIB_DEPENDS= dvdcontrol.5::x11/ogle \ + xml2::textproc/libxml \ + glade.5.0::devel/libglade \ + gtk.1.2::x11/gtk+ + +MODULES= gettext + +CONFIGURE_ENV+= CFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \ + CPPFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \ + LDFLAGS="-pthread" + +.include diff --git a/x11/ogle_gui/distinfo b/x11/ogle_gui/distinfo new file mode 100644 index 00000000000..b25fc4f690c --- /dev/null +++ b/x11/ogle_gui/distinfo @@ -0,0 +1,3 @@ +MD5 (ogle_gui-0.8.2.tar.gz) = 2475844fc862d4e280a4d07e83177199 +RMD160 (ogle_gui-0.8.2.tar.gz) = ba7705165b9c7b5853810562f151a14f1d07b09d +SHA1 (ogle_gui-0.8.2.tar.gz) = 078c45d0b64ae909d67eaebe8216116e724e9fe8 diff --git a/x11/ogle_gui/patches/patch-configure b/x11/ogle_gui/patches/patch-configure new file mode 100644 index 00000000000..ef9ee0545cb --- /dev/null +++ b/x11/ogle_gui/patches/patch-configure @@ -0,0 +1,13 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2002/05/27 14:39:17 espie Exp $ + +--- configure.orig Wed Dec 5 22:43:32 2001 ++++ configure Mon May 27 16:06:32 2002 +@@ -16643,7 +16643,7 @@ fi + LIBGLADE_PREFIX=`$LIBGLADE_CONFIG --prefix` + + cat >>confdefs.h <<_ACEOF +-#define LIBGLADE_LIB "${LIBGLADE_PREFIX}/lib/libglade.so.0" ++#define LIBGLADE_LIB "${LIBGLADE_PREFIX}/lib/libglade.so.5.0" + _ACEOF + + if test "x${prefix}" = "xNONE"; then diff --git a/x11/ogle_gui/patches/patch-src_my_glade_c b/x11/ogle_gui/patches/patch-src_my_glade_c new file mode 100644 index 00000000000..189b2662f18 --- /dev/null +++ b/x11/ogle_gui/patches/patch-src_my_glade_c @@ -0,0 +1,64 @@ +$OpenBSD: patch-src_my_glade_c,v 1.1.1.1 2002/05/27 14:39:17 espie Exp $ + +--- src/my_glade.c.orig Tue Dec 4 19:36:57 2001 ++++ src/my_glade.c Mon May 27 16:32:18 2002 +@@ -48,13 +48,58 @@ static void *my_dlsym(void *handle, char + return fun; + } + ++#ifdef __OpenBSD__ ++#include ++#include ++#include ++/* Quick and dirty: settle for any libglade */ ++static void *findlibrary(char *template) ++{ ++ char *name; ++ char *sopart; ++ size_t len; ++ DIR *d; ++ struct dirent *de; ++ void *lib; ++ ++ name = dirname(template); ++ if (!name) ++ return NULL; ++ template = basename(template); ++ if (!template) ++ return NULL; ++ sopart = strstr(template, ".so."); ++ if (!sopart) ++ return NULL; ++ ++ len = sopart-template+4; ++ ++ d = opendir(name); ++ if (!d) ++ return NULL; ++ while ((de = readdir(d)) != NULL) { ++ if (strncmp(de->d_name, template, len) == 0) { ++ lib = dlopen(de->d_name, DL_LAZY); ++ closedir(d); ++ return lib; ++ } ++ } ++ closedir(d); ++ return NULL; ++} ++#endif ++ + // to be called first + void my_glade_setup () + { + void *glade_lib; + char *home; + +- glade_lib = dlopen (LIBGLADE_LIB, RTLD_NOW); ++ glade_lib = dlopen (LIBGLADE_LIB, DL_LAZY); ++#ifdef __OpenBSD__ ++ if (glade_lib == NULL) ++ glade_lib = findlibrary(LIBGLADE_LIB); ++#endif + if (glade_lib == NULL) { + fprintf(stderr, "Error during dlopen: %s\n", dlerror()); + gtk_exit(1); diff --git a/x11/ogle_gui/patches/patch-src_xsniffer_c b/x11/ogle_gui/patches/patch-src_xsniffer_c new file mode 100644 index 00000000000..bef5f863cd9 --- /dev/null +++ b/x11/ogle_gui/patches/patch-src_xsniffer_c @@ -0,0 +1,43 @@ +$OpenBSD: patch-src_xsniffer_c,v 1.1.1.1 2002/05/27 14:39:17 espie Exp $ + +--- src/xsniffer.c.orig Thu May 16 20:46:28 2002 ++++ src/xsniffer.c Thu May 16 20:48:52 2002 +@@ -16,6 +16,11 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++#define HAVE_SYS_PARAM_H ++ + #include + #include + #include +@@ -35,6 +40,10 @@ + #include "callbacks.h" + #include "bindings.h" + ++#ifdef HAVE_SYS_PARAM_H ++#include ++#endif ++ + extern int msgqid; + + +@@ -64,7 +73,14 @@ void* xsniff_mouse(void* args) { + init_actions(nav2); + + while(1) { +- DVDNextEvent(nav2, &mev); ++ ++#if (defined(BSD) && (BSD >= 199306)) ++ if (DVDNextEventNonBlocking(nav2, &mev) != DVD_E_Ok) ++#else ++ if (DVDNextEvent(nav2, &mev) != DVD_E_Ok) ++#endif ++ pthread_exit(NULL); ++ + + switch(mev.type) { + diff --git a/x11/ogle_gui/pkg/DESCR b/x11/ogle_gui/pkg/DESCR new file mode 100644 index 00000000000..677a7a04634 --- /dev/null +++ b/x11/ogle_gui/pkg/DESCR @@ -0,0 +1 @@ +Ogle_gui is the add-on gtk-based frontend for the Ogle DVD player. diff --git a/x11/ogle_gui/pkg/PLIST b/x11/ogle_gui/pkg/PLIST new file mode 100644 index 00000000000..55f8557978e --- /dev/null +++ b/x11/ogle_gui/pkg/PLIST @@ -0,0 +1,27 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2002/05/27 14:39:17 espie Exp $ +lib/ogle/ogle_gui +share/locale/de/LC_MESSAGES/ogle_gui.mo +share/locale/sv/LC_MESSAGES/ogle_gui.mo +share/ogle_gui/angle.xpm +share/ogle_gui/enter.xpm +share/ogle_gui/fastforward.xpm +share/ogle_gui/go_up.xpm +share/ogle_gui/menus.xpm +share/ogle_gui/ogle.xpm +share/ogle_gui/ogle_gui.glade +share/ogle_gui/rewind.xpm +share/ogle_gui/skip_backwards.xpm +share/ogle_gui/skip_forwards.xpm +share/ogle_gui/stock_down_arrow.xpm +share/ogle_gui/stock_first.xpm +share/ogle_gui/stock_last.xpm +share/ogle_gui/stock_left_arrow.xpm +share/ogle_gui/stock_pause.xpm +share/ogle_gui/stock_right_arrow.xpm +share/ogle_gui/stock_stop.xpm +share/ogle_gui/stock_timer.xpm +share/ogle_gui/stock_timer_stopped.xpm +share/ogle_gui/stock_up_arrow.xpm +share/ogle_gui/stock_volume.xpm +share/ogle_gui/subpicture.xpm +@dirrm share/ogle_gui