summaryrefslogtreecommitdiff
path: root/x11/XF86Setup/patches
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-09-08 10:17:21 +0000
committeragc <agc@pkgsrc.org>1998-09-08 10:17:21 +0000
commit0a3b841df548cf29a4c64abd05446c4769a1d3d3 (patch)
tree51307bb49e36822b38550adc345db5d219b004e3 /x11/XF86Setup/patches
parent5fdbb3be78f81a0955ffb7a1659ad1e225d06b6f (diff)
downloadpkgsrc-0a3b841df548cf29a4c64abd05446c4769a1d3d3.tar.gz
Check for resolution and buttons fields in XF86MiscMouseSettings struct,
and don't try to set them if they don't exist.
Diffstat (limited to 'x11/XF86Setup/patches')
-rw-r--r--x11/XF86Setup/patches/patch-aa19
-rw-r--r--x11/XF86Setup/patches/patch-ab43
-rw-r--r--x11/XF86Setup/patches/patch-ac40
3 files changed, 101 insertions, 1 deletions
diff --git a/x11/XF86Setup/patches/patch-aa b/x11/XF86Setup/patches/patch-aa
index ef508f2598c..d340bf6bc92 100644
--- a/x11/XF86Setup/patches/patch-aa
+++ b/x11/XF86Setup/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 11:17:56 agc Exp $
+$NetBSD: patch-aa,v 1.3 1998/09/08 10:17:26 agc Exp $
--- Imakefile.orig Thu Mar 5 04:19:56 1998
+++ Imakefile Sun Jun 28 18:56:38 1998
@@ -23,3 +23,20 @@ $NetBSD: patch-aa,v 1.2 1998/08/07 11:17:56 agc Exp $
#if XF86SetupUsesStaticTk
TKLIBRARY = StaticLibrary($(TKLIBDIR),$(TKLIBNAME))
#endif
+@@ -82,7 +96,7 @@
+
+ XF86SETUPLIBDIR = $(LIBDIR)/XF86Setup
+ DEFINES = -DCARD_DATABASE_FILE='"$(CARDDBFILE)"' \
+- $(XCONFIG_DEFINES)
++ $(XCONFIG_DEFINES) `cat ./res_cpp_symbol`
+ INCLUDES = -I../os-support -I../common \
+ -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(INCLUDESRC) \
+ -I$(EXTINCSRC) $(USEINSTALLEDINC) \
+@@ -119,3 +133,7 @@
+
+ #endif
+
++depend:: res_cpp_symbol
++
++res_cpp_symbol:
++ -sh ./configure
diff --git a/x11/XF86Setup/patches/patch-ab b/x11/XF86Setup/patches/patch-ab
new file mode 100644
index 00000000000..fa8af1dd56f
--- /dev/null
+++ b/x11/XF86Setup/patches/patch-ab
@@ -0,0 +1,43 @@
+$NetBSD: patch-ab,v 1.1 1998/09/08 10:17:26 agc Exp $
+
+Compensate for older versions of the XF86MiscMouseSettings struct,
+which don't have resolution or buttons fields. Use the configure
+script, and the cpp symbol HAVE_RESOLUTION_FIELD.
+
+--- tclmisc.c 1998/09/08 09:32:45 1.1
++++ tclmisc.c 1998/09/08 09:36:57
+@@ -353,6 +353,7 @@
+ name = "Unknown";
+ else
+ name = msetable[mseinfo.type+1];
++#ifdef HAVE_RESOLUTION_FIELD
+ sprintf(tmpbuf, "%s %s %d %d %d %d %s %d %s",
+ mseinfo.device==NULL? "{}": mseinfo.device,
+ name,
+@@ -361,6 +362,15 @@
+ mseinfo.emulate3buttons? "on": "off",
+ mseinfo.emulate3timeout,
+ mseinfo.chordmiddle? "on": "off");
++#else
++ sprintf(tmpbuf, "%s %s %d %d %s %d %s",
++ mseinfo.device==NULL? "{}": mseinfo.device,
++ name,
++ mseinfo.baudrate, mseinfo.samplerate,
++ mseinfo.emulate3buttons? "on": "off",
++ mseinfo.emulate3timeout,
++ mseinfo.chordmiddle? "on": "off");
++#endif
+ if (mseinfo.flags & MF_CLEAR_DTR)
+ strcat(tmpbuf, " ClearDTR");
+ if (mseinfo.flags & MF_CLEAR_RTS)
+@@ -419,8 +429,10 @@
+ }
+ mseinfo.baudrate = atoi(argv[3]);
+ mseinfo.samplerate = atoi(argv[4]);
++#ifdef HAVE_RESOLUTION_FIELD
+ mseinfo.resolution = atoi(argv[5]);
+ mseinfo.buttons = atoi(argv[6]);
++#endif
+ if (!StrCaseCmp(argv[7], "on"))
+ mseinfo.emulate3buttons = 1;
+ else if (!StrCaseCmp(argv[7], "off"))
diff --git a/x11/XF86Setup/patches/patch-ac b/x11/XF86Setup/patches/patch-ac
new file mode 100644
index 00000000000..44c797916fe
--- /dev/null
+++ b/x11/XF86Setup/patches/patch-ac
@@ -0,0 +1,40 @@
+$NetBSD: patch-ac,v 1.1 1998/09/08 10:17:26 agc Exp $
+
+Introduce a configure script which produces a file called
+res_cpp_symbol, containing either a definition or "undefinition" of
+HAVE_RESOLUTION_FIELD
+
+--- /dev/null Tue Sep 8 10:40:44 1998
++++ configure Tue Sep 8 10:27:51 1998
+@@ -0,0 +1,31 @@
++#! /bin/sh
++
++
++cat > config.c << EOF
++#include <X11/Intrinsic.h>
++#include <X11/Xmd.h>
++#include <X11/extensions/xf86misc.h>
++
++int
++main(int argc, char **argv)
++{
++ XF86MiscMouseSettings mouse;
++
++ mouse.resolution = 400;
++ mouse.buttons = 3;
++ exit(0);
++}
++EOF
++
++ex=1
++cc -g config.c 2>/dev/null
++case $? in
++0)
++ echo "-DHAVE_RESOLUTION_FIELD=1" > ./res_cpp_symbol
++ ex=0 ;;
++*) echo "-UHAVE_RESOLUTION_FIELD" > ./res_cpp_symbol ;;
++esac
++
++rm -f config.c config.o a.out
++
++exit $ex