summaryrefslogtreecommitdiff
path: root/x11/libXi
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2013-03-12 11:39:49 +0000
committerwiz <wiz@pkgsrc.org>2013-03-12 11:39:49 +0000
commit2d697d664e202e455f84d1619e7d9eb82924816d (patch)
treedd3e917170b9d6c3413d7341b47a8e75bbb98316 /x11/libXi
parent626153e855341c080a56284cdc061a8ee0f07787 (diff)
downloadpkgsrc-2d697d664e202e455f84d1619e7d9eb82924816d.tar.gz
redefinition of PointerBarrier.
gcc 4.6 won't complain about that, but earlier versions do: http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ce3765bf44e49ef0568a1ad4a0b7f807591d6412 gcc 4.6 with -pedantic-errors shows: /opt/xorg/include/X11/extensions/XInput2.h:172:13: error: redefinition of typedef ‘PointerBarrier’ [-pedantic] In file included from test.c:1:0: /opt/xorg/include/X11/extensions/Xfixes.h:255:13: note: previous declaration of ‘PointerBarrier’ was here PointerBarriers is defined in XFixes.h and here. So hook onto the only thing we can in Xfixes.h and use that to figure out if we need to typedef ourselves. XFIXES_MAJOR is defined in xfixeswire.h, so we can't hook onto it directly. Adding this ifdef here means we have include order dependency of XFixes.h before XInput2.h unless we add a similar ifdef to the fixes headers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> --- Nasty, but can't think of a better way atm.
Diffstat (limited to 'x11/libXi')
-rw-r--r--x11/libXi/Makefile3
-rw-r--r--x11/libXi/distinfo3
-rw-r--r--x11/libXi/patches/patch-include_X11_extensions_XInput2.h41
3 files changed, 45 insertions, 2 deletions
diff --git a/x11/libXi/Makefile b/x11/libXi/Makefile
index 6ad6316ff8e..dd9c3f89a44 100644
--- a/x11/libXi/Makefile
+++ b/x11/libXi/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2013/03/07 06:36:28 wiz Exp $
+# $NetBSD: Makefile,v 1.21 2013/03/12 11:39:49 wiz Exp $
#
DISTNAME= libXi-1.7
+PKGREVISION= 1
CATEGORIES= x11 devel
MASTER_SITES= ${MASTER_SITE_XORG:=lib/}
EXTRACT_SUFX= .tar.bz2
diff --git a/x11/libXi/distinfo b/x11/libXi/distinfo
index 18f08396ca7..4849d563d7c 100644
--- a/x11/libXi/distinfo
+++ b/x11/libXi/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.17 2013/03/07 06:36:28 wiz Exp $
+$NetBSD: distinfo,v 1.18 2013/03/12 11:39:49 wiz Exp $
SHA1 (libXi-1.7.tar.bz2) = 1c4e992094f71103660f16329b228b081f48d48c
RMD160 (libXi-1.7.tar.bz2) = 368ed28a1562dff67ebdb6e7433205e04c62c0a0
Size (libXi-1.7.tar.bz2) = 433745 bytes
+SHA1 (patch-include_X11_extensions_XInput2.h) = 6e1e5dd3aa8c4b0507aca44c8b7ae51a45cf1b69
diff --git a/x11/libXi/patches/patch-include_X11_extensions_XInput2.h b/x11/libXi/patches/patch-include_X11_extensions_XInput2.h
new file mode 100644
index 00000000000..c984b8b7a07
--- /dev/null
+++ b/x11/libXi/patches/patch-include_X11_extensions_XInput2.h
@@ -0,0 +1,41 @@
+$NetBSD: patch-include_X11_extensions_XInput2.h,v 1.1 2013/03/12 11:39:49 wiz Exp $
+
+gcc 4.6 won't complain about that, but earlier versions do:
+http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ce3765bf44e49ef0568a1ad4a0b7f807591d6412
+
+gcc 4.6 with -pedantic-errors shows:
+/opt/xorg/include/X11/extensions/XInput2.h:172:13: error: redefinition of
+typedef ‘PointerBarrier’ [-pedantic]
+In file included from test.c:1:0:
+/opt/xorg/include/X11/extensions/Xfixes.h:255:13: note: previous declaration
+of ‘PointerBarrier’ was here
+
+PointerBarriers is defined in XFixes.h and here. So hook onto the only thing
+we can in Xfixes.h and use that to figure out if we need to typedef
+ourselves. XFIXES_MAJOR is defined in xfixeswire.h, so we can't hook onto it
+directly.
+
+Adding this ifdef here means we have include order dependency of XFixes.h
+before XInput2.h unless we add a similar ifdef to the fixes headers.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+Nasty, but can't think of a better way atm.
+
+ include/X11/extensions/XInput2.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- include/X11/extensions/XInput2.h.orig 2013-02-19 01:08:17.000000000 +0000
++++ include/X11/extensions/XInput2.h
+@@ -169,7 +169,11 @@ typedef struct
+ int status;
+ } XIGrabModifiers;
+
++/* Xfixes.h typedefs PointerBarrier and gcc pre-4.6 (or with -pedantic) will
++ complain about the duplicate typedef */
++#if !defined _XFIXES_H_ || XFIXES_MAJOR < 5
+ typedef XID PointerBarrier;
++#endif
+ typedef unsigned int BarrierEventID;
+
+ typedef struct