pkgsrc-Bugs archive

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

pkg/55673: Add optional feature support to chat/profanity



>Number:         55673
>Category:       pkg
>Synopsis:       Add optional feature support to chat/profanity
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 21 00:45:00 +0000 2020
>Originator:     snow flurry
>Release:        trunk (2020-09-20)
>Organization:
>Environment:

>Description:
Profanity has additional support for desktop notifications (via libnotify), a tray icon (via gtk2+), and auto-away on screen lock (via libXScrnSaver), but additional dependencies are needed than what is included in chat/profanity-0.9.5.
>How-To-Repeat:

>Fix:
The following patch provides this support via PKG_OPTIONS.profanity, since they all rely on X11 and the package as-is doesn't. This also adds NetBSD as a libnotify platform in patch-configure.ac.

--- a/chat/profanity/Makefile
+++ b/chat/profanity/Makefile
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.2 2020/09/08 19:13:49 nia Exp $
 
 DISTNAME=	profanity-0.9.5
+PKGREVISION=	1
 CATEGORIES=	chat
 MASTER_SITES=	https://profanity-im.github.io/
 
@@ -30,6 +31,8 @@ CONFIGURE_ARGS+=	--enable-c-plugins
 CONFIGURE_ARGS+=	--enable-python-plugins
 CONFIGURE_ARGS+=	--enable-omemo
 
+.include "options.mk"
+
 pre-configure:
 	cd ${WRKSRC} && autoconf
 
diff --git a/chat/profanity/distinfo b/chat/profanity/distinfo
index 137ae7d96..0be9b1784 100644
--- a/chat/profanity/distinfo
+++ b/chat/profanity/distinfo
@@ -4,7 +4,7 @@ SHA1 (profanity-0.9.5.tar.gz) = 88f3bcb483f25710cb35ab3e3f227f11b5d1225a
 RMD160 (profanity-0.9.5.tar.gz) = 39c0a1b7f50e5000bfc649a0461d7f2d45230b16
 SHA512 (profanity-0.9.5.tar.gz) = 79305ee488d3a9b87bb422d6525bfaae62c4969d466b968c86941ed5bf0c0080e349758f2e1ead144693513b5d19a635372e73aa1fe9e362836b9245e1d2b898
 Size (profanity-0.9.5.tar.gz) = 830966 bytes
-SHA1 (patch-configure.ac) = 7f3ec4182d82cb6836d4e0ecb0b023e56ce3b91d
+SHA1 (patch-configure.ac) = d7d07f7c62755bc46e318df216932d7273a0c34c
 SHA1 (patch-src_ui_inputwin.c) = ccdfc1b1fe932ba09eafaf54ed10af453b1a6c80
 SHA1 (patch-src_ui_rosterwin.c) = 1e31cbd7dc0bdaebe9e3fcddbecceeb60b70faf2
 SHA1 (patch-src_ui_window.c) = 5844f276517260beb2ea767523f44c46d6b562d2
diff --git a/chat/profanity/options.mk b/chat/profanity/options.mk
new file mode 100644
index 000000000..a665ff46c
--- /dev/null
+++ b/chat/profanity/options.mk
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.profanity
+PKG_SUPPORTED_OPTIONS=	libnotify gtk2 xscrnsaver
+PKG_SUGGESTED_OPTIONS=
+
+.include "../../mk/bsd.options.mk"
+
+# gtk2
+.if !empty(PKG_OPTIONS:Mgtk2)
+.include "../../x11/gtk2/buildlink3.mk"
+.endif
+
+# libnotify
+.if !empty(PKG_OPTIONS:Mlibnotify)
+.include "../../sysutils/libnotify/buildlink3.mk"
+CONFIGURE_ARGS+=	--enable-notifications
+.endif
+
+# xscrnsaver
+.if !empty(PKG_OPTIONS:Mxscrnsaver)
+.include "../../x11/libXScrnSaver/buildlink3.mk"
+.endif
diff --git a/chat/profanity/patches/patch-configure.ac b/chat/profanity/patches/patch-configure.ac
index 8e02c4d32..f68ac1619 100644
--- a/chat/profanity/patches/patch-configure.ac
+++ b/chat/profanity/patches/patch-configure.ac
@@ -1,10 +1,11 @@
-$NetBSD: patch-configure.ac,v 1.2 2020/09/11 20:44:17 js Exp $
+$NetBSD$
 
 - Add NetBSD as a non-libdl platform.
 - Fix == usage.
 - Remove hardcoded homebrew path on macOS.
+- Add NetBSD as a libnotify platform.
 
---- configure.ac.orig	2020-07-01 16:49:19.000000000 +0000
+--- configure.ac.orig	2020-09-19 01:06:20.595094431 +0000
 +++ configure.ac
 @@ -22,6 +22,7 @@ AC_CANONICAL_HOST
  PLATFORM="unknown"
@@ -49,3 +50,12 @@ $NetBSD: patch-configure.ac,v 1.2 2020/09/11 20:44:17 js Exp $
        [AC_CHECK_FILE([/usr/local/include/ereadline],
            [LIBS="-lereadline $LIBS"
                AM_CPPFLAGS="-I/usr/local/include/ereadline $AM_CPPFLAGS"
+@@ -246,7 +239,7 @@ AS_IF([test "x$PLATFORM" = xosx],
+                     [AC_MSG_ERROR([terminal-notifier not found, required for desktop notifications.])],
+                     [AC_MSG_NOTICE([Desktop notifications not supported.])])],
+                 [AC_DEFINE([HAVE_OSXNOTIFY], [1], [terminal notifier])])])],
+-    [test "x$PLATFORM" = xnix -o "x$PLATFORM" = xfreebsd],
++    [test "x$PLATFORM" = xnix -o "x$PLATFORM" = xfreebsd -o "x$PLATFORM" = xnetbsd],
+         [AS_IF([test "x$enable_notifications" != xno],
+             [PKG_CHECK_MODULES([libnotify], [libnotify],
+                 [AC_DEFINE([HAVE_LIBNOTIFY], [1], [libnotify module])],


Home | Main Index | Thread Index | Old Index