aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2010-08-07 21:58:15 +0800
committernaddy <naddy@FreeBSD.org>2010-08-07 21:58:15 +0800
commitf437b4b32c7287293df091ef4ebff55f43c08197 (patch)
treee6b1232093175a6257e112807e839a71eecc2ba3 /x11-wm
parente1e00dd3ffc9e02445357e7b6547dbfa6d6784fe (diff)
downloadfreebsd-ports-gnome-f437b4b32c7287293df091ef4ebff55f43c08197.tar.gz
freebsd-ports-gnome-f437b4b32c7287293df091ef4ebff55f43c08197.tar.zst
freebsd-ports-gnome-f437b4b32c7287293df091ef4ebff55f43c08197.zip
(1) LP64 fix: XGetWindowProperty() passes 32-bit values in long ints.
(2) Remove pkg-message, which isn't needed any longer. Submitted by: A.J.Caines@halplant.com (maintainer) (2) Approved by: A.J.Caines@halplant.com (maintainer) (1)
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/bbkeys/Makefile2
-rw-r--r--x11-wm/bbkeys/files/patch-src_Netclient.cpp45
-rw-r--r--x11-wm/bbkeys/pkg-message7
3 files changed, 46 insertions, 8 deletions
diff --git a/x11-wm/bbkeys/Makefile b/x11-wm/bbkeys/Makefile
index abecfeb6570a..1f457627a648 100644
--- a/x11-wm/bbkeys/Makefile
+++ b/x11-wm/bbkeys/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bbkeys
PORTVERSION= 0.9.1
+PORTREVISION= 1
CATEGORIES= x11-wm
MASTER_SITES= SF
@@ -38,6 +39,5 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}/
.endfor
.endif
- @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/x11-wm/bbkeys/files/patch-src_Netclient.cpp b/x11-wm/bbkeys/files/patch-src_Netclient.cpp
new file mode 100644
index 000000000000..1aea8e54b8e9
--- /dev/null
+++ b/x11-wm/bbkeys/files/patch-src_Netclient.cpp
@@ -0,0 +1,45 @@
+--- src/Netclient.cpp.orig
++++ src/Netclient.cpp
+@@ -141,6 +141,7 @@
+ int result;
+ unsigned long maxread = nelements;
+ bool ret = False;
++ int bsize;
+
+ // try get the first element
+ result = XGetWindowProperty(_display.XDisplay(), win, atom, 0l, 1l, False,
+@@ -149,18 +150,19 @@
+ ret = (result == Success && ret_type == type && ret_size == size &&
+ nelements > 0);
+ if (ret) {
++ bsize = (size == 32) ? sizeof(long) : size/8;
+ if (ret_bytes == 0 || maxread <= nelements) {
+ // we got the whole property's value
+- *value = new unsigned char[nelements * size/8 + 1];
+- memcpy(*value, c_val, nelements * size/8 + 1);
++ *value = new unsigned char[nelements * bsize + 1];
++ memcpy(*value, c_val, nelements * bsize + 1);
+ } else {
+ // get the entire property since it is larger than one long
+ XFree(c_val);
+ // the number of longs that need to be retreived to get the property's
+ // entire value. The last + 1 is the first long that we retrieved above.
+ int remain = (ret_bytes - 1)/sizeof(long) + 1 + 1;
+- if (remain > size/8 * (signed)maxread) // dont get more than the max
+- remain = size/8 * (signed)maxread;
++ if (remain > bsize * (signed)maxread) // dont get more than the max
++ remain = bsize * (signed)maxread;
+ result = XGetWindowProperty(_display.XDisplay(), win, atom, 0l, remain, False, type,
+ &ret_type, &ret_size, &nelements, &ret_bytes,
+ &c_val);
+@@ -174,8 +176,8 @@
+ if (! ret)
+ return getValue(win, atom, type, maxread, value, size);
+
+- *value = new unsigned char[nelements * size/8 + 1];
+- memcpy(*value, c_val, nelements * size/8 + 1);
++ *value = new unsigned char[nelements * bsize + 1];
++ memcpy(*value, c_val, nelements * bsize + 1);
+ }
+ }
+ if (c_val) XFree(c_val);
diff --git a/x11-wm/bbkeys/pkg-message b/x11-wm/bbkeys/pkg-message
deleted file mode 100644
index 9ef1bcb04775..000000000000
--- a/x11-wm/bbkeys/pkg-message
+++ /dev/null
@@ -1,7 +0,0 @@
-********************************************************************************
-* This version of bbkeys includes various changes in features, behaviour and *
-* configuration. See the README for details of the changes. *
-* *
-* You can create a new bbkeys configuration by copying some or all of bbkeysrc *
-* to your ~/.bbkeysrc file. The new sytax resembles the blackbox menu config. *
-********************************************************************************