summaryrefslogtreecommitdiffstats
path: root/wm-addons
diff options
context:
space:
mode:
authorVlad Glagolev2022-04-04 06:31:54 +0000
committerVlad Glagolev2022-04-04 06:31:54 +0000
commitaf8b9499077ad6d01d8e678c2508fcac45ea93c7 (patch)
tree4ad4594d00d7ee262149c31c09668ae0bbc2e13f /wm-addons
parent5a6ba9e9885c3140fec8d8d1faf8921410587bce (diff)
devilspie2: new spell, window matching utility, based on original devilspie
Diffstat (limited to 'wm-addons')
-rwxr-xr-xwm-addons/devilspie2/BUILD1
-rwxr-xr-xwm-addons/devilspie2/CONFIGURE3
-rwxr-xr-xwm-addons/devilspie2/DEPENDS17
-rwxr-xr-xwm-addons/devilspie2/DETAILS26
-rw-r--r--wm-addons/devilspie2/HISTORY3
-rwxr-xr-xwm-addons/devilspie2/INSTALL1
-rwxr-xr-xwm-addons/devilspie2/PRE_BUILD6
-rw-r--r--wm-addons/devilspie2/devilspie2.gpgbin0 -> 3349 bytes
-rw-r--r--wm-addons/devilspie2/gcc46.patch70
9 files changed, 127 insertions, 0 deletions
diff --git a/wm-addons/devilspie2/BUILD b/wm-addons/devilspie2/BUILD
new file mode 100755
index 0000000000..f25028ece3
--- /dev/null
+++ b/wm-addons/devilspie2/BUILD
@@ -0,0 +1 @@
+make PREFIX="${INSTALL_ROOT}/usr" ${OPTS}
diff --git a/wm-addons/devilspie2/CONFIGURE b/wm-addons/devilspie2/CONFIGURE
new file mode 100755
index 0000000000..ef4f0bef68
--- /dev/null
+++ b/wm-addons/devilspie2/CONFIGURE
@@ -0,0 +1,3 @@
+config_query_list DEVILSPIE2_GTK "Which GTK+ version to build against?" \
+ gtk+3 \
+ gtk+2
diff --git a/wm-addons/devilspie2/DEPENDS b/wm-addons/devilspie2/DEPENDS
new file mode 100755
index 0000000000..ad660ddc4b
--- /dev/null
+++ b/wm-addons/devilspie2/DEPENDS
@@ -0,0 +1,17 @@
+depends libx11 &&
+depends libxinerama &&
+depends lua &&
+depends gettext &&
+depends pkgconfig &&
+depends glib2 &&
+
+case $DEVILSPIE2_GTK in
+ gtk+2)
+ depends gtk+2 "GTK2=on" &&
+ depends libwnck
+ ;;
+ gtk+3)
+ depends gtk+3 &&
+ depends libwnck3
+ ;;
+esac
diff --git a/wm-addons/devilspie2/DETAILS b/wm-addons/devilspie2/DETAILS
new file mode 100755
index 0000000000..d37bc1913c
--- /dev/null
+++ b/wm-addons/devilspie2/DETAILS
@@ -0,0 +1,26 @@
+ SPELL=devilspie2
+ VERSION=0.44
+ SOURCE=${SPELL}-${VERSION}.tar.xz
+ SOURCE2=${SOURCE}.sig
+ SOURCE_URL[0]=http://download.savannah.nongnu.org/releases/${SPELL}/${SOURCE}
+ SOURCE2_URL[0]=${SOURCE_URL[0]}.sig
+ SOURCE_GPG=devilspie2.gpg:${SOURCE2}:UPSTREAM_KEY
+ SOURCE2_IGNORE=signature
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+ WEB_SITE=https://www.nongnu.org/devilspie2/
+ LICENSE[0]=GPL
+ ENTERED=20220403
+ SHORT="window matching utility, based on original devilspie"
+cat << EOF
+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.
+EOF
diff --git a/wm-addons/devilspie2/HISTORY b/wm-addons/devilspie2/HISTORY
new file mode 100644
index 0000000000..dd624fb209
--- /dev/null
+++ b/wm-addons/devilspie2/HISTORY
@@ -0,0 +1,3 @@
+2022-04-03 Vlad Glagolev <stealth@sourcemage.org>
+ * DEPENDS, DETAILS, {PRE_,}BUILD, CONFIGURE, INSTALL, devilspie2.gpg,
+ gcc46.patch: created spell, version 0.44
diff --git a/wm-addons/devilspie2/INSTALL b/wm-addons/devilspie2/INSTALL
new file mode 100755
index 0000000000..06233f4815
--- /dev/null
+++ b/wm-addons/devilspie2/INSTALL
@@ -0,0 +1 @@
+make PREFIX="${INSTALL_ROOT}/usr" ${OPTS} install
diff --git a/wm-addons/devilspie2/PRE_BUILD b/wm-addons/devilspie2/PRE_BUILD
new file mode 100755
index 0000000000..04dc7a8699
--- /dev/null
+++ b/wm-addons/devilspie2/PRE_BUILD
@@ -0,0 +1,6 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+if spell_ok gcc && is_version_less $(installed_version gcc) 4.8; then
+ patch -p0 < "${SPELL_DIRECTORY}/gcc46.patch"
+fi
diff --git a/wm-addons/devilspie2/devilspie2.gpg b/wm-addons/devilspie2/devilspie2.gpg
new file mode 100644
index 0000000000..e01d7f51c6
--- /dev/null
+++ b/wm-addons/devilspie2/devilspie2.gpg
Binary files differ
diff --git a/wm-addons/devilspie2/gcc46.patch b/wm-addons/devilspie2/gcc46.patch
new file mode 100644
index 0000000000..d606bde690
--- /dev/null
+++ b/wm-addons/devilspie2/gcc46.patch
@@ -0,0 +1,70 @@
+--- src/script_functions.c.orig 2022-01-29 11:26:21.000000000 -0800
++++ src/script_functions.c 2022-04-03 23:17:14.783898389 -0700
+@@ -19,6 +19,7 @@
+ */
+ #include <stdlib.h>
+ #include <sys/types.h>
++#include <errno.h>
+
+ #define WNCK_I_KNOW_THIS_IS_UNSTABLE
+ #include <libwnck/libwnck.h>
+@@ -374,7 +375,8 @@
+ #else
+ int32_t struts[12] = {};
+ #endif
+- for (int i = 0; i < top; i++) {
++ int i;
++ for (i = 0; i < top; i++) {
+ struts[i] = lua_tonumber(lua, i + 1);
+ }
+
+@@ -489,7 +491,8 @@
+ int n = lua_gettop(lua); /* number of arguments */
+ lua_getglobal(lua, "tostring");
+
+- for (int i = 1; i <= n; i++) {
++ int i;
++ for (i = 1; i <= n; i++) {
+ lua_pushvalue(lua, -1); /* function to be called */
+ lua_pushvalue(lua, i); /* value to print */
+ lua_call(lua, 1, 1);
+@@ -1792,7 +1795,8 @@
+ int monitor_no = MONITOR_ALL;
+ enum { CENTRE_NONE, CENTRE_H, CENTRE_V, CENTRE_HV } centre = CENTRE_HV;
+
+- for (int i = 1; i <= top; ++i) {
++ int i;
++ for (i = 1; i <= top; ++i) {
+ int type = lua_type(lua, i);
+ gchar *indata;
+
+--- src/xutils.c.orig 2022-01-29 11:26:21.000000000 -0800
++++ src/xutils.c 2022-04-03 23:20:56.640986813 -0700
+@@ -24,6 +24,7 @@
+ #include <gdk/gdkx.h>
+ #include <X11/Xlib.h>
+ #include <string.h>
++#include <sys/types.h>
+
+ // FIXME: retrieve screen position via wnck
+ #include <X11/extensions/Xinerama.h>
+@@ -622,7 +623,8 @@
+
+ GdkPoint centre = { window_r.x + window_r.width / 2, window_r.y + window_r.height / 2 };
+
+- for (int i = 0; i < monitor_count; ++i) {
++ int i;
++ for (i = 0; i < monitor_count; ++i) {
+ if (centre.x >= monitor_list[i].x_org &&
+ centre.x < monitor_list[i].x_org + monitor_list[i].width &&
+ centre.y >= monitor_list[i].y_org &&
+@@ -636,7 +638,8 @@
+ // just use the first matching
+ // FIXME?: should find whichever shows most of the window (if tied, closest to window centre)
+ if (id < 0) {
+- for (int i = 0; i < monitor_count; ++i) {
++ int i;
++ for (i = 0; i < monitor_count; ++i) {
+ GdkRectangle r = {
+ monitor_list[i].x_org, monitor_list[i].y_org,
+ monitor_list[i].x_org + monitor_list[i].width,