git: c230cc46a678 - main - x11/nwg-look: add new port

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 09 Apr 2022 00:42:59 UTC
The branch main has been updated by jbeich:

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

commit c230cc46a6782729bc949eef06a55a75e23beae7
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-04-08 00:16:32 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-04-09 00:41:36 +0000

    x11/nwg-look: add new port
    
    Nwg-look is a GTK3 settings editor, designed to work properly in
    wlroots-based Wayland environment. The look and feel is strongly
    influenced by LXAppearance, but nwg-look is intended to free the user
    from a few inconveniences:
    
    - It works natively on Wayland. You no longer need Xwayland, nor
      strange env variables for it to run.
    - It applies gsettings directly, with no need to use workarounds. You
      don't need to set gsettings in the sway config file. You don't need
      the "import-gsettings" script.
    
    WWW: https://github.com/nwg-piotr/nwg-look
---
 x11/Makefile           |  1 +
 x11/nwg-look/Makefile  | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
 x11/nwg-look/distinfo  | 29 ++++++++++++++++++++++++++++
 x11/nwg-look/pkg-descr | 12 ++++++++++++
 4 files changed, 94 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index 63ffd644bbc9..6c26145e7e24 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -260,6 +260,7 @@
     SUBDIR += nwg-dock
     SUBDIR += nwg-drawer
     SUBDIR += nwg-launchers
+    SUBDIR += nwg-look
     SUBDIR += nwg-menu
     SUBDIR += nxcomp
     SUBDIR += p5-Clipboard
diff --git a/x11/nwg-look/Makefile b/x11/nwg-look/Makefile
new file mode 100644
index 000000000000..2c528c1ab94d
--- /dev/null
+++ b/x11/nwg-look/Makefile
@@ -0,0 +1,52 @@
+PORTNAME=	nwg-look
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.1.0
+CATEGORIES=	x11
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	GTK3 settings editor for sway and other wlroots compositors
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig
+
+USES=		gnome go:modules pkgconfig
+USE_GITHUB=	yes
+USE_GNOME=	cairo gdkpixbuf2 gtk30
+GH_ACCOUNT=	nwg-piotr
+GH_TUPLE=	creack:pty:v1.1.17:creack_pty/vendor/github.com/creack/pty \
+		golang:mod:9b9b3d81d5e3:golang_mod/vendor/golang.org/x/mod \
+		golang:sys:51cd9980dadf:golang_sys/vendor/golang.org/x/sys \
+		golang:tools:v0.1.10:golang_tools/vendor/golang.org/x/tools \
+		golang:xerrors:5ec99f83aff1:golang_xerrors/vendor/golang.org/x/xerrors \
+		gotk3:gotk3:v0.6.1:gotk3_gotk3/vendor/github.com/gotk3/gotk3 \
+		pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \
+		sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
+		visualfc:fastmod:v1.3.9:visualfc_fastmod/vendor/github.com/visualfc/fastmod \
+		visualfc:gocode:v1.3.2:visualfc_gocode/vendor/github.com/visualfc/gocode \
+		visualfc:gotools:v1.3.6:visualfc_gotools/vendor/github.com/visualfc/gotools \
+		visualfc:goversion:v1.1.0:visualfc_goversion/vendor/github.com/visualfc/goversion \
+		yuin:goldmark:v1.4.10:yuin_goldmark/vendor/github.com/yuin/goldmark
+CGO_LDFLAGS+=	-Wl,--as-needed # harfbuzz, freetype2
+PLIST_FILES=	bin/${PORTNAME} \
+		${DATADIR}/main.glade \
+		share/applications/${PORTNAME}.desktop \
+		share/pixmaps/${PORTNAME}.svg
+
+post-patch:
+# Respect PREFIX for *.glade and *.desktop
+	@${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \
+		${WRKSRC}/main.go \
+		${WRKSRC}/tools.go
+
+post-install:
+# Based on install from WRKSRC/Makefile
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/stuff/main.glade ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/stuff/*.desktop \
+		${STAGEDIR}${PREFIX}/share/applications
+	${INSTALL_DATA} ${WRKSRC}/stuff/*.svg \
+		${STAGEDIR}${PREFIX}/share/pixmaps
+
+.include <bsd.port.mk>
diff --git a/x11/nwg-look/distinfo b/x11/nwg-look/distinfo
new file mode 100644
index 000000000000..fcedc1e88d7d
--- /dev/null
+++ b/x11/nwg-look/distinfo
@@ -0,0 +1,29 @@
+TIMESTAMP = 1649376992
+SHA256 (nwg-piotr-nwg-look-v0.1.0_GH0.tar.gz) = 73c0324ec658d78902d94ea4220f4b824a75ad665183ececba246bfc94bb089e
+SIZE (nwg-piotr-nwg-look-v0.1.0_GH0.tar.gz) = 19620
+SHA256 (creack-pty-v1.1.17_GH0.tar.gz) = 0e80751ab6f85cccee8cb20fbeeb970d69854aa19c857a26f7fdaabfbc20d66d
+SIZE (creack-pty-v1.1.17_GH0.tar.gz) = 9960
+SHA256 (golang-mod-9b9b3d81d5e3_GH0.tar.gz) = 17a6e030b6e35cce6189203a8f86f0c4d26cb70f16cfd10c510b0876ff9852fc
+SIZE (golang-mod-9b9b3d81d5e3_GH0.tar.gz) = 119489
+SHA256 (golang-sys-51cd9980dadf_GH0.tar.gz) = 6e75ff50281a7d7a1c57170e636f04c5e93bdc84240cf8a0d04260c6c9ba15ab
+SIZE (golang-sys-51cd9980dadf_GH0.tar.gz) = 1288461
+SHA256 (golang-tools-v0.1.10_GH0.tar.gz) = 9791babef393ab33e90b6045eead923abf37a9a30f79737aed309befa8e01740
+SIZE (golang-tools-v0.1.10_GH0.tar.gz) = 3014465
+SHA256 (golang-xerrors-5ec99f83aff1_GH0.tar.gz) = 71975d658357e170fd6a41f92539cde8b39c9cd8bfe5931b6311bc5f5c0da0d7
+SIZE (golang-xerrors-5ec99f83aff1_GH0.tar.gz) = 13664
+SHA256 (gotk3-gotk3-v0.6.1_GH0.tar.gz) = 971ff1d2d184413113d1cbf68f9127bce06362e2e352d8ade79b1817d2024aa5
+SIZE (gotk3-gotk3-v0.6.1_GH0.tar.gz) = 272727
+SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda
+SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398
+SHA256 (sirupsen-logrus-v1.8.1_GH0.tar.gz) = e9492c08ac8f202b438ccfb992bf81b7860739cf8f2266958e0c574c7abfdd74
+SIZE (sirupsen-logrus-v1.8.1_GH0.tar.gz) = 47161
+SHA256 (visualfc-fastmod-v1.3.9_GH0.tar.gz) = 05cddba21746c902d17551d8a59a74b5f8ec857c4d76161848d418fe7d3a4b0c
+SIZE (visualfc-fastmod-v1.3.9_GH0.tar.gz) = 5992
+SHA256 (visualfc-gocode-v1.3.2_GH0.tar.gz) = 90ef69ba0e2bca19f8937146f5028762f8d5862dc9512223adaca6f767958670
+SIZE (visualfc-gocode-v1.3.2_GH0.tar.gz) = 145591
+SHA256 (visualfc-gotools-v1.3.6_GH0.tar.gz) = 837006de6a1dd62e380c5537fbb4b9fcb94d5fea50383849a388b207da1fbac2
+SIZE (visualfc-gotools-v1.3.6_GH0.tar.gz) = 236380
+SHA256 (visualfc-goversion-v1.1.0_GH0.tar.gz) = 940bbb2253abc1146b0d831332105dc2f9c92a64c360a58baac38441802766e8
+SIZE (visualfc-goversion-v1.1.0_GH0.tar.gz) = 3199
+SHA256 (yuin-goldmark-v1.4.10_GH0.tar.gz) = 369c5d1b7d8095a50523953e65f4c844177596176757b3b35bbe308a94426aa4
+SIZE (yuin-goldmark-v1.4.10_GH0.tar.gz) = 257430
diff --git a/x11/nwg-look/pkg-descr b/x11/nwg-look/pkg-descr
new file mode 100644
index 000000000000..7963af3d57a4
--- /dev/null
+++ b/x11/nwg-look/pkg-descr
@@ -0,0 +1,12 @@
+Nwg-look is a GTK3 settings editor, designed to work properly in
+wlroots-based Wayland environment. The look and feel is strongly
+influenced by LXAppearance, but nwg-look is intended to free the user
+from a few inconveniences:
+
+- It works natively on Wayland. You no longer need Xwayland, nor
+  strange env variables for it to run.
+- It applies gsettings directly, with no need to use workarounds. You
+  don't need to set gsettings in the sway config file. You don't need
+  the "import-gsettings" script.
+
+WWW: https://github.com/nwg-piotr/nwg-look