git: d238d5a277a6 - main - x11-wm/devilspie2: Add new port

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Wed, 15 Jun 2022 09:43:17 UTC
The branch main has been updated by otis:

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

commit d238d5a277a6b68231b42bdd8bf90441a5189c07
Author:     Milan Obuch <bsd@dino.sk>
AuthorDate: 2022-06-15 09:39:27 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2022-06-15 09:40:55 +0000

    x11-wm/devilspie2: Add new port
    
    Add a new port, devilspie2, based on original devilspie, replacing its
    configuration file syntax with Lua based one, easier to maintain.
    
    devilspie2 port is based on original x11-wm/devilspie port, tuned to changed
    sources in the process.
    
    PR:             264378
---
 x11-wm/Makefile                        |  1 +
 x11-wm/devilspie2/Makefile             | 32 ++++++++++++++++++++++++++++++++
 x11-wm/devilspie2/distinfo             |  3 +++
 x11-wm/devilspie2/files/patch-Makefile | 14 ++++++++++++++
 x11-wm/devilspie2/pkg-descr            | 14 ++++++++++++++
 x11-wm/devilspie2/pkg-plist            | 10 ++++++++++
 6 files changed, 74 insertions(+)

diff --git a/x11-wm/Makefile b/x11-wm/Makefile
index 56f462979a67..5aaccc312fd6 100644
--- a/x11-wm/Makefile
+++ b/x11-wm/Makefile
@@ -23,6 +23,7 @@
     SUBDIR += ctwm
     SUBDIR += cwm
     SUBDIR += devilspie
+    SUBDIR += devilspie2
     SUBDIR += durden
     SUBDIR += dwl
     SUBDIR += dwm
diff --git a/x11-wm/devilspie2/Makefile b/x11-wm/devilspie2/Makefile
new file mode 100644
index 000000000000..0b7ebd3cc6a3
--- /dev/null
+++ b/x11-wm/devilspie2/Makefile
@@ -0,0 +1,32 @@
+# Created by: Jean-Yves Lefort <jylefort@brutele.be>
+
+PORTNAME=	devilspie2
+PORTVERSION=	0.43
+CATEGORIES=	x11-wm
+MASTER_SITES=	http://download.savannah.nongnu.org/releases/devilspie2/
+DISTFILES=	${PORTNAME}_${PORTVERSION}-src.tar.gz
+
+MAINTAINER=	bsd@dino.sk
+COMMENT=	Window manipulation tool
+
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	libwnck-3.so:x11-toolkits/libwnck3
+
+USES=		gettext gmake gnome lua:51 pkgconfig tar:xz
+USE_GNOME=	glib20 gtk30 intltool libwnck
+MAKE_ENV+=	"PKG_CONFIG_PATH=${LOCALBASE}/libdata/pkgconfig"
+CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/glib-2.0 \
+		-I${LUA_INCDIR}
+LIBS+=		-L${LOCALBASE}/lib -lX11 -L${LUA_LIBDIR} -llua-${LUA_VER}
+
+PORTDOCS=	AUTHORS README TODO
+
+OPTIONS_DEFINE=	DOCS
+
+post-install:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/x11-wm/devilspie2/distinfo b/x11-wm/devilspie2/distinfo
new file mode 100644
index 000000000000..e703b442881c
--- /dev/null
+++ b/x11-wm/devilspie2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1634744251
+SHA256 (devilspie2_0.43-src.tar.gz) = ecffc17c62b41e196b72340192a90c4223329df041f135e74c0990860595f828
+SIZE (devilspie2_0.43-src.tar.gz) = 48666
diff --git a/x11-wm/devilspie2/files/patch-Makefile b/x11-wm/devilspie2/files/patch-Makefile
new file mode 100644
index 000000000000..f476f6856c10
--- /dev/null
+++ b/x11-wm/devilspie2/files/patch-Makefile
@@ -0,0 +1,14 @@
+--- Makefile.orig	2017-09-26 15:03:36.000000000 +0200
++++ Makefile	2021-10-31 09:13:11.132643000 +0100
+@@ -59,9 +59,9 @@
+ 	PKG_WNCK=libwnck-3.0
+ endif
+ 
+-LIB_CFLAGS=$(shell pkg-config --cflags --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || pkg-config --cflags $(PKG_GTK) $(PKG_WNCK) lua)
++LIB_CFLAGS=$(shell pkg-config --cflags --silence-errors $(PKG_GTK) $(PKG_WNCK) lua-5.1 || pkg-config --cflags $(PKG_GTK) $(PKG_WNCK) lua)
+ STD_LDFLAGS=
+-LIBS=-lX11 $(shell pkg-config --libs --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || pkg-config --libs $(PKG_GTK) $(PKG_WNCK) lua)
++LIBS=-lX11 $(shell pkg-config --libs --silence-errors $(PKG_GTK) $(PKG_WNCK) lua-5.1 || pkg-config --libs $(PKG_GTK) $(PKG_WNCK) lua)
+ 
+ LOCAL_CFLAGS=$(STD_CFLAGS) $(DEPRECATED) $(CFLAGS) $(LIB_CFLAGS)
+ LOCAL_LDFLAGS=$(STD_CFLAGS) $(LDFLAGS) $(STD_LDFLAGS)
diff --git a/x11-wm/devilspie2/pkg-descr b/x11-wm/devilspie2/pkg-descr
new file mode 100644
index 000000000000..04a44d324458
--- /dev/null
+++ b/x11-wm/devilspie2/pkg-descr
@@ -0,0 +1,14 @@
+Devilspie2 is a window-matching utility, allowing the user to perform
+scripted actions on windows as they are created. For example, you can
+script a terminal program to always be positioned at a specific screen
+position, or position a window on a specific workspace.
+
+Devilspie2 is based on the program Devilspie by Ross Burton. The
+difference is that Devilspie2 has replaced the symbolic expressions of
+the original with a Lua interpreter, making it much easier to maintain
+and extend.
+
+Please note that the rules of Devilspie2 are not compatible with the
+symbolic expressions of the original Devilspie.
+
+WWW: http://www.nongnu.org/devilspie2/
diff --git a/x11-wm/devilspie2/pkg-plist b/x11-wm/devilspie2/pkg-plist
new file mode 100644
index 000000000000..89be66eb3f59
--- /dev/null
+++ b/x11-wm/devilspie2/pkg-plist
@@ -0,0 +1,10 @@
+bin/devilspie2
+share/man/man1/devilspie2.1.gz
+share/locale/fi/LC_MESSAGES/devilspie2.mo
+share/locale/fr/LC_MESSAGES/devilspie2.mo
+share/locale/it/LC_MESSAGES/devilspie2.mo
+share/locale/ja/LC_MESSAGES/devilspie2.mo
+share/locale/nl/LC_MESSAGES/devilspie2.mo
+share/locale/pt_BR/LC_MESSAGES/devilspie2.mo
+share/locale/ru/LC_MESSAGES/devilspie2.mo
+share/locale/sv/LC_MESSAGES/devilspie2.mo