Hi!
bodie at #openbsd IRC channel reported me about crashes when using Toxic
via SSH with X11 forwarding. Without X11 forwarding it works fine, just
says 'X failed to initialize'.
Personally I have crashes when close X11 session (but have Toxic running
in tmux session), so I have to start Toxic in tmux session in virtual
console and get 'X failed to initialize' message.
Also it would be wonderful to have this package at machines without
necessity to install Xenocara file sets.
While there, patch two files to bump version in Toxic, for some reason
JFreegman does that after tagging a release.
And one more thing: disable libnotify in no_x11 flavor!
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/Makefile,v
retrieving revision 1.1078
diff -u -p -u -p -r1.1078 Makefile
--- Makefile 11 Jul 2018 20:58:13 -0000 1.1078
+++ Makefile 16 Jul 2018 12:29:32 -0000
@@ -711,6 +711,7 @@
SUBDIR += totd
SUBDIR += toxcore
SUBDIR += toxic
+ SUBDIR += toxic,no_x11
SUBDIR += trafshow
SUBDIR += transmission
SUBDIR += trickle
Index: toxic/Makefile
===================================================================
RCS file: /cvs/ports/net/toxic/Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makefile
--- toxic/Makefile 27 Jun 2018 21:04:00 -0000 1.2
+++ toxic/Makefile 16 Jul 2018 12:29:32 -0000
@@ -2,10 +2,12 @@
COMMENT = ncurses-based Tox client
+V = 0.8.2
GH_ACCOUNT = Jfreegman
GH_PROJECT = toxic
-GH_TAGNAME = v0.8.2
-REVISION = 0
+GH_TAGNAME = v$V
+PKGNAME = toxic-$V
+REVISION = 1
CATEGORIES = net
@@ -14,27 +16,42 @@ MAINTAINER = Leonid Bobrov <mazocomp@di
# GPLv3+
PERMIT_PACKAGE_CDROM = Yes
-WANTLIB += X11 alut c config curses curl gdk_pixbuf-2.0 gio-2.0 glib-2.0
-WANTLIB += gobject-2.0 intl notify m openal png pthread qrencode toxcore
-WANTLIB += util vpx z ${MODPY_WANTLIB}
+WANTLIB += alut c config curses curl intl m openal png pthread
+WANTLIB += qrencode toxcore util z ${MODPY_WANTLIB}
LIB_DEPENDS = audio/freealut \
net/toxcore \
devel/libconfig \
- devel/libnotify \
net/curl \
graphics/libqrencode
-RUN_DEPENDS = devel/desktop-file-utils
-
-MAKE_ENV += ENABLE_PYTHON=1
-MAKE_ENV += USER_CFLAGS="${CFLAGS}"
+MAKE_ENV += ENABLE_PYTHON=1 \
+ USER_CFLAGS="${CFLAGS}"
MODULES = lang/python
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
CONFIGURE_STYLE = none
USE_GMAKE = yes
+FLAVORS = no_x11
+FLAVOR ?=
+
+.if ${FLAVOR:Mno_x11}
+MAKE_ENV += DISABLE_DESKTOP_NOTIFY=1 \
+ DISABLE_X11=1
+.else
+WANTLIB += X11 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
+WANTLIB += notify vpx
+LIB_DEPENDS += devel/libnotify
+
+RUN_DEPENDS = devel/desktop-file-utils
+.endif
+
NO_TEST = Yes
+
+post-install:
+.if ${FLAVOR:Mno_x11}
+ rm -Rf ${PREFIX}/share/applications/
+.endif
.include <bsd.port.mk>
Index: toxic/patches/patch-apidoc_python_source_conf_py
===================================================================
RCS file: toxic/patches/patch-apidoc_python_source_conf_py
diff -N toxic/patches/patch-apidoc_python_source_conf_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ toxic/patches/patch-apidoc_python_source_conf_py 16 Jul 2018 12:29:32
-0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Index: apidoc/python/source/conf.py
+--- apidoc/python/source/conf.py.orig
++++ apidoc/python/source/conf.py
+@@ -55,9 +55,9 @@ author = 'Jakob Kreuze'
+ # built documents.
+ #
+ # The short X.Y version.
+-version = '0.8.1'
++version = '0.8.2'
+ # The full version, including alpha/beta/rc tags.
+-release = '0.8.1'
++release = '0.8.2'
+
+ # The language for content autogenerated by Sphinx. Refer to documentation
+ # for a list of supported languages.
Index: toxic/patches/patch-cfg_global_vars_mk
===================================================================
RCS file: toxic/patches/patch-cfg_global_vars_mk
diff -N toxic/patches/patch-cfg_global_vars_mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ toxic/patches/patch-cfg_global_vars_mk 16 Jul 2018 12:29:32 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+
+Index: cfg/global_vars.mk
+--- cfg/global_vars.mk.orig
++++ cfg/global_vars.mk
+@@ -1,5 +1,5 @@
+ # Version
+-TOXIC_VERSION = 0.8.1
++TOXIC_VERSION = 0.8.2
+ REV = $(shell git rev-list HEAD --count 2>/dev/null || echo -n "error")
+ ifneq (, $(findstring error, $(REV)))
+ VERSION = $(TOXIC_VERSION)
Index: toxic/pkg/PFRAG.no-no_x11
===================================================================
RCS file: toxic/pkg/PFRAG.no-no_x11
diff -N toxic/pkg/PFRAG.no-no_x11
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ toxic/pkg/PFRAG.no-no_x11 16 Jul 2018 12:29:32 -0000
@@ -0,0 +1,3 @@
+@comment $OpenBSD: PFRAG.no-no_x11,v$
+share/applications/toxic.desktop
+@tag update-desktop-database
Index: toxic/pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/toxic/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 PLIST
--- toxic/pkg/PLIST 27 Jun 2018 21:04:00 -0000 1.2
+++ toxic/pkg/PLIST 16 Jul 2018 12:29:32 -0000
@@ -1,8 +1,8 @@
@comment $OpenBSD: PLIST,v 1.2 2018/06/27 21:04:00 espie Exp $
+!%%no_x11%%
@bin bin/toxic
@man man/man1/toxic.1
@man man/man5/toxic.conf.5
-share/applications/toxic.desktop
share/toxic/
share/toxic/nameservers
share/toxic/sounds/
@@ -15,4 +15,3 @@ share/toxic/sounds/ToxicRecvMessage.wav
share/toxic/sounds/ToxicTransferComplete.wav
share/toxic/sounds/ToxicTransferStart.wav
share/toxic/toxic.conf.example
-@tag update-desktop-database