diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-08-28 02:38:21 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-08-28 02:38:21 +0800 |
commit | 5b69d6a22223574eeae92fc0926cdbbe59818798 (patch) | |
tree | 4393f5e84f8dd92ea8cd53c013c56aa90e80b2b5 /x11-servers | |
parent | 1131e65a1faad808d56038d0e97c0eaf7a8ae9e3 (diff) | |
download | marcuscom-ports-5b69d6a22223574eeae92fc0926cdbbe59818798.tar marcuscom-ports-5b69d6a22223574eeae92fc0926cdbbe59818798.tar.gz marcuscom-ports-5b69d6a22223574eeae92fc0926cdbbe59818798.tar.bz2 marcuscom-ports-5b69d6a22223574eeae92fc0926cdbbe59818798.tar.lz marcuscom-ports-5b69d6a22223574eeae92fc0926cdbbe59818798.tar.xz marcuscom-ports-5b69d6a22223574eeae92fc0926cdbbe59818798.tar.zst marcuscom-ports-5b69d6a22223574eeae92fc0926cdbbe59818798.zip |
Update freetype2 to 2.2.1, and fix various ports to allow compilation with
the new version. Please test heavily.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@7159 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11-servers')
61 files changed, 3663 insertions, 0 deletions
diff --git a/x11-servers/XFree86-4-Server/Makefile b/x11-servers/XFree86-4-Server/Makefile new file mode 100644 index 000000000..6dec26f65 --- /dev/null +++ b/x11-servers/XFree86-4-Server/Makefile @@ -0,0 +1,219 @@ +# New ports collection makefile for: XFree86-Server +# Date created: 10 Oct 1999 +# Whom: taguchi@tohoku.iij.ad.jp +# +# $FreeBSD: ports/x11-servers/XFree86-4-Server/Makefile,v 1.171 2006/08/26 04:09:21 lesi Exp $ +# + +PORTNAME= Server +PORTVERSION= 4.5.0 +PORTREVISION= 4 +CATEGORIES= x11-servers +MASTER_SITES= ${MASTER_SITE_XFREE} +MASTER_SITE_SUBDIR= ${PORTVERSION} +PKGNAMEPREFIX= XFree86- +DISTFILES= XFree86-${PORTVERSION}-src-1.tgz \ + XFree86-${PORTVERSION}-src-2.tgz \ + XFree86-${PORTVERSION}-src-3.tgz + +MAINTAINER= x11@FreeBSD.org +COMMENT= XFree86-4 X server and related programs + +CONFLICTS= xorg-server-[0-9]* + +# Override default from XFree86-4-libraries/Makefile.inc +PATCHDIR= ${MASTERDIR}/files + +.for pf in patch-Imake.rules patch-Imake.tmpl \ + patch-X11.tmpl patch-Xcursor-Imakefile \ + patch-c2 \ + patch-f patch-imake.c \ + patch-texteroids patch-xditview-Imakefile patch-xdm \ + patch-xdm_session.c patch-xf86.tmpl \ + patch-xterm-Imakefile patch-z14 \ + patch-z15 patch-z34 patch-z35 \ + patch-z45 \ + patch-lib_GL_GL_Imakefile \ + patch-lib_GL_mesa_drivers_dri_Imakefile \ + patch-lib_GL_mesa_drivers_osmesa_Imakefile \ + patch-programs_Xserver_GL_dri_Imakefile +# patch-startx + +EXTRA_PATCHES+= ${.CURDIR}/../../x11/XFree86-4-libraries/files/${pf} +.endfor + +SCRIPTS_ENV= OSVERSION=${OSVERSION} \ + BuildXF86DRI=${BuildXF86DRI} \ + WITH_DEBUG="${WITH_DEBUG}" +MAN1= XFree86.1 \ + Xserver.1 \ + getconfig.1 \ + gtf.1 \ + kbd_mode.1 \ + pcitweak.1 \ + xf86cfg.1 \ + xf86config.1 +MAN3= XF86VidMode.3 \ + XF86VidModeDeleteModeLine.3 \ + XF86VidModeGetAllModeLines.3 \ + XF86VidModeGetDotClocks.3 \ + XF86VidModeGetGamma.3 \ + XF86VidModeGetGammaRamp.3 \ + XF86VidModeGetGammaRampSize.3 \ + XF86VidModeGetModeLine.3 \ + XF86VidModeGetMonitor.3 \ + XF86VidModeGetPermissions.3 \ + XF86VidModeGetViewPort.3 \ + XF86VidModeLockModeSwitch.3 \ + XF86VidModeModModeLine.3 \ + XF86VidModeQueryExtension.3 \ + XF86VidModeQueryVersion.3 \ + XF86VidModeSetClientVersion.3 \ + XF86VidModeSetGamma.3 \ + XF86VidModeSetGammaRamp.3 \ + XF86VidModeSetViewPort.3 \ + XF86VidModeSwitchMode.3 \ + XF86VidModeSwitchToMode.3 \ + XF86VidModeValidateModeLine.3 +MAN4= citron.4x \ + dynapro.4x \ + elographics.4x \ + fbdevhw.4x \ + kbd.4x \ + keyboard.4x \ + microtouch.4x \ + mouse.4x \ + mutouch.4x \ + nv.4x \ + r128.4x \ + radeon.4x \ + void.4x \ + wacom.4x +MAN5= XF86Config.5 \ + getconfig.5 +XBUILD_DIRS= lib/font lib/lbxutil lib/Xdmcp lib/Xau programs/Xserver +XINCLUDE_DIRS= lib/xkbfile lib/xtrans +XINSTALL_DIRS= lib/font programs/Xserver +XINSTALL_MAN_DIRS= programs/Xserver + +NOT_FOR_ARCHS= ia64 + +.include "${.CURDIR}/../../x11/XFree86-4-libraries/Makefile.inc" +.include <bsd.port.pre.mk> + +.if ${X_WINDOW_SYSTEM:L} != xfree86-4 +IGNORE= is part of XFree86 and you have ${X_WINDOW_SYSTEM} set for X11\ + distribution. See The X Window System and Virtual Consoles chapter\ + of FAQ for more information +.endif + +.if ${ARCH} == i386 || ${ARCH} == alpha || ${ARCH} == amd64 +RUN_DEPENDS+= ${X11BASE}/lib/modules/dri/r200_dri.so:${PORTSDIR}/graphics/xfree86-dri +BuildXF86DRI= YES +PLIST_SUB+= DRI="" +.else +BuildXF86DRI= NO +PLIST_SUB+= DRI="@comment " +.endif + +.if ${ARCH} == alpha +PLIST_SUB+= ALPHA_NA="@comment " +MAN4+= cirrus.4x +.else +PLIST_SUB+= ALPHA_NA="" +.endif + +.if ${ARCH} == amd64 +PLIST_SUB+= AMD64_NA="@comment " +PLIST_SUB+= AMD64="" +MAN4+= apm.4x \ + chips.4x \ + cirrus.4x \ + cyrix.4x \ + fbdev.4x \ + i128.4x \ + neomagic.4x \ + sis.4x \ + trident.4x \ + tseng.4x \ + vesa.4x +.else +PLIST_SUB+= AMD64_NA="" +PLIST_SUB+= AMD64="@comment " +.endif + +.if ${ARCH} == ia64 +PLIST_SUB+= IA64_NA="@comment " +.else +PLIST_SUB+= IA64_NA="" +.endif + +.if ${ARCH} == powerpc +PLIST_SUB+= PPC_NA="@comment " +.else +PLIST_SUB+= PPC_NA="" +.endif + +.if ${ARCH} == sparc64 +PLIST_SUB+= SPARC64_NA="@comment " +PLIST_SUB+= SPARC64="" +MAN4+= sunffb.4x +.else +PLIST_SUB+= SPARC64="@comment " +PLIST_SUB+= SPARC64_NA="" +MAN4+= glint.4x \ + mga.4x \ + s3virge.4x \ + savage.4x \ + tdfx.4x \ + vga.4x +.endif + +.if ${ARCH} == i386 +PLIST_SUB+= I386="" +MAN1+= scanpci.1 +MAN4+= apm.4x \ + chips.4x \ + cirrus.4x \ + cyrix.4x \ + i128.4x \ + i740.4x \ + i810.4x \ + neomagic.4x \ + nsc.4x \ + sis.4x \ + trident.4x \ + tseng.4x \ + vesa.4x \ + via.4x \ + vmware.4x +.else +PLIST_SUB+= I386="@comment " +.endif + +.if ${ARCH} == i386 || ${ARCH} == amd64 +PLIST_SUB+= AMD64_I386="" +.else +PLIST_SUB+= AMD64_I386="@comment " +.endif + +.if ${ARCH} != powerpc && ${ARCH} != sparc64 +MAN4+= rendition.4x \ + siliconmotion.4x +.endif + +.if !defined(NO_SUID_XSERVER) || ${NO_SUID_XSERVER} == NO +pre-everything:: + @${ECHO_MSG} "By default, the X Server installs as a set-user-id root binary. When run by" + @${ECHO_MSG} "a normal user, it checks arguments and environment as done in the x11/wrapper" + @${ECHO_MSG} "port before handling them normally. If you are concerned about the security" + @${ECHO_MSG} "of this, but still want to run an X Server (for example using xdm/kdm/gdm," + @${ECHO_MSG} "which will still run the server as root), you can cancel the build and set" + @${ECHO_MSG} "NO_SUID_XSERVER=YES in /etc/make.conf." + +SCRIPTS_ENV+= SUID_XSERVER=YES +.else +SCRIPTS_ENV+= SUID_XSERVER=NO +.endif + +.include <bsd.port.post.mk> diff --git a/x11-servers/XFree86-4-Server/distinfo b/x11-servers/XFree86-4-Server/distinfo new file mode 100644 index 000000000..a439d4854 --- /dev/null +++ b/x11-servers/XFree86-4-Server/distinfo @@ -0,0 +1,9 @@ +MD5 (xc/XFree86-4.5.0-src-1.tgz) = 6c0fcf8069c13d068276016bbf6ad712 +SHA256 (xc/XFree86-4.5.0-src-1.tgz) = 0e9fb93a0db5f7f4f78e951d559fae36a0fb0e24683a9918dff7ffee766e0aae +SIZE (xc/XFree86-4.5.0-src-1.tgz) = 10507331 +MD5 (xc/XFree86-4.5.0-src-2.tgz) = cc296c71cbe58edc3ffdec1084e58f4c +SHA256 (xc/XFree86-4.5.0-src-2.tgz) = a50120da18c6caeb151094fa2ab7afc618821c72d3cedf6842f3636880839a09 +SIZE (xc/XFree86-4.5.0-src-2.tgz) = 5826556 +MD5 (xc/XFree86-4.5.0-src-3.tgz) = c0ad630bfec4545857c2877b3e2dcbeb +SHA256 (xc/XFree86-4.5.0-src-3.tgz) = 2719f8055955dce293f2a8a846514d3908fa05b9d053c59b4fe1e09470a054df +SIZE (xc/XFree86-4.5.0-src-3.tgz) = 12086763 diff --git a/x11-servers/XFree86-4-Server/files/patch-CAN-2005-2495 b/x11-servers/XFree86-4-Server/files/patch-CAN-2005-2495 new file mode 100644 index 000000000..672d7b7e6 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-CAN-2005-2495 @@ -0,0 +1,312 @@ +Index: programs/Xserver/afb/afbpixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/afb/afbpixmap.c,v +retrieving revision 3.1 +retrieving revision 3.1.20.1 +diff -u -r3.1 -r3.1.20.1 +--- programs/Xserver/afb/afbpixmap.c 3 Jun 1997 14:11:07 -0000 3.1 ++++ programs/Xserver/afb/afbpixmap.c 18 Sep 2005 00:20:57 -0000 3.1.20.1 +@@ -76,6 +76,9 @@ + int datasize; + int paddedWidth; + ++ if ((width > MAXSHORT) || (height > MAXSHORT)) ++ return NullPixmap; ++ + paddedWidth = BitmapBytePad(width); + datasize = height * paddedWidth * depth; + pPixmap = AllocatePixmap(pScreen, datasize); +Index: programs/Xserver/cfb/cfbpixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/cfb/cfbpixmap.c,v +retrieving revision 1.5 +retrieving revision 1.5.8.1 +diff -u -r1.5 -r1.5.8.1 +--- programs/Xserver/cfb/cfbpixmap.c 14 Dec 2001 19:59:23 -0000 1.5 ++++ programs/Xserver/cfb/cfbpixmap.c 18 Sep 2005 00:20:57 -0000 1.5.8.1 +@@ -73,6 +72,9 @@ + int datasize; + int paddedWidth; + ++ if ((width > MAXSHORT) || (height > MAXSHORT)) ++ return NullPixmap; ++ + paddedWidth = PixmapBytePad(width, depth); + datasize = height * paddedWidth; + pPixmap = AllocatePixmap(pScreen, datasize); +Index: programs/Xserver/dix/pixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/dix/pixmap.c,v +retrieving revision 3.5 +retrieving revision 3.5.8.1 +diff -u -r3.5 -r3.5.8.1 +--- programs/Xserver/dix/pixmap.c 14 Dec 2001 19:59:32 -0000 3.5 ++++ programs/Xserver/dix/pixmap.c 18 Sep 2005 00:20:58 -0000 3.5.8.1 +@@ -126,7 +125,9 @@ + unsigned size; + int i; + +- pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize); ++ if (((unsigned)(-1) - pScreen->totalPixmapSize) < (unsigned)pixDataSize) ++ return NullPixmap; ++ pPixmap = xalloc(pScreen->totalPixmapSize + (unsigned)pixDataSize); + if (!pPixmap) + return NullPixmap; + ppriv = (DevUnion *)(pPixmap + 1); +@@ -144,7 +145,7 @@ + ppriv->ptr = (pointer)NULL; + } + #else +- pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec) + pixDataSize); ++ pPixmap = xalloc(sizeof(PixmapRec) + (unsigned)pixDataSize); + #endif + return pPixmap; + } +Index: programs/Xserver/fb/fbpixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/fb/fbpixmap.c,v +retrieving revision 1.11 +retrieving revision 1.11.6.1 +diff -u -r1.11 -r1.11.6.1 +--- programs/Xserver/fb/fbpixmap.c 16 Sep 2002 18:05:34 -0000 1.11 ++++ programs/Xserver/fb/fbpixmap.c 18 Sep 2005 00:20:58 -0000 1.11.6.1 +@@ -37,6 +37,9 @@ + int adjust; + int base; + ++ if ((width > MAXSHORT) || (height > MAXSHORT)) ++ return NullPixmap; ++ + paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits); + datasize = height * paddedWidth; + #ifdef PIXPRIV +Index: programs/Xserver/hw/xfree86/xaa/xaaInit.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/hw/xfree86/xaa/xaaInit.c,v +retrieving revision 1.35 +retrieving revision 1.35.10.1 +diff -u -r1.35 -r1.35.10.1 +--- programs/Xserver/hw/xfree86/xaa/xaaInit.c 19 Jul 2001 18:50:16 -0000 1.35 ++++ programs/Xserver/hw/xfree86/xaa/xaaInit.c 18 Sep 2005 00:20:59 -0000 1.35.10.1 +@@ -479,8 +479,12 @@ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + XAAPixmapPtr pPriv; + PixmapPtr pPix = NULL; +- int size = w * h; ++ int size; ++ ++ if ((w > MAXSHORT) || (h > MAXSHORT)) ++ return NullPixmap; + ++ size = w * h; + if (!infoRec->offscreenDepthsInitialized) + XAAInitializeOffscreenDepths (pScreen); + +Index: programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c,v +retrieving revision 1.5 +retrieving revision 1.5.14.1 +diff -u -r1.5 -r1.5.14.1 +--- programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c 27 Apr 2000 16:26:49 -0000 1.5 ++++ programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c 18 Sep 2005 00:21:00 -0000 1.5.14.1 +@@ -89,8 +89,8 @@ + + TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d)\n", pScreen, width, height, depth)) ; + +- if ( depth > 8 ) +- return (PixmapPtr) NULL ; ++ if ((depth > 8) || (width > MAXSHORT) || (height > MAXSHORT)) ++ return NullPixmap; + + size = PixmapBytePad(width, depth); + pPixmap = AllocatePixmap (pScreen, (height * size)); +Index: programs/Xserver/ilbm/ilbmpixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/ilbm/ilbmpixmap.c,v +retrieving revision 3.0 +retrieving revision 3.0.26.1 +diff -u -r3.0 -r3.0.26.1 +--- programs/Xserver/ilbm/ilbmpixmap.c 18 Aug 1996 01:54:01 -0000 3.0 ++++ programs/Xserver/ilbm/ilbmpixmap.c 18 Sep 2005 00:21:00 -0000 3.0.26.1 +@@ -78,6 +78,9 @@ + int datasize; + int paddedWidth; + ++ if ((width > MAXSHORT) || (height > MAXSHORT)) ++ return NullPixmap; ++ + paddedWidth = BitmapBytePad(width); + datasize = height * paddedWidth * depth; + pPixmap = AllocatePixmap(pScreen, datasize); +Index: programs/Xserver/iplan2p4/iplpixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/iplan2p4/iplpixmap.c,v +retrieving revision 3.1 +retrieving revision 3.1.8.1 +diff -u -r3.1 -r3.1.8.1 +--- programs/Xserver/iplan2p4/iplpixmap.c 17 Dec 2001 20:00:46 -0000 3.1 ++++ programs/Xserver/iplan2p4/iplpixmap.c 18 Sep 2005 00:21:00 -0000 3.1.8.1 +@@ -76,8 +76,12 @@ + PixmapPtr pPixmap; + int datasize; + int paddedWidth; +- int ipad=INTER_PLANES*2 - 1; ++ int ipad; + ++ if ((width > MAXSHORT) || (height > MAXSHORT)) ++ return NullPixmap; ++ ++ ipad = INTER_PLANES*2 - 1; + paddedWidth = PixmapBytePad(width, depth); + paddedWidth = (paddedWidth + ipad) & ~ipad; + datasize = height * paddedWidth; +Index: programs/Xserver/mfb/mfbpixmap.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/mfb/mfbpixmap.c,v +retrieving revision 1.2 +retrieving revision 1.2.8.1 +diff -u -r1.2 -r1.2.8.1 +--- programs/Xserver/mfb/mfbpixmap.c 14 Dec 2001 20:00:10 -0000 1.2 ++++ programs/Xserver/mfb/mfbpixmap.c 18 Sep 2005 00:21:00 -0000 1.2.8.1 +@@ -44,7 +45,6 @@ + SOFTWARE. + + ******************************************************************/ +-/* $Xorg: mfbpixmap.c,v 1.4 2001/02/09 02:05:19 xorgcvs Exp $ */ + + /* pixmap management + written by drewry, september 1986 +@@ -75,8 +75,9 @@ + int datasize; + int paddedWidth; + +- if (depth != 1) ++ if ((depth != 1) || (width > MAXSHORT) || (height > MAXSHORT)) + return NullPixmap; ++ + paddedWidth = BitmapBytePad(width); + datasize = height * paddedWidth; + pPixmap = AllocatePixmap(pScreen, datasize); +Index: programs/Xserver/os/utils.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/os/utils.c,v +retrieving revision 3.102 +retrieving revision 3.102.2.1 +diff -u -r3.102 -r3.102.2.1 +--- programs/Xserver/os/utils.c 3 Feb 2005 02:01:14 -0000 3.102 ++++ programs/Xserver/os/utils.c 18 Sep 2005 00:21:00 -0000 3.102.2.1 +@@ -1243,19 +1243,19 @@ + void * + Xalloc(unsigned long amount) + { +- register pointer ptr; +- +- if ((long)amount <= 0) +- return NULL; ++ pointer ptr; + + /* aligned extra on long word boundary */ + amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1); ++ ++ if ((long)amount <= 0) ++ return NULL; + #ifdef MEMBUG + if (!Must_have_memory && Memory_fail && + ((random() % MEM_FAIL_SCALE) < Memory_fail)) + return NULL; + #endif +- if ((ptr = (pointer)malloc(amount))) { ++ if ((ptr = malloc(amount))) { + return ptr; + } + if (Must_have_memory) +@@ -1273,12 +1273,16 @@ + { + register pointer ptr; + +- if ((long)amount <= 0) +- return NULL; ++ if (amount == 0) ++ return NULL; + + /* aligned extra on long word boundary */ + amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1); +- ptr = (pointer)malloc(amount); ++ ++ if ((long)amount <= 0) ++ FatalError("Bad request for memory"); ++ ++ ptr = malloc(amount); + if (!ptr) + FatalError("Out of memory"); + +@@ -1292,11 +1296,11 @@ + void * + Xcalloc(unsigned long amount) + { +- unsigned long *ret; ++ pointer ret; + +- ret = Xalloc (amount); ++ ret = Xalloc(amount); + if (ret) +- bzero ((void *) ret, (int) amount); ++ bzero (ret, (int) amount); + return ret; + } + +@@ -1307,13 +1311,17 @@ + void * + XNFcalloc(unsigned long amount) + { +- unsigned long *ret; ++ pointer ret; + +- ret = Xalloc (amount); +- if (ret) +- bzero ((char *) ret, (int) amount); +- else if ((long)amount > 0) ++ if (amount == 0) ++ return NULL; ++ ++ ret = Xalloc(amount); ++ if (!ret) + FatalError("Out of memory"); ++ ++ bzero (ret, (int) amount); ++ + return ret; + } + +@@ -1336,10 +1344,12 @@ + return NULL; + } + amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1); ++ if ((long)amount <= 0) ++ return NULL; + if (ptr) +- ptr = (pointer)realloc((char *)ptr, amount); ++ ptr = realloc(ptr, amount); + else +- ptr = (pointer)malloc(amount); ++ ptr = malloc(amount); + if (ptr) + return ptr; + if (Must_have_memory) +@@ -1355,12 +1365,12 @@ + void * + XNFrealloc(pointer ptr, unsigned long amount) + { +- if (( ptr = (pointer)Xrealloc( ptr, amount ) ) == NULL) ++ if ((ptr = Xrealloc(ptr, amount)) == NULL) + { +- if ((long)amount > 0) ++ if (amount != 0) + FatalError( "Out of memory" ); + } +- return ((unsigned long *)ptr); ++ return ptr; + } + + /***************** 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 000000000..01fcb12d6 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-FreeBSD.cf @@ -0,0 +1,49 @@ +--- config/cf/FreeBSD.cf.orig Thu Mar 3 03:32:17 2005 ++++ config/cf/FreeBSD.cf Wed Mar 23 10:41:03 2005 +@@ -234,11 +234,11 @@ + * ld: warning: libXThrStub.so.6, needed by libX11.so, not found + */ + #if BuildThreadStubLibrary && (!defined(UseInstalledX11) || !UseInstalledX11) +-# define CcCmd $(CLIENTENVSETUP) cc +-# define CplusplusCmd $(CLIENTENVSETUP) c++ ++# define CcCmd $(CLIENTENVSETUP) FreeBSDCC ++# define CplusplusCmd $(CLIENTENVSETUP) FreeBSDCXX + #else +-# define CcCmd cc +-# define CplusplusCmd c++ ++# define CcCmd FreeBSDCC ++# define CplusplusCmd FreeBSDCXX + #endif + + #define CppCmd /usr/bin/cpp +@@ -470,6 +470,9 @@ + #define AsVISOption -Av9a + #define AsOutputArchSize 64 + #endif ++#ifdef PpcArchitecture ++#define XF86INT10_BUILD X86INT10_STUB ++#endif + + #define StandardDefines -DCSRG_BASED + +@@ -491,18 +494,8 @@ + #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC + #endif + +-/* 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 GccAliasingArgs +-#endif +-#endif +- +-#ifdef i386Architecture +-# define OptimizedCDebugFlags DefaultGcc2i386Opt +-#else +-# define OptimizedCDebugFlags -O +-#endif ++#define DefaultGcc2i386Opt ++#define OptimizedCDebugFlags FreeBSDCFLAGS + + #ifndef PreIncDir + # define PreIncDir /usr/include diff --git a/x11-servers/XFree86-4-Server/files/patch-GL-Imakefile b/x11-servers/XFree86-4-Server/files/patch-GL-Imakefile new file mode 100644 index 000000000..40560c382 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-GL-Imakefile @@ -0,0 +1,11 @@ +--- lib/GL/Imakefile.orig Thu Oct 23 00:33:15 2003 ++++ lib/GL/Imakefile Thu Oct 23 00:35:49 2003 +@@ -110,7 +110,7 @@ + #if BuildXF86DRI && GlxUseBuiltInDRIDriver + SUBDIRS = $(MESADIRS) $(DRIDIRS) $(DRIVERDIRS) $(GLXDIRS) $(LIBGLBUILDDIR) $(OSMESADIRS) + #else +-SUBDIRS = $(MESADIRS) $(GLXDIRS) $(DRIDIRS) $(LIBGLBUILDDIR) $(OSMESADIRS) $(DRIVERDIRS) ++SUBDIRS = $(MESADIRS) $(GLXDIRS) $(DRIDIRS) /*$(LIBGLBUILDDIR) $(OSMESADIRS) */ $(DRIVERDIRS) + #endif + + MakeSubdirs($(SUBDIRS)) diff --git a/x11-servers/XFree86-4-Server/files/patch-HALlib_bindings.c b/x11-servers/XFree86-4-Server/files/patch-HALlib_bindings.c new file mode 100644 index 000000000..4f2b4f41f --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-HALlib_bindings.c @@ -0,0 +1,27 @@ +Index: programs/Xserver/hw/xfree86/drivers/mga/HALlib/binding.h +=================================================================== +RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/mga/HALlib/binding.h,v +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -r1.6 -r1.7 +--- programs/Xserver/hw/xfree86/drivers/mga/HALlib/binding.h 31 Mar 2004 16:37:09 -0000 1.6 ++++ programs/Xserver/hw/xfree86/drivers/mga/HALlib/binding.h 26 Apr 2005 00:56:44 -0000 1.7 +@@ -210,6 +210,8 @@ + #define MGAMODEINFO_FORCE_PITCH (1L << 5) + #define MGAMODEINFO_FORCE_DISPLAYORG (1L << 6) + #define MGAMODEINFO_TV (1L << 7) ++#define MGAMODEINFO_FLATPANEL1 (1L << 8) ++#define MGAMODEINFO_FLATPANEL2 (1L << 9) + #define MGAMODEINFO_TESTONLY 0x80000000 + + /* Cable Type */ +@@ -243,7 +245,8 @@ + ULONG MGAGetBOARDHANDLESize(void); + ULONG MGASetTVStandard(LPBOARDHANDLE pBoard, ULONG ulTVStandard); + ULONG MGASetTVCableType(LPBOARDHANDLE pBoard, ULONG ulCableType); +-ULONG MGASetDisplayStart(LPBOARDHANDLE pBoard, ULONG ulX, ULONG ulY, ULONG ulCrtc); ++ULONG MGAForceFlatPanel(LPBOARDHANDLE pBoard); ++ULONG HALSetDisplayStart(LPBOARDHANDLE pBoard, ULONG ulX, ULONG ulY, ULONG ulCrtc); + + #if defined(__cplusplus) + } diff --git a/x11-servers/XFree86-4-Server/files/patch-Imake.cf b/x11-servers/XFree86-4-Server/files/patch-Imake.cf new file mode 100644 index 000000000..cdda9ca19 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-Imake.cf @@ -0,0 +1,18 @@ + +--- patch-Imake.cf begins here --- +--- config/cf/Imake.cf.orig Wed Jan 19 20:53:39 2005 ++++ config/cf/Imake.cf Wed Jan 19 20:55:09 2005 +@@ -282,6 +282,10 @@ + # undef __amd64__ + # undef __x86_64__ + # endif ++# ifdef __powerpc__ ++# define PpcArchitecture ++# undef __powerpc__ ++# endif + #endif /* __FreeBSD__ */ + + /* Systems based on kernel of FreeBSD */ +--- patch-Imake.cf ends here --- + + diff --git a/x11-servers/XFree86-4-Server/files/patch-Pci.h b/x11-servers/XFree86-4-Server/files/patch-Pci.h new file mode 100644 index 000000000..ece4cf51d --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-Pci.h @@ -0,0 +1,16 @@ + +--- patch-Pci.h begins here --- +--- programs/Xserver/hw/xfree86/os-support/bus/Pci.h.orig Thu Jan 20 06:51:21 2005 ++++ programs/Xserver/hw/xfree86/os-support/bus/Pci.h Thu Jan 20 06:52:09 2005 +@@ -285,7 +285,7 @@ + # define ARCH_PCI_INIT linuxPciInit + # define INCLUDE_XF86_MAP_PCI_MEM + # define INCLUDE_XF86_NO_DOMAIN /* Needs kernel work to remove */ +-# elif defined(__OpenBSD__) ++# elif defined(__FreeBSD__) || defined(__OpenBSD__) + # define ARCH_PCI_INIT freebsdPciInit + # define INCLUDE_XF86_MAP_PCI_MEM + # define INCLUDE_XF86_NO_DOMAIN +--- patch-Pci.h ends here --- + + diff --git a/x11-servers/XFree86-4-Server/files/patch-bsdResource.c b/x11-servers/XFree86-4-Server/files/patch-bsdResource.c new file mode 100644 index 000000000..e031b2681 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-bsdResource.c @@ -0,0 +1,68 @@ +--- programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c.orig Fri Apr 23 21:54:07 2004 ++++ programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c Tue May 17 00:48:36 2005 +@@ -18,7 +18,7 @@ + + #ifdef INCLUDE_XF86_NO_DOMAIN + +-#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) ++#if defined(__alpha__) || defined(__amd64__) + + resPtr + xf86BusAccWindowsFromOS(void) +@@ -112,7 +112,7 @@ + return ret; + } + +-#elif defined(__powerpc__) ++#elif defined(__powerpc__) || defined(__sparc__) || defined(__sparc64__) + + resPtr + xf86BusAccWindowsFromOS(void) +@@ -123,7 +123,11 @@ + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); + ret = xf86AddResToList(ret, &range, -1); + ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + return ret; + } +@@ -137,7 +141,11 @@ + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); + ret = xf86AddResToList(ret, &range, -1); + ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + return ret; + } +@@ -153,7 +161,11 @@ + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); + ret = xf86AddResToList(ret, &range, -1); + ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + return ret; + } +@@ -175,7 +187,11 @@ + ret = xf86AddResToList(ret, &range, -1); + RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); + ret = xf86AddResToList(ret, &range, -1); ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + + return ret; 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 000000000..0e80a054d --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-bus_Imakefile @@ -0,0 +1,21 @@ + +--- patch-bus-Imakefile begins here --- +--- programs/Xserver/hw/xfree86/os-support/bus/Imakefile.orig Thu Jan 20 03:43:03 2005 ++++ programs/Xserver/hw/xfree86/os-support/bus/Imakefile Thu Jan 20 03:46:40 2005 +@@ -66,6 +66,13 @@ + PCIDRVRSRC = netbsdPci.c + PCIDRVROBJ = netbsdPci.o + ++#elif defined(FreeBSDArchitecture) && defined(PpcArchitecture) ++ ++XCOMM FreeBSD/PowerPC PCI driver (using /dev/pci) ++ ++PCIDRVRSRC = freebsdPci.c ++PCIDRVROBJ = freebsdPci.o ++ + #elif defined(PpcArchitecture) + + XCOMM PowerPC PCI drivers +--- patch-bus-Imakefile ends here --- + + 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 000000000..cab042675 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-compiler.h @@ -0,0 +1,16 @@ + +--- patch-compiler.h begins here --- +--- programs/Xserver/hw/xfree86/common/compiler.h.orig Fri Jan 21 03:19:16 2005 ++++ programs/Xserver/hw/xfree86/common/compiler.h Fri Jan 21 03:20:03 2005 +@@ -1068,7 +1068,7 @@ + # define write_mem_barrier() /* NOP */ + # endif /* __arm32__ */ + +-# elif (defined(Lynx) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__)) && defined(__powerpc__) ++# elif (defined(Lynx) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__) + + # ifndef MAP_FAILED + # define MAP_FAILED ((void *)-1) +--- patch-compiler.h ends here --- + + diff --git a/x11-servers/XFree86-4-Server/files/patch-drm_Imakefile b/x11-servers/XFree86-4-Server/files/patch-drm_Imakefile new file mode 100644 index 000000000..08e8d9ab4 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-drm_Imakefile @@ -0,0 +1,15 @@ +--- programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile.orig Thu Feb 24 16:37:48 2005 ++++ programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile Thu Feb 24 16:38:50 2005 +@@ -125,6 +125,7 @@ + $(LN) $${UP}$(DRMBSDDIR)/$$i/Makefile $(DRM_COPY_DIR)/$$i); \ + done + ++/* + INSTALL_LIST = $(INSTALL_SHARED) $(INSTALL_BSD) + InstallMultiple($(INSTALL_LIST),$(DRMBSDINSTSRCDIR)) + +@@ -138,3 +139,4 @@ + $(DESTDIR)$(DRMBSDINSTSRCDIR)/$$i); \ + done + ++*/ 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 000000000..7013d0a33 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-elfloader.c @@ -0,0 +1,82 @@ +--- programs/Xserver/hw/xfree86/loader/elfloader.c.orig Mon Mar 28 19:12:53 2005 ++++ programs/Xserver/hw/xfree86/loader/elfloader.c Mon Mar 28 19:22:51 2005 +@@ -203,6 +203,7 @@ + #if defined (__alpha__) || \ + defined (__ia64__) || \ + defined (__AMD64__) || \ ++ defined (__amd64__) || \ + (defined (__sparc__) && \ + (defined (__arch64__) || \ + defined (__sparcv9))) +@@ -294,7 +295,8 @@ + defined(__alpha__) || \ + defined(__sparc__) || \ + defined(__ia64__) || \ +- defined(__AMD64__) ++ defined(__AMD64__) || \ ++ defined(__amd64__) + typedef Elf_Rela Elf_Rel_t; + #else + typedef Elf_Rel Elf_Rel_t; +@@ -488,7 +490,8 @@ + defined(__alpha__) || \ + defined(__sparc__) || \ + defined(__ia64__) || \ +- defined(__AMD64__) ++ defined(__AMD64__) || \ ++ defined(__amd64__) + ELFDEBUG(", r_addend 0x%lx", rel->r_addend); + # endif + ELFDEBUG("\n"); +@@ -524,6 +527,7 @@ + #if defined(__alpha__) || \ + defined(__ia64__) || \ + defined(__AMD64__) || \ ++ defined(__amd64__) || \ + (defined(__sparc__) && \ + (defined(__arch64__) || \ + defined(__sparcv9))) +@@ -548,6 +552,7 @@ + #if defined(__alpha__) || \ + defined(__ia64__) || \ + defined(__AMD64__) || \ ++ defined(__amd64__) || \ + (defined(__sparc__) && \ + (defined(__arch64__) || \ + defined(__sparcv9))) +@@ -603,6 +608,7 @@ + #if defined(__alpha__) || \ + defined(__ia64__) || \ + defined(__AMD64__) || \ ++ defined(__amd64__) || \ + (defined(__sparc__) && \ + (defined(__arch64__) || \ + defined(__sparcv9))) +@@ -1263,7 +1269,7 @@ + unsigned long *dest64; + unsigned short *dest16; + #endif +-#if defined(__AMD64__) ++#if defined(__AMD64__) || defined(__amd64__) + unsigned long *dest64; + int *dest32s; + #endif +@@ -1281,7 +1287,8 @@ + defined(__alpha__) || \ + defined(__sparc__) || \ + defined(__ia64__) || \ +- defined(__AMD64__) ++ defined(__AMD64__) || \ ++ defined(__amd64__) + ELFDEBUG("%lx", rel->r_addend); + # endif + ELFDEBUG("\n"); +@@ -1340,7 +1347,7 @@ + + break; + #endif /* i386 */ +-#if defined(__AMD64__) ++#if defined(__AMD64__) || defined(__amd64__) + case R_X86_64_32: + dest32 = (unsigned int *)(secp + rel->r_offset); + # ifdef ELFDEBUG diff --git a/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftfuncs.c b/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftfuncs.c new file mode 100644 index 000000000..65e0a7487 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftfuncs.c @@ -0,0 +1,238 @@ +--- lib/font/FreeType/ftfuncs.c.orig Wed Apr 14 11:32:43 2004 ++++ lib/font/FreeType/ftfuncs.c Sun Aug 27 14:35:48 2006 +@@ -50,10 +50,7 @@ THE SOFTWARE. + #include FT_TYPE1_TABLES_H + #include FT_XFREE86_H + #include FT_BBOX_H +-#include FT_INTERNAL_TRUETYPE_TYPES_H + #include FT_TRUETYPE_TAGS_H +-#include FT_INTERNAL_SFNT_H +-#include FT_INTERNAL_STREAM_H + /* + * If you want to use FT_Outline_Get_CBox instead of + * FT_Outline_Get_BBox, define here. +@@ -119,6 +116,46 @@ static char *xlfd_props[] = { + }; + + ++/* read 2-byte value from a SFNT table */ ++static FT_UShort ++sfnt_get_ushort( FT_Face face, ++ FT_ULong table_tag, ++ FT_ULong table_offset ) ++{ ++ FT_Byte buff[2]; ++ FT_ULong len = sizeof(buff); ++ FT_UShort result = 0; ++ ++ if ( !FT_Load_Sfnt_Table( face, table_tag, table_offset, buff, &len ) ); ++ result = (FT_UShort)( (buff[0] << 8) | buff[1] ); ++ ++ return result; ++} ++ ++#define sfnt_get_short(f,t,o) ((FT_Short)sfnt_get_ushort((f),(t),(o))) ++ ++ ++#if 0 ++static FT_ULong ++sfnt_get_ulong( FT_Face face, ++ FT_ULong table_tag, ++ FT_ULong table_offset ) ++{ ++ FT_Byte buff[4]; ++ FT_ULong len = sizeof(buff); ++ FT_UShort result = 0; ++ ++ if ( !FT_Load_Sfnt_Table( face, table_tag, table_offset, buff, &len ); ++ result = ((FT_ULong)buff[0] << 24) | ((FT_ULong)buff[1] << 16) | ++ ((FT_ULong)buff[2] << 8) | (FT_ULong)buff[3]; ++ ++ return result; ++} ++#endif ++ ++ ++ ++ + static int ftypeInitP = 0; /* is the engine initialised? */ + static FT_Library ftypeLibrary; + +@@ -207,6 +244,10 @@ FreeTypeOpenFace(FTFacePtr *facep, char + if(maxp && maxp->maxContours == 0) + face->bitmap = 1; + } ++ ++ face->num_hmetrics = (FT_UInt) sfnt_get_ushort( face->face, ++ TTAG_hhea, 34 ); ++ + /* Insert face in hashtable and return it */ + face->next = faceTable[bucket]; + faceTable[bucket] = face; +@@ -458,6 +499,29 @@ FreeTypeOpenInstance(FTInstancePtr *inst + } + + if( FT_IS_SFNT( face->face ) ) { ++#if 1 ++ FT_F26Dot6 tt_char_width, tt_char_height, tt_dim_x, tt_dim_y; ++ FT_UInt nn; ++ ++ instance->strike_index=0xFFFFU; ++ ++ tt_char_width = (int)(trans->scale*(1<<6) + 0.5); ++ tt_char_height = (int)(trans->scale*(1<<6) + 0.5); ++ ++ tt_dim_x = ( ( tt_char_width * trans->xres + (36+32*72) ) / 72 ) & -64; ++ tt_dim_y = ( ( tt_char_height * trans->yres + (36+32*72) ) / 72 ) & -64; ++ ++ for ( nn = 0; nn < face->face->num_fixed_sizes; nn++ ) ++ { ++ FT_Bitmap_Size* sz = &face->face->available_sizes[nn]; ++ ++ if ( tt_dim_x == sz->x_ppem && tt_dim_y == sz->y_ppem ) ++ { ++ instance->strike_index = nn; ++ break; ++ } ++ } ++#else + /* See Set_Char_Sizes() in ttdriver.c */ + FT_Error err; + TT_Face tt_face; +@@ -482,6 +546,7 @@ FreeTypeOpenInstance(FTInstancePtr *inst + sfnt = (SFNT_Service)tt_face->sfnt; + err = sfnt->set_sbit_strike(tt_face,tt_x_ppem,tt_y_ppem,&instance->strike_index); + if ( err ) instance->strike_index=0xFFFFU; ++#endif + } + + /* maintain a linked list of instances */ +@@ -799,31 +864,36 @@ ft_make_up_italic_bitmap( char *raster, + * parse the htmx field in TrueType font. + */ + +-/* from src/truetype/ttgload.c */ + static void +-tt_get_metrics( TT_HoriHeader* header, ++tt_get_metrics( FT_Face face, + FT_UInt idx, ++ FT_UInt num_hmetrics, + FT_Short* bearing, + FT_UShort* advance ) +-/* Copyright 1996-2001, 2002 by */ +-/* David Turner, Robert Wilhelm, and Werner Lemberg. */ + { +- TT_LongMetrics longs_m; +- FT_UShort k = header->number_Of_HMetrics; ++ /* read the metrics directly from the horizontal header, we ++ * parse the SFNT table directly through the standard FreeType API. ++ * this works with any version of the library and doesn't need to ++ * peek at its internals. Maybe a bit less ++ */ ++ FT_UInt count = num_hmetrics; + +- if ( k == 0 ) { +- *bearing = *advance = 0; +- return; ++ if ( count == 0 ) ++ { ++ *advance = 0; ++ *bearing = 0; + } ++ else if ( idx < count ) ++ { ++ FT_ULong offset = idx*4; + +- if ( idx < (FT_UInt)k ) { +- longs_m = (TT_LongMetrics )header->long_metrics + idx; +- *bearing = longs_m->bearing; +- *advance = longs_m->advance; ++ *advance = sfnt_get_ushort( face, TTAG_hmtx, offset ); ++ *bearing = sfnt_get_short ( face, TTAG_hmtx, offset+2 ); + } +- else { +- *bearing = ((TT_ShortMetrics*)header->short_metrics)[idx - k]; +- *advance = ((TT_LongMetrics )header->long_metrics)[k - 1].advance; ++ else ++ { ++ *advance = sfnt_get_ushort( face, TTAG_hmtx, (count-1)*4 ); ++ *bearing = sfnt_get_short ( face, TTAG_hmtx, (count+idx)*2 ); + } + } + +@@ -831,6 +901,7 @@ static int + ft_get_very_lazy_bbox( FT_UInt index, + FT_Face face, + FT_Size size, ++ FT_UInt num_hmetrics, + double slant, + FT_Matrix *matrix, + FT_BBox *bbox, +@@ -838,14 +909,13 @@ ft_get_very_lazy_bbox( FT_UInt index, + FT_Long *vertAdvance) + { + if ( FT_IS_SFNT( face ) ) { +- TT_Face ttface = (TT_Face)face; + FT_Size_Metrics *smetrics = &size->metrics; + FT_Short leftBearing = 0; + FT_UShort advance = 0; + FT_Vector p0, p1, p2, p3; + + /* horizontal */ +- tt_get_metrics(&ttface->horizontal, index, ++ tt_get_metrics( face, num_hmetrics, index, + &leftBearing, &advance); + + #if 0 +@@ -905,6 +975,27 @@ static FT_Error + FT_Do_SBit_Metrics( FT_Face ft_face, FT_Size ft_size, FT_ULong strike_index, + FT_UShort glyph_index, FT_Glyph_Metrics *metrics_return ) + { ++#if 1 ++ if ( strike_index != 0xFFFFU && ft_face->available_sizes != 0) ++ { ++ FT_Error error; ++ FT_Bitmap_Size* sz = &ft_face->available_sizes[strike_index]; ++ ++ error = FT_Set_Pixel_Sizes( ft_face, sz->x_ppem/64, sz->y_ppem/64 ); ++ if ( !error ) ++ { ++ error = FT_Load_Glyph( ft_face, glyph_index, FT_LOAD_SBITS_ONLY ); ++ if ( !error ) ++ { ++ if ( metrics_return != NULL ) ++ *metrics_return = ft_face->glyph->metrics; ++ ++ return 0; ++ } ++ } ++ } ++ return -1; ++#elif (FREETYPE_VERSION >= 2001008) + SFNT_Service sfnt; + TT_Face face; + FT_Error error; +@@ -968,6 +1059,7 @@ FT_Do_SBit_Metrics( FT_Face ft_face, FT_ + + Exit: + return error; ++#endif + } + + int +@@ -1023,6 +1115,7 @@ FreeTypeRasteriseGlyph(unsigned idx, int + if( bitmap_metrics == NULL ) { + if ( instance->ttcap.flags & TTCAP_IS_VERY_LAZY ) { + if( ft_get_very_lazy_bbox( idx, face->face, instance->size, ++ face->num_hmetrics, + instance->ttcap.vl_slant, + &instance->transformation.matrix, + &bbox, &outline_hori_advance, +@@ -1197,6 +1290,7 @@ FreeTypeRasteriseGlyph(unsigned idx, int + if( is_outline == 1 ){ + if( correct ){ + if( ft_get_very_lazy_bbox( idx, face->face, instance->size, ++ face->num_hmetrics, + instance->ttcap.vl_slant, + &instance->transformation.matrix, + &bbox, &outline_hori_advance, diff --git a/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftfuncs.h b/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftfuncs.h new file mode 100644 index 000000000..925263c00 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftfuncs.h @@ -0,0 +1,12 @@ +$NetBSD: patch-bj,v 1.3 2006/06/01 22:44:09 tron Exp $ + +--- lib/font/FreeType/ftfuncs.h.orig 2005-07-07 15:59:47.000000000 +0100 ++++ lib/font/FreeType/ftfuncs.h 2006-06-01 23:21:39.000000000 +0100 +@@ -47,6 +47,7 @@ + char *filename; + FT_Face face; + int bitmap; ++ FT_UInt num_hmetrics; + struct _FTInstance *instances; + struct _FTInstance *active_instance; + struct _FTFace *next; /* link to next face in bucket */ diff --git a/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftsystem.c b/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftsystem.c new file mode 100644 index 000000000..df7c97dce --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-lib_font_FreeType_ftsystem.c @@ -0,0 +1,12 @@ +$NetBSD: patch-bk,v 1.3 2006/06/01 22:44:09 tron Exp $ + +--- lib/font/FreeType/ftsystem.c.orig 2005-07-09 07:36:10.000000000 +0100 ++++ lib/font/FreeType/ftsystem.c 2006-06-01 23:21:53.000000000 +0100 +@@ -35,7 +35,6 @@ + #endif + #include <ft2build.h> + #include FT_CONFIG_CONFIG_H +-#include FT_INTERNAL_DEBUG_H + #include FT_SYSTEM_H + #include FT_ERRORS_H + #include FT_TYPES_H diff --git a/x11-servers/XFree86-4-Server/files/patch-lib_font_bitmap_pcfread.c b/x11-servers/XFree86-4-Server/files/patch-lib_font_bitmap_pcfread.c new file mode 100644 index 000000000..0983fdd5d --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-lib_font_bitmap_pcfread.c @@ -0,0 +1,93 @@ +--- lib/font/bitmap/pcfread.c.orig Tue Nov 18 02:17:04 2003 ++++ lib/font/bitmap/pcfread.c Sat Aug 26 00:13:05 2006 +@@ -129,6 +129,10 @@ + return (PCFTablePtr) NULL; + count = pcfGetLSB32(file); + if (IS_EOF(file)) return (PCFTablePtr) NULL; ++ if ((count < 0) || (count > (0x7fffffff / sizeof(PCFTableRec)))) { ++ pcfError("pcfReadTOC(): invalid file format\n"); ++ return NULL; ++ } + tables = (PCFTablePtr) xalloc(count * sizeof(PCFTableRec)); + if (!tables) { + pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec)); +@@ -248,6 +252,10 @@ + if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) + goto Bail; + nprops = pcfGetINT32(file, format); ++ if ((nprops <= 0) || (nprops > (0x7fffffff / sizeof(FontPropRec)))) { ++ pcfError("pcfGetProperties(): invalid nprops value (%d)\n", nprops); ++ goto Bail; ++ } + if (IS_EOF(file)) goto Bail; + props = (FontPropPtr) xalloc(nprops * sizeof(FontPropRec)); + if (!props) { +@@ -263,6 +271,13 @@ + props[i].name = pcfGetINT32(file, format); + isStringProp[i] = pcfGetINT8(file, format); + props[i].value = pcfGetINT32(file, format); ++ if (props[i].name < 0 ++ || (isStringProp[i] != 0 && isStringProp[i] != 1) ++ || (isStringProp[i] && props[i].value < 0)) { ++ pcfError("pcfGetProperties(): invalid file format %d %d %d\n", ++ props[i].name, isStringProp[i], props[i].value); ++ goto Bail; ++ } + if (IS_EOF(file)) goto Bail; + } + /* pad the property array */ +@@ -278,6 +293,7 @@ + } + if (IS_EOF(file)) goto Bail; + string_size = pcfGetINT32(file, format); ++ if (string_size < 0) goto Bail; + if (IS_EOF(file)) goto Bail; + strings = (char *) xalloc(string_size); + if (!strings) { +@@ -418,6 +434,10 @@ + else + nmetrics = pcfGetINT16(file, format); + if (IS_EOF(file)) goto Bail; ++ if ((nmetrics < 0) || (nmetrics > (0x7fffffff / sizeof(CharInfoRec)))) { ++ pcfError("pcfReadFont(): invalid file format\n"); ++ goto Bail; ++ } + metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); + if (!metrics) { + pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); +@@ -443,7 +463,7 @@ + nbitmaps = pcfGetINT32(file, format); + if (nbitmaps != nmetrics || IS_EOF(file)) + goto Bail; +- ++ /* nmetrics is already ok, so nbitmap also is */ + offsets = (CARD32 *) xalloc(nbitmaps * sizeof(CARD32)); + if (!offsets) { + pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32)); +@@ -457,6 +477,7 @@ + for (i = 0; i < GLYPHPADOPTIONS; i++) { + bitmapSizes[i] = pcfGetINT32(file, format); + if (IS_EOF(file)) goto Bail; ++ if (bitmapSizes[i] < 0) goto Bail; + } + + sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; +@@ -532,6 +553,7 @@ + if (IS_EOF(file)) goto Bail; + if (nink_metrics != nmetrics) + goto Bail; ++ /* nmetrics already checked */ + ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); + if (!ink_metrics) { + pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); +@@ -805,6 +827,10 @@ + else + nmetrics = pcfGetINT16(file, format); + if (IS_EOF(file)) goto Bail; ++ if ((nmetrics < 0) || (nmetrics > (0x7fffffff / sizeof(CharInfoRec)))) { ++ pcfError("pmfReadFont(): invalid file format\n"); ++ goto Bail; ++ } + metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); + if (!metrics) { + pcfError("pmfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); 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 000000000..f68744ce3 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-loader.c @@ -0,0 +1,13 @@ +--- programs/Xserver/hw/xfree86/loader/loader.c.orig Tue Feb 22 06:58:18 2005 ++++ programs/Xserver/hw/xfree86/loader/loader.c Tue Feb 22 06:59:09 2005 +@@ -552,8 +552,8 @@ + FatalError("\n_LoaderFileToMem() read() failed: %s\n", + strerror(errno)); + +-# if (defined(linux) || defined(__NetBSD__) || defined(__OpenBSD__)) \ +- && defined(__powerpc__) ++# if (defined(linux) || defined(__NetBSD__) || defined(__OpenBSD__) \ ++ || defined(__FreeBSD__)) && defined(__powerpc__) + /* + * Keep the instruction cache in sync with changes in the + * main memory. diff --git a/x11-servers/XFree86-4-Server/files/patch-mga_driver.c b/x11-servers/XFree86-4-Server/files/patch-mga_driver.c new file mode 100644 index 000000000..533d9ba9c --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-mga_driver.c @@ -0,0 +1,35 @@ +Index: programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c,v +retrieving revision 1.250 +retrieving revision 1.251 +diff -u -r1.250 -r1.251 +--- programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 18 Feb 2005 02:55:08 -0000 1.250 ++++ programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 26 Apr 2005 00:56:43 -0000 1.251 +@@ -401,7 +401,7 @@ + "MGASetVgaMode", + "MGAValidateMode", + "MGAValidateVideoParameters", +- "MGASetDisplayStart", ++ "HALSetDisplayStart", + NULL + }; + #endif +@@ -3644,7 +3644,7 @@ + MGAAdjustGranularity(pScrn,&x,&y); + pMga->HALGranularityOffX = pMga->HALGranularityOffX - x; + pMga->HALGranularityOffY = pMga->HALGranularityOffY - y; +- MGASetDisplayStart(pMga->pBoard,x,y,0); ++ HALSetDisplayStart(pMga->pBoard,x,y,0); + ); + #endif + MGA_NOT_HAL( +@@ -3692,7 +3692,7 @@ + #ifdef USEMGAHAL + MGA_HAL( + MGAAdjustGranularity(pScrn,&x,&y); +- MGASetDisplayStart(pMga->pBoard,x,y,1); ++ HALSetDisplayStart(pMga->pBoard,x,y,1); + ); + #endif + MGA_NOT_HAL( diff --git a/x11-servers/XFree86-4-Server/files/patch-mouse.c b/x11-servers/XFree86-4-Server/files/patch-mouse.c new file mode 100644 index 000000000..6aba3f562 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-mouse.c @@ -0,0 +1,18 @@ + +--- patch-mouse.c begins here --- +--- programs/Xserver/hw/xfree86/input/mouse/mouse.c.orig Sat Jan 29 06:57:55 2005 ++++ programs/Xserver/hw/xfree86/input/mouse/mouse.c Sat Jan 29 06:59:03 2005 +@@ -1501,8 +1501,8 @@ + + case PROT_SYSMOUSE: /* sysmouse */ + buttons = (~pBuf[0]) & 0x07; +- dx = (char)(pBuf[1]) + (char)(pBuf[3]); +- dy = - ((char)(pBuf[2]) + (char)(pBuf[4])); ++ dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]); ++ dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4])); + /* FreeBSD sysmouse sends additional data bytes */ + if (pMse->protoPara[4] >= 8) { + /* +--- patch-mouse.c ends here --- + + 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 000000000..c418e5cad --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-os-support_Imakefile @@ -0,0 +1,15 @@ + +--- patch-support-Imakefile begins here --- +--- programs/Xserver/hw/xfree86/os-support/Imakefile.orig Thu Jan 20 03:30:38 2005 ++++ programs/Xserver/hw/xfree86/os-support/Imakefile Thu Jan 20 03:31:37 2005 +@@ -15,6 +15,7 @@ + (defined(SunArchitecture) && defined(SparcArchitecture)) || \ + (defined(KFreeBSDArchitecture) && defined(AlphaArchitecture)) || \ + (defined(KFreeBSDArchitecture) && defined(Sparc64Architecture)) || \ ++ (defined(KFreeBSDArchitecture) && defined(PpcArchitecture)) || \ + (defined(KNetBSDArchitecture) && defined(AlphaArchitecture)) || \ + (defined(KNetBSDArchitecture) && defined(PpcArchitecture)) || \ + (defined(KNetBSDArchitecture) && defined(SparcArchitecture)) || \ +--- patch-support-Imakefile ends here --- + + diff --git a/x11-servers/XFree86-4-Server/files/patch-trident_driver.c b/x11-servers/XFree86-4-Server/files/patch-trident_driver.c new file mode 100644 index 000000000..5a062e416 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-trident_driver.c @@ -0,0 +1,17 @@ +Index: programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c +=================================================================== +RCS file: /usr/local/repos/xfree86/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c,v +retrieving revision 1.193 +retrieving revision 1.194 +diff -u -r1.193 -r1.194 +--- programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c 18 Feb 2005 02:55:10 -0000 1.193 ++++ programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c 30 Apr 2005 17:04:00 -0000 1.194 +@@ -2606,7 +2606,7 @@ + TRIDENTPtr pTrident = TRIDENTPTR(pScrn); + TRIDENTRegPtr tridentReg; + +- WAITFORVSYNC; ++ if (!xf86IsPc98()) WAITFORVSYNC; + + TridentFindClock(pScrn,mode->Clock); + diff --git a/x11-servers/XFree86-4-Server/files/patch-trident_video.c b/x11-servers/XFree86-4-Server/files/patch-trident_video.c new file mode 100644 index 000000000..776d1ded6 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-trident_video.c @@ -0,0 +1,19 @@ +Index: programs/Xserver/hw/xfree86/drivers/trident/trident_video.c +=================================================================== +RCS file: /usr/local/repos/xfree86/xc/programs/Xserver/hw/xfree86/drivers/trident/trident_video.c,v +retrieving revision 1.47 +retrieving revision 1.48 +diff -u -r1.47 -r1.48 +--- programs/Xserver/hw/xfree86/drivers/trident/trident_video.c 29 Mar 2004 16:25:22 -0000 1.47 ++++ programs/Xserver/hw/xfree86/drivers/trident/trident_video.c 30 Apr 2005 17:04:00 -0000 1.48 +@@ -1307,6 +1307,8 @@ + * full vblank has passed. + * - Alan. + */ +- WAITFORVSYNC; +- WAITFORVSYNC; ++ if (!xf86IsPc98()) { ++ WAITFORVSYNC; ++ WAITFORVSYNC; ++ } + } diff --git a/x11-servers/XFree86-4-Server/pkg-descr b/x11-servers/XFree86-4-Server/pkg-descr new file mode 100644 index 000000000..7bb168d1f --- /dev/null +++ b/x11-servers/XFree86-4-Server/pkg-descr @@ -0,0 +1,4 @@ +This package contains X server and its related programs, +such as xf86cfg, xf86config, kbd_mode, and so on. + +WWW: http://www.xfree86.org/ diff --git a/x11-servers/XFree86-4-Server/pkg-install b/x11-servers/XFree86-4-Server/pkg-install new file mode 100644 index 000000000..d62eb7772 --- /dev/null +++ b/x11-servers/XFree86-4-Server/pkg-install @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +PKG_PREFIX=${PKG_PREFIX:=/usr/X11R6} +SECCONFDIR=${PKG_PREFIX}/lib/X11/xserver + +if [ ! -f ${SECCONFDIR}/SecurityPolicy ]; then + cp ${SECCONFDIR}/SecurityPolicy.default-Server \ + ${SECCONFDIR}/SecurityPolicy +fi diff --git a/x11-servers/XFree86-4-Server/pkg-plist b/x11-servers/XFree86-4-Server/pkg-plist new file mode 100644 index 000000000..8db4e4324 --- /dev/null +++ b/x11-servers/XFree86-4-Server/pkg-plist @@ -0,0 +1,182 @@ +bin/X +bin/XFree86 +bin/getconfig +bin/getconfig.pl +bin/gtf +%%PPC_NA%%%%SPARC64_NA%%bin/inb +%%PPC_NA%%%%SPARC64_NA%%bin/inl +%%PPC_NA%%%%SPARC64_NA%%bin/inw +%%PPC_NA%%%%SPARC64_NA%%bin/ioport +bin/kbd_mode +bin/mmapr +bin/mmapw +%%PPC_NA%%%%SPARC64_NA%%bin/outb +%%PPC_NA%%%%SPARC64_NA%%bin/outl +%%PPC_NA%%%%SPARC64_NA%%bin/outw +bin/pcitweak +%%I386%%bin/scanpci +bin/xf86cfg +bin/xf86config +include/X11/bitmaps/card.xbm +include/X11/bitmaps/down.xbm +include/X11/bitmaps/keyboard.xbm +include/X11/bitmaps/left.xbm +include/X11/bitmaps/monitor.xbm +include/X11/bitmaps/mouse.xbm +include/X11/bitmaps/narrower.xbm +include/X11/bitmaps/right.xbm +include/X11/bitmaps/shorter.xbm +include/X11/bitmaps/taller.xbm +include/X11/bitmaps/up.xbm +include/X11/bitmaps/wider.xbm +include/X11/pixmaps/card.xpm +include/X11/pixmaps/computer.xpm +include/X11/pixmaps/keyboard.xpm +include/X11/pixmaps/monitor.xpm +include/X11/pixmaps/mouse.xpm +lib/X11/Cards +lib/X11/Options +lib/X11/XF86Config.98 +lib/X11/XF86Config.eg +lib/X11/app-defaults/XF86Cfg +share/doc/XFree86/BUILD +share/doc/XFree86/BugReport +share/doc/XFree86/DESIGN +share/doc/XFree86/Install +share/doc/XFree86/Japanese/README98 +share/doc/XFree86/Japanese/README98.1st +share/doc/XFree86/LICENSE +share/doc/XFree86/README +share/doc/XFree86/README.DECtga +share/doc/XFree86/README.DRI +share/doc/XFree86/README.DRIcomp +share/doc/XFree86/README.I128 +share/doc/XFree86/README.SiS +share/doc/XFree86/README.XKB-Config +share/doc/XFree86/README.XKB-Enhancing +share/doc/XFree86/README.apm +share/doc/XFree86/README.ati +share/doc/XFree86/README.chips +share/doc/XFree86/README.cyrix +share/doc/XFree86/README.dps +share/doc/XFree86/README.fonts +share/doc/XFree86/README.i740 +share/doc/XFree86/README.i810 +share/doc/XFree86/README.mouse +share/doc/XFree86/README.newport +share/doc/XFree86/README.r128 +share/doc/XFree86/README.rapidaccess +share/doc/XFree86/README.rendition +share/doc/XFree86/README.s3virge +share/doc/XFree86/RELNOTES +share/doc/XFree86/Versions +share/doc/XFree86/VideoBoard98 +lib/X11/etc/Xinstall.sh +lib/X11/etc/sun.termcap +lib/X11/etc/sun.terminfo +lib/X11/etc/xmodmap.std +lib/X11/getconfig/cfg.sample +lib/X11/getconfig/xfree86.cfg +%%AMD64_I386%%lib/modules/drivers/apm_drv.o +%%AMD64_I386%%lib/modules/drivers/ark_drv.o +lib/modules/drivers/ati_drv.o +lib/modules/drivers/atimisc_drv.o +%%AMD64_I386%%lib/modules/drivers/chips_drv.o +%%PPC_NA%%%%SPARC64_NA%%lib/modules/drivers/cirrus_alpine.o +%%PPC_NA%%%%SPARC64_NA%%lib/modules/drivers/cirrus_drv.o +%%PPC_NA%%%%SPARC64_NA%%lib/modules/drivers/cirrus_laguna.o +%%AMD64_I386%%lib/modules/drivers/cyrix_drv.o +%%AMD64%%lib/modules/drivers/dummy_drv.o +%%AMD64%%lib/modules/drivers/fbdev_drv.o +%%SPARC64_NA%%lib/modules/drivers/glint_drv.o +%%AMD64_I386%%lib/modules/drivers/i128_drv.o +%%I386%%lib/modules/drivers/i740_drv.o +%%I386%%lib/modules/drivers/i810_drv.o +%%SPARC64_NA%%lib/modules/drivers/mga_drv.o +%%AMD64_I386%%lib/modules/drivers/neomagic_drv.o +%%I386%%lib/modules/drivers/nsc_drv.o +lib/modules/drivers/nv_drv.o +lib/modules/drivers/r128_drv.o +lib/modules/drivers/radeon_drv.o +%%PPC_NA%%%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/rendition_drv.o +lib/modules/drivers/riva128.o +%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/s3_drv.o +%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/s3virge_drv.o +%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/savage_drv.o +%%PPC_NA%%%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/siliconmotion_drv.o +%%AMD64_I386%%lib/modules/drivers/sis_drv.o +%%SPARC64%%lib/modules/drivers/sunffb_drv.o +%%SPARC64_NA%%lib/modules/drivers/tdfx_drv.o +%%PPC_NA%%%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/tga_drv.o +%%AMD64_I386%%lib/modules/drivers/trident_drv.o +%%AMD64_I386%%lib/modules/drivers/tseng_drv.o +%%AMD64_I386%%lib/modules/drivers/vesa_drv.o +%%SPARC64_NA%%lib/modules/drivers/vga_drv.o +%%I386%%lib/modules/drivers/via_drv.o +%%I386%%lib/modules/drivers/vmware_drv.o +lib/modules/extensions/libGLcore.a +lib/modules/extensions/libdbe.a +%%DRI%%lib/modules/extensions/libdri.a +lib/modules/extensions/libextmod.a +lib/modules/extensions/libglx.a +lib/modules/extensions/librecord.a +lib/modules/extensions/libxtrap.a +lib/modules/fonts/libbitmap.a +lib/modules/fonts/libfreetype.a +lib/modules/fonts/libspeedo.a +lib/modules/fonts/libtype1.a +lib/modules/fonts/libxtt.a +%%DRI%%lib/modules/freebsd/libdrm.a +lib/modules/input/citron_drv.o +lib/modules/input/digitaledge_drv.o +lib/modules/input/dynapro_drv.o +lib/modules/input/elo2300_drv.o +lib/modules/input/elographics_drv.o +lib/modules/input/kbd_drv.o +lib/modules/input/magellan_drv.o +lib/modules/input/microtouch_drv.o +lib/modules/input/mouse_drv.o +lib/modules/input/mutouch_drv.o +lib/modules/input/spaceorb_drv.o +lib/modules/input/summa_drv.o +lib/modules/input/void_drv.o +lib/modules/input/wacom_drv.o +%%I386%%lib/modules/libafb.a +lib/modules/libcfb.a +lib/modules/libcfb16.a +lib/modules/libcfb24.a +lib/modules/libcfb32.a +lib/modules/libddc.a +lib/modules/libfb.a +lib/modules/libi2c.a +lib/modules/libint10.a +lib/modules/liblayer.a +lib/modules/libmfb.a +lib/modules/libpcidata.a +lib/modules/librac.a +lib/modules/libramdac.a +lib/modules/libscanpci.a +lib/modules/libshadow.a +lib/modules/libshadowfb.a +lib/modules/libvbe.a +lib/modules/libvgahw.a +lib/modules/libxaa.a +lib/modules/libxf1bpp.a +lib/modules/libxf24_32bpp.a +lib/modules/libxf4bpp.a +lib/modules/libxf8_16bpp.a +lib/modules/libxf8_32bpp.a +%%SPARC64%%lib/modules/libxf8_32wid.a +%%PPC_NA%%%%SPARC64_NA%%lib/modules/v10002d.uc +%%PPC_NA%%%%SPARC64_NA%%lib/modules/v20002d.uc +@dirrm lib/X11/etc +@dirrm lib/X11/getconfig +@dirrm lib/modules/drivers +@dirrm lib/modules/extensions +@dirrm lib/modules/fonts +@dirrm lib/modules/freebsd +@dirrm lib/modules/input +@dirrmtry include/X11/pixmaps +@dirrmtry lib/modules +@dirrmtry share/doc/XFree86/Japanese +@dirrmtry share/doc/XFree86 diff --git a/x11-servers/XFree86-4-Server/scripts/configure b/x11-servers/XFree86-4-Server/scripts/configure new file mode 100644 index 000000000..11dbf6ad8 --- /dev/null +++ b/x11-servers/XFree86-4-Server/scripts/configure @@ -0,0 +1,117 @@ +#!/bin/sh + +# This script does the following: +# (1) cp xf86site.def, installed by imake-4 port, +# to ${WRKDIR}/xc/config/cf. +# this provides settings for the ports system. +# (2) Create a host.def for this specific port, using +# host.def as a base. + +ORIGDEF=$PREFIX/lib/X11/config/xf86site.def +DESTDEF=$WRKDIR/xc/config/cf/xf86site.def +ORIGHOSTDEF=$PREFIX/lib/X11/config/host.def +LOCALDEF=$WRKDIR/.config +HOSTDEF=$WRKDIR/xc/config/cf/host.def + +# Use original host.def as initial config file +rm -f $LOCALDEF +grep -v '#define.*ProjectRoot' $ORIGHOSTDEF >> $LOCALDEF +echo "#define ProjectRoot $PREFIX" >> $LOCALDEF + +# This is also defined in xf86site.def, but doesn't get +# picked up for some reason. +echo "#define NothingOutsideProjectRoot YES" >> $LOCALDEF + +# Now, we can use this configuration. +# Thanks, Trevor Johnson +echo "#define InstallXserverSetUID NO" >> $LOCALDEF + +echo "#define XInputDrivers mouse keyboard digitaledge dynapro elo2300 \ + elographics magellan \ + microtouch mutouch spaceorb summa \ + wacom void citron" >> $LOCALDEF +echo "#define BuildXF86DRI ${BuildXF86DRI}" >> $LOCALDEF +echo "#define BuildXF86DRM NO" >> $LOCALDEF +echo "#define HasGlide3 YES" >> $LOCALDEF + +# Install driver manpages as foo.4x so they can easily be accesed by +# 'man 4x foo' +echo "#define DriverManSuffix 4x" >> $LOCALDEF +echo "#define DriverManDir \$(MANSOURCEPATH)4" >> $LOCALDEF + +# disable some options +for i in \ + BuildFonts \ + Build75DpiFonts \ + Build100DpiFonts \ + BuildSpeedoFonts \ + BuildType1Fonts \ + BuildCIDFonts \ + BuildCyrillicFonts \ + BuildHtmlManPages \ + JoystickSupport \ + XnestServer \ + BuildFontServer \ + XVirtualFramebufferServer \ + XprtServer \ + BuildDmx \ + LibHeaders \ + LibInstall \ + ForceNormalLib \ + InstallSecurityConfig \ + XTrueTypeInstallCConvHeaders +do \ + echo "#define $i NO" >> $LOCALDEF +done + +echo "#define InstallXserverSetUID ${SUID_XSERVER}" >> $LOCALDEF +echo "#define BuildServer YES" >> $LOCALDEF +echo "#define LibInstallBuild YES" >> $LOCALDEF +echo "#define ModInstall YES" >> $LOCALDEF +echo "#define XF86Server YES" >> $LOCALDEF +echo "#define BuildServersOnly YES" >> $LOCALDEF +echo "#define BuildGLXLibrary YES" >> $LOCALDEF +echo "#define BuildXFree86ConfigTools YES" >> $LOCALDEF +echo "#define InstallJapaneseDocs YES" >> $LOCALDEF +echo "#define UseInstalledPrograms YES" >> $LOCALDEF +echo "#define UseInstalledLibraries YES" >> $LOCALDEF +echo "#define StandardIncludes -I${PREFIX}/include" >> $LOCALDEF + +echo "#define FreeBSDCC ${CC}" >> $LOCALDEF +echo "#define FreeBSDCXX ${CXX}" >> $LOCALDEF +if [ X$WITH_DEBUG != X ]; then + echo "#define FreeBSDCFLAGS -g ${CFLAGS}" >> $LOCALDEF + echo "#define InstPgmFlags" >> $LOCALDEF +else + echo "#define FreeBSDCFLAGS ${CFLAGS}" >> $LOCALDEF +fi + +# We need to test cards on these architectures and see what can be added +# to the other architectures. +cat >> $LOCALDEF <<END +#if defined(i386Architecture) +# define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \ + neomagic i740 tdfx savage \ + cirrus vmware tseng trident via chips apm \ + i128 nsc ati i810 ark cyrix siliconmotion \ + vesa vga +#elif defined(ia64Architecture) +# define XF86CardDrivers mga nv tdfx glint ati vga +#elif defined(AlphaArchitecture) +# define XF86CardDrivers mga glint nv tga s3 s3virge rendition \ + tdfx savage cirrus ati siliconmotion vga +#elif defined(Sparc64Architecture) +# define XF86CardDrivers nv ati sunffb +#endif +END + +echo "#define FreeBSDBuildXxserv YES" >> $LOCALDEF + +# Copy ORIGDEF to DESTDEF +rm -f $DESTDEF +cp -f $ORIGDEF $DESTDEF + +# copy generated config to host.def +cp -f $LOCALDEF $HOSTDEF + +exit 0 diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile new file mode 100644 index 000000000..d402358ab --- /dev/null +++ b/x11-servers/xorg-server/Makefile @@ -0,0 +1,169 @@ +# New ports collection makefile for: xorg-server +# Date created: 7 May 2004 +# Whom: anholt@FreeBSD.org +# +# $FreeBSD: ports/x11-servers/xorg-server/Makefile,v 1.39 2006/08/25 21:52:48 lesi Exp $ +# + +PORTNAME= xorg-server +PORTVERSION= 6.9.0 +PORTREVISION= 5 +CATEGORIES= x11-servers +MASTER_SITES= ${MASTER_SITE_XORG} +MASTER_SITE_SUBDIR= X11R${PORTVERSION}/src +DISTFILES= X11R${PORTVERSION}-src1.tar.gz \ + X11R${PORTVERSION}-src3.tar.gz + +MAINTAINER= x11@FreeBSD.org +COMMENT= X.Org X server and related programs + +.if !defined(WITH_MODULAR) +USE_XLIB= yes +.else +LIB_PC_DEPENDS= ${X11BASE}/libdata/pkgconfig/xdmcp.pc:${PORTSDIR}/x11/libXdmcp \ + ${X11BASE}/libdata/pkgconfig/xau.pc:${PORTSDIR}/x11/libXau +LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 \ + GL.1:${PORTSDIR}/x11/libGL +BUILD_DEPENDS= ${X11BASE}/include/X11/extensions/XKMformat.h:${PORTSDIR}/x11/libxkbfile \ + ${LIB_PC_DEPENDS} +RUN_DEPENDS= ${LIB_PC_DEPENDS} +.endif + +CONFLICTS= XFree86-Server-* + +SCRIPTS_ENV= WITH_DEBUG="${WITH_DEBUG}" +MAN1= Xorg.1 \ + getconfig.1 \ + gtf.1 \ + kbd_mode.1 \ + pcitweak.1 \ + xorgcfg.1 \ + xorgconfig.1 +MAN4= citron.4x \ + dmc.4x \ + dynapro.4x \ + elographics.4x \ + fbdevhw.4x \ + fpit.4x \ + glint.4x \ + js_x.4x \ + kbd.4x \ + keyboard.4x \ + mga.4x \ + microtouch.4x \ + mouse.4x \ + mutouch.4x \ + palmax.4x \ + penmount.4x \ + r128.4x \ + radeon.4x \ + tdfx.4x \ + tek4957.4x \ + vga.4x \ + void.4x \ + wacom.4x +MAN5= getconfig.5 \ + xorg.conf.5 + +XBUILD_DIRS= lib/font programs/Xserver +XINCLUDE_DIRS= lib/xtrans +XMAN_DIRS= programs/Xserver + +NOT_FOR_ARCHS= ia64 +.include "${.CURDIR}/../../x11-servers/xorg-server/Makefile.inc" +.include <bsd.port.pre.mk> + +.if ${X_WINDOW_SYSTEM:L} != xorg +IGNORE= is part of X.Org and you have ${X_WINDOW_SYSTEM} set for X11\ + distribution. See The X Window System and Virtual Consoles chapter\ + of FAQ for more information +.endif + +.if ${ARCH} == alpha +PLIST_SUB+= ALPHA_NA="@comment " +.else +PLIST_SUB+= ALPHA_NA="" +.endif + +.if ${ARCH} == ia64 +PLIST_SUB+= IA64_NA="@comment " +.else +PLIST_SUB+= IA64_NA="" +.endif + +.if ${ARCH} == powerpc +PLIST_SUB+= PPC_NA="@comment " +MAN4+= nv.4x +.else +PLIST_SUB+= PPC_NA="" +.endif + +.if ${ARCH} == sparc64 +PLIST_SUB+= SPARC64="" +PLIST_SUB+= SPARC64_NA="@comment " +MAN4+= sunbw2.4x \ + suncg14.4x \ + suncg3.4x \ + suncg6.4x \ + sunffb.4x \ + sunleo.4x \ + suntcx.4x +.else +PLIST_SUB+= SPARC64="@comment " +PLIST_SUB+= SPARC64_NA="" +.endif + +.if ${ARCH} != powerpc && ${ARCH} != sparc64 +MAN4+= cirrus.4x \ + nv.4x \ + rendition.4x \ + s3virge.4x \ + savage.4x \ + siliconmotion.4x +.endif + +.if ${ARCH} != powerpc && ${ARCH} != alpha +MAN4+= vesa.4x +.endif + +.if ${ARCH} == i386 +PLIST_SUB+= I386="" +MAN1+= scanpci.1 +MAN4+= i740.4x \ + nsc.4x \ + via.4x +.else +PLIST_SUB+= I386="@comment " +.endif + +.if ${ARCH} == amd64 || ${ARCH} == i386 +PLIST_SUB+= AMD64_I386="" +MAN4+= apm.4x \ + chips.4x \ + cyrix.4x \ + i128.4x \ + i810.4x \ + neomagic.4x \ + sis.4x \ + trident.4x \ + tseng.4x \ + vmware.4x +.else +PLIST_SUB+= AMD64_I386="@comment " +.endif + +.if !defined(NO_SUID_XSERVER) || ${NO_SUID_XSERVER} == NO +pre-everything:: + @${ECHO_MSG} "By default, the X Server installs as a set-user-id root binary. When run by" + @${ECHO_MSG} "a normal user, it checks arguments and environment as done in the x11/wrapper" + @${ECHO_MSG} "port before handling them normally. If you are concerned about the security" + @${ECHO_MSG} "of this, but still want to run an X Server (for example using xdm/kdm/gdm," + @${ECHO_MSG} "which will still run the server as root), you can cancel the build and set" + @${ECHO_MSG} "NO_SUID_XSERVER=YES in /etc/make.conf." + +SCRIPTS_ENV+= SUID_XSERVER=YES +.else +SCRIPTS_ENV+= SUID_XSERVER=NO +.endif + +.include <bsd.port.post.mk> diff --git a/x11-servers/xorg-server/Makefile.inc b/x11-servers/xorg-server/Makefile.inc new file mode 100644 index 000000000..4cb271384 --- /dev/null +++ b/x11-servers/xorg-server/Makefile.inc @@ -0,0 +1,89 @@ +# Include before bsd.port.pre.mk for XFree86-4 ports which share +# XFree86-4-libraries's patches. +# The purpose of this file is to reduce the duplicated code among the XFree86-4 +# ports which each do only part of a standard XFree86 build. +# +# XBUILD_DIRS is the group of directories under ${WRKSRC} that will +# be built in. +# XINCLUDE_DIRS is the group of directories under ${WRKSRC} that need +# to be Makefilesed or included in besides XBUILD_DIRS +# XINSTALL_DIRS is the group of directories which will have +# their install targets run. +# XMAN_DIRS is the group of directories which will have +# their install.man targets run. + +DIST_SUBDIR?= xorg +WRKSRC?= ${WRKDIR}/xc +USE_X_PREFIX?= no +PREFIX?= ${X11BASE} +MTREE_FILE= /etc/mtree/BSD.x11-4.dist +EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude */CVS/* + +USE_IMAKE= YES +.if defined(XMAN_DIRS) +XFREE86_HTML_MAN?= yes +.else +XFREE86_HTML_MAN?= no +.endif +SCRIPTS_ENV+= CC="${CC}" \ + CXX="${CXX}" \ + CFLAGS="${CFLAGS}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" \ + PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" + +XINSTALL_DIRS?= ${XBUILD_DIRS} +_XINCLUDE_DIRS= include ${XBUILD_DIRS} ${XINCLUDE_DIRS} + +CF_PATCHES= ${PORTSDIR}/x11-servers/xorg-server/files/patch-FreeBSD.cf \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-Imake.rules \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-Imake.tmpl \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-Library.tmpl \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-X11.rules \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-X11.tmpl + +SERVER_PATCHES= ${PORTSDIR}/x11-servers/xorg-server/files/patch-Xserver-Imakefile \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-Xserver-Xext-xvmc.c \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-Xserver-os-xprintf.c \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-font-bitmap-pcfread.c \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-mitri.c \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-servermd.h \ + ${PORTSDIR}/x11-servers/xorg-server/files/patch-xf86sym.c + +.if !target(do-configure) +do-configure: + @cp ${X11BASE}/lib/X11/config/version.def ${WRKSRC}/config/cf + @cp ${X11BASE}/lib/X11/config/date.def ${WRKSRC}/config/cf + @cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} Makefile.boot + @for dir in ${_XINCLUDE_DIRS}; do \ + cd ${WRKSRC}/$${dir} && ${WRKSRC}/config/imake/imake \ + -DTOPDIR=${WRKSRC} -DCURDIR=$${dir} -I${WRKSRC}/config/cf; \ + done + @for dir in ${_XINCLUDE_DIRS}; do \ + cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE} Makefiles; \ + done + @for dir in ${_XINCLUDE_DIRS}; do \ + cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE} includes; \ + done + @for dir in include ${XBUILD_DIRS}; do \ + cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE} depend; \ + done +.endif + +.if !target(do-build) +do-build: + @for dir in ${XBUILD_DIRS}; do \ + cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE} all; \ + done +.endif + +.if !target(do-install) +do-install: + @for dir in ${XINSTALL_DIRS}; do \ + cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE} install; \ + done + @for dir in ${XMAN_DIRS}; do \ + cd ${WRKSRC}/$${dir} && ${SETENV} ${MAKE_ENV} ${MAKE} install.man; \ + done +.endif + diff --git a/x11-servers/xorg-server/distinfo b/x11-servers/xorg-server/distinfo new file mode 100644 index 000000000..177370c87 --- /dev/null +++ b/x11-servers/xorg-server/distinfo @@ -0,0 +1,6 @@ +MD5 (xorg/X11R6.9.0-src1.tar.gz) = 9cd255a090e81e2c62637122794e6150 +SHA256 (xorg/X11R6.9.0-src1.tar.gz) = 30502fd1074ee7d782bae084c8c9b4872dcbf16dc45a2b944c6d0fc0e0c1a60c +SIZE (xorg/X11R6.9.0-src1.tar.gz) = 33460996 +MD5 (xorg/X11R6.9.0-src3.tar.gz) = 4d5450bde835270632e004b25e45ef33 +SHA256 (xorg/X11R6.9.0-src3.tar.gz) = 6c55602a0d6476457d3cf6a1413c39d63c70ca9255749bff5502dae9414f9971 +SIZE (xorg/X11R6.9.0-src3.tar.gz) = 10872474 diff --git a/x11-servers/xorg-server/files/patch-945GM.patch b/x11-servers/xorg-server/files/patch-945GM.patch new file mode 100644 index 000000000..a0fd8f94d --- /dev/null +++ b/x11-servers/xorg-server/files/patch-945GM.patch @@ -0,0 +1,335 @@ +# +# Add support to Intel 945GM +# +--- programs/Xserver/hw/xfree86/drivers/i810/common.h.orig Mon Jul 17 11:41:34 2006 ++++ programs/Xserver/hw/xfree86/drivers/i810/common.h Mon Jul 17 11:43:00 2006 +@@ -322,6 +322,11 @@ + #define PCI_CHIP_I945_G_BRIDGE 0x2770 + #endif + ++#ifndef PCI_CHIP_I945_GM ++#define PCI_CHIP_I945_GM 0x27A2 ++#define PCI_CHIP_I945_GM_BRIDGE 0x27A0 ++#endif ++ + #define IS_I810(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I810 || \ + pI810->PciInfo->chipType == PCI_CHIP_I810_DC100 || \ + pI810->PciInfo->chipType == PCI_CHIP_I810_E) +@@ -335,6 +340,7 @@ + #define IS_I915G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_G || pI810->PciInfo->chipType == PCI_CHIP_E7221_G) + #define IS_I915GM(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_GM) + #define IS_I945G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I945_G) ++#define IS_I945GM(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I945_GM) + + #define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810) || IS_I915GM(pI810)) + +--- programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c.orig Mon Jul 17 11:41:34 2006 ++++ programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Mon Jul 17 11:44:09 2006 +@@ -136,6 +136,7 @@ + {PCI_CHIP_E7221_G, "E7221 (i915)"}, + {PCI_CHIP_I915_GM, "915GM"}, + {PCI_CHIP_I945_G, "945G"}, ++ {PCI_CHIP_I945_GM, "945GM"}, + {-1, NULL} + }; + +@@ -154,6 +155,7 @@ + {PCI_CHIP_E7221_G, PCI_CHIP_E7221_G, RES_SHARED_VGA}, + {PCI_CHIP_I915_GM, PCI_CHIP_I915_GM, RES_SHARED_VGA}, + {PCI_CHIP_I945_G, PCI_CHIP_I945_G, RES_SHARED_VGA}, ++ {PCI_CHIP_I945_GM, PCI_CHIP_I945_GM, RES_SHARED_VGA}, + {-1, -1, RES_UNDEFINED } + }; + +@@ -569,6 +571,7 @@ + case PCI_CHIP_E7221_G: + case PCI_CHIP_I915_GM: + case PCI_CHIP_I945_G: ++ case PCI_CHIP_I945_GM: + xf86SetEntitySharable(usedChips[i]); + + /* Allocate an entity private if necessary */ +--- programs/Xserver/hw/xfree86/drivers/i810/i830_cursor.c.orig Mon Jul 17 11:41:34 2006 ++++ programs/Xserver/hw/xfree86/drivers/i810/i830_cursor.c Mon Jul 17 11:46:20 2006 +@@ -86,7 +86,7 @@ + + DPRINTF(PFX, "I830InitHWCursor\n"); + /* Initialise the HW cursor registers, leaving the cursor hidden. */ +- if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) { ++ if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + temp = INREG(CURSOR_A_CONTROL); + temp &= ~(CURSOR_MODE | MCURSOR_GAMMA_ENABLE | MCURSOR_MEM_TYPE_LOCAL | + MCURSOR_PIPE_SELECT); +@@ -308,7 +308,7 @@ + } + + /* have to upload the base for the new position */ +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + if (pI830->CursorIsARGB) + OUTREG(CURSOR_A_BASE, pI830->CursorMemARGB->Physical); + else +@@ -339,7 +339,7 @@ + pI830->CursorMemARGB->Physical, pI830->CursorMemARGB->Start); + + pI830->cursorOn = TRUE; +- if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) { ++ if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + temp = INREG(CURSOR_A_CONTROL); + temp &= ~(CURSOR_MODE | MCURSOR_PIPE_SELECT); + if (pI830->CursorIsARGB) +@@ -387,7 +387,7 @@ + DPRINTF(PFX, "I830HideCursor\n"); + + pI830->cursorOn = FALSE; +- if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) { ++ if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + temp = INREG(CURSOR_A_CONTROL); + temp &= ~CURSOR_MODE; + temp |= CURSOR_MODE_DISABLE; +--- programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c.orig Mon Jul 17 11:41:34 2006 ++++ programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c Mon Jul 17 11:49:23 2006 +@@ -196,6 +196,7 @@ + {PCI_CHIP_E7221_G, "E7221 (i915)"}, + {PCI_CHIP_I915_GM, "915GM"}, + {PCI_CHIP_I945_G, "945G"}, ++ {PCI_CHIP_I945_GM, "945GM"}, + {-1, NULL} + }; + +@@ -208,6 +209,7 @@ + {PCI_CHIP_E7221_G, PCI_CHIP_E7221_G, RES_SHARED_VGA}, + {PCI_CHIP_I915_GM, PCI_CHIP_I915_GM, RES_SHARED_VGA}, + {PCI_CHIP_I945_G, PCI_CHIP_I945_G, RES_SHARED_VGA}, ++ {PCI_CHIP_I945_GM, PCI_CHIP_I945_GM, RES_SHARED_VGA}, + {-1, -1, RES_UNDEFINED} + }; + +@@ -1323,7 +1325,7 @@ + * The GTT varying according the the FbMapSize and the popup is 4KB */ + range = (pI830->FbMapSize / (1024*1024)) + 4; + +- if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + switch (gmch_ctrl & I830_GMCH_GMS_MASK) { + case I855_GMCH_GMS_STOLEN_1M: + memsize = MB(1) - KB(range); +@@ -1341,11 +1343,11 @@ + memsize = MB(32) - KB(range); + break; + case I915G_GMCH_GMS_STOLEN_48M: +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) + memsize = MB(48) - KB(range); + break; + case I915G_GMCH_GMS_STOLEN_64M: +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) + memsize = MB(64) - KB(range); + break; + } +@@ -2090,6 +2092,9 @@ + case PCI_CHIP_I945_G: + chipname = "945G"; + break; ++ case PCI_CHIP_I945_GM: ++ chipname = "945GM"; ++ break; + default: + chipname = "unknown chipset"; + break; +@@ -2127,7 +2132,7 @@ + pI830->LinearAddr = pI830->pEnt->device->MemBase; + from = X_CONFIG; + } else { +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + pI830->LinearAddr = pI830->PciInfo->memBase[2] & 0xF0000000; + from = X_PROBED; + } else if (pI830->PciInfo->memBase[1] != 0) { +@@ -2149,7 +2154,7 @@ + pI830->MMIOAddr = pI830->pEnt->device->IOBase; + from = X_CONFIG; + } else { +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + pI830->MMIOAddr = pI830->PciInfo->memBase[0] & 0xFFF80000; + from = X_PROBED; + } else if (pI830->PciInfo->memBase[1]) { +@@ -2194,7 +2199,7 @@ + pI830->FbMapSize = 0x4000000; /* 64MB - has this been tested ?? */ + } + } else { +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + if (pI830->PciInfo->memBase[2] & 0x08000000) + pI830->FbMapSize = 0x8000000; /* 128MB aperture */ + else +@@ -2227,7 +2232,7 @@ + if (pI830->PciInfo->chipType == PCI_CHIP_E7221_G) + pI830->availablePipes = 1; + else +- if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) ++ if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) + pI830->availablePipes = 2; + else + pI830->availablePipes = 1; +@@ -2872,7 +2877,7 @@ + } + + /* Check if the HW cursor needs physical address. */ +- if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830)) ++ if (IS_MOBILE(pI830) || IS_I915G(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) + pI830->CursorNeedsPhysical = TRUE; + else + pI830->CursorNeedsPhysical = FALSE; +--- programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c.orig Mon Jul 17 11:41:34 2006 ++++ programs/Xserver/hw/xfree86/drivers/i810/i830_memory.c Mon Jul 17 11:51:02 2006 +@@ -1239,7 +1239,7 @@ + + i830Reg->Fence[nr] = 0; + +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) + fence_mask = ~I915G_FENCE_START_MASK; + else + fence_mask = ~I830_FENCE_START_MASK; +@@ -1247,7 +1247,7 @@ + if (start & fence_mask) { + xf86DrvMsg(X_WARNING, pScrn->scrnIndex, + "SetFence: %d: start (0x%08x) is not %s aligned\n", +- nr, start, (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) ? "1MB" : "512k"); ++ nr, start, (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) ? "1MB" : "512k"); + return; + } + +@@ -1267,7 +1267,7 @@ + + val = (start | FENCE_X_MAJOR | FENCE_VALID); + +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + switch (size) { + case MB(1): + val |= I915G_FENCE_SIZE_1M; +@@ -1328,7 +1328,7 @@ + } + } + +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) + fence_pitch = pitch / 512; + else + fence_pitch = pitch / 128; +--- programs/Xserver/hw/xfree86/drivers/i810/i830_video.c.orig Mon Jul 17 11:41:34 2006 ++++ programs/Xserver/hw/xfree86/drivers/i810/i830_video.c Mon Jul 17 11:52:36 2006 +@@ -617,7 +617,7 @@ + adapt->nAttributes = NUM_ATTRIBUTES; + if (pI830->Clone) + adapt->nAttributes += CLONE_ATTRIBUTES; +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) + adapt->nAttributes += GAMMA_ATTRIBUTES; /* has gamma */ + adapt->pAttributes = xnfalloc(sizeof(XF86AttributeRec) * adapt->nAttributes); + /* Now copy the attributes */ +@@ -628,7 +628,7 @@ + memcpy((char*)att, (char*)CloneAttributes, sizeof(XF86AttributeRec) * CLONE_ATTRIBUTES); + att+=CLONE_ATTRIBUTES; + } +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + memcpy((char*)att, (char*)GammaAttributes, sizeof(XF86AttributeRec) * GAMMA_ATTRIBUTES); + att+=GAMMA_ATTRIBUTES; + } +@@ -688,7 +688,7 @@ + if (pI830->Clone) + xvPipe = MAKE_ATOM("XV_PIPE"); + +- if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830)) { ++ if (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) { + xvGamma0 = MAKE_ATOM("XV_GAMMA0"); + xvGamma1 = MAKE_ATOM("XV_GAMMA1"); + xvGamma2 = MAKE_ATOM("XV_GAMMA2"); +@@ -806,7 +806,7 @@ + overlay->OCONFIG |= OVERLAY_PIPE_B; + if (pPriv->overlayOK) + OVERLAY_UPDATE; +- } else if (attribute == xvGamma0 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma0 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + /* Avoid video anomalies, so set gamma registers when overlay is off */ + /* We also clamp the values if they are outside the ranges */ + if (!*pI830->overlayOn) { +@@ -815,35 +815,35 @@ + pPriv->gamma1 = pPriv->gamma0 + 0x7d; + } else + return BadRequest; +- } else if (attribute == xvGamma1 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma1 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + if (!*pI830->overlayOn) { + pPriv->gamma1 = value; + if (pPriv->gamma1 - pPriv->gamma0 > 0x7d) + pPriv->gamma0 = pPriv->gamma1 - 0x7d; + } else + return BadRequest; +- } else if (attribute == xvGamma2 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma2 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + if (!*pI830->overlayOn) { + pPriv->gamma2 = value; + if (pPriv->gamma3 - pPriv->gamma2 > 0x7d) + pPriv->gamma3 = pPriv->gamma2 + 0x7d; + } else + return BadRequest; +- } else if (attribute == xvGamma3 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma3 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + if (!*pI830->overlayOn) { + pPriv->gamma3 = value; + if (pPriv->gamma3 - pPriv->gamma2 > 0x7d) + pPriv->gamma2 = pPriv->gamma3 - 0x7d; + } else + return BadRequest; +- } else if (attribute == xvGamma4 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma4 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + if (!*pI830->overlayOn) { + pPriv->gamma4 = value; + if (pPriv->gamma5 - pPriv->gamma4 > 0x7d) + pPriv->gamma5 = pPriv->gamma4 + 0x7d; + } else + return BadRequest; +- } else if (attribute == xvGamma5 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma5 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + if (!*pI830->overlayOn) { + pPriv->gamma5 = value; + if (pPriv->gamma5 - pPriv->gamma4 > 0x7d) +@@ -875,7 +875,7 @@ + attribute == xvGamma2 || + attribute == xvGamma3 || + attribute == xvGamma4 || +- attribute == xvGamma5) && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ attribute == xvGamma5) && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + I830UpdateGamma(pScrn); + } + +@@ -895,17 +895,17 @@ + *value = pPriv->contrast; + } else if (pI830->Clone && attribute == xvPipe) { + *value = pPriv->pipe; +- } else if (attribute == xvGamma0 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma0 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + *value = pPriv->gamma0; +- } else if (attribute == xvGamma1 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma1 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + *value = pPriv->gamma1; +- } else if (attribute == xvGamma2 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma2 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + *value = pPriv->gamma2; +- } else if (attribute == xvGamma3 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma3 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + *value = pPriv->gamma3; +- } else if (attribute == xvGamma4 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma4 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + *value = pPriv->gamma4; +- } else if (attribute == xvGamma5 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830))) { ++ } else if (attribute == xvGamma5 && (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830))) { + *value = pPriv->gamma5; + } else if (attribute == xvColorKey) { + *value = pPriv->colorKey; diff --git a/x11-servers/xorg-server/files/patch-CVE-2006-0745 b/x11-servers/xorg-server/files/patch-CVE-2006-0745 new file mode 100644 index 000000000..afb7d4de7 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-CVE-2006-0745 @@ -0,0 +1,20 @@ +--- programs/Xserver/hw/xfree86/common/xf86Init.c.orig 2006-03-17 23:30:10.000000000 +0200 ++++ programs/Xserver/hw/xfree86/common/xf86Init.c 2006-03-17 23:29:35.000000000 +0200 +@@ -1376,7 +1376,7 @@ + } + + /* First the options that are only allowed for root */ +- if (getuid() == 0 || geteuid != 0) ++ if (getuid() == 0 || geteuid() != 0) + { + if (!strcmp(argv[i], "-modulepath")) + { +@@ -1679,7 +1679,7 @@ + } + if (!strcmp(argv[i], "-configure")) + { +- if (getuid() != 0 && geteuid == 0) { ++ if (getuid() != 0 && geteuid() == 0) { + ErrorF("The '-configure' option can only be used by root.\n"); + exit(1); + } diff --git a/x11-servers/xorg-server/files/patch-FreeBSD.cf b/x11-servers/xorg-server/files/patch-FreeBSD.cf new file mode 100644 index 000000000..9a208d778 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-FreeBSD.cf @@ -0,0 +1,93 @@ +--- config/cf/FreeBSD.cf.orig Sun Aug 15 10:03:36 2004 ++++ config/cf/FreeBSD.cf Sun Feb 6 03:56:59 2005 +@@ -78,6 +78,7 @@ + #define HasIssetugid YES + #define HasPoll YES + #endif ++#define BuildHtmlManPages NO + + #if OSMajorVersion >= 4 + #define HasGetIfAddrs YES +@@ -116,15 +117,14 @@ + # endif + # if (OSRelVersion < 500043) + # define NeedUIThrStubs YES +-# endif +-# if (OSRelVersion >= 502102) +-# define ThreadsLibraries -lpthread +-# elif (OSRelVersion >= 500016) +-# define ThreadsLibraries -lc_r ++# define BuildThreadStubLibrary YES ++# define SharedX11Reqs $(LDPRELIB) $(XTHRSTUBLIB) ++# define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) $(XTHRSTUBLIB) + # else +-# define ThreadsLibraries -pthread ++# define BuildThreadStubLibrary NO + # endif +-# define SystemMTDefines -D_THREAD_SAFE ++# define ThreadsLibraries FreeBSDPTHREAD_LIBS ++# define SystemMTDefines FreeBSDPTHREAD_CFLAGS + #endif + + /* This fixes linking C programs against libGLU on FreeBSD 3.x */ +@@ -172,12 +172,14 @@ + #endif + #endif + +-#ifndef CcCmd +-#define CcCmd cc +-#endif +-#ifndef CplusplusCmd +-#define CplusplusCmd c++ ++#if BuildThreadStubLibrary && (!defined(UseInstalledX11) || !UseInstalledX11) ++#define CcCmd $(CLIENTENVSETUP) FreeBSDCC ++#define CplusplusCmd $(CLIENTENVSETUP) FreeBSDCXX ++#else ++#define CcCmd FreeBSDCC ++#define CplusplusCmd FreeBSDCXX + #endif ++ + #define CppCmd /usr/bin/cpp + #define PreProcessCmd CppCmd + #define StandardCppOptions -traditional +@@ -338,7 +340,7 @@ + #ifndef LibraryRpathLoadFlags + # if UseRpath + # if UseElfFormat +-# define LibraryRpathLoadFlags -rpath $(USRLIBDIRPATH) ++# define LibraryRpathLoadFlags -Wl,-rpath $(USRLIBDIRPATH) + # else + # define LibraryRpathLoadFlags -R $(USRLIBDIRPATH) + # endif +@@ -442,7 +444,9 @@ + #define AsVISOption -Av9a + #define AsOutputArchSize 64 + #endif +- ++#ifdef PpcArchitecture ++#define XF86INT10_BUILD X86INT10_STUB ++#endif + #define StandardDefines -DCSRG_BASED + + #if OSMajorVersion > 1 +@@ -463,18 +467,8 @@ + #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC + #endif + +-/* 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 GccAliasingArgs +-#endif +-#endif +- +-#ifdef i386Architecture +-# define OptimizedCDebugFlags DefaultGcc2i386Opt +-#else +-# define OptimizedCDebugFlags -O +-#endif ++#define DefaultGcc2i386Opt ++#define OptimizedCDebugFlags FreeBSDCFLAGS + + #ifndef PreIncDir + # define PreIncDir /usr/include diff --git a/x11-servers/xorg-server/files/patch-Imake.rules b/x11-servers/xorg-server/files/patch-Imake.rules new file mode 100644 index 000000000..deea1cb88 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Imake.rules @@ -0,0 +1,67 @@ +--- config/cf/Imake.rules.orig Mon Dec 9 15:00:42 2002 ++++ config/cf/Imake.rules Mon Oct 13 17:04:19 2003 +@@ -1406,7 +1406,7 @@ + * this Imakefile is within the source tree. + */ + #ifndef RmanDependency +-#ifdef UseInstalled ++#if defined(UseInstalled) || defined(UseInstalledPrograms) + #define RmanDependency() /**/ + #else + #define RmanDependency() @@\ +@@ -1421,7 +1421,7 @@ + #endif /* RmanDependency */ + + #ifndef RmanCmdDependency +-#ifdef UseInstalled ++#if defined(UseInstalled) || defined(UseInstalledPrograms) + #define RmanCmdDependency /**/ + #else + #define RmanCmdDependency ProgramTargetName($(RMAN)) +@@ -1874,7 +1874,7 @@ + * this Imakefile is within the source tree. + */ + #ifndef DependDependency +-#ifdef UseInstalled ++#if defined(UseInstalled) || defined(UseInstalledPrograms) + #define DependDependency() /**/ + #else + #define DependDependency() @@\ +@@ -1969,7 +1969,7 @@ + * within the source tree. + */ + #ifndef ImakeDependency +-#ifdef UseInstalled ++#if defined(UseInstalled) || defined(UseInstalledPrograms) + #define ImakeDependency(target) /**/ + #else + #define ImakeDependency(target) @@\ +@@ -2066,11 +2066,18 @@ + * ProjectUnsharedLibReferences - variables for unshared libraries + */ + #ifndef ProjectUnsharedLibReferences ++#if defined(UseInstalledLibraries) ++#define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\ ++Concat3(DEP,varname,LIB) = @@\ ++Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ ++LintLibReferences(varname,libname,libsource) ++#else + #define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\ + Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,buildlibdir/,LibraryTargetName(libname)) @@\ + Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ + LintLibReferences(varname,libname,libsource) + #endif ++#endif + + /* + * ProjectUnsharedFontLibReferences - unshared font libraries +@@ -3126,6 +3133,9 @@ + + #ifdef UseInstalled + #define ImakeSubCmdHelper $(IMAKE_CMD) ++#elif defined(UseInstalledPrograms) ++#define ImakeSubCmdHelper $(IMAKE) -I$(IMAKEPREFIX)$(IRULESRC) \ ++ $(IMAKE_DEFINES) $(IMAKE_WARNINGS) + #else + #define ImakeSubCmdHelper $(IMAKEPREFIX)$(IMAKE) -I$(IMAKEPREFIX)$(IRULESRC) \ + $(IMAKE_DEFINES) $(IMAKE_WARNINGS) diff --git a/x11-servers/xorg-server/files/patch-Imake.tmpl b/x11-servers/xorg-server/files/patch-Imake.tmpl new file mode 100644 index 000000000..526e2e5de --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Imake.tmpl @@ -0,0 +1,75 @@ +--- config/cf/Imake.tmpl.orig Mon Dec 9 19:20:41 2002 ++++ config/cf/Imake.tmpl Thu Jan 2 14:34:20 2003 +@@ -237,7 +237,8 @@ + + #ifndef RmanCmd + #if BuildRman +-#ifdef UseInstalled /* assume BINDIR in path */ ++#if defined(UseInstalled) || defined(UseInstalledPrograms) ++/* assume BINDIR in path */ + #define RmanCmd rman + #else + #define RmanCmd $(TOP)/config/util/rman +@@ -1348,7 +1349,8 @@ + #define LoaderLibPrefix /**/ + #endif + #ifndef ImakeCmd +-#ifdef UseInstalled /* assume BINDIR in path */ ++#if defined(UseInstalled) || defined(UseInstalledPrograms) ++/* assume BINDIR in path */ + #define ImakeCmd imake + #else + #define ImakeCmd $(IMAKESRC)/imake +@@ -1359,19 +1361,22 @@ + #endif + #ifndef DependCmd + #if UseGccMakeDepend +-#ifdef UseInstalled /* assume BINDIR in path */ ++#if defined(UseInstalled) || defined(UseInstalledPrograms) ++/* assume BINDIR in path */ + #define DependCmd gccmakedep + #else + #define DependCmd $(DEPENDSRC)/gccmakedep + #endif + #elif UseCCMakeDepend +-#ifdef UseInstalled /* assume BINDIR in path */ ++#if defined(UseInstalled) || defined(UseInstalledPrograms) ++/* assume BINDIR in path */ + #define DependCmd ccmakedep + #else + #define DependCmd $(DEPENDSRC)/ccmakedep + #endif + #else +-#ifdef UseInstalled /* assume BINDIR in path */ ++#if defined(UseInstalled) || defined(UseInstalledPrograms) ++/* assume BINDIR in path */ + #define DependCmd makedepend + #else + #define DependCmd $(DEPENDSRC)/makedepend +@@ -1398,21 +1403,23 @@ + #ifndef ExportListCmd + # ifndef ExportListGenSource + # define ExportListCmd /**/ +-# elif !defined(UseInstalled) ++# elif !defined(UseInstalled) && !defined(UseInstalledPrograms) + # define ExportListCmd $(CONFIGSRC)/util/exportlistgen + # else + # define ExportListCmd exportlistgen + # endif + #endif + #ifndef MkdirHierCmd +-#ifdef UseInstalled /* assume BINDIR in path */ ++#if defined(UseInstalled) || defined(UseInstalledPrograms) ++/* assume BINDIR in path */ + #define MkdirHierCmd mkdirhier + #else + #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh + #endif + #endif + #ifndef RevPathCmd +-#ifdef UseInstalled /* assume BINDIR in path */ ++#if defined(UseInstalled) || defined(UseInstalledPrograms) ++/* assume BINDIR in path */ + #define RevPathCmd revpath + #else + #define RevPathCmd $(CONFIGSRC)/util/revpath diff --git a/x11-servers/xorg-server/files/patch-Library.tmpl b/x11-servers/xorg-server/files/patch-Library.tmpl new file mode 100644 index 000000000..e94aae3bf --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Library.tmpl @@ -0,0 +1,21 @@ +--- config/cf/Library.tmpl.orig Mon May 24 12:06:57 2004 ++++ config/cf/Library.tmpl Fri Sep 10 21:46:00 2004 +@@ -389,7 +389,7 @@ + */ + + #ifndef MakeStringsDependency +-# ifndef UseInstalled ++# if !defined(UseInstalled) && !defined(UseInstalledPrograms) + # define MakeStringsDependency @@\ + MAKESTRS = $(CONFIGSRC)/util/makestrs @@\ + NoCmpScript(HostProgramTargetName($(MAKESTRS)) $(MAKESTRS).Osuf) @@\ +@@ -399,7 +399,8 @@ + @@\ + includes:: HostProgramTargetName($(MAKESTRS)) + # else +-# define MakeStringsDependency /**/ ++# define MakeStringsDependency @@\ ++MAKESTRS = makestrs + # endif + #endif + diff --git a/x11-servers/xorg-server/files/patch-X11.rules b/x11-servers/xorg-server/files/patch-X11.rules new file mode 100644 index 000000000..052e96012 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-X11.rules @@ -0,0 +1,17 @@ +--- config/cf/X11.rules.orig Sun May 30 12:49:38 2004 ++++ config/cf/X11.rules Sun May 30 12:50:02 2004 +@@ -23,6 +23,14 @@ + # define UseInstalledX11 YES + #endif + ++#ifndef UseInstalledPrograms ++# define UseInstalledPrograms NO ++#endif ++ ++#ifndef UseInstalledClients ++# define UseInstalledClients NO ++#endif ++ + #ifndef ImportX11 + # ifdef UseImports + # define ImportX11 YES diff --git a/x11-servers/xorg-server/files/patch-X11.tmpl b/x11-servers/xorg-server/files/patch-X11.tmpl new file mode 100644 index 000000000..c27d14d8e --- /dev/null +++ b/x11-servers/xorg-server/files/patch-X11.tmpl @@ -0,0 +1,79 @@ +--- X11.tmpl.orig Fri Sep 3 09:18:18 2004 ++++ config/cf/X11.tmpl Wed Dec 29 13:42:37 2004 +@@ -616,7 +616,7 @@ + #define BuildXft1Library BuildRenderLibrary + #endif + #ifndef UseFontconfig +-#define UseFontconfig BuildXftLibrary ++#define UseFontconfig (BuildXftLibrary || BuildXft1Library) + #endif + #ifndef BuildFontconfigLibrary + #define BuildFontconfigLibrary (UseFontconfig && !HasFontconfig) +@@ -773,6 +773,9 @@ + #ifndef ThreadedProject + #define ThreadedProject ThreadedX + #endif ++#ifndef BuildThreadStubLibrary ++#define BuildThreadStubLibrary NO ++#endif + #ifndef NeedUIThrStubs + #define NeedUIThrStubs NO + #endif +@@ -1606,7 +1609,7 @@ + #endif + + #ifndef PsWrap +-# ifndef UseInstalled ++# if !defined(UseInstalled) && !defined(UseInstalledPrograms) + # define PsWrap $(PSWRAPSRC)/pswrap + # else + # define PsWrap pswrap +@@ -1683,7 +1686,7 @@ + + INSTAPPFLAGS = $(INSTDATFLAGS) /* XXX - this should go away - XXX */ + +-#if UseInstalledX11 ++#if UseInstalledX11 || UseInstalledClients + RGB = $(XBINDIR)/rgb + FONTC = $(XBINDIR)/bdftopcf + MKFONTSCALE = $(XBINDIR)/mkfontscale +@@ -1843,6 +1846,39 @@ + DEPXLIBONLY = $(DEPXONLYLIB) + XLIBONLY = $(XONLYLIB) + LINTXONLYLIB = $(LINTXONLY) ++ ++#if BuildThreadStubLibrary ++#ifndef SharedLibXThrStub ++#define SharedLibXThrStub YES ++#endif ++#ifndef NormalLibXThrStub ++#define NormalLibXThrStub NO ++#endif ++#ifndef DebugLibXThrStub ++#define DebugLibXThrStub NO ++#endif ++#ifndef ProfileLibXThrStub ++#define ProfileLibXThrStub NO ++#endif ++ XTHRSTUBLIBSRC = $(LIBSRC)/XThrStub ++#if SharedLibXThrStub ++#ifndef SharedXThrStubRev ++#define SharedXThrStubRev 6.1 ++#endif ++SharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBLIBSRC),SOXTHRSTUBREV,SharedXThrStubRev) ++#else ++ProjectUnsharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBSRC),XBuildLibDir) ++#endif ++#else ++#undef SharedLibXThrStub ++#define SharedLibXThrStub NO ++#undef NormalLibXThrStub ++#define NormalLibXThrStub NO ++#undef DebugLibXThrStub ++#define DebugLibXThrStub NO ++#undef ProfileLibXThrStub ++#define ProfileLibXThrStub NO ++#endif + + #if BuildScreenSaverLibrary + #ifndef SharedLibXss diff --git a/x11-servers/xorg-server/files/patch-Xserver-Imakefile b/x11-servers/xorg-server/files/patch-Xserver-Imakefile new file mode 100644 index 000000000..5dab87bd4 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Xserver-Imakefile @@ -0,0 +1,8 @@ +--- programs/Xserver/Imakefile.orig Sat May 29 14:12:45 2004 ++++ programs/Xserver/Imakefile Sat May 29 14:12:16 2004 +@@ -1095,5 +1095,3 @@ + + DEFAULTFONTPATH = DefaultFontPath + EXTRAMANDEFS = -D__default_font_path__="`echo $(DEFAULTFONTPATH) | sed -e 's/,/, /g'`" +- +-InstallManPage(Xserver,$(MANDIR)) diff --git a/x11-servers/xorg-server/files/patch-Xserver-Xext-xvmc.c b/x11-servers/xorg-server/files/patch-Xserver-Xext-xvmc.c new file mode 100644 index 000000000..6a9380e45 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Xserver-Xext-xvmc.c @@ -0,0 +1,14 @@ +Index: programs/Xserver/Xext/xvmc.c +diff -u -p programs/Xserver/Xext/xvmc.c.orig programs/Xserver/Xext/xvmc.c +--- programs/Xserver/Xext/xvmc.c.orig Sun Jul 3 17:53:36 2005 ++++ programs/Xserver/Xext/xvmc.c Thu Jan 26 14:22:20 2006 +@@ -24,8 +24,8 @@ + + #ifdef HAS_XVMCSHM + #ifndef Lynx +-#include <sys/ipc.h> + #include <sys/types.h> ++#include <sys/ipc.h> + #include <sys/shm.h> + #else + #include <ipc.h> diff --git a/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-common-xf86Config.c b/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-common-xf86Config.c new file mode 100644 index 000000000..129b262f1 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-common-xf86Config.c @@ -0,0 +1,18 @@ +Index: programs/Xserver/hw/xfree86/common/xf86Config.c +diff -u -p programs/Xserver/hw/xfree86/common/xf86Config.c.orig programs/Xserver/hw/xfree86/common/xf86Config.c +--- programs/Xserver/hw/xfree86/common/xf86Config.c.orig Wed Dec 21 07:30:50 2005 ++++ programs/Xserver/hw/xfree86/common/xf86Config.c Thu Jan 26 15:10:39 2006 +@@ -505,8 +505,12 @@ GenerateDriverlist(char * dirname, char + { + #ifdef XFree86LOADER + char **ret; +- char *subdirs[] = { dirname, NULL }; ++ char *subdirs[2]; + static const char *patlist[] = {"(.*)_drv\\.so", "(.*)_drv\\.o", NULL}; ++ ++ subdirs[0] = dirname; ++ subdirs[1] = NULL; ++ + ret = LoaderListDirs(subdirs, patlist); + + /* fix up the probe order for video drivers */ diff --git a/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-bsd-i386_video.c b/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-bsd-i386_video.c new file mode 100644 index 000000000..8fc64d32f --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-bsd-i386_video.c @@ -0,0 +1,12 @@ +Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c +diff -u -p programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c.orig programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c +--- programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c.orig Tue Oct 4 01:46:14 2005 ++++ programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c Thu Jan 26 14:57:56 2006 +@@ -35,6 +35,7 @@ + #include "xf86Priv.h" + + #include <errno.h> ++#include <sys/types.h> + #include <sys/mman.h> + + #ifdef HAS_MTRR_SUPPORT diff --git a/x11-servers/xorg-server/files/patch-Xserver-os-xprintf.c b/x11-servers/xorg-server/files/patch-Xserver-os-xprintf.c new file mode 100644 index 000000000..d8f304d15 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-Xserver-os-xprintf.c @@ -0,0 +1,13 @@ +Index: programs/Xserver/os/xprintf.c +diff -u -p programs/Xserver/os/xprintf.c.orig programs/Xserver/os/xprintf.c +--- programs/Xserver/os/xprintf.c.orig Sun Jul 3 17:53:52 2005 ++++ programs/Xserver/os/xprintf.c Thu Jan 26 12:47:37 2006 +@@ -39,7 +39,7 @@ + # ifdef __va_copy + # define va_copy __va_copy + # else +-# error "no working va_copy was found" ++# define va_copy(dest, src) ((dest) = (src)) + # endif + #endif + diff --git a/x11-servers/xorg-server/files/patch-bsdResource.c b/x11-servers/xorg-server/files/patch-bsdResource.c new file mode 100644 index 000000000..e031b2681 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-bsdResource.c @@ -0,0 +1,68 @@ +--- programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c.orig Fri Apr 23 21:54:07 2004 ++++ programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c Tue May 17 00:48:36 2005 +@@ -18,7 +18,7 @@ + + #ifdef INCLUDE_XF86_NO_DOMAIN + +-#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) ++#if defined(__alpha__) || defined(__amd64__) + + resPtr + xf86BusAccWindowsFromOS(void) +@@ -112,7 +112,7 @@ + return ret; + } + +-#elif defined(__powerpc__) ++#elif defined(__powerpc__) || defined(__sparc__) || defined(__sparc64__) + + resPtr + xf86BusAccWindowsFromOS(void) +@@ -123,7 +123,11 @@ + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); + ret = xf86AddResToList(ret, &range, -1); + ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + return ret; + } +@@ -137,7 +141,11 @@ + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); + ret = xf86AddResToList(ret, &range, -1); + ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + return ret; + } +@@ -153,7 +161,11 @@ + RANGE(range, 0x00000000, 0xffffffff, ResExcMemBlock); + ret = xf86AddResToList(ret, &range, -1); + ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00000000, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x00000000, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + return ret; + } +@@ -175,7 +187,11 @@ + ret = xf86AddResToList(ret, &range, -1); + RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); + ret = xf86AddResToList(ret, &range, -1); ++#if defined(__sparc__) || defined(__sparc64__) ++ RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock); ++#else + RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock); ++#endif + ret = xf86AddResToList(ret, &range, -1); + + return ret; diff --git a/x11-servers/xorg-server/files/patch-font-FreeType-ftfuncs.c b/x11-servers/xorg-server/files/patch-font-FreeType-ftfuncs.c new file mode 100644 index 000000000..68e18f831 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-font-FreeType-ftfuncs.c @@ -0,0 +1,231 @@ +--- lib/font/FreeType/ftfuncs.c.orig 2005-10-23 19:32:05.000000000 +0100 ++++ lib/font/FreeType/ftfuncs.c 2006-06-01 23:21:34.000000000 +0100 +@@ -54,10 +54,7 @@ + #include FT_TYPE1_TABLES_H + #include FT_XFREE86_H + #include FT_BBOX_H +-#include FT_INTERNAL_TRUETYPE_TYPES_H + #include FT_TRUETYPE_TAGS_H +-#include FT_INTERNAL_SFNT_H +-#include FT_INTERNAL_STREAM_H + /* + * If you want to use FT_Outline_Get_CBox instead of + * FT_Outline_Get_BBox, define here. +@@ -123,6 +120,46 @@ + }; + + ++/* read 2-byte value from a SFNT table */ ++static FT_UShort ++sfnt_get_ushort( FT_Face face, ++ FT_ULong table_tag, ++ FT_ULong table_offset ) ++{ ++ FT_Byte buff[2]; ++ FT_ULong len = sizeof(buff); ++ FT_UShort result = 0; ++ ++ if ( !FT_Load_Sfnt_Table( face, table_tag, table_offset, buff, &len ) ); ++ result = (FT_UShort)( (buff[0] << 8) | buff[1] ); ++ ++ return result; ++} ++ ++#define sfnt_get_short(f,t,o) ((FT_Short)sfnt_get_ushort((f),(t),(o))) ++ ++ ++#if 0 ++static FT_ULong ++sfnt_get_ulong( FT_Face face, ++ FT_ULong table_tag, ++ FT_ULong table_offset ) ++{ ++ FT_Byte buff[4]; ++ FT_ULong len = sizeof(buff); ++ FT_UShort result = 0; ++ ++ if ( !FT_Load_Sfnt_Table( face, table_tag, table_offset, buff, &len ); ++ result = ((FT_ULong)buff[0] << 24) | ((FT_ULong)buff[1] << 16) | ++ ((FT_ULong)buff[2] << 8) | (FT_ULong)buff[3]; ++ ++ return result; ++} ++#endif ++ ++ ++ ++ + static int ftypeInitP = 0; /* is the engine initialised? */ + FT_Library ftypeLibrary; + +@@ -211,6 +248,10 @@ + if(maxp && maxp->maxContours == 0) + face->bitmap = 1; + } ++ ++ face->num_hmetrics = (FT_UInt) sfnt_get_ushort( face->face, ++ TTAG_hhea, 34 ); ++ + /* Insert face in hashtable and return it */ + face->next = faceTable[bucket]; + faceTable[bucket] = face; +@@ -462,6 +503,29 @@ + } + + if( FT_IS_SFNT( face->face ) ) { ++#if 1 ++ FT_F26Dot6 tt_char_width, tt_char_height, tt_dim_x, tt_dim_y; ++ FT_UInt nn; ++ ++ instance->strike_index=0xFFFFU; ++ ++ tt_char_width = (int)(trans->scale*(1<<6) + 0.5); ++ tt_char_height = (int)(trans->scale*(1<<6) + 0.5); ++ ++ tt_dim_x = ( ( tt_char_width * trans->xres + (36+32*72) ) / 72 ) & -64; ++ tt_dim_y = ( ( tt_char_height * trans->yres + (36+32*72) ) / 72 ) & -64; ++ ++ for ( nn = 0; nn < face->face->num_fixed_sizes; nn++ ) ++ { ++ FT_Bitmap_Size* sz = &face->face->available_sizes[nn]; ++ ++ if ( tt_dim_x == sz->x_ppem && tt_dim_y == sz->y_ppem ) ++ { ++ instance->strike_index = nn; ++ break; ++ } ++ } ++#else + /* See Set_Char_Sizes() in ttdriver.c */ + FT_Error err; + TT_Face tt_face; +@@ -486,6 +550,7 @@ + sfnt = (SFNT_Service)tt_face->sfnt; + err = sfnt->set_sbit_strike(tt_face,tt_x_ppem,tt_y_ppem,&instance->strike_index); + if ( err ) instance->strike_index=0xFFFFU; ++#endif + } + + /* maintain a linked list of instances */ +@@ -803,31 +868,36 @@ + * parse the htmx field in TrueType font. + */ + +-/* from src/truetype/ttgload.c */ + static void +-tt_get_metrics( TT_HoriHeader* header, ++tt_get_metrics( FT_Face face, + FT_UInt idx, ++ FT_UInt num_hmetrics, + FT_Short* bearing, + FT_UShort* advance ) +-/* Copyright 1996-2001, 2002 by */ +-/* David Turner, Robert Wilhelm, and Werner Lemberg. */ + { +- TT_LongMetrics longs_m; +- FT_UShort k = header->number_Of_HMetrics; ++ /* read the metrics directly from the horizontal header, we ++ * parse the SFNT table directly through the standard FreeType API. ++ * this works with any version of the library and doesn't need to ++ * peek at its internals. Maybe a bit less ++ */ ++ FT_UInt count = num_hmetrics; + +- if ( k == 0 ) { +- *bearing = *advance = 0; +- return; ++ if ( count == 0 ) ++ { ++ *advance = 0; ++ *bearing = 0; + } ++ else if ( idx < count ) ++ { ++ FT_ULong offset = idx*4; + +- if ( idx < (FT_UInt)k ) { +- longs_m = (TT_LongMetrics )header->long_metrics + idx; +- *bearing = longs_m->bearing; +- *advance = longs_m->advance; ++ *advance = sfnt_get_ushort( face, TTAG_hmtx, offset ); ++ *bearing = sfnt_get_short ( face, TTAG_hmtx, offset+2 ); + } +- else { +- *bearing = ((TT_ShortMetrics*)header->short_metrics)[idx - k]; +- *advance = ((TT_LongMetrics )header->long_metrics)[k - 1].advance; ++ else ++ { ++ *advance = sfnt_get_ushort( face, TTAG_hmtx, (count-1)*4 ); ++ *bearing = sfnt_get_short ( face, TTAG_hmtx, (count+idx)*2 ); + } + } + +@@ -835,6 +905,7 @@ + ft_get_very_lazy_bbox( FT_UInt index, + FT_Face face, + FT_Size size, ++ FT_UInt num_hmetrics, + double slant, + FT_Matrix *matrix, + FT_BBox *bbox, +@@ -842,14 +913,13 @@ + FT_Long *vertAdvance) + { + if ( FT_IS_SFNT( face ) ) { +- TT_Face ttface = (TT_Face)face; + FT_Size_Metrics *smetrics = &size->metrics; + FT_Short leftBearing = 0; + FT_UShort advance = 0; + FT_Vector p0, p1, p2, p3; + + /* horizontal */ +- tt_get_metrics(&ttface->horizontal, index, ++ tt_get_metrics( face, num_hmetrics, index, + &leftBearing, &advance); + + #if 0 +@@ -910,7 +980,27 @@ + FT_UShort glyph_index, FT_Glyph_Metrics *metrics_return, + int *sbitchk_incomplete_but_exist ) + { +-#if (FREETYPE_VERSION >= 2001008) ++#if 1 ++ if ( strike_index != 0xFFFFU && ft_face->available_sizes != 0) ++ { ++ FT_Error error; ++ FT_Bitmap_Size* sz = &ft_face->available_sizes[strike_index]; ++ ++ error = FT_Set_Pixel_Sizes( ft_face, sz->x_ppem/64, sz->y_ppem/64 ); ++ if ( !error ) ++ { ++ error = FT_Load_Glyph( ft_face, glyph_index, FT_LOAD_SBITS_ONLY ); ++ if ( !error ) ++ { ++ if ( metrics_return != NULL ) ++ *metrics_return = ft_face->glyph->metrics; ++ ++ return 0; ++ } ++ } ++ } ++ return -1; ++#elif (FREETYPE_VERSION >= 2001008) + SFNT_Service sfnt; + TT_Face face; + FT_Error error; +@@ -1043,6 +1133,7 @@ + if( bitmap_metrics == NULL ) { + if ( sbitchk_incomplete_but_exist==0 && (instance->ttcap.flags & TTCAP_IS_VERY_LAZY) ) { + if( ft_get_very_lazy_bbox( idx, face->face, instance->size, ++ face->num_hmetrics, + instance->ttcap.vl_slant, + &instance->transformation.matrix, + &bbox, &outline_hori_advance, +@@ -1221,6 +1312,7 @@ + if( is_outline == 1 ){ + if( correct ){ + if( ft_get_very_lazy_bbox( idx, face->face, instance->size, ++ face->num_hmetrics, + instance->ttcap.vl_slant, + &instance->transformation.matrix, + &bbox, &outline_hori_advance, diff --git a/x11-servers/xorg-server/files/patch-font-FreeType-ftfuncs.h b/x11-servers/xorg-server/files/patch-font-FreeType-ftfuncs.h new file mode 100644 index 000000000..925263c00 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-font-FreeType-ftfuncs.h @@ -0,0 +1,12 @@ +$NetBSD: patch-bj,v 1.3 2006/06/01 22:44:09 tron Exp $ + +--- lib/font/FreeType/ftfuncs.h.orig 2005-07-07 15:59:47.000000000 +0100 ++++ lib/font/FreeType/ftfuncs.h 2006-06-01 23:21:39.000000000 +0100 +@@ -47,6 +47,7 @@ + char *filename; + FT_Face face; + int bitmap; ++ FT_UInt num_hmetrics; + struct _FTInstance *instances; + struct _FTInstance *active_instance; + struct _FTFace *next; /* link to next face in bucket */ diff --git a/x11-servers/xorg-server/files/patch-font-FreeType-ftsystem.c b/x11-servers/xorg-server/files/patch-font-FreeType-ftsystem.c new file mode 100644 index 000000000..df7c97dce --- /dev/null +++ b/x11-servers/xorg-server/files/patch-font-FreeType-ftsystem.c @@ -0,0 +1,12 @@ +$NetBSD: patch-bk,v 1.3 2006/06/01 22:44:09 tron Exp $ + +--- lib/font/FreeType/ftsystem.c.orig 2005-07-09 07:36:10.000000000 +0100 ++++ lib/font/FreeType/ftsystem.c 2006-06-01 23:21:53.000000000 +0100 +@@ -35,7 +35,6 @@ + #endif + #include <ft2build.h> + #include FT_CONFIG_CONFIG_H +-#include FT_INTERNAL_DEBUG_H + #include FT_SYSTEM_H + #include FT_ERRORS_H + #include FT_TYPES_H diff --git a/x11-servers/xorg-server/files/patch-font-bitmap-pcfread.c b/x11-servers/xorg-server/files/patch-font-bitmap-pcfread.c new file mode 100644 index 000000000..c676e1934 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-font-bitmap-pcfread.c @@ -0,0 +1,101 @@ +--- lib/font/bitmap/pcfread.c.orig Sat Jul 9 08:36:12 2005 ++++ lib/font/bitmap/pcfread.c Thu Aug 24 21:56:56 2006 +@@ -45,6 +45,7 @@ + #endif + + #include <stdarg.h> ++#include <stdint.h> + + void + pcfError(const char* message, ...) +@@ -133,6 +134,10 @@ + return (PCFTablePtr) NULL; + count = pcfGetLSB32(file); + if (IS_EOF(file)) return (PCFTablePtr) NULL; ++ if (count < 0 || count > INT32_MAX / sizeof(PCFTableRec)) { ++ pcfError("pcfReadTOC(): invalid file format\n"); ++ return NULL; ++ } + tables = (PCFTablePtr) xalloc(count * sizeof(PCFTableRec)); + if (!tables) { + pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec)); +@@ -252,6 +257,10 @@ + if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) + goto Bail; + nprops = pcfGetINT32(file, format); ++ if (nprops <= 0 || nprops > INT32_MAX / sizeof(FontPropRec)) { ++ pcfError("pcfGetProperties(): invalid nprops value (%d)\n", nprops); ++ goto Bail; ++ } + if (IS_EOF(file)) goto Bail; + props = (FontPropPtr) xalloc(nprops * sizeof(FontPropRec)); + if (!props) { +@@ -267,6 +276,13 @@ + props[i].name = pcfGetINT32(file, format); + isStringProp[i] = pcfGetINT8(file, format); + props[i].value = pcfGetINT32(file, format); ++ if (props[i].name < 0 ++ || (isStringProp[i] != 0 && isStringProp[i] != 1) ++ || (isStringProp[i] && props[i].value < 0)) { ++ pcfError("pcfGetProperties(): invalid file format %d %d %d\n", ++ props[i].name, isStringProp[i], props[i].value); ++ goto Bail; ++ } + if (IS_EOF(file)) goto Bail; + } + /* pad the property array */ +@@ -282,6 +298,7 @@ + } + if (IS_EOF(file)) goto Bail; + string_size = pcfGetINT32(file, format); ++ if (string_size < 0) goto Bail; + if (IS_EOF(file)) goto Bail; + strings = (char *) xalloc(string_size); + if (!strings) { +@@ -422,6 +439,10 @@ + else + nmetrics = pcfGetINT16(file, format); + if (IS_EOF(file)) goto Bail; ++ if (nmetrics < 0 || nmetrics > INT32_MAX / sizeof(CharInfoRec)) { ++ pcfError("pcfReadFont(): invalid file format\n"); ++ goto Bail; ++ } + metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); + if (!metrics) { + pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); +@@ -447,7 +468,7 @@ + nbitmaps = pcfGetINT32(file, format); + if (nbitmaps != nmetrics || IS_EOF(file)) + goto Bail; +- ++ /* nmetrics is alreadt ok, so nbitmap also is */ + offsets = (CARD32 *) xalloc(nbitmaps * sizeof(CARD32)); + if (!offsets) { + pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32)); +@@ -461,6 +482,7 @@ + for (i = 0; i < GLYPHPADOPTIONS; i++) { + bitmapSizes[i] = pcfGetINT32(file, format); + if (IS_EOF(file)) goto Bail; ++ if (bitmapSizes[i] < 0) goto Bail; + } + + sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; +@@ -536,6 +558,7 @@ + if (IS_EOF(file)) goto Bail; + if (nink_metrics != nmetrics) + goto Bail; ++ /* nmetrics already checked */ + ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); + if (!ink_metrics) { + pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); +@@ -809,6 +832,10 @@ + else + nmetrics = pcfGetINT16(file, format); + if (IS_EOF(file)) goto Bail; ++ if (nmetrics < 0 || nmetrics > INT32_MAX / sizeof(CharInfoRec)) { ++ pcfError("pmfReadFont(): invalid file format\n"); ++ goto Bail; ++ } + metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); + if (!metrics) { + pcfError("pmfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); diff --git a/x11-servers/xorg-server/files/patch-mitri.c b/x11-servers/xorg-server/files/patch-mitri.c new file mode 100644 index 000000000..8c4ef0f57 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-mitri.c @@ -0,0 +1,25 @@ +Index: render/mitri.c +=================================================================== +RCS file: /cvs/xorg/xserver/xorg/render/mitri.c,v +retrieving revision 1.5 +diff -u -r1.5 mitri.c +--- programs/Xserver/render/mitri.c 3 Jul 2005 07:02:08 -0000 1.5 ++++ programs/Xserver/render/mitri.c 18 Apr 2006 22:34:08 -0000 +@@ -145,7 +145,7 @@ + if (npoint < 3) + return; + ntri = npoint - 2; +- tris = ALLOCATE_LOCAL (ntri & sizeof (xTriangle)); ++ tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle)); + if (!tris) + return; + for (tri = tris; npoint >= 3; npoint--, points++, tri++) +@@ -177,7 +177,7 @@ + if (npoint < 3) + return; + ntri = npoint - 2; +- tris = ALLOCATE_LOCAL (ntri & sizeof (xTriangle)); ++ tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle)); + if (!tris) + return; + first = points++; diff --git a/x11-servers/xorg-server/files/patch-render.c b/x11-servers/xorg-server/files/patch-render.c new file mode 100644 index 000000000..2bcd61775 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-render.c @@ -0,0 +1,11 @@ +--- programs/Xserver/render/render.c.orig Mon May 29 09:43:15 2006 ++++ programs/Xserver/render/render.c Mon May 29 09:45:02 2006 +@@ -1340,7 +1340,7 @@ + { + if (buffer + sizeof (GlyphSet) < end) + { +- memcpy(&gs, buffer, sizeof(GlyphSet)); ++ gs = *(CARD32 *) buffer; + glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, + gs, + GlyphSetType, diff --git a/x11-servers/xorg-server/files/patch-servermd.h b/x11-servers/xorg-server/files/patch-servermd.h new file mode 100644 index 000000000..4315d78de --- /dev/null +++ b/x11-servers/xorg-server/files/patch-servermd.h @@ -0,0 +1,11 @@ +--- programs/Xserver/include/servermd.h.orig Sun Jan 8 14:05:55 2006 ++++ programs/Xserver/include/servermd.h Sun Jan 8 14:06:22 2006 +@@ -216,7 +216,7 @@ + defined(__sparc__) || defined(__mc68000__) + + #if defined(__sparc) || defined(__sparc__) +-# if !defined(sparc) ++# if !defined(sparc) && !defined(__FreeBSD__) + # define sparc 1 + # endif + #endif diff --git a/x11-servers/xorg-server/files/patch-sunffb-nocfb b/x11-servers/xorg-server/files/patch-sunffb-nocfb new file mode 100644 index 000000000..934268ca4 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-sunffb-nocfb @@ -0,0 +1,101 @@ +--- programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c.orig Fri Mar 31 00:22:07 2006 ++++ programs/Xserver/hw/xfree86/drivers/sunffb/ffb_accel.c Fri Mar 31 00:35:35 2006 +@@ -43,8 +43,6 @@ + #include "ffb_rcache.h" + #include "ffb_loops.h" + #include "ffb_regs.h" +-#include "ffb_stip.h" +-#include "ffb_gc.h" + + int CreatorScreenPrivateIndex; + int CreatorGCPrivateIndex; +--- programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c.orig Fri Mar 31 00:22:07 2006 ++++ programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dga.c Fri Mar 31 00:36:08 2006 +@@ -36,7 +36,6 @@ + #include "ffb_regs.h" + #include "ffb_rcache.h" + #include "ffb_fifo.h" +-#include "ffb_stip.h" + #include "ffb_loops.h" + + static Bool FFB_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, +--- programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c.orig Fri Mar 31 00:22:07 2006 ++++ programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c Fri Mar 31 00:37:04 2006 +@@ -33,11 +33,6 @@ + + #include "xf86PciInfo.h" + #include "xf86Pci.h" +-#define PSZ 8 +-#include "cfb.h" +-#undef PSZ +-#include "cfb16.h" +-#include "cfb32.h" + + #include "miline.h" + +--- programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile.orig Fri Mar 31 00:22:07 2006 ++++ programs/Xserver/hw/xfree86/drivers/sunffb/Imakefile Fri Mar 31 00:34:27 2006 +@@ -60,16 +60,10 @@ + #define FFBsObjectRule(name) + #endif + +-SRCS = ffb_driver.c ffb_accel.c ffb_attr.c ffb_stip.c ffb_bcopy.c \ +- ffb_cplane.c ffb_fspans.c ffb_point.c ffb_seg.c ffb_plygon.c \ +- ffb_line.c ffb_glyph.c ffb_frect.c ffb_circle.c ffb_checks.c \ +- ffb_stubs.c ffb_gc.c ffb_gspans.c ffb_sspans.c ffb_zeroarc.c \ +- ffb_cursor.c ffb_dga.c ffb_dac.c ffb_wid.c ffb_dbe.c $(DRISRCS) +-OBJS = ffb_driver.o ffb_accel.o ffb_attr.o ffb_stip.o ffb_bcopy.o \ +- ffb_cplane.o ffb_fspans.o ffb_point.o ffb_seg.o ffb_plygon.o \ +- ffb_line.o ffb_glyph.o ffb_frect.o ffb_circle.o ffb_checks.o \ +- ffb_stubs.o ffb_gc.o ffb_gspans.o ffb_sspans.o ffb_zeroarc.o \ +- ffb_cursor.o ffb_dga.o ffb_dac.o ffb_wid.o ffb_dbe.o $(VISOBJS) \ ++SRCS = ffb_driver.c ffb_accel.c ffb_attr.c \ ++ ffb_cursor.c ffb_dga.c ffb_dac.c ffb_wid.c $(DRISRCS) ++OBJS = ffb_driver.o ffb_accel.o ffb_attr.o \ ++ ffb_cursor.o ffb_dga.o ffb_dac.o ffb_wid.o $(VISOBJS) \ + $(DRIOBJS) + + #if defined(XF86DriverSDK) +@@ -107,28 +101,10 @@ + FFBCObjectRule(ffb_accel) + FFBCObjectRule(ffb_driver) + FFBCObjectRule(ffb_attr) +-FFBCObjectRule(ffb_stip) +-FFBCObjectRule(ffb_bcopy) +-FFBCObjectRule(ffb_cplane) +-FFBCObjectRule(ffb_fspans) +-FFBCObjectRule(ffb_point) +-FFBCObjectRule(ffb_seg) +-FFBCObjectRule(ffb_plygon) +-FFBCObjectRule(ffb_line) +-FFBCObjectRule(ffb_glyph) +-FFBCObjectRule(ffb_frect) +-FFBCObjectRule(ffb_circle) +-FFBCObjectRule(ffb_checks) +-FFBCObjectRule(ffb_stubs) +-FFBCObjectRule(ffb_gc) +-FFBCObjectRule(ffb_gspans) +-FFBCObjectRule(ffb_sspans) +-FFBCObjectRule(ffb_zeroarc) + FFBCObjectRule(ffb_cursor) + FFBCObjectRule(ffb_dga) + FFBCObjectRule(ffb_dac) + FFBCObjectRule(ffb_wid) +-FFBCObjectRule(ffb_dbe) + FFBsObjectRule(VISmoveImage) + FFBsObjectRule(ffb_asm) + #if BuildXF86DRI +--- programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c.orig Wed Apr 19 13:13:47 2006 ++++ programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c Wed Apr 19 13:14:25 2006 +@@ -411,11 +411,6 @@ + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n"); + } + +- if (xf86LoadSubModule(pScrn, "xf8_32wid") == NULL) { +- FFBFreeRec(pScrn); +- return FALSE; +- } +- + if (xf86LoadSubModule(pScrn, "fb") == NULL) { + FFBFreeRec(pScrn); + return FALSE; diff --git a/x11-servers/xorg-server/files/patch-xf86.tmpl b/x11-servers/xorg-server/files/patch-xf86.tmpl new file mode 100644 index 000000000..3bf0b443d --- /dev/null +++ b/x11-servers/xorg-server/files/patch-xf86.tmpl @@ -0,0 +1,12 @@ +--- config/cf/xf86.tmpl.orig Tue Dec 17 04:21:38 2002 ++++ config/cf/xf86.tmpl Thu Jan 2 14:10:44 2003 +@@ -19,6 +19,9 @@ + #ifdef UseInstalled + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(TOP) -I$(IRULESRC) \ + $(IMAKE_DEFINES) $(IMAKE_WARNINGS) ++#elif UseInstalledPrograms ++ IMAKE_CMD = $(IMAKE) -I$(TOP) -I$(IRULESRC) \ ++ $(IMAKE_DEFINES) $(IMAKE_WARNINGS) + #else + IMAKE_CMD = $(IMAKE) -I$(TOP) -I$(IRULESRC) \ + $(IMAKE_DEFINES) $(IMAKE_WARNINGS) diff --git a/x11-servers/xorg-server/files/patch-xf86Events.c b/x11-servers/xorg-server/files/patch-xf86Events.c new file mode 100644 index 000000000..bdd5bc51c --- /dev/null +++ b/x11-servers/xorg-server/files/patch-xf86Events.c @@ -0,0 +1,76 @@ +--- programs/Xserver/hw/xfree86/common/xf86Events.c.orig Sun Sep 26 04:17:42 2004 ++++ programs/Xserver/hw/xfree86/common/xf86Events.c Sun Sep 26 04:17:25 2004 +@@ -448,7 +448,7 @@ + #if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT) + static Bool first_time = TRUE; + #endif +-#if defined(__sparc__) && defined(__linux__) ++#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__)) + static int kbdSun = -1; + #endif + /* Disable any keyboard processing while in suspend */ +@@ -464,7 +464,7 @@ + } + #endif + +-#if defined (__sparc__) && defined(__linux__) ++#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__)) + if (kbdSun == -1) { + if ((xf86Info.xkbmodel && !strcmp(xf86Info.xkbmodel, "sun")) + || (xf86Info.xkbrules && !strcmp(xf86Info.xkbrules, "sun"))) +@@ -474,7 +474,7 @@ + } + if (kbdSun) + goto special; +-#endif /* __sparc__ && __linux__ */ ++#endif /* __sparc__ && (__linux__ || __FreeBSD__) */ + + #ifdef __linux__ + if (xf86Info.kbdCustomKeycodes) { +@@ -525,6 +525,7 @@ + } else + #endif /* i386 && SVR4 */ + { ++ if (!xf86IsPc98()) { + switch (scanCode) { + case 0x59: scanCode = KEY_0x59; break; + case 0x5a: scanCode = KEY_0x5A; break; +@@ -555,6 +556,7 @@ + case 0x75: scanCode = KEY_0x75; break; + case 0x76: scanCode = KEY_0x76; break; + } ++ } /* end if (!xf86IsPc98()) */ + } + } + +@@ -636,10 +638,12 @@ + * they need to get the same key code as the base key on the same + * physical keyboard key. + */ ++ if (!xf86IsPc98()) { + if (scanCode == KEY_SysReqest) + scanCode = KEY_Print; + else if (scanCode == KEY_Break) + scanCode = KEY_Pause; ++ } + #endif + + /* +@@ -676,7 +680,7 @@ + } + } + #endif +-#if defined (__sparc__) && defined(__linux__) ++#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__)) + special: + if (kbdSun) { + switch (scanCode) { +@@ -710,7 +714,7 @@ + */ + scanCode--; + } +-#endif /* defined (__sparc__) && defined(__linux__) */ ++#endif /* __sparc__ && (__linux__ || __FreeBSD__) */ + + #ifdef XKB + if ((xf86Info.ddxSpecialKeys == SKWhenNeeded && diff --git a/x11-servers/xorg-server/files/patch-xf86cfg-Imakefile b/x11-servers/xorg-server/files/patch-xf86cfg-Imakefile new file mode 100644 index 000000000..5728d915f --- /dev/null +++ b/x11-servers/xorg-server/files/patch-xf86cfg-Imakefile @@ -0,0 +1,11 @@ +--- programs/Xserver/hw/xfree86/xf86cfg/Imakefile.orig Sat Sep 11 15:11:04 2004 ++++ programs/Xserver/hw/xfree86/xf86cfg/Imakefile Sat Sep 11 15:11:07 2004 +@@ -25,6 +25,8 @@ + SNPRINTFOBJS = snprintf.o + #endif + ++XAWLIB = -lXaw ++ + SRCS =\ + accessx.c\ + card-cfg.c\ diff --git a/x11-servers/xorg-server/files/patch-xf86sym.c b/x11-servers/xorg-server/files/patch-xf86sym.c new file mode 100644 index 000000000..1372be144 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-xf86sym.c @@ -0,0 +1,10 @@ +--- programs/Xserver/hw/xfree86/loader/xf86sym.c.orig Fri May 7 18:51:51 2004 ++++ programs/Xserver/hw/xfree86/loader/xf86sym.c Fri May 7 18:52:02 2004 +@@ -63,7 +63,6 @@ + #include "xf86.h" + #include "xf86Resources.h" + #include "xf86_OSproc.h" +-#include "xf86Parser.h" + #include "xf86Config.h" + #ifdef XINPUT + # include "xf86Xinput.h" diff --git a/x11-servers/xorg-server/files/patch-xorgconf.cpp b/x11-servers/xorg-server/files/patch-xorgconf.cpp new file mode 100644 index 000000000..e21fac8d8 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-xorgconf.cpp @@ -0,0 +1,14 @@ +--- programs/Xserver/hw/xfree86/xorgconf.cpp.orig Fri Dec 31 14:40:27 2004 ++++ programs/Xserver/hw/xfree86/xorgconf.cpp Fri Dec 31 14:40:28 2004 +@@ -624,3 +624,11 @@ + InputDevice "Keyboard1" "CoreKeyboard" + EndSection + ++ ++XCOMM Two experimental extensions are available -- Composite and XEVIE. Uncomment ++XCOMM the section below to enable Composite. Many extensions can also be disabled ++XCOMM in this manner. ++ ++XCOMM Section "Extensions" ++XCOMM Option "Composite" "Enable" ++XCOMM EndSection diff --git a/x11-servers/xorg-server/pkg-descr b/x11-servers/xorg-server/pkg-descr new file mode 100644 index 000000000..f95969b82 --- /dev/null +++ b/x11-servers/xorg-server/pkg-descr @@ -0,0 +1,6 @@ +This package contains the X.Org X server and some associated programs. + +WWW: http://www.freedesktop.org/Software/xorg + +- Eric Anholt +anholt@FreeBSD.org diff --git a/x11-servers/xorg-server/pkg-plist b/x11-servers/xorg-server/pkg-plist new file mode 100644 index 000000000..cadb9a395 --- /dev/null +++ b/x11-servers/xorg-server/pkg-plist @@ -0,0 +1,207 @@ +bin/X +bin/Xorg +bin/getconfig +bin/getconfig.pl +bin/gtf +%%SPARC64_NA%%%%PPC_NA%%bin/inb +%%SPARC64_NA%%%%PPC_NA%%bin/inl +%%SPARC64_NA%%%%PPC_NA%%bin/inw +%%SPARC64_NA%%%%PPC_NA%%bin/ioport +bin/kbd_mode +bin/mmapr +bin/mmapw +%%SPARC64_NA%%%%PPC_NA%%bin/outb +%%SPARC64_NA%%%%PPC_NA%%bin/outl +%%SPARC64_NA%%%%PPC_NA%%bin/outw +bin/pcitweak +%%I386%%bin/scanpci +bin/xorgcfg +bin/xorgconfig +include/X11/bitmaps/card.xbm +include/X11/bitmaps/down.xbm +include/X11/bitmaps/keyboard.xbm +include/X11/bitmaps/left.xbm +include/X11/bitmaps/monitor.xbm +include/X11/bitmaps/mouse.xbm +include/X11/bitmaps/narrower.xbm +include/X11/bitmaps/right.xbm +include/X11/bitmaps/shorter.xbm +include/X11/bitmaps/taller.xbm +include/X11/bitmaps/up.xbm +include/X11/bitmaps/wider.xbm +include/X11/pixmaps/card.xpm +include/X11/pixmaps/computer.xpm +include/X11/pixmaps/keyboard.xpm +include/X11/pixmaps/monitor.xpm +include/X11/pixmaps/mouse.xpm +lib/X11/Cards +lib/X11/Options +lib/X11/app-defaults/XOrgCfg +lib/X11/doc/BUILD +lib/X11/doc/BugReport +lib/X11/doc/DESIGN +lib/X11/doc/Install +lib/X11/doc/LICENSE +lib/X11/doc/OS2.Notes +lib/X11/doc/README +lib/X11/doc/README.DECtga +lib/X11/doc/README.Darwin +lib/X11/doc/README.I128 +lib/X11/doc/README.LynxOS +lib/X11/doc/README.NetBSD +lib/X11/doc/README.OpenBSD +lib/X11/doc/README.SCO +lib/X11/doc/README.SiS +lib/X11/doc/README.Solaris +lib/X11/doc/README.XKB-Config +lib/X11/doc/README.XKB-Enhancing +lib/X11/doc/README.apm +lib/X11/doc/README.ati +lib/X11/doc/README.chips +lib/X11/doc/README.cyrix +lib/X11/doc/README.dps +lib/X11/doc/README.fonts +lib/X11/doc/README.i740 +lib/X11/doc/README.i810 +lib/X11/doc/README.mouse +lib/X11/doc/README.newport +lib/X11/doc/README.r128 +lib/X11/doc/README.rapidaccess +lib/X11/doc/README.rendition +lib/X11/doc/README.s3virge +lib/X11/doc/RELNOTES +lib/X11/doc/Versions +lib/X11/doc/VideoBoard98 +lib/X11/etc/Xinstall.sh +lib/X11/etc/xmodmap.std +lib/X11/getconfig/cfg.sample +lib/X11/getconfig/xorg.cfg +lib/X11/xorg.conf.eg +lib/X11/xserver/SecurityPolicy +%%AMD64_I386%%lib/modules/drivers/apm_drv.so +%%AMD64_I386%%lib/modules/drivers/ark_drv.so +lib/modules/drivers/ati_drv.so +lib/modules/drivers/atimisc_drv.so +%%AMD64_I386%%lib/modules/drivers/chips_drv.so +%%SPARC64_NA%%%%PPC_NA%%lib/modules/drivers/cirrus_alpine.so +%%SPARC64_NA%%%%PPC_NA%%lib/modules/drivers/cirrus_drv.so +%%SPARC64_NA%%%%PPC_NA%%lib/modules/drivers/cirrus_laguna.so +%%AMD64_I386%%lib/modules/drivers/cyrix_drv.so +%%ALPHA_NA%%lib/modules/drivers/dummy_drv.so +lib/modules/drivers/glint_drv.so +%%AMD64_I386%%lib/modules/drivers/i128_drv.so +%%I386%%lib/modules/drivers/i740_drv.so +%%AMD64_I386%%lib/modules/drivers/i810_drv.so +lib/modules/drivers/mga_drv.so +%%AMD64_I386%%lib/modules/drivers/neomagic_drv.so +%%I386%%lib/modules/drivers/nsc_drv.so +%%SPARC64_NA%%lib/modules/drivers/nv_drv.so +lib/modules/drivers/r128_drv.so +lib/modules/drivers/radeon_drv.so +%%SPARC64_NA%%%%IA64_NA%%%%PPC_NA%%lib/modules/drivers/rendition_drv.so +%%SPARC64_NA%%lib/modules/drivers/riva128.so +%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/s3_drv.so +%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/s3virge_drv.so +%%SPARC64_NA%%%%IA64_NA%%lib/modules/drivers/savage_drv.so +%%SPARC64_NA%%%%IA64_NA%%%%PPC_NA%%lib/modules/drivers/siliconmotion_drv.so +%%AMD64_I386%%lib/modules/drivers/sis_drv.so +%%SPARC64%%lib/modules/drivers/sunbw2_drv.so +%%SPARC64%%lib/modules/drivers/suncg14_drv.so +%%SPARC64%%lib/modules/drivers/suncg3_drv.so +%%SPARC64%%lib/modules/drivers/suncg6_drv.so +%%SPARC64%%lib/modules/drivers/sunffb_drv.so +%%SPARC64%%lib/modules/drivers/sunleo_drv.so +%%SPARC64%%lib/modules/drivers/suntcx_drv.so +lib/modules/drivers/tdfx_drv.so +%%SPARC64_NA%%%%IA64_NA%%%%PPC_NA%%lib/modules/drivers/tga_drv.so +%%AMD64_I386%%lib/modules/drivers/trident_drv.so +%%AMD64_I386%%lib/modules/drivers/tseng_drv.so +%%ALPHA_NA%%%%PPC_NA%%lib/modules/drivers/vesa_drv.so +lib/modules/drivers/vga_drv.so +%%I386%%lib/modules/drivers/via_drv.so +%%AMD64_I386%%lib/modules/drivers/vmware_drv.so +lib/modules/extensions/libGLcore.so +lib/modules/extensions/libdbe.so +lib/modules/extensions/libdri.so +lib/modules/extensions/libextmod.so +lib/modules/extensions/libglx.so +lib/modules/extensions/librecord.so +lib/modules/extensions/libxtrap.so +lib/modules/fonts/libbitmap.so +lib/modules/fonts/libfreetype.so +lib/modules/fonts/libtype1.so +lib/modules/freebsd/libdrm.so +lib/modules/input/acecad_drv.so +lib/modules/input/calcomp_drv.so +lib/modules/input/citron_drv.so +lib/modules/input/digitaledge_drv.so +lib/modules/input/dmc_drv.so +lib/modules/input/dynapro_drv.so +lib/modules/input/elographics_drv.so +lib/modules/input/fpit_drv.so +lib/modules/input/hyperpen_drv.so +lib/modules/input/js_x_drv.so +lib/modules/input/kbd_drv.so +lib/modules/input/keyboard_drv.so +lib/modules/input/magellan_drv.so +lib/modules/input/microtouch_drv.so +lib/modules/input/mouse_drv.so +lib/modules/input/mutouch_drv.so +lib/modules/input/palmax_drv.so +lib/modules/input/penmount_drv.so +lib/modules/input/spaceorb_drv.so +lib/modules/input/summa_drv.so +lib/modules/input/tek4957_drv.so +lib/modules/input/void_drv.so +lib/modules/input/wacom_drv.so +%%ALPHA_NA%%lib/modules/libafb.so +lib/modules/libcfb.so +lib/modules/libcfb16.so +%%SPARC64%%lib/modules/libcfb24.so +lib/modules/libcfb32.so +lib/modules/libddc.so +lib/modules/libexa.so +lib/modules/libfb.so +lib/modules/libi2c.so +lib/modules/libint10.so +lib/modules/liblayer.so +lib/modules/libmfb.so +lib/modules/libpcidata.so +lib/modules/librac.so +lib/modules/libramdac.so +lib/modules/libscanpci.so +lib/modules/libshadow.so +lib/modules/libshadowfb.so +lib/modules/libvbe.so +lib/modules/libvgahw.so +lib/modules/libxaa.so +lib/modules/libxf1bpp.so +lib/modules/libxf4bpp.so +lib/modules/libxf8_16bpp.so +lib/modules/libxf8_32bpp.so +%%SPARC64%%lib/modules/libxf8_32wid.so +lib/modules/multimedia/bt829_drv.so +lib/modules/multimedia/fi1236_drv.so +lib/modules/multimedia/msp3430_drv.so +lib/modules/multimedia/tda8425_drv.so +lib/modules/multimedia/tda9850_drv.so +lib/modules/multimedia/tda9885_drv.so +lib/modules/multimedia/theatre_detect_drv.so +lib/modules/multimedia/theatre_drv.so +lib/modules/multimedia/theatre200_drv.so +lib/modules/multimedia/uda1380_drv.so +%%SPARC64_NA%%%%PPC_NA%%lib/modules/v10002d.uc +%%SPARC64_NA%%%%PPC_NA%%lib/modules/v20002d.uc +@dirrm lib/X11/getconfig +@dirrm lib/modules/fonts +@dirrm lib/modules/extensions +@dirrm lib/modules/freebsd +@dirrm lib/modules/drivers +@dirrm lib/modules/input +@dirrm lib/modules/internal +@dirrm lib/modules/multimedia +@dirrmtry include/X11/pixmaps +@dirrmtry lib/X11/doc +@dirrmtry lib/X11/etc +@dirrmtry lib/X11/xserver +@dirrmtry lib/modules diff --git a/x11-servers/xorg-server/scripts/configure b/x11-servers/xorg-server/scripts/configure new file mode 100644 index 000000000..84cf7bd2a --- /dev/null +++ b/x11-servers/xorg-server/scripts/configure @@ -0,0 +1,38 @@ +#!/bin/sh + +LOCALDEF=$WRKDIR/.config + +rm -f $LOCALDEF +echo "#define InstallXserverSetUID ${SUID_XSERVER}" >> $LOCALDEF +echo "#define JoystickSupport NO" >> $LOCALDEF +echo "#define BuildLBX NO" >> $LOCALDEF +echo "#define XnestServer NO" >> $LOCALDEF +echo "#define BuildFontServer NO" >> $LOCALDEF +echo "#define XVirtualFramebufferServer NO" >> $LOCALDEF +echo "#define XprtServer NO" >> $LOCALDEF +echo "#define LibInstall NO" >> $LOCALDEF +echo "#define ForceNormalLib NO" >> $LOCALDEF +echo "#define XTrueTypeInstallCConvHeaders NO" >> $LOCALDEF +echo "#define BuildServer YES" >> $LOCALDEF +echo "#define BuildXprint NO" >> $LOCALDEF +echo "#define BuildLibraries NO" >> $LOCALDEF +echo "#define LibInstallBuild YES" >> $LOCALDEF +echo "#define ModInstall YES" >> $LOCALDEF +echo "#define XF86Server NO" >> $LOCALDEF +echo "#define BuildServersOnly YES" >> $LOCALDEF +echo "#define BuildGLXLibrary YES" >> $LOCALDEF +echo "#define UseInstalledPrograms YES" >> $LOCALDEF +echo "#define StandardIncludes -I${PREFIX}/include" >> $LOCALDEF +echo "#define BuildXFree86ConfigTools YES" >> $LOCALDEF +echo "#define DriverManDir \$(MANSOURCEPATH)4" >> $LOCALDEF +echo "#define DriverManSuffix 4x" >> $LOCALDEF +echo "#define MiscManDir \$(MANSOURCEPATH)7" >> $LOCALDEF +echo "#define MiscManSuffix 7x" >> $LOCALDEF + +if [ X$WITH_DEBUG != X ]; then + export CFLAGS="-g $CFLAGS" + echo "#define InstPgmFlags" >> $LOCALDEF + echo "#define MakeDllModules YES" >> $LOCALDEF +fi + +sh $PORTSDIR/x11-servers/xorg-server/scripts/configure.gen diff --git a/x11-servers/xorg-server/scripts/configure.gen b/x11-servers/xorg-server/scripts/configure.gen new file mode 100644 index 000000000..ee7e1d88a --- /dev/null +++ b/x11-servers/xorg-server/scripts/configure.gen @@ -0,0 +1,30 @@ +#!/bin/sh + +# This script takes some of the system's imake configuration files and munges +# them to be used in the X.Org build, and allows port configuration located in +# $LOCALDEF to be included in the generated host.def + +SYSSITE=$PREFIX/lib/X11/config/xf86site.def +BUILDSITE=$WRKDIR/xc/config/cf/xorgsite.def +SYSHOST=$PREFIX/lib/X11/config/host.def +LOCALDEF=$WRKDIR/.config +BUILDHOST=$WRKDIR/xc/config/cf/host.def + +# Append system xf86site.def to build's xorgsite.def. +rm -f $BUILDSITE +cp -f $SYSSITE $BUILDSITE + +# Use system host.def as initial config file, setting ProjectRoot appropriately. +rm -f $BUILDHOST +grep -v '#define.*ProjectRoot' $SYSHOST >> $BUILDHOST +echo "#define ProjectRoot $PREFIX" >> $BUILDHOST + +# Add in defines that all ports will want. +echo "#define NothingOutsideProjectRoot YES" >> $BUILDHOST +echo "#define FreeBSDCC ${CC}" >> $BUILDHOST +echo "#define FreeBSDCXX ${CXX}" >> $BUILDHOST +echo "#define FreeBSDPTHREAD_LIBS ${PTHREAD_LIBS}" >> $BUILDHOST +echo "#define FreeBSDPTHREAD_CFLAGS ${PTHREAD_CFLAGS}" >> $BUILDHOST +echo "#define FreeBSDCFLAGS ${CFLAGS}" >> $BUILDHOST + +cat ${LOCALDEF} >> ${BUILDHOST} |