aboutsummaryrefslogtreecommitdiff
path: root/x11-servers
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2000-06-22 13:19:33 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2000-06-22 13:19:33 +0000
commitc554962384f17b2c3ea27ca0bf0433b7e90abf73 (patch)
treea8ec48453127e6d094b03df425a480d25224a95f /x11-servers
parent002f34aa9bf83e4f0e0a8b96d7bbafad4054af01 (diff)
downloadports-c554962384f17b2c3ea27ca0bf0433b7e90abf73.tar.gz
ports-c554962384f17b2c3ea27ca0bf0433b7e90abf73.zip
Notes
Diffstat (limited to 'x11-servers')
-rw-r--r--x11-servers/XttXF86srv-common/Makefile13
-rw-r--r--x11-servers/XttXF86srv-common/distinfo3
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0071
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0112
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0230
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0314
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0421
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0512
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0626
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0712
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0821
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0934
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0a112
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0b12
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0c16
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0d12
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0e398
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-0f53
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-511
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-611
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-720
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-813
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-912
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-aa40
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-ac60
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-b20
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-c12
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-d10
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-e13
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-f11
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-z0118
-rw-r--r--x11-servers/XttXF86srv-common/files/patch-z0224
-rw-r--r--x11-servers/XttXF86srv-common/files/xttpatch15
33 files changed, 1118 insertions, 44 deletions
diff --git a/x11-servers/XttXF86srv-common/Makefile b/x11-servers/XttXF86srv-common/Makefile
index 86d4fde03af4..18414983e0be 100644
--- a/x11-servers/XttXF86srv-common/Makefile
+++ b/x11-servers/XttXF86srv-common/Makefile
@@ -8,10 +8,10 @@
PORTNAME?= xtt-common
PORTVERSION= ${VERSION}.${PATCHLEVEL}
CATEGORIES= x11-servers
-MASTER_SITES= ftp://ftp.xfree86.org/pub/XFree86/3.3.5/source/ \
- ftp://ftp.freesoftware.com/pub/XFree86/3.3.5/source/ \
- http://X-TT.dsl.gr.jp/dists/1.x/1.3/
-DISTFILES= X335src-1.tgz xtt-1.3.tgz
+MASTER_SITES= ftp://ftp.xfree86.org/pub/XFree86/3.3.6/source/ \
+ ftp://ftp.freesoftware.com/pub/XFree86/3.3.6/source/ \
+ http://X-TT.dsl.gr.jp/dists/1.x/${VERSION}/
+DISTFILES= X336src-1.tgz xtt-${VERSION}.tgz
MAINTAINER= taguchi@tohoku.iij.ad.jp
@@ -33,7 +33,7 @@ DISTFILES+= Wraphelp.c
IGNOREFILES= Wraphelp.c
.endif
USE_X_PREFIX= YES
-EXTRACT_ONLY= X335src-1.tgz xtt-1.3.tgz
+EXTRACT_ONLY= X336src-1.tgz xtt-${VERSION}.tgz
BINOWN= root
BINGRP= wheel
MASTERDIR?= ${.CURDIR}/../XttXF86srv-common
@@ -44,7 +44,7 @@ WRKDIR= ${MASTERDIR}/work
.endif
WRKSRC= ${WRKDIR}/xc
DIST_SUBDIR= xc
-XTTDIR= ${WRKDIR}/xtt-1.3
+XTTDIR= ${WRKDIR}/xtt-${VERSION}
.if !defined(PATCH_DEBUG)
XTTPATCHARGS= -p1 -E -t -s -N
.else
@@ -138,6 +138,7 @@ pre-extract:
pre-patch:
@( cd ${WRKSRC}; \
+ ${PATCH} -s < ${PATCHDIR}/xttpatch ; \
for i in ${COREPATCHES} ; do \
${PATCH} ${XTTPATCHARGS} < ${XTTDIR}/$${i}; \
done; \
diff --git a/x11-servers/XttXF86srv-common/distinfo b/x11-servers/XttXF86srv-common/distinfo
index 04670184e164..2372e04a667f 100644
--- a/x11-servers/XttXF86srv-common/distinfo
+++ b/x11-servers/XttXF86srv-common/distinfo
@@ -1,4 +1,3 @@
-MD5 (xc/X335src-1.tgz) = 9bc6e1b45a19eab01e2618c8eca01cbc
-MD5 (xc/X335src-2.tgz) = 30bd83eed999e79a92969a0c26615c61
+MD5 (xc/X336src-1.tgz) = bbfa360d10ce91ab37f24f197a31b485
MD5 (xc/xtt-1.3.tgz) = f4c9efdb90d848701c305e2955149920
MD5 (xc/Wraphelp.c) = IGNORE
diff --git a/x11-servers/XttXF86srv-common/files/patch-00 b/x11-servers/XttXF86srv-common/files/patch-00
new file mode 100644
index 000000000000..683899cea08f
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-00
@@ -0,0 +1,71 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/config/cf/FreeBSD.cf config/cf/FreeBSD.cf
+--- /usr/ports/x11/XFree86/work/xc/config/cf/FreeBSD.cf Sun Nov 8 11:19:10 1998
++++ config/cf/FreeBSD.cf Tue Dec 8 10:10:06 1998
+diff -ur /usr/ports/x11/XFree86/work/xc/config/cf/Imake.cf config/cf/Imake.cf
+@@ -308,7 +308,12 @@
+ # define AsmDefines AsmElfDefines
+ #endif
+
++#ifdef i386Architecture
+ #define ServerExtraDefines GccGasOption XFree86ServerDefines
++#endif
++#ifdef AlphaArchitecture
++#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
++#endif
+
+ #define StandardDefines -DCSRG_BASED
+
+@@ -333,14 +338,14 @@
+ /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
+ #ifndef DefaultGcc2i386Opt
+ #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
+-#define DefaultGcc2i386Opt -O2
++#define DefaultGcc2i386Opt
+ #endif
+ #endif
+
+ #ifdef i386Architecture
+ # define OptimizedCDebugFlags DefaultGcc2i386Opt
+ #else
+-# define OptimizedCDebugFlags -O2
++# define OptimizedCDebugFlags
+ #endif
+
+ #ifndef PreIncDir
+@@ -449,14 +454,18 @@
+ #define DlLibrary /**/
+ #endif
+
++#ifdef AlphaArchitecture
++#define IoLibrary -lio
++#else
++#define IoLibrary /**/
++#endif
++
+ #if BuildDynamicLoading
+-#define ServerExtraSysLibs DlLibrary
++#define ServerExtraSysLibs DlLibrary IoLibrary
+ #else
+-#define ServerExtraSysLibs /**/
++#define ServerExtraSysLibs IoLibrary
+ #endif
+
+ #include <bsdLib.rules>
+
+-#ifdef i386Architecture
+ #include <xfree86.cf>
+-#endif
+--- /usr/ports/x11/XFree86/work/xc/config/cf/Imake.cf Fri Nov 13 14:10:12 1998
++++ config/cf/Imake.cf Tue Dec 8 10:05:49 1998
+@@ -160,6 +160,11 @@
+ # define i386Architecture
+ # undef i386
+ # endif
++# ifdef __alpha__
++# define AlphaBsdArchitecture
++# define AlphaArchitecture
++# undef __alpha__
++# endif
+ #endif /* __FreeBSD__ */
+
+ #ifdef AMOEBA
diff --git a/x11-servers/XttXF86srv-common/files/patch-01 b/x11-servers/XttXF86srv-common/files/patch-01
new file mode 100644
index 000000000000..677d184b5c89
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-01
@@ -0,0 +1,12 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/config/cf/xfree86.cf config/cf/xfree86.cf
+--- /usr/ports/x11/XFree86/work/xc/config/cf/xfree86.cf Sun Nov 8 11:19:11 1998
++++ config/cf/xfree86.cf Tue Dec 8 10:05:55 1998
+@@ -853,7 +853,7 @@
+ #endif
+
+ #ifndef XFree86ConsoleDefines
+-#ifdef i386BsdArchitecture
++#if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture)
+ #define XFree86ConsoleDefines -DPCCONS_SUPPORT -DSYSCONS_SUPPORT -DPCVT_SUPPORT
+ #else
+ #define XFree86ConsoleDefines /**/
diff --git a/x11-servers/XttXF86srv-common/files/patch-02 b/x11-servers/XttXF86srv-common/files/patch-02
new file mode 100644
index 000000000000..036e849db7fe
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-02
@@ -0,0 +1,30 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h Mon Dec 23 06:31:04 1996
++++ programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h Tue Dec 8 10:05:55 1998
+@@ -37,6 +37,18 @@
+ #define outw(p,v) _outw((v),(p))
+ #define outl(p,v) _outl((v),(p))
+ #else
++#if defined(__FreeBSD__) && defined(__alpha__)
++
++#include <sys/types.h>
++
++extern void outb(u_int32_t port, u_int8_t val);
++extern void outw(u_int32_t port, u_int16_t val);
++extern void outl(u_int32_t port, u_int32_t val);
++extern u_int8_t inb(u_int32_t port);
++extern u_int16_t inw(u_int32_t port);
++extern u_int32_t inl(u_int32_t port);
++
++#else
+ #ifdef GCCUSESGAS
+ static __inline__ void
+ outb(port, val)
+@@ -156,6 +168,7 @@
+
+ #endif /* GCCUSESGAS */
+ #endif /* linux && __alpha__ */
++#endif /* __FreeBSD__ && __alpha__ */
+
+ #ifdef linux
+
diff --git a/x11-servers/XttXF86srv-common/files/patch-03 b/x11-servers/XttXF86srv-common/files/patch-03
new file mode 100644
index 000000000000..d4005c2cb7ce
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-03
@@ -0,0 +1,14 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/Imakefile programs/Xserver/hw/xfree86/SuperProbe/Imakefile
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/SuperProbe/Imakefile Mon Oct 19 21:38:44 1998
++++ programs/Xserver/hw/xfree86/SuperProbe/Imakefile Tue Dec 8 10:05:55 1998
+@@ -31,6 +31,10 @@
+ #if defined(i386BsdArchitecture)
+ # define OSModule OS_386BSD
+ #endif
++#if defined(AlphaBsdArchitecture)
++# define OSModule OS_386BSD
++ SYS_LIBRARIES = -lio
++#endif
+ #if defined(MinixArchitecture)
+ # define OSModule OS_Minix
+ #endif
diff --git a/x11-servers/XttXF86srv-common/files/patch-04 b/x11-servers/XttXF86srv-common/files/patch-04
new file mode 100644
index 000000000000..45d6465c8354
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-04
@@ -0,0 +1,21 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3.c programs/Xserver/hw/xfree86/accel/s3/s3.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3.c Mon Oct 19 21:39:13 1998
++++ programs/Xserver/hw/xfree86/accel/s3/s3.c Wed Dec 9 10:27:41 1998
+@@ -291,7 +291,7 @@
+ int s3_968_DashBug = 0;
+ unsigned long s3MemBase = 0;
+ Bool tmp_useSWCursor = FALSE;
+-#ifdef __alpha__
++#if defined(__alpha__) && defined(linux)
+ unsigned long _bus_base(void);
+ Bool isJensen = FALSE;
+ #endif
+@@ -1034,7 +1034,7 @@
+
+ xf86VerifyOptions(&validOptions, &s3InfoRec);
+
+-#ifdef __alpha__
++#if defined(__alpha__) && defined(linux)
+ #ifdef TEST_JENSEN_CODE
+ if (1)
+ #else
diff --git a/x11-servers/XttXF86srv-common/files/patch-05 b/x11-servers/XttXF86srv-common/files/patch-05
new file mode 100644
index 000000000000..4480d68e23c3
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-05
@@ -0,0 +1,12 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3im.c programs/Xserver/hw/xfree86/accel/s3/s3im.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/accel/s3/s3im.c Fri Nov 13 14:15:12 1998
++++ programs/Xserver/hw/xfree86/accel/s3/s3im.c Wed Dec 9 10:29:01 1998
+@@ -51,7 +51,7 @@
+ (a & 0x02) << 5 | \
+ (a & 0x01) << 7;
+
+-#ifdef __alpha__
++#if defined(__alpha__) && defined(linux)
+ extern Bool isJensen;
+ #define MemToBusBase(Base,dst,src,count) { if(isJensen) JensenMemToBus(Base,dst,src,count); else MemToBus(&Base[dst],src,count); }
+ #define BusToMemBase(dst,Base,src,count) { if(isJensen) JensenBusToMem(Base,dst,src,count); else BusToMem(dst,&Base[src],count); }
diff --git a/x11-servers/XttXF86srv-common/files/patch-06 b/x11-servers/XttXF86srv-common/files/patch-06
new file mode 100644
index 000000000000..1749cb1532ae
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-06
@@ -0,0 +1,26 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common/compiler.h programs/Xserver/hw/xfree86/common/compiler.h
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common/compiler.h Mon Oct 19 21:39:32 1998
++++ programs/Xserver/hw/xfree86/common/compiler.h Tue Dec 8 10:58:16 1998
+@@ -145,7 +145,21 @@
+ return _inl(port);
+ }
+
+-# else /* defined(linux) */
++# elif defined(__FreeBSD__)
++/* for FreeBSD on Alpha, we use the libio inx/outx routines */
++/* note that the appropriate setup via "ioperm" needs to be done */
++/* *before* any inx/outx is done. */
++
++#include <sys/types.h>
++
++extern void outb(u_int32_t port, u_int8_t val);
++extern void outw(u_int32_t port, u_int16_t val);
++extern void outl(u_int32_t port, u_int32_t val);
++extern u_int8_t inb(u_int32_t port);
++extern u_int16_t inw(u_int32_t port);
++extern u_int32_t inl(u_int32_t port);
++
++# else /* defined(__FreeBSD__) */
+
+ #define outb(a, b) /* NOP */
+ #define outw(a, b) /* NOP */
diff --git a/x11-servers/XttXF86srv-common/files/patch-07 b/x11-servers/XttXF86srv-common/files/patch-07
new file mode 100644
index 000000000000..6f47aca6451f
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-07
@@ -0,0 +1,12 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c Sun Nov 24 09:55:37 1996
++++ programs/Xserver/hw/xfree86/common_hw/BUSmemcpy.c Tue Dec 8 10:05:56 1998
+@@ -299,8 +299,6 @@
+ * "bge reg, xx"). I hope alpha-gcc will be fixed to notice this eventually..
+ */
+
+-#include <linux/types.h>
+-
+ /*
+ * This should be done in one go with ldq_u*2/mask/stq_u. Do it
+ * with a macro so that we can fix it up later..
diff --git a/x11-servers/XttXF86srv-common/files/patch-08 b/x11-servers/XttXF86srv-common/files/patch-08
new file mode 100644
index 000000000000..2cd67f8d3b08
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-08
@@ -0,0 +1,21 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/Imakefile programs/Xserver/hw/xfree86/common_hw/Imakefile
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/Imakefile Tue Feb 24 21:01:21 1998
++++ programs/Xserver/hw/xfree86/common_hw/Imakefile Tue Dec 8 10:05:56 1998
+@@ -15,7 +15,7 @@
+ XSRCS = BUSmemcpy.c IODelay.c SlowBcopy.c $(IOSRC)
+ XOBJS = BUSmemcpy.o IODelay.o SlowBcopy.o $(IOOBJ)
+ #else
+-#if defined(ArcArchitecture)
++#if defined(ArcArchitecture) || defined(AlphaArchitecture)
+ XSRCS = BUSmemcpy.c IODelay.c SlowBcopy.c $(IOSRC)
+ XOBJS = BUSmemcpy.o IODelay.o SlowBcopy.o $(IOOBJ)
+ #else
+@@ -42,7 +42,7 @@
+
+ NormalLibraryTarget(xf86_hw,$(OBJS))
+
+-#if !(defined(LinuxArchitecture) && defined(AlphaArchitecture)) && !defined(ArcArchitecture)
++#if !defined(AlphaArchitecture) && !defined(ArcArchitecture)
+ ObjectFromAsmSource(BUSmemcpy,NullParameter)
+ ObjectFromAsmSource(IODelay,NullParameter)
+ ObjectFromAsmSource(SlowBcopy,NullParameter)
diff --git a/x11-servers/XttXF86srv-common/files/patch-09 b/x11-servers/XttXF86srv-common/files/patch-09
new file mode 100644
index 000000000000..579b70768c05
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-09
@@ -0,0 +1,34 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c Sun Jan 5 11:58:24 1997
++++ programs/Xserver/hw/xfree86/common_hw/SlowBcopy.c Tue Dec 8 10:05:56 1998
+@@ -37,7 +37,12 @@
+ * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996
+ */
+
++#ifdef linux
+ unsigned long _bus_base(void);
++#define isJensen() (!_bus_base())
++#else
++#define isJensen() 0
++#endif
+
+ #ifdef TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */
+ #define SPARSE (5)
+@@ -50,7 +55,7 @@
+ unsigned char *src, *dst;
+ int count;
+ {
+- if (!_bus_base()) /* Jensen */
++ if (isJensen())
+ {
+ unsigned long addr;
+ long result;
+@@ -74,7 +79,7 @@
+ unsigned char *src, *dst;
+ int count;
+ {
+- if (!_bus_base()) /* Jensen */
++ if (isJensen())
+ {
+ unsigned long addr;
+
diff --git a/x11-servers/XttXF86srv-common/files/patch-0a b/x11-servers/XttXF86srv-common/files/patch-0a
new file mode 100644
index 000000000000..0808363a702d
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-0a
@@ -0,0 +1,112 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c Fri Nov 13 14:15:23 1998
++++ programs/Xserver/hw/xfree86/common_hw/xf86_PCI.c Tue Dec 8 10:05:56 1998
+@@ -490,7 +490,7 @@
+ static int pciConfigType = 0;
+ static int pciMaxDevice = 0;
+
+-#if defined(__alpha__)
++#if defined(__alpha__) && defined(linux)
+ #include <asm/unistd.h>
+ #define BUS(tag) (((tag)>>16)&0xff)
+ #define DFN(tag) (((tag)>>8)&0xff)
+@@ -512,7 +512,69 @@
+ {
+ return syscall(__NR_pciconfig_write, bus, dfn, off, len, buf);
+ }
+-#endif /* __alpha__ */
++#endif /* __alpha__ && linux */
++#if defined(__alpha__) && defined(__FreeBSD__)
++
++#include <sys/pciio.h>
++
++#define BUS(tag) (((tag)>>16)&0xff)
++#define DFN(tag) (((tag)>>8)&0xff)
++
++static int pciFd = -1;
++
++void pciconfig_enable(void)
++{
++ pciFd = open("/dev/pci", O_RDWR);
++}
++
++void pciconfig_disable(void)
++{
++#if 0
++ /* MGA server calls pciWriteLong after pciDisableIO */
++ close(pciFd);
++ pciFd = -1;
++#endif
++}
++
++int pciconfig_read(
++ unsigned char bus,
++ unsigned char dfn,
++ unsigned char off,
++ unsigned char len,
++ void * buf)
++{
++ struct pci_io io;
++ int error;
++ io.pi_sel.pc_bus = bus;
++ io.pi_sel.pc_dev = dfn >> 3;
++ io.pi_sel.pc_func = dfn & 7;
++ io.pi_reg = off;
++ io.pi_width = len;
++ error = ioctl(pciFd, PCIOCREAD, &io);
++ if (error)
++ return error;
++ memcpy(buf, &io.pi_data, len);
++ return 0;
++}
++
++int pciconfig_write(
++ unsigned char bus,
++ unsigned char dfn,
++ unsigned char off,
++ unsigned char len,
++ void * buf)
++{
++ struct pci_io io;
++ io.pi_sel.pc_bus = bus;
++ io.pi_sel.pc_dev = dfn >> 3;
++ io.pi_sel.pc_func = dfn & 7;
++ io.pi_reg = off;
++ io.pi_width = len;
++ memcpy(&io.pi_data, buf, len);
++ return ioctl(pciFd, PCIOCWRITE, &io);
++}
++
++#endif /* __alpha__ && __FreeBSD__ */
+
+ static Bool
+ pcibusCheck()
+@@ -1052,6 +1114,9 @@
+ static void
+ pciEnableIO(int scrnIndex)
+ {
++#if defined(__alpha__) && defined(__FreeBSD__)
++ pciconfig_enable();
++#else
+ /* This is enough to ensure that full I/O is enabled */
+ unsigned pciIOPorts[] = { PCI_MODE1_ADDRESS_REG };
+ int numPciIOPorts = sizeof(pciIOPorts) / sizeof(pciIOPorts[0]);
+@@ -1059,13 +1124,18 @@
+ xf86ClearIOPortList(scrnIndex);
+ xf86AddIOPorts(scrnIndex, numPciIOPorts, pciIOPorts);
+ xf86EnableIOPorts(scrnIndex);
++#endif
+ }
+
+ static void
+ pciDisableIO(int scrnIndex)
+ {
++#if defined(__alpha__) && defined(__FreeBSD__)
++ pciconfig_disable();
++#else
+ xf86DisableIOPorts(scrnIndex);
+ xf86ClearIOPortList(scrnIndex);
++#endif
+ }
+
+ static Bool
diff --git a/x11-servers/XttXF86srv-common/files/patch-0b b/x11-servers/XttXF86srv-common/files/patch-0b
new file mode 100644
index 000000000000..6eae94c40370
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-0b
@@ -0,0 +1,12 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/Imakefile programs/Xserver/hw/xfree86/os-support/Imakefile
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/Imakefile Sun May 11 06:04:24 1997
++++ programs/Xserver/hw/xfree86/os-support/Imakefile Tue Dec 8 10:05:56 1998
+@@ -38,7 +38,7 @@
+ OS_SUBDIR = lynxos
+ #endif
+
+-#if defined(i386BsdArchitecture)
++#if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture)
+ # if defined(BSD386Architecture)
+ OS_SUBDIR = bsdi
+ # else
diff --git a/x11-servers/XttXF86srv-common/files/patch-0c b/x11-servers/XttXF86srv-common/files/patch-0c
new file mode 100644
index 000000000000..433600270792
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-0c
@@ -0,0 +1,16 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile programs/Xserver/hw/xfree86/os-support/bsd/Imakefile
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/Imakefile Sun Jan 5 11:59:09 1997
++++ programs/Xserver/hw/xfree86/os-support/bsd/Imakefile Tue Dec 8 10:05:56 1998
+@@ -31,8 +31,12 @@
+ IOPERMDEFINES = -DUSE_I386_IOPL
+ # endif
+ #else
++# if defined(AlphaBsdArchitecture)
++ IOPERMDEFINES = -DUSE_ALPHA_PORTS
++# else
+ IOPERM_SRC = ioperm_noop.c
+ IOPERM_OBJ = ioperm_noop.o
++# endif
+ #endif
+
+ SRCS = bsd_init.c bsd_video.c bsd_io.c bsd_VTsw.c bios_devmem.c mapVT_noop.c \
diff --git a/x11-servers/XttXF86srv-common/files/patch-0d b/x11-servers/XttXF86srv-common/files/patch-0d
new file mode 100644
index 000000000000..40c39830d8a5
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-0d
@@ -0,0 +1,12 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c Mon Oct 19 21:40:36 1998
++++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c Tue Dec 8 10:05:56 1998
+@@ -386,7 +386,7 @@
+ vtmode_t vtmode;
+ char vtname[12];
+ struct stat status;
+- long syscons_version;
++ int syscons_version;
+
+ /* Check for syscons */
+ if ((fd = open(SYSCONS_CONSOLE_DEV1, SYSCONS_CONSOLE_MODE, 0)) >= 0
diff --git a/x11-servers/XttXF86srv-common/files/patch-0e b/x11-servers/XttXF86srv-common/files/patch-0e
new file mode 100644
index 000000000000..562c6b102ee0
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-0e
@@ -0,0 +1,398 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c Mon Feb 16 00:42:01 1998
++++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c Tue Dec 8 10:05:56 1998
+@@ -40,6 +40,13 @@
+ #define MAP_FLAGS (MAP_FILE | MAP_SHARED)
+ #endif
+
++#ifdef __alpha__
++extern u_int64_t dense_base();
++#define BUS_BASE dense_base()
++#else
++#define BUS_BASE 0L
++#endif
++
+ /***************************************************************************/
+ /* Video Memory Mapping section */
+ /***************************************************************************/
+@@ -77,7 +84,7 @@
+ {
+ /* Try to map a page at the VGA address */
+ base = (pointer)mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
+- MAP_FLAGS, fd, (off_t)0xA0000);
++ MAP_FLAGS, fd, (off_t)0xA0000 + BUS_BASE);
+
+ if (base != (pointer)-1)
+ {
+@@ -147,7 +154,6 @@
+ #endif
+ }
+
+-
+ pointer
+ xf86MapVidMem(ScreenNum, Region, Base, Size)
+ int ScreenNum;
+@@ -160,6 +166,10 @@
+ if (!devMemChecked)
+ checkDevMem(FALSE);
+
++#ifdef __alpha__
++ Base = (pointer)((unsigned long)Base & ((1L<<32) - 1));
++#endif
++
+ if (useDevMem)
+ {
+ if (devMemFd < 0)
+@@ -169,7 +179,7 @@
+ }
+ base = (pointer)mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
+ MAP_FLAGS, devMemFd,
+- (off_t)(unsigned long) Base);
++ (off_t)(unsigned long) Base + BUS_BASE);
+ if (base == (pointer)-1)
+ {
+ FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
+@@ -195,11 +205,14 @@
+ }
+ base = (pointer)mmap(0, Size, PROT_READ|PROT_WRITE, MAP_FLAGS,
+ xf86Info.screenFd,
+-#ifdef __mips__
+- (unsigned long)Base);
++#if defined(__alpha__)
++ (unsigned long)Base + BUS_BASE
++#elif defined(__mips__)
++ (unsigned long)Base
+ #else
+- (unsigned long)Base - 0xA0000);
++ (unsigned long)Base - 0xA0000
+ #endif
++ );
+ if (base == (pointer)-1)
+ {
+ FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
+@@ -397,7 +410,73 @@
+ ErrorF("EnableIOPorts: failed to open %s (%s)\n",
+ "/dev/ttyC0", strerror(errno));
+ }
+-
++
++ ExtendedEnabled = TRUE;
++
++ return;
++}
++
++void
++xf86DisableIOPorts(ScreenNum)
++int ScreenNum;
++{
++ int i;
++
++ ScreenEnabled[ScreenNum] = FALSE;
++
++ return;
++}
++
++void xf86DisableIOPrivs()
++{
++}
++
++#endif /* USE_ARC_MMAP */
++
++#ifdef USE_ALPHA_PORTS
++
++static Bool ScreenEnabled[MAXSCREENS];
++static Bool ExtendedEnabled = FALSE;
++static Bool InitDone = FALSE;
++
++void
++xf86ClearIOPortList(ScreenNum)
++int ScreenNum;
++{
++ if (!InitDone)
++ {
++ int i;
++ for (i = 0; i < MAXSCREENS; i++)
++ ScreenEnabled[i] = FALSE;
++ InitDone = TRUE;
++ }
++ return;
++}
++
++void
++xf86AddIOPorts(ScreenNum, NumPorts, Ports)
++int ScreenNum;
++int NumPorts;
++unsigned *Ports;
++{
++ return;
++}
++
++void
++xf86EnableIOPorts(ScreenNum)
++int ScreenNum;
++{
++ int i;
++ int fd;
++ pointer base;
++
++ ScreenEnabled[ScreenNum] = TRUE;
++
++ if (ExtendedEnabled)
++ return;
++
++ ioperm(0, 65536, TRUE);
++
+ ExtendedEnabled = TRUE;
+
+ return;
+@@ -411,6 +490,8 @@
+
+ ScreenEnabled[ScreenNum] = FALSE;
+
++ ioperm(0, 65536, FALSE);
++
+ return;
+ }
+
+@@ -428,7 +509,7 @@
+ xf86DisableInterrupts()
+ {
+
+-#if !defined(__mips__)
++#if !defined(__mips__) && !defined(__alpha__)
+ #ifdef __GNUC__
+ __asm__ __volatile__("cli");
+ #else
+@@ -443,7 +524,7 @@
+ xf86EnableInterrupts()
+ {
+
+-#if !defined(__mips__)
++#if !defined(__mips__) && !defined(__alpha__)
+ #ifdef __GNUC__
+ __asm__ __volatile__("sti");
+ #else
+@@ -453,3 +534,223 @@
+
+ return;
+ }
++
++#if defined(__alpha__)
++
++#if 0
++
++#include <machine/sysarch.h>
++
++#define SPARSE_SHIFT 5
++
++static pointer sparseMappedVirt;
++static unsigned long sparseMappedPhys;
++
++pointer xf86MapVidMemSparse(ScreenNum, Region, Base, Size)
++int ScreenNum;
++int Region;
++pointer Base;
++unsigned long Size;
++{
++ pointer base;
++ int fd;
++
++ sparseMappedPhys = (unsigned long) Base;
++
++ Size <<= SPARSE_SHIFT;
++ Base = (pointer)((sparseMappedPhys & ~_bus_hae_mask()) << SPARSE_SHIFT);
++
++ if ((fd = open("/dev/mem", O_RDWR)) < 0)
++ {
++ FatalError("xf86MapVidMem: failed to open /dev/mem (%s)\n",
++ strerror(errno));
++ }
++ /* This requirers linux-0.99.pl10 or above */
++ base = (pointer)mmap((caddr_t)0, Size,
++ PROT_READ | PROT_WRITE,
++ MAP_SHARED, fd,
++ (off_t)Base + _bus_base_sparse());
++ close(fd);
++ if ((long)base == -1)
++ {
++ FatalError("xf86MapVidMem: Could not mmap framebuffer (%s)\n",
++ strerror(errno));
++ }
++
++ /*
++ * This enables user HAE settings for this process.
++ */
++ alpha_sethae(0);
++
++ sparseMappedVirt = base;
++
++ return base;
++}
++
++void xf86UnMapVidMemSparse(ScreenNum, Region, Base, Size)
++int ScreenNum;
++int Region;
++pointer Base;
++unsigned long Size;
++{
++ Size <<= SPARSE_SHIFT;
++
++ munmap((caddr_t)Base, Size);
++}
++
++#define vuip volatile unsigned int *
++
++static void
++setupAddress(Offset)
++unsigned long Offset;
++{
++ unsigned long phys = sparseMappedPhys + Offset;
++ alpha_sethae(phys & _bus_hae_mask());
++}
++
++int xf86ReadSparse8(Base, Offset)
++pointer Base;
++unsigned long Offset;
++{
++ unsigned long result, shift;
++
++ shift = (Offset & 0x3) * 8;
++ setupAddress(Offset);
++ result = *(vuip) ((unsigned long)Base + (Offset << SPARSE_SHIFT));
++ result >>= shift;
++ return 0xffUL & result;
++}
++
++int xf86ReadSparse16(Base, Offset)
++pointer Base;
++unsigned long Offset;
++{
++ unsigned long result, shift;
++
++ shift = (Offset & 0x2) * 8;
++ setupAddress(Offset);
++ result = *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(1<<(SPARSE_SHIFT-2)));
++ result >>= shift;
++ return 0xffffUL & result;
++}
++
++int xf86ReadSparse32(Base, Offset)
++pointer Base;
++unsigned long Offset;
++{
++ unsigned long result;
++
++ setupAddress(Offset);
++ result = *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(3<<(SPARSE_SHIFT-2)));
++ return result;
++}
++
++void xf86WriteSparse8(Value, Base, Offset)
++int Value;
++pointer Base;
++unsigned long Offset;
++{
++ unsigned int b = Value & 0xffU;
++
++ setupAddress(Offset);
++ *(vuip) ((unsigned long)Base + (Offset << SPARSE_SHIFT)) = b * 0x01010101;
++}
++
++void xf86WriteSparse16(Value, Base, Offset)
++int Value;
++pointer Base;
++unsigned long Offset;
++{
++ unsigned int w = Value & 0xffffU;
++
++ setupAddress(Offset);
++ *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(1<<(SPARSE_SHIFT-2))) =
++ w * 0x00010001;
++}
++
++void xf86WriteSparse32(Value, Base, Offset)
++int Value;
++pointer Base;
++unsigned long Offset;
++{
++ setupAddress(Offset);
++ *(vuip)((unsigned long)Base+(Offset<<SPARSE_SHIFT)+(3<<(SPARSE_SHIFT-2))) = Value;
++}
++
++#else
++
++extern void *map_memory(u_int32_t address, u_int32_t size);
++extern void unmap_memory(void *handle, u_int32_t size);
++extern u_int8_t readb(void *handle, u_int32_t offset);
++extern u_int16_t readw(void *handle, u_int32_t offset);
++extern u_int32_t readl(void *handle, u_int32_t offset);
++extern void writeb(void *handle, u_int32_t offset, u_int8_t val);
++extern void writew(void *handle, u_int32_t offset, u_int16_t val);
++extern void writel(void *handle, u_int32_t offset, u_int32_t val);
++
++pointer xf86MapVidMemSparse(ScreenNum, Region, Base, Size)
++int ScreenNum;
++int Region;
++pointer Base;
++unsigned long Size;
++{
++ return (pointer) map_memory((u_int32_t) (u_int64_t) Base, Size);
++}
++
++void xf86UnMapVidMemSparse(ScreenNum, Region, Base, Size)
++int ScreenNum;
++int Region;
++pointer Base;
++unsigned long Size;
++{
++ unmap_memory(Base, Size);
++}
++
++int xf86ReadSparse8(Base, Offset)
++pointer Base;
++unsigned long Offset;
++{
++ return readb(Base, Offset);
++}
++
++int xf86ReadSparse16(Base, Offset)
++pointer Base;
++unsigned long Offset;
++{
++ return readw(Base, Offset);
++}
++
++int xf86ReadSparse32(Base, Offset)
++pointer Base;
++unsigned long Offset;
++{
++ return readl(Base, Offset);
++}
++
++void xf86WriteSparse8(Value, Base, Offset)
++int Value;
++pointer Base;
++unsigned long Offset;
++{
++ writeb(Base, Offset, Value);
++}
++
++void xf86WriteSparse16(Value, Base, Offset)
++int Value;
++pointer Base;
++unsigned long Offset;
++{
++ writel(Base, Offset, Value);
++}
++
++void xf86WriteSparse32(Value, Base, Offset)
++int Value;
++pointer Base;
++unsigned long Offset;
++{
++ writel(Base, Offset, Value);
++}
++
++#endif
++
++#endif /* __alpha__ */
diff --git a/x11-servers/XttXF86srv-common/files/patch-0f b/x11-servers/XttXF86srv-common/files/patch-0f
new file mode 100644
index 000000000000..be49e3258157
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-0f
@@ -0,0 +1,53 @@
+diff -ur /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c
+--- /usr/ports/x11/XFree86/work/xc/programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c Mon Dec 23 06:50:58 1996
++++ programs/Xserver/hw/xfree86/os-support/shared/bios_devmem.c Tue Dec 8 10:05:56 1998
+@@ -60,25 +60,7 @@
+ * re: boundaries and sizes and such...
+ */
+
+-/*
+- * The Jensen lacks dense memory, thus we have to address the bus via
+- * the sparse addressing scheme.
+- *
+- * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996
+- */
+-
+-#ifdef TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */
+-#define SPARSE (5)
+-#define isJensen (1)
+-#else
+-#define isJensen (!_bus_base())
+-#define SPARSE (7)
+-#endif
+-
+-extern unsigned long _bus_base(void);
+-extern unsigned long _bus_base_sparse(void);
+-#define BUS_BASE (isJensen ? _bus_base_sparse() : _bus_base())
+-#define JENSEN_SHIFT(x) (isJensen ? ((long)x<<SPARSE) : (long)x)
++extern u_int64_t dense_base(void);
+
+ #define SIZE (64*1024)
+
+@@ -92,8 +74,8 @@
+ return(-1);
+ }
+
+- base = mmap((caddr_t)0, JENSEN_SHIFT(SIZE), PROT_READ,
+- MAP_SHARED, fd, (off_t)(JENSEN_SHIFT(Base) + BUS_BASE));
++ base = mmap((caddr_t)0, SIZE, PROT_READ,
++ MAP_SHARED, fd, (off_t)Base + dense_base());
+
+ if (base == (caddr_t)-1UL)
+ {
+@@ -102,9 +84,9 @@
+ return(-1);
+ }
+
+- SlowBCopyFromBus(base+JENSEN_SHIFT(Offset), Buf, Len);
++ SlowBCopyFromBus(base+Offset, Buf, Len);
+
+- munmap((caddr_t)JENSEN_SHIFT(base), JENSEN_SHIFT(SIZE));
++ munmap((caddr_t)base, SIZE);
+ close(fd);
+ return(Len);
+
diff --git a/x11-servers/XttXF86srv-common/files/patch-5 b/x11-servers/XttXF86srv-common/files/patch-5
new file mode 100644
index 000000000000..a5f67a13c03f
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-5
@@ -0,0 +1,11 @@
+--- programs/Xserver/os/access.c.orig Thu Dec 24 13:43:25 1998
++++ programs/Xserver/os/access.c Wed Dec 23 15:32:23 1998
+@@ -634,7 +634,7 @@
+ #endif
+ ifc.ifc_len = sizeof (buf);
+ ifc.ifc_buf = buf;
+- if (ifioctl (fd, (int) SIOCGIFCONF, (pointer) &ifc) < 0)
++ if (ifioctl (fd, SIOCGIFCONF, (pointer) &ifc) < 0)
+ Error ("Getting interface configuration (4)");
+
+ #ifdef ISC
diff --git a/x11-servers/XttXF86srv-common/files/patch-6 b/x11-servers/XttXF86srv-common/files/patch-6
new file mode 100644
index 000000000000..82ba1e24384d
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-6
@@ -0,0 +1,11 @@
+--- programs/xdm/Imakefile.orig Sun Aug 1 15:28:12 1999
++++ programs/xdm/Imakefile Sun Aug 1 15:33:53 1999
+@@ -20,7 +20,7 @@
+ */
+ #ifndef SharedLibXdmGreet
+ #define SharedLibXdmGreet \
+- ((defined(AlphaArchitecture) && \
++ ((defined(AlphaArchitecture) && !defined(FreeBSDArchitecture) && \
+ (!defined(NetBSDArchitecture) || \
+ (defined(NetBSDArchitecture) && HasSharedLibraries))) || \
+ SystemV4)
diff --git a/x11-servers/XttXF86srv-common/files/patch-7 b/x11-servers/XttXF86srv-common/files/patch-7
new file mode 100644
index 000000000000..40944438d6d7
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-7
@@ -0,0 +1,20 @@
+--- lib/Xxf86dga/XF86DGA.c.orig Sun Sep 5 10:53:57 1999
++++ lib/Xxf86dga/XF86DGA.c Sun Sep 5 10:56:20 1999
+@@ -30,7 +30,7 @@
+
+ /* Alpha Patch by Georg Acher, acher@in.tum.de
+ modified by Ivan Kokshaysky <ink@rc.ru> */
+-#ifdef __alpha__
++#if defined(__alpha__) && !defined(__FreeBSD__)
+ extern unsigned long _bus_base(void);
+ #endif
+
+@@ -571,7 +571,7 @@
+ HFILE hfd;
+ #endif
+
+-#ifdef __alpha__
++#if defined(__alpha__) && !defined(__FreeBSD__)
+ off_t bus_base_addr = _bus_base();
+
+ /* DGA would be broken on Jensen anyway due to the lack of
diff --git a/x11-servers/XttXF86srv-common/files/patch-8 b/x11-servers/XttXF86srv-common/files/patch-8
new file mode 100644
index 000000000000..58f16f2ed4de
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-8
@@ -0,0 +1,13 @@
+--- nls/Imakefile.orig Sun Jan 23 02:22:04 2000
++++ nls/Imakefile Sun Jan 23 02:38:08 2000
+@@ -8,7 +8,9 @@
+ #define PassCDebugFlags
+
+ SUBDIRS = XLC_LOCALE Compose
+-
++#if defined(FreeBSDArchitecture)
++STD_CPP_DEFINES+= -DINCLUDE_ru_SU
++#endif
+ MakeSubdirs($(SUBDIRS))
+ DependSubdirs($(SUBDIRS))
+
diff --git a/x11-servers/XttXF86srv-common/files/patch-9 b/x11-servers/XttXF86srv-common/files/patch-9
new file mode 100644
index 000000000000..985d7dddac3d
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-9
@@ -0,0 +1,12 @@
+--- programs/xdm/sessreg.c~ Sun Jan 16 18:33:06 2000
++++ programs/xdm/sessreg.c Sun Jan 23 03:31:15 2000
+@@ -79,7 +79,9 @@
+
+ #ifdef CSRG_BASED
+ /* *BSD doesn't like a ':0' type entry in utmp */
++#ifndef __FreeBSD__
+ #define NO_UTMP
++#endif
+ #endif
+
+ #ifndef WTMP_FILE
diff --git a/x11-servers/XttXF86srv-common/files/patch-aa b/x11-servers/XttXF86srv-common/files/patch-aa
index 29dbec41bfb1..def1d4dd3fb6 100644
--- a/x11-servers/XttXF86srv-common/files/patch-aa
+++ b/x11-servers/XttXF86srv-common/files/patch-aa
@@ -1,29 +1,11 @@
---- Makefile.orig Thu Oct 28 18:13:31 1999
-+++ Makefile Fri Oct 29 10:04:43 1999
-@@ -56,7 +56,8 @@
- echo "" > $(IRULESRC)/host.def; \
- fi; \
- fi; \
-- fi
-+ fi
-+ @echo "#include \"host.def.local\"" >> $(IRULESRC)/host.def
- cd $(IMAKESRC) && $(MAKE) $(FLAGS) clean
- $(MAKE) $(MFLAGS) Makefile.boot
- $(MAKE_CMD) $(MFLAGS) VerifyOS
-@@ -207,7 +208,7 @@
- @echo "#define IncludeFlags -I`pwd`/exports/include"\
- >> $(IRULESRC)/host.def
- @echo "#define BuildFontServerOnly YES" >> $(IRULESRC)/host.def
-- @echo "$(EXTRA_HOST_DEF)" >> $(IRULESRC)/host.def
-+ @echo "#include \"host.def.local\"" >> $(IRULESRC)/host.def
- imake -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_EXTRA_OPTS) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) -DUseInstalled
- $(MAKE) $(MFLAGS) Makefiles
- $(MAKE) $(MFLAGS) clean
-@@ -234,6 +235,7 @@
- @echo "#define IncludeFlags -I`pwd`/exports/include"\
- >> $(IRULESRC)/host.def
- @echo "#define BuildFontLibOnly YES" >> $(IRULESRC)/host.def
-+ @echo "#include \"host.def.local\"" >> $(IRULESRC)/host.def
- imake -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_EXTRA_OPTS) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) -DUseInstalled
- $(MAKE) $(MFLAGS) Makefiles
- $(MAKE) $(MFLAGS) clean
+--- programs/Xserver/Imakefile.ORIG Sun Nov 14 18:16:17 1999
++++ programs/Xserver/Imakefile Sun Nov 14 18:17:24 1999
+@@ -161,7 +161,7 @@
+ SYSLIBS = $(ZLIB) MathLibrary Krb5Libraries DBMLibrary $(EXTRASYSLIBS)
+ #endif
+ #if HasPam
+- PAMLIBS = -lpam -lpam_misc -ldl
++ PAMLIBS = -lpam
+ #endif
+ CBRT = mi/LibraryTargetName(cbrt)
+ STDDIRS = include dix os mi $(XPDDXDIR) $(EXTDIRS)
diff --git a/x11-servers/XttXF86srv-common/files/patch-ac b/x11-servers/XttXF86srv-common/files/patch-ac
index da8dd1c2a2a4..7eeb517a654b 100644
--- a/x11-servers/XttXF86srv-common/files/patch-ac
+++ b/x11-servers/XttXF86srv-common/files/patch-ac
@@ -1,5 +1,47 @@
---- lib/font/X-TrueType/BIG5/BIG5toUCS2.c.orig Wed Dec 22 03:22:33 1999
-+++ lib/font/X-TrueType/BIG5/BIG5toUCS2.c Wed Dec 22 03:27:31 1999
+--- lib/font/X-TrueType/BIG5/BIG5toUCS2.c.orig Fri Oct 8 01:59:09 1999
++++ lib/font/X-TrueType/BIG5/BIG5toUCS2.c Sun Jun 18 06:14:33 2000
+@@ -49,9 +49,9 @@
+ static ucs2_t tblBig5ToUcs2[] = {
+ /* 0xA140 - 0xA1FF */
+ 0x3000, 0xFF0C, 0x3001, 0x3002, 0xFF0E, 0x2022, 0xFF1B, 0xFF1A,
+- 0xFF1F, 0xFF01, 0xFE30, 0x2026, 0x2025, 0xFE50, 0xFF64, 0xFE52,
++ 0xFF1F, 0xFF01, 0xFE30, 0x2026, 0x2025, 0xFE50, 0xFE51, 0xFE52,
+ 0x00B7, 0xFE54, 0xFE55, 0xFE56, 0xFE57, 0xFF5C, 0x2013, 0xFE31,
+- 0x2014, 0xFE33, 0xFFFD, 0xFE34, 0xFE4F, 0xFF08, 0xFF09, 0xFE35,
++ 0x2014, 0xFE33, 0x2574, 0xFE34, 0xFE4F, 0xFF08, 0xFF09, 0xFE35,
+ 0xFE36, 0xFF5B, 0xFF5D, 0xFE37, 0xFE38, 0x3014, 0x3015, 0xFE39,
+ 0xFE3A, 0x3010, 0x3011, 0xFE3B, 0xFE3C, 0x300A, 0x300B, 0xFE3D,
+ 0xFE3E, 0x3008, 0x3009, 0xFE3F, 0xFE40, 0x300C, 0x300D, 0xFE41,
+@@ -64,16 +64,16 @@
+ 0x201D, 0x301D, 0x301E, 0x2035, 0x2032, 0xFF03, 0xFF06, 0xFF0A,
+ 0x203B, 0x00A7, 0x3003, 0x25CB, 0x25CF, 0x25B3, 0x25B2, 0x25CE,
+ 0x2606, 0x2605, 0x25C7, 0x25C6, 0x25A1, 0x25A0, 0x25BD, 0x25BC,
+- 0x32A3, 0x2105, 0x203E, 0xFFFD, 0xFF3F, 0xFFFD, 0xFE49, 0xFE4A,
++ 0x32A3, 0x2105, 0x203E, 0xFFE3, 0xFF3F, 0x02CD, 0xFE49, 0xFE4A,
+ 0xFE4D, 0xFE4E, 0xFE4B, 0xFE4C, 0xFE5F, 0xFE60, 0xFE61, 0xFF0B,
+ 0xFF0D, 0x00D7, 0x00F7, 0x00B1, 0x221A, 0xFF1C, 0xFF1E, 0xFF1D,
+ 0x2266, 0x2267, 0x2260, 0x221E, 0x2252, 0x2261, 0xFE62, 0xFE63,
+- 0xFE64, 0xFE65, 0xFE66, 0x223C, 0x2229, 0x222A, 0x22A5, 0x2220,
++ 0xFE64, 0xFE65, 0xFE66, 0xFF5E, 0x2229, 0x222A, 0x22A5, 0x2220,
+ 0x221F, 0x22BF, 0x33D2, 0x33D1, 0x222B, 0x222E, 0x2235, 0x2234,
+ 0x2640, 0x2642, 0x2641, 0x2609, 0x2191, 0x2193, 0x2190, 0x2192,
+- 0x2196, 0x2197, 0x2199, 0x2198, 0x2225, 0x2223, 0xFFFD, ALTCHR,
++ 0x2196, 0x2197, 0x2199, 0x2198, 0x2225, 0x2223, 0xFF0F, ALTCHR,
+ /* 0xA240 - 0xA2FF */
+- 0xFFFD, 0xFF0F, 0xFF3C, 0xFF04, 0x00A5, 0x3012, 0x00A2, 0x00A3,
++ 0xFF3C, 0xFF0F, 0xFF3C, 0xFF04, 0xFFE5, 0x3012, 0x00A2, 0x00A3,
+ 0xFF05, 0xFF20, 0x2103, 0x2109, 0xFE69, 0xFE6A, 0xFE6B, 0x33D5,
+ 0x339C, 0x339D, 0x339E, 0x33CE, 0x33A1, 0x338E, 0x338F, 0x33C4,
+ 0x00B0, 0x5159, 0x515B, 0x515E, 0x515D, 0x5161, 0x5163, 0x55E7,
+@@ -90,7 +90,7 @@
+ 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17, 0xFF18,
+ 0xFF19, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166,
+ 0x2167, 0x2168, 0x2169, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025,
+- 0x3026, 0x3027, 0x3028, 0x3029, 0xFFFD, 0x5344, 0xFFFD, 0xFF21,
++ 0x3026, 0x3027, 0x3028, 0x3029, 0x5341, 0x5344, 0x5345, 0xFF21,
+ 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27, 0xFF28, 0xFF29,
+ 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F, 0xFF30, 0xFF31,
+ 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37, 0xFF38, 0xFF39,
@@ -985,68 +985,68 @@
ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
@@ -129,12 +171,16 @@
0x8B9F, 0x9483, 0x9C79, 0x9EB7, 0x7675, 0x9A6B, 0x9C7A, 0x9E1D,
- 0x7069, 0x706A, 0x9EA4, 0x9F7E, 0x9F49, 0x9F98, ALTCHR, ALTCHR,
- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
+- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
+- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
+- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
+- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
+ 0x7069, 0x706A, 0x9EA4, 0x9F7E, 0x9F49, 0x9F98, 0x7881, 0x92B9,
-+ 0x88CF, 0x58BB, 0x6052, 0x7CA7, 0x5AFA, ALTCHR, ALTCHR, ALTCHR,
- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
- ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR, ALTCHR,
++ 0x88CF, 0x58BB, 0x6052, 0x7CA7, 0x5AFA, 0x2554, 0x2566, 0x2557,
++ 0x2560, 0x256C, 0x2563, 0x255A, 0x2569, 0x255D, 0x2552, 0x2564,
++ 0x2555, 0x255E, 0x256A, 0x2561, 0x2558, 0x2567, 0x255B, 0x2553,
++ 0x2565, 0x2556, 0x255F, 0x256B, 0x2562, 0x2559, 0x2568, 0x255C,
++ 0x2551, 0x2550, 0x256D, 0x256E, 0x2570, 0x256F, 0x2593, ALTCHR,
+/* 0xFA40 - 0xFAFF */
+ 0xE000, 0xE001, 0xE002, 0xE003, 0xE004, 0xE005, 0xE006, 0xE007,
+ 0xE008, 0xE009, 0xE00A, 0xE00B, 0xE00C, 0xE00D, 0xE00E, 0xE00F,
diff --git a/x11-servers/XttXF86srv-common/files/patch-b b/x11-servers/XttXF86srv-common/files/patch-b
new file mode 100644
index 000000000000..a1e92a81cb2a
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-b
@@ -0,0 +1,20 @@
+--- config/cf/Imake.tmpl.orig Sat Jan 9 15:18:57 1999
++++ config/cf/Imake.tmpl Thu Nov 25 02:31:28 1999
+@@ -1150,7 +1150,7 @@
+ CXXOPTIONS = CplusplusOptions
+ CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
+ CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES)
+- CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
++ CXXFLAGS += $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
+ #endif
+ COMPRESS = CompressCmd
+ GZIPCMD = GzipCmd
+@@ -1321,7 +1321,7 @@
+ */
+ ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
+ ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
+- CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
++ CFLAGS += $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
+ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
+ LDPRELIB = LdPreLib
+ LDPOSTLIB = LdPostLib
diff --git a/x11-servers/XttXF86srv-common/files/patch-c b/x11-servers/XttXF86srv-common/files/patch-c
new file mode 100644
index 000000000000..01ac36e89a74
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-c
@@ -0,0 +1,12 @@
+--- programs/Xserver/hw/xfree86/XF86Setup/mouse.tcl.orig Mon Jan 17 00:34:06 2000
++++ programs/Xserver/hw/xfree86/XF86Setup/mouse.tcl Wed Jan 19 02:51:43 2000
+@@ -586,6 +586,9 @@
+ set mseRes $initres
+ if { $mseRes <= 0 } {
+ set mseRes 100
++ }
++ if { $mseRes > 200 } {
++ set mseRes 200
+ }
+ $w.mouse.resolution.$mseRes invoke
+ set mseButtons $initbtn
diff --git a/x11-servers/XttXF86srv-common/files/patch-d b/x11-servers/XttXF86srv-common/files/patch-d
new file mode 100644
index 000000000000..70cb0a30c77f
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-d
@@ -0,0 +1,10 @@
+--- programs/Xserver/hw/xfree86/xf86Version.h.orig Sat Jan 8 19:24:57 2000
++++ programs/Xserver/hw/xfree86/xf86Version.h Wed Feb 9 16:44:53 2000
+@@ -19,6 +19,6 @@
+ XF86_VERSION_BETA, \
+ XF86_VERSION_ALPHA)
+
+-#define XF86_DATE "January 8 1999"
++#define XF86_DATE "January 8 2000"
+
+ /* $XConsortium: xf86Version.h /main/78 1996/10/28 05:42:10 kaleb $ */
diff --git a/x11-servers/XttXF86srv-common/files/patch-e b/x11-servers/XttXF86srv-common/files/patch-e
new file mode 100644
index 000000000000..c111df47dd0f
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-e
@@ -0,0 +1,13 @@
+--- config/cf/FreeBSD.cf-3.3.6 Sat Feb 12 06:36:11 2000
++++ config/cf/FreeBSD.cf Tue Feb 15 00:25:54 2000
+@@ -69,7 +69,7 @@
+ #define MkdirHierCmd mkdir -p
+
+ #define CcCmd cc
+-#define CppCmd /usr/libexec/cpp
++#define CppCmd /usr/bin/cpp
+ #define PreProcessCmd CppCmd
+ #define StandardCppDefines -traditional
+ #if defined(UseInstalled) && (!defined(XF86LinkKit) || !XF86LinkKit)
+
+
diff --git a/x11-servers/XttXF86srv-common/files/patch-f b/x11-servers/XttXF86srv-common/files/patch-f
new file mode 100644
index 000000000000..a3bc926c6263
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-f
@@ -0,0 +1,11 @@
+--- nls/locale.alias.orig Thu Feb 17 16:04:55 2000
++++ nls/locale.alias Thu Feb 17 16:04:29 2000
+@@ -27,6 +27,7 @@
+ cs_CS.ISO8859-2 cs_CZ.ISO8859-2
+ cs_CZ cs_CZ.ISO8859-2
+ cs_CZ.iso88592 cs_CZ.ISO8859-2
++cs_CZ.ISO_8859-2 cs_CZ.ISO8859-2
+ cz cz_CZ.ISO8859-2
+ cz_CZ cz_CZ.ISO8859-2
+ da da_DK.ISO8859-1
+
diff --git a/x11-servers/XttXF86srv-common/files/patch-z01 b/x11-servers/XttXF86srv-common/files/patch-z01
new file mode 100644
index 000000000000..d298fd26cf8a
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-z01
@@ -0,0 +1,18 @@
+--- lib/font/X-TrueType/xttcconv.c.ORIG Mon Jun 19 11:28:44 2000
++++ lib/font/X-TrueType/xttcconv.c Mon Jun 19 11:37:26 2000
+@@ -515,12 +515,14 @@
+ char **tryItFirst = NULL;
+
+ for (l=list; *l ; l++) {
+- if(!strcasecmp(*l,moduleArg.charSetHints->charsetStdName))
++ if(!strcasecmp(*l,moduleArg.charSetHints->charsetStdName)) {
+ tryItFirst = l;
++ break;
+ #if 0
+ ErrorF("%s/%s\n",
+ *l, moduleArg.charSetHints->charsetStdName);
+ #endif
++ }
+ }
+
+ if(tryItFirst)
diff --git a/x11-servers/XttXF86srv-common/files/patch-z02 b/x11-servers/XttXF86srv-common/files/patch-z02
new file mode 100644
index 000000000000..4254fffcb9a1
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/patch-z02
@@ -0,0 +1,24 @@
+--- lib/font/X-TrueType/xttfuncs.c.ORIG Mon Jun 19 11:38:08 2000
++++ lib/font/X-TrueType/xttfuncs.c Mon Jun 19 11:41:00 2000
+@@ -698,7 +698,7 @@
+
+ if ((entry = FontCacheGetEntry()) == NULL) {
+ charInfo = &nocharinfo;
+- fprintf(stderr, "can't get cache entry\n");
++ fprintf(stderr, "get_metrics: can't get cache entry\n");
+ goto next;
+ }
+ FC_TT_SETVFUNC(entry);
+@@ -786,10 +786,9 @@
+ char_width.pixel = char_width.raw = 0;
+ get_metrics(ft, c, char_width);
+ /* Retry to get it created in get_metrics(). */
+- FontCacheSearchEntry(ft->cache, c, &entry);
+- if (!charInfo) {
++ if (!FontCacheSearchEntry(ft->cache, c, &entry)) {
+ charInfo = &nocharinfo;
+- fprintf(stderr, "can't get cache entry\n");
++ fprintf(stderr, "get_glyph: can't get cache entry\n");
+ goto next;
+ }
+ }
diff --git a/x11-servers/XttXF86srv-common/files/xttpatch b/x11-servers/XttXF86srv-common/files/xttpatch
new file mode 100644
index 000000000000..45d96e76427e
--- /dev/null
+++ b/x11-servers/XttXF86srv-common/files/xttpatch
@@ -0,0 +1,15 @@
+--- ../xtt-1.3/shared-libfont-1.2.diff~ Sun May 28 18:55:42 2000
++++ ../xtt-1.3/shared-libfont-1.2.diff Sun May 28 21:52:50 2000
+@@ -1050,9 +1050,9 @@
+ DIX = dix/LibraryTargetName(dix)
+ - FONT = $(DEPFONTLIB)
+ + FONT = $(FONTLIB) $(XPFBLIBS)
+- #ifdef ServerExtraSysLibs
+- EXTRASYSLIBS = ServerExtraSysLibs
+- #endif
++ #if UsbMouseSupport
++ #if !HasLibUsb
++ USB = $(XF86OSSRC)/libusb/LibraryTargetName(usb)
+ @@ -209,7 +209,8 @@
+ DECDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS)
+ DECOBJS = hw/dec/ws/init.o hw/dec/ws/sdepthinit.o