[maintainer update] Necessity to flavor net/toxic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[maintainer update] Necessity to flavor net/toxic

Leonid Bobrov
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!

toxic.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [maintainer update] Necessity to flavor net/toxic

Stuart Henderson
On 2018/07/16 15:44, Leonid Bobrov wrote:

> 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

Keep this with GH_TAGNAME=v0.8.2 and no PKGNAME and no V.

> +++ 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

I don't think it's really worth patching this ..

> ===================================================================
> 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

PLIST/PFRAG change is correct.

Reply | Threaded
Open this post in threaded view
|

Re: [maintainer update] Necessity to flavor net/toxic

Leonid Bobrov
In reply to this post by Leonid Bobrov
> Keep this with GH_TAGNAME=v0.8.2 and no PKGNAME and no V.

If I don't set PKGNAME, then I get this:
$ env FLAVOR="no_x11" make show=FULLPKGNAME
toxic-0.8.2-no_x11p1
So I fixed that by taking a look at editors/vim

Reply | Threaded
Open this post in threaded view
|

Re: [maintainer update] Necessity to flavor net/toxic

Stuart Henderson
On 2018/07/17 05:47, Leonid Bobrov wrote:
> > Keep this with GH_TAGNAME=v0.8.2 and no PKGNAME and no V.
>
> If I don't set PKGNAME, then I get this:
> $ env FLAVOR="no_x11" make show=FULLPKGNAME
> toxic-0.8.2-no_x11p1
> So I fixed that by taking a look at editors/vim

Congratulations, you found a bug in GH_* handling :-)

vim uses multi-packages so it's a different situation.

This helps for net/toxic, but I need to do more testing.

Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1426
diff -u -p -r1.1426 bsd.port.mk
--- bsd.port.mk 16 Jul 2018 09:11:31 -0000 1.1426
+++ bsd.port.mk 17 Jul 2018 06:56:18 -0000
@@ -596,6 +596,16 @@ BUILD_DEPENDS += textproc/groff>=1.21
 _PKG_ARGS += -DUSE_GROFF=1
 .endif
 
+# github related variables
+GH_TAGNAME ?=
+GH_COMMIT ?=
+GH_ACCOUNT ?=
+GH_PROJECT ?=
+
+.if !empty(GH_PROJECT) && !empty(GH_TAGNAME)
+DISTNAME ?= ${GH_PROJECT}-${GH_TAGNAME:C/^v//}
+.endif
+
 PKGNAME ?= ${DISTNAME}
 FULLPKGNAME ?= ${PKGNAME}${FLAVOR_EXT}
 _MASTER ?=
@@ -818,12 +828,6 @@ _WRKDIRS = ${WRKOBJDIR_${PKGPATH}}/${_WR
 _WRKDIRS += ${WRKOBJDIR}/${_WRKDIR_STEM}
 _WRKDIRS += ${WRKOBJDIR_MFS}/${_WRKDIR_STEM}
 
-# github related variables
-GH_TAGNAME ?=
-GH_COMMIT ?=
-GH_ACCOUNT ?=
-GH_PROJECT ?=
-
 .if !empty(GH_TAGNAME)
 WRKDIST ?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:C/^v//}
 .elif !empty(GH_COMMIT)
@@ -834,10 +838,6 @@ WRKDIST ?= ${WRKDIR}
 .  else
 WRKDIST ?= ${WRKDIR}/${DISTNAME}
 .  endif
-.endif
-
-.if !empty(GH_PROJECT) && !empty(GH_TAGNAME)
-DISTNAME ?= ${GH_PROJECT}-${GH_TAGNAME:C/^v//}
 .endif
 
 WRKSRC ?= ${WRKDIST}

Reply | Threaded
Open this post in threaded view
|

Re: [maintainer update] Necessity to flavor net/toxic

Leonid Bobrov
In reply to this post by Leonid Bobrov
        From [hidden email] Tue Jul 17 10:28:21 2018

        On 2018/07/17 05:47, Leonid Bobrov wrote:
        > > Keep this with GH_TAGNAME=v0.8.2 and no PKGNAME and no V.
        >
        > If I don't set PKGNAME, then I get this:
        > $ env FLAVOR="no_x11" make show=FULLPKGNAME
        > toxic-0.8.2-no_x11p1
        > So I fixed that by taking a look at editors/vim

        Congratulations, you found a bug in GH_* handling :-)

        vim uses multi-packages so it's a different situation.

        This helps for net/toxic, but I need to do more testing.

Good, I see that's committed to ports@, here's a fresh diff without two
new patch files (but still that would look nice):

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 17 Jul 2018 13:37:34 -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 17 Jul 2018 13:37:34 -0000
@@ -5,7 +5,7 @@ COMMENT = ncurses-based Tox client
 GH_ACCOUNT = Jfreegman
 GH_PROJECT = toxic
 GH_TAGNAME = v0.8.2
-REVISION = 0
+REVISION = 1
 
 CATEGORIES = net
 
@@ -14,27 +14,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/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 17 Jul 2018 13:37:34 -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 17 Jul 2018 13:37:34 -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

Reply | Threaded
Open this post in threaded view
|

Re: [maintainer update] Necessity to flavor net/toxic

Stuart Henderson
On 2018/07/17 16:41, Leonid Bobrov wrote:

> From [hidden email] Tue Jul 17 10:28:21 2018
>
> On 2018/07/17 05:47, Leonid Bobrov wrote:
> > > Keep this with GH_TAGNAME=v0.8.2 and no PKGNAME and no V.
> >
> > If I don't set PKGNAME, then I get this:
> > $ env FLAVOR="no_x11" make show=FULLPKGNAME
> > toxic-0.8.2-no_x11p1
> > So I fixed that by taking a look at editors/vim
>
> Congratulations, you found a bug in GH_* handling :-)
>
> vim uses multi-packages so it's a different situation.
>
> This helps for net/toxic, but I need to do more testing.
>
> Good, I see that's committed to ports@, here's a fresh diff without two
> new patch files (but still that would look nice):

Thanks, committed with small tweaks:

- mention no_x11 in DESCR

- move the .if here to surround the "post-install:" line as well

> +
> +post-install:
> +.if ${FLAVOR:Mno_x11}
> + rm -Rf ${PREFIX}/share/applications/
> +.endif