aboutsummaryrefslogtreecommitdiff
path: root/x11-servers
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2003-07-27 09:44:00 +0000
committerKris Kennaway <kris@FreeBSD.org>2003-07-27 09:44:00 +0000
commit3378745c51f136483f9224deb8b41b6c2a90e7bf (patch)
tree246517ce2246d6c74830f4e176cb9f8770bce561 /x11-servers
parentb19a3fa47cdf31eb1520cd05ef602912c98133fa (diff)
downloadports-3378745c51f136483f9224deb8b41b6c2a90e7bf.tar.gz
ports-3378745c51f136483f9224deb8b41b6c2a90e7bf.zip
Add support for sparc64.
Submitted by: jake (based on)
Notes
Notes: svn path=/head/; revision=85665
Diffstat (limited to 'x11-servers')
-rw-r--r--x11-servers/XFree86-4-Server/Makefile24
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-FreeBSD.cf11
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-Pci.h16
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-Sbus.c11
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-bsd_Imakefile16
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-bus_Imakefile18
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-compiler.h11
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-elfloader.c70
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-freebsdPci.c11
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-loader.c20
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-os-support_Imakefile10
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-sunffb_Imakefile11
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-xf86-common-Imakefile13
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-xf86Events.c18
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-xf86Sbus.h16
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-xf86sym.c31
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-xfree86.cf11
-rw-r--r--x11-servers/XFree86-4-Server/pkg-plist22
18 files changed, 315 insertions, 25 deletions
diff --git a/x11-servers/XFree86-4-Server/Makefile b/x11-servers/XFree86-4-Server/Makefile
index 7354d5339726..63f9b1ce71d5 100644
--- a/x11-servers/XFree86-4-Server/Makefile
+++ b/x11-servers/XFree86-4-Server/Makefile
@@ -31,7 +31,11 @@ COMMENT= XFree86-4 X server and related programs
patch-radeon_cursor.c patch-radeon_reg.h patch-smi \
patch-libc_wrapper.c patch-xf86-common-Imakefile patch-loader-Imakefile \
patch-loader-elfloader.c patch-bsd-Imakefile patch-bsd-bsdResource.c \
- patch-bus-Imakefile patch-r200_vtxtmp_x86.S patch-radeon_vtxtmp_x86.S
+ patch-bus-Imakefile patch-r200_vtxtmp_x86.S patch-radeon_vtxtmp_x86.S \
+ patch-compiler.h patch-os-support_Imakefile patch-bsd_Imakefile \
+ patch-freebsdPci.c patch-bus_Imakefile patch-xf86Sbus.h patch-loader.c \
+ patch-Sbus.c patch-elfloader.c patch-xfree86.cf patch-FreeBSD.cf \
+ patch-sunffb_Imakefile patch-xf86sym.c patch-xf86Events.c
EXTRA_PATCHES+= ${FILESDIR}/${pf}
.endfor
SCRIPTS_ENV= OSVERSION=${OSVERSION} \
@@ -70,22 +74,14 @@ MAN4= citron.4 \
dynapro.4 \
elographics.4 \
fbdevhw.4 \
- glint.4 \
kbd.4 \
keyboard.4 \
- mga.4 \
microtouch.4 \
mouse.4 \
mutouch.4 \
nv.4 \
r128.4 \
radeon.4 \
- rendition.4 \
- s3virge.4 \
- savage.4 \
- siliconmotion.4 \
- tdfx.4 \
- vga.4 \
void.4 \
wacom.4
MAN5= XF86Config.5
@@ -112,8 +108,10 @@ PLIST_SUB+= DRI="@comment "
PLIST_SUB+= ALPHA_NA="@comment "
.else
PLIST_SUB+= ALPHA_NA=""
+.if ${ARCH} != sparc64
MAN1+= scanpci.1
.endif
+.endif
.if ${ARCH} == ia64
PLIST_SUB+= IA64_NA="@comment "
@@ -125,6 +123,14 @@ PLIST_SUB+= IA64_NA=""
PLIST_SUB+= SPARC64_NA="@comment "
.else
PLIST_SUB+= SPARC64_NA=""
+MAN4+= glint.4 \
+ mga.4 \
+ rendition.4 \
+ s3virge.4 \
+ savage.4 \
+ siliconmotion.4 \
+ tdfx.4 \
+ vga.4
.endif
.if ${ARCH} == i386
diff --git a/x11-servers/XFree86-4-Server/files/patch-FreeBSD.cf b/x11-servers/XFree86-4-Server/files/patch-FreeBSD.cf
new file mode 100644
index 000000000000..c0cfe1547bad
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-FreeBSD.cf
@@ -0,0 +1,11 @@
+--- config/cf/FreeBSD.cf.orig Tue May 20 05:10:21 2003
++++ config/cf/FreeBSD.cf Tue May 20 03:41:35 2003
+@@ -464,6 +464,8 @@
+ #endif
+ #ifdef Sparc64Architecture
+ #define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
++#define AsVISOption -Av9a
++#define AsOutputArchSize 64
+ #endif
+ #ifdef ia64Architecture
+ #define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
diff --git a/x11-servers/XFree86-4-Server/files/patch-Pci.h b/x11-servers/XFree86-4-Server/files/patch-Pci.h
index fc0d0955f376..75a9b57dda6a 100644
--- a/x11-servers/XFree86-4-Server/files/patch-Pci.h
+++ b/x11-servers/XFree86-4-Server/files/patch-Pci.h
@@ -1,5 +1,5 @@
---- programs/Xserver/hw/xfree86/os-support/bus/Pci.h.orig Tue Mar 4 16:42:16 2003
-+++ programs/Xserver/hw/xfree86/os-support/bus/Pci.h Tue Mar 4 16:42:21 2003
+--- programs/Xserver/hw/xfree86/os-support/bus/Pci.h.orig Mon Dec 23 07:37:26 2002
++++ programs/Xserver/hw/xfree86/os-support/bus/Pci.h Sat Jul 26 21:34:12 2003
@@ -230,6 +230,10 @@
# define ARCH_PCI_INIT linuxPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
@@ -11,9 +11,19 @@
# endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
#elif defined(__i386__)
-@@ -298,7 +302,11 @@
+@@ -291,14 +295,20 @@
+ # elif defined(sun)
+ # define ARCH_PCI_INIT sparcPciInit
+ # define INCLUDE_XF86_MAP_PCI_MEM
+-# elif defined(__OpenBSD__) && defined(__sparc64__)
++# elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc64__)
+ # define ARCH_PCI_INIT freebsdPciInit
+ # define INCLUDE_XF86_MAP_PCI_MEM
+ # define INCLUDE_XF86_NO_DOMAIN
# endif
++# if !defined(__FreeBSD__)
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
++# endif
#elif defined(__x86_64__)
-# define ARCH_PCI_INIT ix86PciInit
+# if defined(__FreeBSD__)
diff --git a/x11-servers/XFree86-4-Server/files/patch-Sbus.c b/x11-servers/XFree86-4-Server/files/patch-Sbus.c
new file mode 100644
index 000000000000..9013e1dfe8c0
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-Sbus.c
@@ -0,0 +1,11 @@
+--- programs/Xserver/hw/xfree86/os-support/bus/Sbus.c.orig Fri May 16 15:33:46 2003
++++ programs/Xserver/hw/xfree86/os-support/bus/Sbus.c Fri May 16 15:37:46 2003
+@@ -170,6 +170,8 @@
+ promP1275 = TRUE;
+ else
+ promP1275 = FALSE;
++#elif defined(__FreeBSD__)
++ promP1275 = TRUE;
+ #else
+ #error Missing promIsP1275() function for this OS
+ #endif
diff --git a/x11-servers/XFree86-4-Server/files/patch-bsd_Imakefile b/x11-servers/XFree86-4-Server/files/patch-bsd_Imakefile
new file mode 100644
index 000000000000..f65650278b96
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-bsd_Imakefile
@@ -0,0 +1,16 @@
+--- programs/Xserver/hw/xfree86/os-support/bsd/Imakefile.orig Thu May 15 18:39:39 2003
++++ programs/Xserver/hw/xfree86/os-support/bsd/Imakefile Thu May 15 18:40:42 2003
+@@ -45,10 +45,10 @@
+ IOPERM_SRC = ioperm_noop.c
+ IOPERM_OBJ = ioperm_noop.o
+ # endif
+-#elif defined(FreeBSDArchitecture) && !defined(AlphaBsdArchitecture)
++#elif defined(FreeBSDArchitecture)
++# if defined(i386Architecture)
+ IOPERMDEFINES = -DUSE_DEV_IO
+-#else
+-# if defined(AlphaBsdArchitecture)
++# elif defined(AlphaBsdArchitecture)
+ IOPERMDEFINES = -DUSE_ALPHA_PORTS
+ # else
+ IOPERM_SRC = ioperm_noop.c
diff --git a/x11-servers/XFree86-4-Server/files/patch-bus_Imakefile b/x11-servers/XFree86-4-Server/files/patch-bus_Imakefile
new file mode 100644
index 000000000000..503877315957
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-bus_Imakefile
@@ -0,0 +1,18 @@
+--- programs/Xserver/hw/xfree86/os-support/bus/Imakefile.orig Sun Feb 23 15:26:49 2003
++++ programs/Xserver/hw/xfree86/os-support/bus/Imakefile Fri May 16 14:33:32 2003
+@@ -88,6 +88,15 @@
+ PCIDRVRSRC = freebsdPci.c
+ PCIDRVROBJ = freebsdPci.o
+
++#elif defined(FreeBSDArchitecture) && defined(Sparc64Architecture)
++
++XCOMM Sparc SBUS & PCI drivers
++
++PCIDRVRSRC = freebsdPci.c
++PCIDRVROBJ = freebsdPci.o
++SBUSDRVSRC = Sbus.c
++SBUSDRVOBJ = Sbus.o
++
+ #elif defined(NetBSDArchitecture) && defined(AlphaArchitecture)
+
+ XCOMM Alpha (NetBSD) PCI driver
diff --git a/x11-servers/XFree86-4-Server/files/patch-compiler.h b/x11-servers/XFree86-4-Server/files/patch-compiler.h
new file mode 100644
index 000000000000..2cbe5f847ea2
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-compiler.h
@@ -0,0 +1,11 @@
+--- programs/Xserver/hw/xfree86/common/compiler.h.orig Thu May 15 14:49:26 2003
++++ programs/Xserver/hw/xfree86/common/compiler.h Thu May 15 14:50:07 2003
+@@ -514,7 +514,7 @@
+ return ret;
+ }
+
+-# elif (defined(linux) || defined(Lynx) || defined(sun) || defined(__OpenBSD__)) && defined(__sparc__)
++# elif (defined(linux) || defined(Lynx) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
+
+ # if !defined(Lynx)
+ # ifndef ASI_PL
diff --git a/x11-servers/XFree86-4-Server/files/patch-elfloader.c b/x11-servers/XFree86-4-Server/files/patch-elfloader.c
new file mode 100644
index 000000000000..8b12a697405f
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-elfloader.c
@@ -0,0 +1,70 @@
+--- programs/Xserver/hw/xfree86/loader/elfloader.c.orig Fri Jan 24 12:26:35 2003
++++ programs/Xserver/hw/xfree86/loader/elfloader.c Tue May 20 15:18:44 2003
+@@ -1150,6 +1150,7 @@
+ #endif
+ #if defined(__sparc__)
+ unsigned char *dest8; /* address of the 8 bit place being modified */
++ unsigned long *dest64;
+ #endif
+ #if defined(__alpha__)
+ unsigned int *dest32h; /* address of the high 32 bit place being modified */
+@@ -1960,7 +1961,6 @@
+ break;
+
+ case R_SPARC_32: /* 3 */
+- case R_SPARC_GLOB_DAT: /* 20 */
+ case R_SPARC_UA32: /* 23 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+@@ -1970,29 +1970,36 @@
+ ((unsigned char *)dest32)[3] = (unsigned char)(symval );
+ break;
+
++ case R_SPARC_GLOB_DAT: /* 20 */
++ case R_SPARC_64: /* 32 */
++ dest64 = (unsigned long *)(secp + rel->r_offset);
++ symval += rel->r_addend;
++ *dest64 = symval;
++ break;
++
+ case R_SPARC_DISP8: /* 4 */
+ dest8 = (unsigned char *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+- *dest8 = (symval - (Elf32_Addr) dest8);
++ *dest8 = (symval - (Elf_Addr) dest8);
+ break;
+
+ case R_SPARC_DISP16: /* 5 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+- *dest16 = (symval - (Elf32_Addr) dest16);
++ *dest16 = (symval - (Elf_Addr) dest16);
+ break;
+
+ case R_SPARC_DISP32: /* 6 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+- *dest32 = (symval - (Elf32_Addr) dest32);
++ *dest32 = (symval - (Elf_Addr) dest32);
+ break;
+
+ case R_SPARC_WDISP30: /* 7 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest32 = ((*dest32 & 0xc0000000) |
+- ((symval - (Elf32_Addr) dest32) >> 2));
++ (((symval - (Elf_Addr) dest32) >> 2) & 0x3fffffff));
+ break;
+
+ case R_SPARC_HI22: /* 9 */
+@@ -2038,8 +2045,8 @@
+ break;
+
+ case R_SPARC_RELATIVE: /* 22 */
+- dest32 = (unsigned int *)(secp + rel->r_offset);
+- *dest32 += (unsigned int)secp + rel->r_addend;
++ dest64 = (unsigned long *)(secp + rel->r_offset);
++ *dest64 = (unsigned long)secp + rel->r_addend;
+ break;
+ #endif /*__sparc__*/
+ #ifdef __ia64__
diff --git a/x11-servers/XFree86-4-Server/files/patch-freebsdPci.c b/x11-servers/XFree86-4-Server/files/patch-freebsdPci.c
new file mode 100644
index 000000000000..58b4c940474a
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-freebsdPci.c
@@ -0,0 +1,11 @@
+--- programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c.orig Thu May 15 18:53:48 2003
++++ programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c Thu May 15 18:54:24 2003
+@@ -84,7 +84,7 @@
+ /* bridge */ NULL
+ };
+
+-#if !defined(__OpenBSD__)
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ #if X_BYTE_ORDER == X_BIG_ENDIAN
+ #ifdef __sparc__
+ #ifndef ASI_PL
diff --git a/x11-servers/XFree86-4-Server/files/patch-loader.c b/x11-servers/XFree86-4-Server/files/patch-loader.c
new file mode 100644
index 000000000000..23acde46016b
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-loader.c
@@ -0,0 +1,20 @@
+--- programs/Xserver/hw/xfree86/loader/loader.c.orig Thu May 15 19:50:47 2003
++++ programs/Xserver/hw/xfree86/loader/loader.c Thu May 15 19:51:35 2003
+@@ -88,7 +88,7 @@
+ static int refCount[MAX_HANDLE] ;
+ #endif
+
+-#if defined(__sparc__) && defined(__GNUC__)
++#if defined(__sparc__) && defined(__GNUC__) && !defined(__FreeBSD__)
+ # define SYMFUNCDOT(func) { "." #func, (funcptr)&__sparc_dot_ ## func },
+ # if !defined(__OpenBSD__)
+ # define SYMFUNCDOT89(func) { "." #func, (funcptr)&func ## _sparcv89 },
+@@ -298,7 +298,7 @@
+ LoaderAddSymbols(-1, -1, dixLookupTab ) ;
+ LoaderAddSymbols(-1, -1, fontLookupTab ) ;
+ LoaderAddSymbols(-1, -1, extLookupTab );
+-#ifdef __sparc__
++#if defined(__sparc__) && !defined(__FreeBSD__)
+ #ifdef linux
+ if (sparcUseHWMulDiv())
+ LoaderAddSymbols(-1, -1, SparcV89LookupTab ) ;
diff --git a/x11-servers/XFree86-4-Server/files/patch-os-support_Imakefile b/x11-servers/XFree86-4-Server/files/patch-os-support_Imakefile
new file mode 100644
index 000000000000..5ca4d30ccf34
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-os-support_Imakefile
@@ -0,0 +1,10 @@
+--- programs/Xserver/hw/xfree86/os-support/Imakefile.orig Mon Feb 17 12:06:45 2003
++++ programs/Xserver/hw/xfree86/os-support/Imakefile Thu May 15 16:51:46 2003
+@@ -13,6 +13,7 @@
+ #if defined(i386Architecture) || defined(ia64Architecture) || \
+ (defined(SunArchitecture) && defined(SparcArchitecture)) || \
+ (defined(FreeBSDArchitecture) && defined(AlphaArchitecture)) || \
++ (defined(FreeBSDArchitecture) && defined(Sparc64Architecture)) || \
+ (defined(NetBSDArchitecture) && defined(AlphaArchitecture)) || \
+ (defined(NetBSDArchitecture) && defined(PpcArchitecture)) || \
+ (defined(NetBSDArchitecture) && defined(SparcArchitecture)) || \
diff --git a/x11-servers/XFree86-4-Server/files/patch-sunffb_Imakefile b/x11-servers/XFree86-4-Server/files/patch-sunffb_Imakefile
new file mode 100644
index 000000000000..fe16ad9c1cf7
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-sunffb_Imakefile
@@ -0,0 +1,11 @@
+--- programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile.orig Mon Sep 16 14:06:01 2002
++++ programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile Tue May 20 12:25:15 2003
+@@ -49,7 +49,7 @@
+ #define FFBsObjectRule(name) @@\
+ name.o: name.s @@\
+ $(RM) $@ @@\
+- $(CPP) $*.s | $(AS) $(GCCVISOPTION) -o $@ -
++ $(CC) -c -x assembler-with-cpp $(GCCVISOPTION) $*.s -o $@
+ #endif
+ #else
+ VISOBJS =
diff --git a/x11-servers/XFree86-4-Server/files/patch-xf86-common-Imakefile b/x11-servers/XFree86-4-Server/files/patch-xf86-common-Imakefile
index 339256aef92b..c5c5c7617849 100644
--- a/x11-servers/XFree86-4-Server/files/patch-xf86-common-Imakefile
+++ b/x11-servers/XFree86-4-Server/files/patch-xf86-common-Imakefile
@@ -1,5 +1,5 @@
---- programs/Xserver/hw/xfree86/common/Imakefile.orig Mon Feb 17 09:06:41 2003
-+++ programs/Xserver/hw/xfree86/common/Imakefile Tue Jul 15 17:29:14 2003
+--- programs/Xserver/hw/xfree86/common/Imakefile.orig Mon Feb 17 12:06:41 2003
++++ programs/Xserver/hw/xfree86/common/Imakefile Thu May 15 20:17:15 2003
@@ -18,7 +18,8 @@
#endif /* GNUMachArchitecture */
#else
@@ -10,3 +10,12 @@
KBD = xf86KbdBSD
# else
# ifdef LinuxArchitecture
+@@ -29,7 +30,7 @@
+ # endif
+ #endif
+
+-#ifdef SparcArchitecture
++#if defined(SparcArchitecture) || defined(Sparc64Architecture)
+ SBUSSRC = xf86sbusBus.c
+ SBUSOBJ = xf86sbusBus.o
+ #endif
diff --git a/x11-servers/XFree86-4-Server/files/patch-xf86Events.c b/x11-servers/XFree86-4-Server/files/patch-xf86Events.c
new file mode 100644
index 000000000000..728c22d9a811
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-xf86Events.c
@@ -0,0 +1,18 @@
+--- programs/Xserver/hw/xfree86/common/xf86Events.c.orig Wed May 21 14:24:03 2003
++++ programs/Xserver/hw/xfree86/common/xf86Events.c Wed May 21 14:24:28 2003
+@@ -828,6 +828,7 @@
+ }
+ #endif
+
++#ifndef __sparc64__
+ /*
+ * PC keyboards generate separate key codes for
+ * Alt+Print and Control+Pause but in the X keyboard model
+@@ -838,6 +839,7 @@
+ scanCode = KEY_Print;
+ else if (scanCode == KEY_Break)
+ scanCode = KEY_Pause;
++#endif
+
+ /*
+ * Now map the scancodes to real X-keycodes ...
diff --git a/x11-servers/XFree86-4-Server/files/patch-xf86Sbus.h b/x11-servers/XFree86-4-Server/files/patch-xf86Sbus.h
new file mode 100644
index 000000000000..c6ac90bc6a21
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-xf86Sbus.h
@@ -0,0 +1,16 @@
+--- programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h.orig Wed May 22 17:38:30 2002
++++ programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h Fri May 16 15:47:05 2003
+@@ -35,7 +35,13 @@
+ #elif defined(__OpenBSD__) && defined(__sparc64__)
+ /* XXX */
+ #elif defined(CSRG_BASED)
++#if defined(__FreeBSD__)
++#include <sys/types.h>
++#include <sys/fbio.h>
++#include <dev/ofw/openpromio.h>
++#else
+ #include <machine/fbio.h>
++#endif
+ #else
+ #include <sun/fbio.h>
+ #endif
diff --git a/x11-servers/XFree86-4-Server/files/patch-xf86sym.c b/x11-servers/XFree86-4-Server/files/patch-xf86sym.c
new file mode 100644
index 000000000000..1d30c304c847
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-xf86sym.c
@@ -0,0 +1,31 @@
+--- programs/Xserver/hw/xfree86/loader/xf86sym.c.orig Wed Feb 26 15:08:02 2003
++++ programs/Xserver/hw/xfree86/loader/xf86sym.c Wed May 21 08:47:39 2003
+@@ -106,6 +106,14 @@
+ extern void* __remqu(long, long);
+ #endif
+
++#if defined(__sparc__) && defined(__FreeBSD__)
++extern float _Qp_qtos(unsigned int *);
++extern double _Qp_qtod(unsigned int *);
++extern unsigned long long _Qp_qtoux(unsigned int *);
++extern void _Qp_dtoq(unsigned int *, double);
++extern void _Qp_uitoq(unsigned int *, unsigned int);
++#endif
++
+ #if defined(__GNUC__)
+ extern long __div64(long, long);
+ extern long __divdf3(long, long);
+@@ -1066,6 +1074,13 @@
+
+ #ifdef __FreeBSD__
+ SYMFUNC(sysctlbyname)
++#if defined(__sparc__)
++ SYMFUNC(_Qp_qtos)
++ SYMFUNC(_Qp_qtod)
++ SYMFUNC(_Qp_qtoux)
++ SYMFUNC(_Qp_uitoq)
++ SYMFUNC(_Qp_dtoq)
++#endif
+ #endif
+
+ /*
diff --git a/x11-servers/XFree86-4-Server/files/patch-xfree86.cf b/x11-servers/XFree86-4-Server/files/patch-xfree86.cf
new file mode 100644
index 000000000000..a46f6ae40b15
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-xfree86.cf
@@ -0,0 +1,11 @@
+--- config/cf/xfree86.cf.orig Mon May 19 02:11:26 2003
++++ config/cf/xfree86.cf Mon May 19 02:12:05 2003
+@@ -481,7 +481,7 @@
+
+ /* SPARC and UltraSPARC drivers */
+
+-#if defined(SparcArchitecture) && \
++#if (defined(SparcArchitecture) || defined(Sparc64Architecture)) && \
+ !defined(LynxOSArchitecture) && \
+ !defined(NetBSDArchitecture) && \
+ !defined(OpenBSDArchitecture)
diff --git a/x11-servers/XFree86-4-Server/pkg-plist b/x11-servers/XFree86-4-Server/pkg-plist
index ccc5618b233c..5a79b45d69a2 100644
--- a/x11-servers/XFree86-4-Server/pkg-plist
+++ b/x11-servers/XFree86-4-Server/pkg-plist
@@ -1,18 +1,18 @@
bin/X
bin/XFree86
bin/gtf
-bin/inb
-bin/inl
-bin/inw
-bin/ioport
+%%SPARC64_NA%%bin/inb
+%%SPARC64_NA%%bin/inl
+%%SPARC64_NA%%bin/inw
+%%SPARC64_NA%%bin/ioport
bin/kbd_mode
bin/mmapr
bin/mmapw
-bin/outb
-bin/outl
-bin/outw
+%%SPARC64_NA%%bin/outb
+%%SPARC64_NA%%bin/outl
+%%SPARC64_NA%%bin/outw
bin/pcitweak
-%%ALPHA_NA%%bin/scanpci
+%%SPARC64_NA%%%%ALPHA_NA%%bin/scanpci
bin/xf86cfg
bin/xf86config
include/X11/bitmaps/card.xbm
@@ -172,7 +172,7 @@ lib/modules/input/spaceorb_drv.o
lib/modules/input/summa_drv.o
lib/modules/input/void_drv.o
lib/modules/input/wacom_drv.o
-%%ALPHA_NA%%lib/modules/libafb.a
+%%SPARC64_NA%%%%ALPHA_NA%%lib/modules/libafb.a
lib/modules/libcfb.a
lib/modules/libcfb16.a
lib/modules/libcfb24.a
@@ -197,5 +197,5 @@ lib/modules/libxf24_32bpp.a
lib/modules/libxf4bpp.a
lib/modules/libxf8_16bpp.a
lib/modules/libxf8_32bpp.a
-lib/modules/v10002d.uc
-lib/modules/v20002d.uc
+%%SPARC64_NA%%lib/modules/v10002d.uc
+%%SPARC64_NA%%lib/modules/v20002d.uc