aboutsummaryrefslogtreecommitdiff
path: root/net-im/profanity
diff options
context:
space:
mode:
authorTilman Keskinoz <arved@FreeBSD.org>2015-03-09 14:27:57 +0000
committerTilman Keskinoz <arved@FreeBSD.org>2015-03-09 14:27:57 +0000
commitdc0db7761b8546441af238b351c31b464999807d (patch)
treebb91dfd1fc87adb6fe8c17c838bf1874ef63aa33 /net-im/profanity
parent0a449ca9e21fe705916bedc14f6b023b78bada8b (diff)
downloadports-dc0db7761b8546441af238b351c31b464999807d.tar.gz
ports-dc0db7761b8546441af238b351c31b464999807d.zip
Add an option for libnotify support
Submitted by: Denis D <stdedjub@googlemail.com> (Makefile changes)
Notes
Notes: svn path=/head/; revision=380850
Diffstat (limited to 'net-im/profanity')
-rw-r--r--net-im/profanity/Makefile10
-rw-r--r--net-im/profanity/files/patch-configure.ac32
2 files changed, 41 insertions, 1 deletions
diff --git a/net-im/profanity/Makefile b/net-im/profanity/Makefile
index 29b949ea0071..7947b5b97fdb 100644
--- a/net-im/profanity/Makefile
+++ b/net-im/profanity/Makefile
@@ -16,9 +16,17 @@ LIB_DEPENDS= libstrophe.so:${PORTSDIR}/net-im/libstrophe \
libcurl.so:${PORTSDIR}/ftp/curl \
libotr.so:${PORTSDIR}/security/libotr3
-USES= ncurses pkgconfig
+OPTIONS_DEFINE=NOTIFY
+USES= ncurses pkgconfig autoreconf
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-otr
CONFIGURE_ENV= LIBS="${CFLAGS} -lcrypto"
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNOTIFY}
+LIB_DEPENDS+= libnotify.so:${PORTSDIR}/devel/libnotify
+CONFIGURE_ARGS+= --enable-notifications
+.endif
+
.include <bsd.port.mk>
diff --git a/net-im/profanity/files/patch-configure.ac b/net-im/profanity/files/patch-configure.ac
new file mode 100644
index 000000000000..7949b2ae0a1e
--- /dev/null
+++ b/net-im/profanity/files/patch-configure.ac
@@ -0,0 +1,32 @@
+--- configure.ac.orig 2015-03-09 09:51:22.000000000 +0100
++++ configure.ac 2015-03-09 09:56:17.000000000 +0100
+@@ -141,22 +141,21 @@
+ ### Windows uses native OS calls
+ ### OSX requires terminal-notifier
+
+-AS_IF([test "x$PLATFORM" = xosx],
+- [AS_IF([test "x$enable_notifications" != xno],
++AS_IF([test "x$enable_notifications" != xno],
+ [NOTIFIER_PATH="no"
+ AC_PATH_PROG(NOTIFIER_PATH, terminal-notifier, no)
+ AS_IF([test "x$NOTIFIER_PATH" = xno],
+ [AS_IF([test "x$enable_notifications" = xyes],
+- [AC_MSG_ERROR([terminal-notifier not found, required for desktop notifications.])],
++ [AC_MSG_WARN([terminal-notifier not found, required for desktop notifications on OS X.])],
+ [AC_MSG_NOTICE([Desktop notifications not supported.])])],
+- [AC_DEFINE([HAVE_OSXNOTIFY], [1], [terminal notifier])])])],
+- [test "x$PLATFORM" = xnix],
+- [AS_IF([test "x$enable_notifications" != xno],
++ [AC_DEFINE([HAVE_OSXNOTIFY], [1], [terminal notifier])])])
++
++AS_IF([test "x$enable_notifications" != xno],
+ [PKG_CHECK_MODULES([libnotify], [libnotify],
+ [AC_DEFINE([HAVE_LIBNOTIFY], [1], [libnotify module])],
+ [AS_IF([test "x$enable_notifications" = xyes],
+- [AC_MSG_ERROR([libnotify is required but does not exist])],
+- [AC_MSG_NOTICE([libnotify support will be disabled])])])])])
++ [AC_MSG_WARN([libnotify is required but does not exist])],
++ [AC_MSG_NOTICE([libnotify support will be disabled])])])])
+
+ # TODO: rewrite this
+ if test "x$with_xscreensaver" = xyes; then