diff options
author | Vlad Glagolev | 2016-08-29 22:03:17 -0400 |
---|---|---|
committer | Vlad Glagolev | 2016-08-29 22:03:17 -0400 |
commit | 3fadc8413579b21272f80ea5817f5958166b350d (patch) | |
tree | e6cc4ef9238113945831971d02ea05bd948a2d97 /wm-addons | |
parent | b1e673e2e2ba6a91240327e4f8b247d60e8bc360 (diff) |
wmctrl: fixed for x86_64 arch
Diffstat (limited to 'wm-addons')
-rwxr-xr-x | wm-addons/wmctrl/DETAILS | 1 | ||||
-rw-r--r-- | wm-addons/wmctrl/HISTORY | 4 | ||||
-rwxr-xr-x | wm-addons/wmctrl/PRE_BUILD | 4 | ||||
-rw-r--r-- | wm-addons/wmctrl/amd64-Xlib.patch | 28 |
4 files changed, 37 insertions, 0 deletions
diff --git a/wm-addons/wmctrl/DETAILS b/wm-addons/wmctrl/DETAILS index 0a33b00788..48effc48b3 100755 --- a/wm-addons/wmctrl/DETAILS +++ b/wm-addons/wmctrl/DETAILS @@ -1,5 +1,6 @@ SPELL=wmctrl VERSION=1.07 + PATCHLEVEL=1 SOURCE=${SPELL}-${VERSION}.tar.gz SOURCE_DIRECTORY=${BUILD_DIRECTORY}/${SPELL}-${VERSION} SOURCE_URL[0]=http://sweb.cz/tripie/utils/${SPELL}/dist/${SOURCE} diff --git a/wm-addons/wmctrl/HISTORY b/wm-addons/wmctrl/HISTORY index 96ed83b8ac..345539c9c3 100644 --- a/wm-addons/wmctrl/HISTORY +++ b/wm-addons/wmctrl/HISTORY @@ -1,5 +1,9 @@ 2016-08-29 Vlad Glagolev <stealth@sourcemage.org> + * DETAILS: PATCHLEVEL=1 * DEPENDS: killed xorg-libs + * PRE_BUILD: added, to apply patch + * amd64-Xlib.patch: added, backported from Gentoo, to correct 64 + architecture implementation of 32 bit data 2011-10-14 Bor Kraljič <pyrobor@ver.si> * DETAILS: fixed long description wrap (scripted) diff --git a/wm-addons/wmctrl/PRE_BUILD b/wm-addons/wmctrl/PRE_BUILD new file mode 100755 index 0000000000..91a78c7e13 --- /dev/null +++ b/wm-addons/wmctrl/PRE_BUILD @@ -0,0 +1,4 @@ +default_pre_build && +cd "$SOURCE_DIRECTORY" && + +patch -p1 < "$SPELL_DIRECTORY/amd64-Xlib.patch" diff --git a/wm-addons/wmctrl/amd64-Xlib.patch b/wm-addons/wmctrl/amd64-Xlib.patch new file mode 100644 index 0000000000..a1039a8250 --- /dev/null +++ b/wm-addons/wmctrl/amd64-Xlib.patch @@ -0,0 +1,28 @@ +--- wmctrl-1.07.orig/main.c ++++ wmctrl-1.07/main.c +@@ -1425,6 +1425,16 @@ + * + * long_length = Specifies the length in 32-bit multiples of the + * data to be retrieved. ++ * ++ * NOTE: see ++ * http://mail.gnome.org/archives/wm-spec-list/2003-March/msg00067.html ++ * In particular: ++ * ++ * When the X window system was ported to 64-bit architectures, a ++ * rather peculiar design decision was made. 32-bit quantities such ++ * as Window IDs, atoms, etc, were kept as longs in the client side ++ * APIs, even when long was changed to 64 bits. ++ * + */ + if (XGetWindowProperty(disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False, + xa_prop_type, &xa_ret_type, &ret_format, +@@ -1441,6 +1451,8 @@ + + /* null terminate the result to make string handling easier */ + tmp_size = (ret_format / 8) * ret_nitems; ++ /* Correct 64 Architecture implementation of 32 bit data */ ++ if(ret_format==32) tmp_size *= sizeof(long)/4; + ret = g_malloc(tmp_size + 1); + memcpy(ret, ret_prop, tmp_size); + ret[tmp_size] = '\0'; |