git: e358a2f1d856 - main - net-mgmt/wifimgr: allow to optionally build against GTK v2

Alexey Dokuchaev danfe at FreeBSD.org
Sat Jul 3 18:47:39 UTC 2021


The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e358a2f1d856c5da4a4545da88da6661045cc197

commit e358a2f1d856c5da4a4545da88da6661045cc197
Author:     Alexey Dokuchaev <danfe at FreeBSD.org>
AuthorDate: 2021-07-03 18:45:54 +0000
Commit:     Alexey Dokuchaev <danfe at FreeBSD.org>
CommitDate: 2021-07-03 18:46:01 +0000

    net-mgmt/wifimgr: allow to optionally build against GTK v2
    
    It is still supported by upstream, even though default is now GTK v3.
    All that was missing is some make(1) glue to distinguish between the
    toolkit versions.
---
 net-mgmt/wifimgr/Makefile                 |  8 +++++--
 net-mgmt/wifimgr/files/patch-src_Makefile | 38 ++++++++++++++++++++++++++++---
 2 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/net-mgmt/wifimgr/Makefile b/net-mgmt/wifimgr/Makefile
index 1583befca415..e3ac5eeac9fc 100644
--- a/net-mgmt/wifimgr/Makefile
+++ b/net-mgmt/wifimgr/Makefile
@@ -16,13 +16,17 @@ LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libfreetype.so:print/freetype2
 
 USES=		desktop-file-utils gnome pkgconfig tar:bzip2 xorg
-USE_GNOME=	cairo gtk30
+USE_GNOME=	cairo
 INSTALLS_ICONS=	yes
 USE_XORG=	x11
 
-OPTIONS_DEFINE=	NLS
+OPTIONS_DEFINE=	GTK2 NLS
 OPTIONS_SUB=	yes
 
+GTK2_USE=	GNOME=gtk20
+GTK2_MAKE_ENV=	GTK_VERSION=2
+GTK2_USE_OFF=	GNOME=gtk30
+
 NLS_USES=	gettext-runtime gettext-tools
 NLS_MAKE_ENV_OFF=	WITHOUT_NLS=yes
 NLS_CFLAGS_OFF=	-DWITHOUT_NLS
diff --git a/net-mgmt/wifimgr/files/patch-src_Makefile b/net-mgmt/wifimgr/files/patch-src_Makefile
index 5b8e947bf1c4..f81053e001bc 100644
--- a/net-mgmt/wifimgr/files/patch-src_Makefile
+++ b/net-mgmt/wifimgr/files/patch-src_Makefile
@@ -1,6 +1,38 @@
---- src/Makefile.orig	2014-05-10 22:54:38 UTC
+--- src/Makefile.orig	2021-06-28 10:55:25 UTC
 +++ src/Makefile
-@@ -97,7 +97,7 @@ clean:
+@@ -6,9 +6,11 @@
+ # $Id: Makefile 145 2021-06-28 10:55:25Z jr $
+ #
+ 
+-GTK_CFLAGS !=	pkg-config --cflags gtk+-3.0
+-GTK_LDFLAGS !=	pkg-config --libs gtk+-3.0
++GTK_VERSION ?=	3
+ 
++GTK_CFLAGS !=	pkg-config --cflags gtk+-${GTK_VERSION}.0
++GTK_LDFLAGS !=	pkg-config --libs gtk+-${GTK_VERSION}.0
++
+ .if defined(WITHOUT_NLS)
+ CFLAGS +=	-DWITHOUT_NLS
+ .else
+@@ -71,7 +73,7 @@ installed =	${DESTDIR}${PREFIX}/bin/wifimgr \
+ 
+ all:		wifimgr wifimgrsu
+ 
+-wmgr_objs =	wifimgr.o string.o net_list.o wifimgr-gtk.o
++wmgr_objs =	wifimgr.o string.o net_list.o wifimgr-gtk${GTK_VERSION}.o
+ 
+ wifimgr:	${wmgr_objs}
+ 		${CC} -o $@ ${wmgr_objs} ${LDFLAGS}
+@@ -82,7 +84,7 @@ string.o:	string.c
+ 
+ net_list.o:	net_list.c wifimgr.h
+ 
+-wifimgr-gtk.o:	wifimgr-gtk.c wifimgr.h version.h
++wifimgr-gtk${GTK_VERSION}.o:	wifimgr-gtk${GTK_VERSION}.c wifimgr.h version.h
+ 
+ wmgrsu_objs =	wifimgrsu.o string.o
+ 
+@@ -97,7 +99,7 @@ clean:
  		rm -f *.o
  		rm -f *.core
  
@@ -9,7 +41,7 @@
  
  deinstall:	do-deinstall update-icon-cache
  
-@@ -113,7 +113,7 @@ ${DESTDIR}${PREFIX}/bin/wifimgr:	wifimgr
+@@ -113,7 +115,7 @@ ${DESTDIR}${PREFIX}/bin/wifimgr:	wifimgr
  		${INSTALL} $? $@
  
  ${DESTDIR}${PREFIX}/libexec/wifimgrsu:	wifimgrsu


More information about the dev-commits-ports-all mailing list