diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-03-18 19:33:44 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2012-03-18 19:33:44 +0000 |
commit | 2133d2da62807190c6df7ca8cb6b9cdeeef264d5 (patch) | |
tree | 92ef808d9988914929268ba4469e1bf95a3180a8 /x11-drivers/xf86-input-synaptics | |
parent | alpha/ia64/s390/sh/sparc stable wrt #404777 (diff) | |
download | gentoo-2-2133d2da62807190c6df7ca8cb6b9cdeeef264d5.tar.gz gentoo-2-2133d2da62807190c6df7ca8cb6b9cdeeef264d5.tar.bz2 gentoo-2-2133d2da62807190c6df7ca8cb6b9cdeeef264d5.zip |
Fix building against xorg-server-1.12.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'x11-drivers/xf86-input-synaptics')
5 files changed, 374 insertions, 3 deletions
diff --git a/x11-drivers/xf86-input-synaptics/ChangeLog b/x11-drivers/xf86-input-synaptics/ChangeLog index 56984c89d81b..98ffab42f03b 100644 --- a/x11-drivers/xf86-input-synaptics/ChangeLog +++ b/x11-drivers/xf86-input-synaptics/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for x11-drivers/xf86-input-synaptics # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-input-synaptics/ChangeLog,v 1.66 2012/03/18 17:08:05 chithanh Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-input-synaptics/ChangeLog,v 1.67 2012/03/18 19:33:44 chithanh Exp $ + + 18 Mar 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> + +files/xf86-input-synaptics-1.5.0-abi-lt14.patch, + +files/xf86-input-synaptics-1.5.0-xf86optionrec.patch, + +files/xf86-input-synaptics-1.5.0-xf86setstroption.patch, + xf86-input-synaptics-1.5.0.ebuild: + Fix building against xorg-server-1.12. 18 Mar 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> xf86-input-synaptics-1.5.99.901.ebuild: diff --git a/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-abi-lt14.patch b/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-abi-lt14.patch new file mode 100644 index 000000000000..08808f7875e4 --- /dev/null +++ b/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-abi-lt14.patch @@ -0,0 +1,27 @@ +From c861d4568c2c6cc56db8e683a8d7035bef711262 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue, 03 Jan 2012 01:03:14 +0000 +Subject: test: fix build error introduced in 9f9b55ab55ed5 + +Bad search/replace, ended up in two xf86SetStrOption declarations which +differed on ABIs < 14. + +Fixes https://bugs.freedesktop.org/show_bug.cgi?id=44335 + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +Reviewed-by: Chase Douglas <chase.douglas@canonical.com> +--- +diff --git a/test/fake-symbols.h b/test/fake-symbols.h +index a297d28..1fa1716 100644 +--- a/test/fake-symbols.h ++++ b/test/fake-symbols.h +@@ -25,7 +25,6 @@ extern char* xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); + + + extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt); +-extern _X_EXPORT char *xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt); + extern int xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt); + extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val); + extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name); +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-xf86optionrec.patch b/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-xf86optionrec.patch new file mode 100644 index 000000000000..fdd2733505c5 --- /dev/null +++ b/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-xf86optionrec.patch @@ -0,0 +1,262 @@ +From a15af628154ac37f24896a30614f3be6ecdb65c4 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed, 12 Oct 2011 01:20:06 +0000 +Subject: test: wrap ABI 14 xf86OptionRec type changes + +ABI 13 still uses pointer as type for most option calls, ABI 14 uses the +proper type now. Wrap this so we can build against both versions. + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +--- +diff --git a/test/fake-symbols.c b/test/fake-symbols.c +index 71c3bc5..a312aa0 100644 +--- a/test/fake-symbols.c ++++ b/test/fake-symbols.c +@@ -26,7 +26,7 @@ xf86WaitForInput (int fd, int timeout) + } + + _X_EXPORT int +-xf86OpenSerial (pointer options) ++xf86OpenSerial (OPTTYPE options) + { + return 0; + } +@@ -37,43 +37,43 @@ xf86SetSerialSpeed (int fd, int speed) + return 0; + } + +-_X_EXPORT pointer +-xf86ReplaceIntOption(pointer optlist, const char *name, const int val) ++_X_EXPORT OPTTYPE ++xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val) + { + return NULL; + } + + _X_EXPORT char * +-xf86SetStrOption(pointer optlist, const char *name, char *deflt) ++xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt) + { + return NULL; + } + + _X_EXPORT int +-xf86SetBoolOption(pointer optlist, const char *name, int deflt) ++xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt) + { + return 0; + } + +-_X_EXPORT pointer +-xf86AddNewOption(pointer head, const char *name, const char *val) ++_X_EXPORT OPTTYPE ++xf86AddNewOption(OPTTYPE head, const char *name, const char *val) + { + return NULL; + } + _X_EXPORT char * +-xf86FindOptionValue(pointer options, const char *name) ++xf86FindOptionValue(OPTTYPE options, const char *name) + { + return NULL; + } + + _X_EXPORT char * +-xf86OptionName(pointer opt) ++xf86OptionName(OPTTYPE opt) + { + return NULL; + } + + _X_EXPORT char * +-xf86OptionValue(pointer opt) ++xf86OptionValue(OPTTYPE opt) + { + return NULL; + } +@@ -85,7 +85,7 @@ xf86NameCmp(const char *s1, const char *s2) + } + + _X_EXPORT char * +-xf86CheckStrOption(pointer optlist, const char *name, char *deflt) ++xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt) + { + return NULL; + } +@@ -196,8 +196,8 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) + return; + } + +-_X_EXPORT pointer +-xf86OptionListDuplicate(pointer options) ++_X_EXPORT OPTTYPE ++xf86OptionListDuplicate(OPTTYPE options) + { + return NULL; + } +@@ -225,7 +225,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, + } + + _X_EXPORT int +-xf86SetIntOption(pointer optlist, const char *name, int deflt) ++xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt) + { + return 0; + } +@@ -254,7 +254,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) + _X_EXPORT int + XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, + int format, int mode, unsigned long len, +- pointer value, Bool sendevent) ++ OPTTYPE value, Bool sendevent) + { + return 0; + } +@@ -367,15 +367,15 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, + } + + +-_X_EXPORT pointer +-xf86ReplaceStrOption(pointer optlist, const char *name, const char* val) ++_X_EXPORT OPTTYPE ++xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char* val) + { + return NULL; + } + + +-_X_EXPORT pointer +-xf86NextOption(pointer list) ++_X_EXPORT OPTTYPE ++xf86NextOption(OPTTYPE list) + { + return NULL; + } +@@ -424,14 +424,14 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev) + + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + void +-xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer list) ++xf86ProcessCommonOptions(InputInfoPtr pInfo, OPTTYPE list) + { + } + + void + xf86CollectInputOptions(InputInfoPtr pInfo, + const char **defaultOpts, +- pointer extraOpts) ++ OPTTYPE extraOpts) + { + } + +diff --git a/test/fake-symbols.h b/test/fake-symbols.h +index dfe1355..7c74f7a 100644 +--- a/test/fake-symbols.h ++++ b/test/fake-symbols.h +@@ -1,29 +1,35 @@ + #include <xorg-server.h> + #include <xf86Xinput.h> + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 ++#define OPTTYPE XF86OptionPtr ++#else ++#define OPTTYPE pointer ++#endif ++ + extern int xf86ReadSerial (int fd, void *buf, int count); + extern int xf86WriteSerial (int fd, const void *buf, int count); + extern int xf86CloseSerial (int fd); + extern int xf86WaitForInput (int fd, int timeout); +-extern int xf86OpenSerial (pointer options); ++extern int xf86OpenSerial (OPTTYPE options); + extern int xf86SetSerialSpeed (int fd, int speed); + +-extern pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); +-extern pointer xf86AddNewOption(pointer head, const char *name, const char *val); +-extern char* xf86OptionName(pointer opt); +-extern char* xf86FindOptionValue(pointer options, const char *name); ++extern OPTTYPE xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val); ++extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val); ++extern char* xf86OptionName(OPTTYPE opt); ++extern char* xf86FindOptionValue(OPTTYPE options, const char *name); + extern int xf86NameCmp(const char *s1, const char *s2); +-extern char* xf86CheckStrOption(pointer optlist, const char *name, char *deflt); ++extern char* xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); + + +-extern char * xf86SetStrOption(pointer optlist, const char *name, char *deflt); +-extern int xf86SetBoolOption(pointer optlist, const char *name, int deflt); +-extern pointer xf86AddNewOption(pointer head, const char *name, const char *val); +-extern char* xf86FindOptionValue(pointer options, const char *name); +-extern char* xf86OptionName(pointer opt); +-extern char *xf86OptionValue(pointer opt); ++extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt); ++extern int xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt); ++extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val); ++extern char* xf86FindOptionValue(OPTTYPE options, const char *name); ++extern char* xf86OptionName(OPTTYPE opt); ++extern char *xf86OptionValue(OPTTYPE opt); + extern int xf86NameCmp(const char *s1, const char *s2); +-extern char * xf86CheckStrOption(pointer optlist, const char *name, char *deflt); ++extern char * xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); + extern void xf86AddEnabledDevice(InputInfoPtr pInfo); + extern void xf86RemoveEnabledDevice(InputInfoPtr pInfo); + extern Atom XIGetKnownProperty(char *name); +@@ -53,7 +59,7 @@ XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable); + + extern InputInfoPtr xf86FirstLocalDevice(void); + extern void xf86DeleteInput(InputInfoPtr pInp, int flags); +-extern pointer xf86OptionListDuplicate(pointer options); ++extern OPTTYPE xf86OptionListDuplicate(OPTTYPE options); + extern Bool + InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels, + CARD8 *map); +@@ -65,7 +71,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, + unsigned int key_code, + int is_down); + extern int +-xf86SetIntOption(pointer optlist, const char *name, int deflt); ++xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt); + extern void + xf86PostButtonEventP(DeviceIntPtr device, + int is_absolute, +@@ -83,7 +89,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc); + extern int + XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, + int format, int mode, unsigned long len, +- pointer value, Bool sendevent); ++ OPTTYPE value, Bool sendevent); + extern CARD32 GetTimeInMillis (void); + + extern int +@@ -132,10 +138,10 @@ extern Bool + InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, + int numMotionEvents, int mode); + +-extern pointer +-xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); ++extern OPTTYPE ++xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char* val); + +-extern pointer xf86NextOption(pointer list); ++extern OPTTYPE xf86NextOption(OPTTYPE list); + + extern int + XIGetDeviceProperty (DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value); +@@ -159,12 +165,12 @@ extern Bool InitFocusClassDeviceStruct(DeviceIntPtr dev); + + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + extern void +-xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer list); ++xf86ProcessCommonOptions(InputInfoPtr pInfo, OPTTYPE list); + + extern void + xf86CollectInputOptions(InputInfoPtr pInfo, + const char **defaultOpts, +- pointer extraOpts); ++ OPTTYPE extraOpts); + + extern InputInfoPtr + xf86AllocateInput(InputDriverPtr drv, int flags); +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-xf86setstroption.patch b/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-xf86setstroption.patch new file mode 100644 index 000000000000..06a3d1124a54 --- /dev/null +++ b/x11-drivers/xf86-input-synaptics/files/xf86-input-synaptics-1.5.0-xf86setstroption.patch @@ -0,0 +1,69 @@ +From 9f9b55ab55ed5251c1607c59d8817231d076d82c Mon Sep 17 00:00:00 2001 +From: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon, 12 Dec 2011 01:35:37 +0000 +Subject: test: fix build errors introduced by upstream server change + +Introduced by upstream change xorg-server-1.11.99.1-33-g09e4b78, + Fix gcc -Wwrite-strings warnings in xf86 ddx + +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +--- +diff --git a/test/fake-symbols.c b/test/fake-symbols.c +index a312aa0..2d94622 100644 +--- a/test/fake-symbols.c ++++ b/test/fake-symbols.c +@@ -44,7 +44,7 @@ xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val) + } + + _X_EXPORT char * +-xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt) ++xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt) + { + return NULL; + } +@@ -60,7 +60,7 @@ xf86AddNewOption(OPTTYPE head, const char *name, const char *val) + { + return NULL; + } +-_X_EXPORT char * ++_X_EXPORT CONST char * + xf86FindOptionValue(OPTTYPE options, const char *name) + { + return NULL; +diff --git a/test/fake-symbols.h b/test/fake-symbols.h +index 7c74f7a..a297d28 100644 +--- a/test/fake-symbols.h ++++ b/test/fake-symbols.h +@@ -3,8 +3,10 @@ + + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 + #define OPTTYPE XF86OptionPtr ++#define CONST const + #else + #define OPTTYPE pointer ++#define CONST + #endif + + extern int xf86ReadSerial (int fd, void *buf, int count); +@@ -17,15 +19,16 @@ extern int xf86SetSerialSpeed (int fd, int speed); + extern OPTTYPE xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val); + extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val); + extern char* xf86OptionName(OPTTYPE opt); +-extern char* xf86FindOptionValue(OPTTYPE options, const char *name); ++extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name); + extern int xf86NameCmp(const char *s1, const char *s2); + extern char* xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); + + +-extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt); ++extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt); ++extern _X_EXPORT char *xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt); + extern int xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt); + extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val); +-extern char* xf86FindOptionValue(OPTTYPE options, const char *name); ++extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name); + extern char* xf86OptionName(OPTTYPE opt); + extern char *xf86OptionValue(OPTTYPE opt); + extern int xf86NameCmp(const char *s1, const char *s2); +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-drivers/xf86-input-synaptics/xf86-input-synaptics-1.5.0.ebuild b/x11-drivers/xf86-input-synaptics/xf86-input-synaptics-1.5.0.ebuild index 3d535d081600..7a8e943548f4 100644 --- a/x11-drivers/xf86-input-synaptics/xf86-input-synaptics-1.5.0.ebuild +++ b/x11-drivers/xf86-input-synaptics/xf86-input-synaptics-1.5.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-input-synaptics/xf86-input-synaptics-1.5.0.ebuild,v 1.1 2011/11/16 21:31:05 chithanh Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-input-synaptics/xf86-input-synaptics-1.5.0.ebuild,v 1.2 2012/03/18 19:33:44 chithanh Exp $ EAPI=4 @@ -34,3 +34,9 @@ pkg_pretend() { echo fi } + +PATCHES=( + "${FILESDIR}"/${PN}-1.5.0-xf86optionrec.patch + "${FILESDIR}"/${PN}-1.5.0-xf86setstroption.patch + "${FILESDIR}"/${PN}-1.5.0-abi-lt14.patch +) |