diff options
author | marcus <marcus@FreeBSD.org> | 2006-03-27 07:46:47 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2006-03-27 07:46:47 +0800 |
commit | 3c921cea17331f293f751a87e8a9a7cda6f216df (patch) | |
tree | 304443ba7f7aed99e801090fd37040a06fc2eabd | |
parent | 04a337abe7c5f47cc06321d8f5239a75bb7982ba (diff) | |
download | freebsd-ports-gnome-3c921cea17331f293f751a87e8a9a7cda6f216df.tar.gz freebsd-ports-gnome-3c921cea17331f293f751a87e8a9a7cda6f216df.tar.zst freebsd-ports-gnome-3c921cea17331f293f751a87e8a9a7cda6f216df.zip |
* Add libnotify support
* Fix build with libgnotify-0.3.2 [1]
PR: 93610
Submitted by: Christian Hiris <4711@chello.at>
Obtained from: Mandriva Linux
-rw-r--r-- | audio/goobox/Makefile | 14 | ||||
-rw-r--r-- | audio/goobox/files/patch-src_main.c | 51 |
2 files changed, 63 insertions, 2 deletions
diff --git a/audio/goobox/Makefile b/audio/goobox/Makefile index 16e81ee732fb..68691236e535 100644 --- a/audio/goobox/Makefile +++ b/audio/goobox/Makefile @@ -7,7 +7,7 @@ PORTNAME= goobox PORTVERSION= 0.9.93 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:R} @@ -19,6 +19,7 @@ COMMENT= CD player and ripper for GNOME Desktop environment RUN_DEPENDS= cddb-slave2-properties:${PORTSDIR}/audio/gnomemedia2 USE_X_PREFIX= yes +USE_GETTEXT= yes USE_BZIP2= yes USE_GMAKE= yes USE_GNOME= gnomeprefix gnomehack intlhack libgnomeui libglade2 libbonobo \ @@ -31,4 +32,13 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \ GCONF_SCHEMAS= goobox.schemas -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_NOTIFY) +LIB_DEPENDS+= notify.1:${PORTSDIR}/devel/libnotify +CONFIGURE_ARGS+= --enable-notification +.else +CONFIGURE_ARGS+= --disable-notification +.endif + +.include <bsd.port.post.mk> diff --git a/audio/goobox/files/patch-src_main.c b/audio/goobox/files/patch-src_main.c new file mode 100644 index 000000000000..eaf098579f63 --- /dev/null +++ b/audio/goobox/files/patch-src_main.c @@ -0,0 +1,51 @@ +--- src/main.c.orig Fri Nov 18 21:20:08 2005 ++++ src/main.c Mon Feb 20 22:41:55 2006 +@@ -47,7 +47,6 @@ + + #ifdef HAVE_LIBNOTIFY + #include <libnotify/notify.h> +-static NotifyHandle *notify_h = NULL; + #endif /* HAVE_LIBNOTIFY */ + + GtkWindow *main_window = NULL; +@@ -193,7 +192,7 @@ + + #ifdef HAVE_LIBNOTIFY + if (! notify_init ("goobox")) +- g_error ("Cannot initialize notification system."); ++ g_warning ("Cannot initialize notification system."); + #endif /* HAVE_LIBNOTIFY */ + + goo_stock_init (); +@@ -557,27 +556,10 @@ + int y) + { + #ifdef HAVE_LIBNOTIFY +- NotifyIcon *icon = notify_icon_new_from_uri("goobox"); +- NotifyHints *hints = NULL; +- +- if ((x >= 0) && (y >= 0)) { +- hints = notify_hints_new (); +- notify_hints_set_int (hints, "x", x); +- notify_hints_set_int (hints, "y", y); +- } ++ if(!notify_is_initted()) ++ return; ++ NotifyNotification *n = notify_notification_new (title,msg,"goobox",GTK_WIDGET (main_window)); ++ notify_notification_show(n, NULL); + +- notify_h = notify_send_notification (notify_h, +- "device", +- NOTIFY_URGENCY_NORMAL, +- title, +- msg, +- icon, +- TRUE, 0, +- hints, // no hints +- NULL, // no user data +- 0); +- +- if (icon != NULL) +- notify_icon_destroy (icon); + #endif /* HAVE_LIBNOTIFY */ + } |