summaryrefslogtreecommitdiff
path: root/x11/libX11
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-01-20 09:42:55 +0000
committernia <nia@pkgsrc.org>2021-01-20 09:42:55 +0000
commit1a52a1cf150047c270fb2f2c36e66d4ffd6af66d (patch)
treed6a1004c6b5d651e53ec9b1de0fe767ab33565fd /x11/libX11
parent6ef436be83b0764db55566d0a3486ad4671c654f (diff)
downloadpkgsrc-1a52a1cf150047c270fb2f2c36e66d4ffd6af66d.tar.gz
libX11: fix building with older gcc versions
Diffstat (limited to 'x11/libX11')
-rw-r--r--x11/libX11/distinfo3
-rw-r--r--x11/libX11/patches/patch-src_xkb_XKBBind.c49
2 files changed, 51 insertions, 1 deletions
diff --git a/x11/libX11/distinfo b/x11/libX11/distinfo
index a360454ddeb..fc1513d66e2 100644
--- a/x11/libX11/distinfo
+++ b/x11/libX11/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.35 2020/11/20 20:42:53 wiz Exp $
+$NetBSD: distinfo,v 1.36 2021/01/20 09:42:55 nia Exp $
SHA1 (libX11-1.7.0.tar.bz2) = 48fd27a11572a7d3c1014368e1dc9f40a7b23e7d
RMD160 (libX11-1.7.0.tar.bz2) = a3df61054babc200de47e0d5dc416461f64f8981
@@ -7,3 +7,4 @@ Size (libX11-1.7.0.tar.bz2) = 2409144 bytes
SHA1 (patch-Makefile.in) = a38502ac45908a4a8d57de42e301894a2e9f8a15
SHA1 (patch-aa) = 4f502264e7200fd2f9409d8684c53de3bc6f0649
SHA1 (patch-ac) = 565aa2a636b5c50f67cbd11e7c2adcac8d55418e
+SHA1 (patch-src_xkb_XKBBind.c) = 3ad94bd3265c3c4a85bcf3e2da0782c16fd461d1
diff --git a/x11/libX11/patches/patch-src_xkb_XKBBind.c b/x11/libX11/patches/patch-src_xkb_XKBBind.c
new file mode 100644
index 00000000000..797be591165
--- /dev/null
+++ b/x11/libX11/patches/patch-src_xkb_XKBBind.c
@@ -0,0 +1,49 @@
+$NetBSD: patch-src_xkb_XKBBind.c,v 1.1 2021/01/20 09:42:55 nia Exp $
+
+Don't use pragma inside a function, it breaks compiling with older
+GCCs.
+
+XKBBind.c:230: error: #pragma GCC diagnostic not allowed inside functions
+
+--- src/xkb/XKBBind.c.orig 2020-11-20 19:08:11.000000000 +0000
++++ src/xkb/XKBBind.c
+@@ -214,6 +214,14 @@ XkbKeysymToModifiers(Display *dpy, KeySy
+ return mods;
+ }
+
++#ifdef __clang__
++#pragma clang diagnostic push
++#pragma clang diagnostic ignored "-Wdeprecated-declarations"
++#elif defined(__GNUC__)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
++#endif
++
+ KeySym
+ XLookupKeysym(register XKeyEvent * event, int col)
+ {
+@@ -223,22 +231,15 @@ XLookupKeysym(register XKeyEvent * event
+ return _XLookupKeysym(event, col);
+ _XkbCheckPendingRefresh(dpy, dpy->xkb_info);
+
+-#ifdef __clang__
+-#pragma clang diagnostic push
+-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+-#elif defined(__GNUC__)
+-#pragma GCC diagnostic push
+-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+-#endif
+ return XKeycodeToKeysym(dpy, event->keycode, col);
++}
++
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #elif defined(__GNUC__)
+ #pragma GCC diagnostic pop
+ #endif
+
+-}
+-
+ /*
+ * Not a public entry point -- XkbTranslateKey is an obsolete name
+ * that is preserved here so that functions linked against the old