summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-09-04 10:15:17 +0000
committernia <nia@pkgsrc.org>2020-09-04 10:15:17 +0000
commitafd86f568aac1e3b78ad9eab74d956c527710742 (patch)
treee24b55c0b0e45f184535f1e7d6db6d3fdfc23232
parentea1efb9e457ec5cd997bac15251579d56485acc1 (diff)
downloadpkgsrc-afd86f568aac1e3b78ad9eab74d956c527710742.tar.gz
chat: Add profanity. Based on work by js and leot in pkgsrc-wip.
Profanity is a simple lightweight console based XMPP chat client. Its emphasis is on having a simple and configurable command driven UI.
-rw-r--r--chat/Makefile3
-rw-r--r--chat/profanity/DESCR2
-rw-r--r--chat/profanity/Makefile49
-rw-r--r--chat/profanity/PLIST30
-rw-r--r--chat/profanity/distinfo10
-rw-r--r--chat/profanity/patches/patch-configure.ac33
-rw-r--r--chat/profanity/patches/patch-src_ui_inputwin.c17
-rw-r--r--chat/profanity/patches/patch-src_ui_rosterwin.c48
-rw-r--r--chat/profanity/patches/patch-src_ui_window.c20
9 files changed, 211 insertions, 1 deletions
diff --git a/chat/Makefile b/chat/Makefile
index 79db9c37694..2f8929e7883 100644
--- a/chat/Makefile
+++ b/chat/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.249 2020/09/04 10:13:16 nia Exp $
+# $NetBSD: Makefile,v 1.250 2020/09/04 10:15:17 nia Exp $
#
COMMENT= Communication programs
@@ -95,6 +95,7 @@ SUBDIR+= pidgin-otr
SUBDIR+= pidgin-sametime
SUBDIR+= pidgin-silc
SUBDIR+= pircbot
+SUBDIR+= profanity
SUBDIR+= prosody
SUBDIR+= psi
SUBDIR+= psybnc
diff --git a/chat/profanity/DESCR b/chat/profanity/DESCR
new file mode 100644
index 00000000000..14532e55d2f
--- /dev/null
+++ b/chat/profanity/DESCR
@@ -0,0 +1,2 @@
+Profanity is a simple lightweight console based XMPP chat client.
+Its emphasis is on having a simple and configurable command driven UI.
diff --git a/chat/profanity/Makefile b/chat/profanity/Makefile
new file mode 100644
index 00000000000..7781620e983
--- /dev/null
+++ b/chat/profanity/Makefile
@@ -0,0 +1,49 @@
+# $NetBSD: Makefile,v 1.1 2020/09/04 10:15:17 nia Exp $
+
+DISTNAME= profanity-0.9.5
+CATEGORIES= chat
+MASTER_SITES= https://profanity-im.github.io/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://profanity-im.github.io/
+COMMENT= Console based XMPP client inspired by irssi
+LICENSE= gnu-gpl-v3
+
+USE_TOOLS+= autoconf pkg-config
+
+AUTOCONF_REQD= 2.69
+
+FAKE_NCURSES= yes
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_TOOLS+= pkg-config
+
+SUBST_CLASSES+= python
+SUBST_STAGE.python= pre-configure
+SUBST_FILES.python= configure.ac
+SUBST_SED.python= -e 's,python-config,python${PYVERSSUFFIX}-config,g'
+
+CONFIGURE_ARGS+= --enable-plugins
+CONFIGURE_ARGS+= --enable-c-plugins
+CONFIGURE_ARGS+= --enable-python-plugins
+CONFIGURE_ARGS+= --enable-omemo
+
+pre-configure:
+ cd ${WRKSRC} && autoconf
+
+BUILDLINK_API_DEPENDS.libmesode+= libmesode>=0.9.1
+.include "../../chat/libmesode/buildlink3.mk"
+.include "../../chat/libotr/buildlink3.mk"
+.include "../../chat/libsignal-protocol-c/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../devel/readline/buildlink3.mk"
+.include "../../security/gpgme/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/chat/profanity/PLIST b/chat/profanity/PLIST
new file mode 100644
index 00000000000..d7bf8781d5c
--- /dev/null
+++ b/chat/profanity/PLIST
@@ -0,0 +1,30 @@
+@comment $NetBSD: PLIST,v 1.1 2020/09/04 10:15:17 nia Exp $
+bin/profanity
+include/profapi.h
+lib/libprofanity.la
+man/man1/profanity.1
+share/profanity/icons/proIcon.png
+share/profanity/icons/proIconMsg.png
+share/profanity/themes/aqua
+share/profanity/themes/batman
+share/profanity/themes/bios
+share/profanity/themes/boothj5
+share/profanity/themes/boothj5_laptop
+share/profanity/themes/boothj5_slack
+share/profanity/themes/complex
+share/profanity/themes/forest
+share/profanity/themes/gruvbox
+share/profanity/themes/hacker
+share/profanity/themes/headache
+share/profanity/themes/joker
+share/profanity/themes/jubalian
+share/profanity/themes/mono
+share/profanity/themes/orange
+share/profanity/themes/original
+share/profanity/themes/original_bright
+share/profanity/themes/shade
+share/profanity/themes/simple
+share/profanity/themes/solarized-dark
+share/profanity/themes/solarized-light
+share/profanity/themes/spawn
+share/profanity/themes/whiteness
diff --git a/chat/profanity/distinfo b/chat/profanity/distinfo
new file mode 100644
index 00000000000..2aaea07645e
--- /dev/null
+++ b/chat/profanity/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2020/09/04 10:15:17 nia Exp $
+
+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) = b01d512700e204306e2ebeebdd7d8d4164a57c5f
+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/patches/patch-configure.ac b/chat/profanity/patches/patch-configure.ac
new file mode 100644
index 00000000000..9f04773561e
--- /dev/null
+++ b/chat/profanity/patches/patch-configure.ac
@@ -0,0 +1,33 @@
+$NetBSD: patch-configure.ac,v 1.1 2020/09/04 10:15:17 nia Exp $
+
+- Add NetBSD as a non-libdl platform.
+- Fix == usage.
+
+--- configure.ac.orig 2020-07-01 16:49:19.000000000 +0000
++++ configure.ac
+@@ -22,6 +22,7 @@ AC_CANONICAL_HOST
+ PLATFORM="unknown"
+ AS_CASE([$host_os],
+ [freebsd*], [PLATFORM="freebsd"],
++ [netbsd*], [PLATFORM="netbsd"],
+ [openbsd*], [PLATFORM="openbsd"],
+ [darwin*], [PLATFORM="osx"],
+ [cygwin], [PLATFORM="cygwin"],
+@@ -81,7 +82,7 @@ elif test "x$enable_python_plugins" != x
+ rm -f Python.framework
+ ln -s $PYTHON_FRAMEWORK Python.framework ])
+ AC_CHECK_PROG(PYTHON_CONFIG_EXISTS, python-config, yes, no)
+- if test "$PYTHON_CONFIG_EXISTS" == "yes"; then
++ if test "$PYTHON_CONFIG_EXISTS" = "yes"; then
+ AX_PYTHON_DEVEL
+ AM_CONDITIONAL([BUILD_PYTHON_API], [true])
+ AC_DEFINE([HAVE_PYTHON], [1], [Python support])
+@@ -108,7 +109,7 @@ else
+ elif test "x$enable_c_plugins" != xno; then
+ # libdl doesn't exist as a separate library in OpenBSD/FreeBSD and is
+ # provided in the standard libraries.
+- AS_IF([test "x$PLATFORM" = xopenbsd -o "x$PLATFORM" = xfreebsd],
++ AS_IF([test "x$PLATFORM" = xopenbsd -o "x$PLATFORM" = xfreebsd -o "x$PLATFORM" = xnetbsd],
+ [AM_CONDITIONAL([BUILD_C_API], [true]) AC_DEFINE([HAVE_C], [1], [C support])],
+ [AC_CHECK_LIB([dl], [main],
+ [AM_CONDITIONAL([BUILD_C_API], [true]) LIBS="$LIBS -ldl" AC_DEFINE([HAVE_C], [1], [C support])],
diff --git a/chat/profanity/patches/patch-src_ui_inputwin.c b/chat/profanity/patches/patch-src_ui_inputwin.c
new file mode 100644
index 00000000000..e8d5205d235
--- /dev/null
+++ b/chat/profanity/patches/patch-src_ui_inputwin.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_ui_inputwin.c,v 1.1 2020/09/04 10:15:17 nia Exp $
+
+Prevent NetBSD libcurses from dereferencing a null pointer.
+
+--- src/ui/inputwin.c.orig 2020-06-29 15:43:33.000000000 +0000
++++ src/ui/inputwin.c
+@@ -307,7 +307,9 @@ _inp_win_update_virtual(void)
+ {
+ int wcols = getmaxx(stdscr);
+ int row = screen_inputwin_row();
+- pnoutrefresh(inp_win, 0, pad_start, row, 0, row, wcols-2);
++ if (inp_win != NULL) {
++ pnoutrefresh(inp_win, 0, pad_start, row, 0, row, wcols-2);
++ }
+ }
+
+ static void
diff --git a/chat/profanity/patches/patch-src_ui_rosterwin.c b/chat/profanity/patches/patch-src_ui_rosterwin.c
new file mode 100644
index 00000000000..78b5de15248
--- /dev/null
+++ b/chat/profanity/patches/patch-src_ui_rosterwin.c
@@ -0,0 +1,48 @@
+$NetBSD: patch-src_ui_rosterwin.c,v 1.1 2020/09/04 10:15:17 nia Exp $
+
+Prevent NetBSD libcurses from dereferencing a null pointer.
+
+--- src/ui/rosterwin.c.orig 2020-06-25 13:59:14.000000000 +0000
++++ src/ui/rosterwin.c
+@@ -95,7 +95,10 @@ rosterwin_roster(void)
+
+ ProfLayoutSplit *layout = (ProfLayoutSplit*)console->layout;
+ assert(layout->memcheck == LAYOUT_SPLIT_MEMCHECK);
+- werase(layout->subwin);
++
++ if (layout->subwin != NULL) {
++ werase(layout->subwin);
++ }
+
+ char *roomspos = prefs_get_string(PREF_ROSTER_ROOMS_POS);
+ if (prefs_get_boolean(PREF_ROSTER_ROOMS) && (g_strcmp0(roomspos, "first") == 0)) {
+@@ -1105,9 +1108,11 @@ _rosterwin_contacts_header(ProfLayoutSpl
+
+ gboolean wrap = prefs_get_boolean(PREF_ROSTER_WRAP);
+
+- wattron(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
+- win_sub_print(layout->subwin, header->str, FALSE, wrap, 1);
+- wattroff(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
++ if (layout->subwin != NULL) {
++ wattron(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
++ win_sub_print(layout->subwin, header->str, FALSE, wrap, 1);
++ wattroff(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
++ }
+
+ g_string_free(header, TRUE);
+ }
+@@ -1165,9 +1170,11 @@ _rosterwin_rooms_header(ProfLayoutSplit
+
+ gboolean wrap = prefs_get_boolean(PREF_ROSTER_WRAP);
+
+- wattron(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
+- win_sub_print(layout->subwin, header->str, FALSE, wrap, 1);
+- wattroff(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
++ if (layout->subwin != NULL) {
++ wattron(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
++ win_sub_print(layout->subwin, header->str, FALSE, wrap, 1);
++ wattroff(layout->subwin, theme_attrs(THEME_ROSTER_HEADER));
++ }
+
+ g_string_free(header, TRUE);
+ }
diff --git a/chat/profanity/patches/patch-src_ui_window.c b/chat/profanity/patches/patch-src_ui_window.c
new file mode 100644
index 00000000000..43203651cfc
--- /dev/null
+++ b/chat/profanity/patches/patch-src_ui_window.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_ui_window.c,v 1.1 2020/09/04 10:15:17 nia Exp $
+
+Prevent NetBSD libcurses from dereferencing a null pointer.
+
+--- src/ui/window.c.orig 2020-07-01 16:49:19.000000000 +0000
++++ src/ui/window.c
+@@ -1858,7 +1858,12 @@ win_sub_print(WINDOW *win, char *msg, gb
+ void
+ win_sub_newline_lazy(WINDOW *win)
+ {
+- int curx = getcurx(win);
++ int curx;
++
++ if (win == NULL) {
++ return;
++ }
++ curx = getcurx(win);
+ if (curx > 0) {
+ int cury = getcury(win);
+ wmove(win, cury+1, 0);