From [email protected] 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