pinkbyte-overlay/x11-plugins/compiz-plugins-extra/files/compiz-plugins-extra-0.8.6-libnotify.patch

46 lines
1.4 KiB
Diff

--- configure.ac
+++ configure.ac
@@ -136,9 +136,12 @@
PKG_CHECK_MODULES(COMPIZMOUSEPOLL, compiz-mousepoll, [have_compiz_mousepoll=yes], [have_compiz_mousepoll=no])
AM_CONDITIONAL(SHOWMOUSE_PLUGIN, test "x$have_compiz_mousepoll" = "xyes")
-PKG_CHECK_MODULES(LIBNOTIFY, libnotify, [have_libnotify=yes], [have_libnotify=no])
+AC_ARG_WITH([libnotify], [AS_HELP_STRING([--without-libnotify], [Build without libnotify support @<:@default=auto@:>@])])
+AS_IF([test "x$with_libnotify" != "xno"], [
+ PKG_CHECK_MODULES(LIBNOTIFY, libnotify, [have_libnotify=yes], [have_libnotify=no])
+])
AM_CONDITIONAL(NOTIFICATION_PLUGIN, test "x$have_libnotify" = "xyes")
-if test "$have_libnotify" = yes; then
+if test "x$have_libnotify" = "xyes"; then
AC_DEFINE(USE_NOTIFICATION, 1, [Build notification plugin])
fi
--- src/notification/notification.c
+++ src/notification/notification.c
@@ -21,6 +21,11 @@
#include <libnotify/notify.h>
+
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
@@ -103,7 +108,12 @@
n = notify_notification_new (logLevel,
message,
- iconUri, NULL);
+ iconUri
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+ );
+#else
+ , NULL);
+#endif
notify_notification_set_timeout (n, nd->timeout);