From: Jakub Bogusz Date: Wed, 18 Sep 2002 17:36:01 +0000 (+0000) Subject: - replaced RedHat's tdfx-enable-interlaced-modes joke (which didn't actualy X-Git-Tag: XFree86-4_2_1-3~4 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=a450cc71862f2f72d1b9701df9f0fe63a2ae136a;p=packages%2FXFree86.git - replaced RedHat's tdfx-enable-interlaced-modes joke (which didn't actualy set interlace) with proper interlace patch (tested on Voodoo4 4500: OK) - added Xfont-Type1-large-DoS patch - prevent xfs or Xserver DoS on large Type1 font request (problably not the only one - Type1 Xfont backend contains many abort()s; it's to be rewritten (basing on freetype2) in X 4.3.0 and XFree86 team is not going to fix broken error handling in current version) - added GLcore-strip-a-workaround patch - workaround for "strip -g *.a" - caused libGLcore.a load failure with "debug_xform.o: no symbols" - added workaround for gcc3 ICE on athlon Changed files: XFree86-GLcore-strip-a-workaround.patch -> 1.1 XFree86-Xfont-Type1-large-DoS.patch -> 1.1 XFree86-tdfx-interlace.patch -> 1.1 XFree86.spec -> 1.326 --- diff --git a/XFree86-GLcore-strip-a-workaround.patch b/XFree86-GLcore-strip-a-workaround.patch new file mode 100644 index 0000000..0ef68cd --- /dev/null +++ b/XFree86-GLcore-strip-a-workaround.patch @@ -0,0 +1,18 @@ +--- XFree86-4.2.1/xc/lib/GL/mesa/src/Imakefile.inc.orig Tue Apr 3 00:15:47 2001 ++++ XFree86-4.2.1/xc/lib/GL/mesa/src/Imakefile.inc Wed Sep 18 16:11:39 2002 +@@ -197,7 +197,6 @@ + $(MESABUILDDIR)context.o \ + $(MESABUILDDIR)copypix.o \ + $(MESABUILDDIR)cva.o \ +- $(MESABUILDDIR)debug_xform.o \ + $(MESABUILDDIR)depth.o \ + $(MESABUILDDIR)dlist.o \ + $(DISPATCHOBJS) \ +@@ -282,7 +281,6 @@ + $(MESABUILDDIR)unshared/context.o \ + $(MESABUILDDIR)unshared/copypix.o \ + $(MESABUILDDIR)unshared/cva.o \ +- $(MESABUILDDIR)unshared/debug_xform.o \ + $(MESABUILDDIR)unshared/depth.o \ + $(DISPATCHUOBJS) \ + $(MESABUILDDIR)unshared/dlist.o \ diff --git a/XFree86-Xfont-Type1-large-DoS.patch b/XFree86-Xfont-Type1-large-DoS.patch new file mode 100644 index 0000000..610d45e --- /dev/null +++ b/XFree86-Xfont-Type1-large-DoS.patch @@ -0,0 +1,13 @@ +--- XFree86-4.2.1/xc/lib/font/Type1/t1funcs.c.orig Fri Dec 14 20:56:44 2001 ++++ XFree86-4.2.1/xc/lib/font/Type1/t1funcs.c Wed Sep 18 16:04:20 2002 +@@ -523,7 +523,9 @@ + if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]) < 1.0 || + hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) < 1.0) + return BadFontName; +- ++ /* Reject large sizes too - may cause DoS in xfs or X-server due to abort() */ ++ if (hypot(vals->pixel_matrix[0], vals->pixel_matrix[3]) > 5000.0) ++ return BadFontName; + /* set up default values */ + FontDefaultFormat(&bit, &byte, &glyph, &scan); + /* get any changes made from above */ diff --git a/XFree86-tdfx-interlace.patch b/XFree86-tdfx-interlace.patch new file mode 100644 index 0000000..14b5a16 --- /dev/null +++ b/XFree86-tdfx-interlace.patch @@ -0,0 +1,85 @@ +--- XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h.orig Thu Apr 5 23:29:17 2001 ++++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfxdefs.h Thu Sep 5 21:46:01 2002 +@@ -45,6 +45,7 @@ + #define SST_DESKTOP_EN BIT(7) + #define SST_DESKTOP_PIXEL_FORMAT_SHIFT 18 + #define SST_DESKTOP_CLUT_BYPASS BIT(10) ++#define SST_INTERLACE BIT(3) + #define SST_HALF_MODE BIT(4) + #define SST_CURSOR_EN BIT(27) + #define SST_FBI_BUSY BIT(7) +--- XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c.orig Wed Sep 18 03:02:14 2002 ++++ XFree86-4.2.1/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c Wed Sep 18 13:41:20 2002 +@@ -960,7 +960,18 @@ + clockRanges->minClock= 12000; /* !!! What's the min clock? !!! */ + clockRanges->maxClock=pTDFX->MaxClock; + clockRanges->clockIndex = -1; +- clockRanges->interlaceAllowed = FALSE; ++ switch (pTDFX->ChipType) { ++ case PCI_CHIP_BANSHEE: ++ clockRanges->interlaceAllowed = FALSE; ++ break; ++ case PCI_CHIP_VOODOO3: ++ case PCI_CHIP_VOODOO5: ++ clockRanges->interlaceAllowed = TRUE; ++ break; ++ default: ++ clockRanges->interlaceAllowed = FALSE; ++ break; ++ } + clockRanges->doubleScanAllowed = TRUE; + + /* +@@ -990,7 +1001,7 @@ + return FALSE; + } + +- xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V); ++ xf86SetCrtcForModes(pScrn, 0); + + pScrn->currentMode = pScrn->modes; + +@@ -1666,6 +1677,10 @@ + tdfxReg->screensize=mode->HDisplay|(mode->VDisplay<<12); + tdfxReg->vidcfg &= ~SST_HALF_MODE; + } ++ if (mode->Flags&V_INTERLACE) { ++ tdfxReg->vidcfg|=SST_INTERLACE; ++ } else ++ tdfxReg->vidcfg&=~SST_INTERLACE; + + TDFXTRACEREG("cpp=%d Hdisplay=%d Vdisplay=%d stride=%d screensize=%x\n", + pTDFX->cpp, mode->HDisplay, mode->VDisplay, tdfxReg->stride, +@@ -2394,12 +2409,29 @@ + + static int + TDFXValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags) { ++ ScrnInfoPtr pScrn; ++ TDFXPtr pTDFX; ++ + TDFXTRACE("TDFXValidMode start\n"); + if ((mode->HDisplay>2048) || (mode->VDisplay>1536)) + return MODE_BAD; +- /* Banshee doesn't support interlace. Does V3? */ +- if (mode->Flags&V_INTERLACE) +- return MODE_BAD; ++ /* Banshee doesn't support interlace, but Voodoo 3 and higher do. */ ++ pScrn = xf86Screens[scrnIndex]; ++ pTDFX = TDFXPTR(pScrn); ++ if (mode->Flags&V_INTERLACE) { ++ switch (pTDFX->ChipType) { ++ case PCI_CHIP_BANSHEE: ++ return MODE_BAD; ++ break; ++ case PCI_CHIP_VOODOO3: ++ case PCI_CHIP_VOODOO5: ++ return MODE_OK; ++ break; ++ default: ++ return MODE_BAD; ++ break; ++ } ++ } + /* In clock doubled mode widths must be divisible by 16 instead of 8 */ + if ((mode->Clock>TDFX2XCUTOFF) && (mode->HDisplay%16)) + return MODE_BAD; diff --git a/XFree86.spec b/XFree86.spec index d59428c..aff7f9e 100644 --- a/XFree86.spec +++ b/XFree86.spec @@ -12,7 +12,7 @@ Summary(ru): Summary(uk): âÁÚÏצ ÛÒÉÆÔÉ, ÐÒÏÇÒÁÍÉ ÔÁ ÄÏËÕÍÅÎÔÁÃ¦Ñ ÄÌÑ ÒÏÂÏÞϧ ÓÔÁÎæ§ Ð¦Ä X Name: XFree86 Version: 4.2.1 -Release: 2 +Release: 2.1 License: MIT Group: X11/XFree86 Source0: ftp://ftp.xfree86.org/pub/XFree86/4.2.0/source/X420src-1.tgz @@ -80,15 +80,18 @@ Patch44: %{name}-xtt-null-pointer.patch Patch45: %{name}-i740-driver-update-cvs-20020617.patch Patch46: %{name}-neomagic-Xv-support.patch Patch47: %{name}-tdfx-disable-dri-on-16Mb-cards-in-hires.patch -Patch48: %{name}-tdfx-enable-interlaced-modes.patch -Patch49: %{name}-tdfx-fix-compiler-warnings.patch -Patch50: %{name}-tdfx-fix-vtswitch-font-corruption.patch -Patch51: %{name}-tdfx-should-be-2048-not-2046.patch +Patch48: %{name}-tdfx-should-be-2048-not-2046.patch +Patch49: %{name}-tdfx-interlace.patch +Patch50: %{name}-tdfx-fix-compiler-warnings.patch +Patch51: %{name}-tdfx-fix-vtswitch-font-corruption.patch Patch52: %{name}-sis-option-swcursor.patch Patch53: %{name}-sis-unresolved-symbols.patch Patch54: %{name}-sis-maxxfbmem-fixup.patch Patch55: %{name}-Radeon9000.patch - +Patch56: %{name}-Xfont-Type1-large-DoS.patch +# "strip -g libGLcore.a" left empty object debug_xform.o, which caused GLcore +# loading failure with "debug_xform.o: no symbols" +Patch57: %{name}-GLcore-strip-a-workaround.patch BuildRequires: bison BuildRequires: flex BuildRequires: freetype-devel >= 2.0.0 @@ -126,6 +129,11 @@ Obsoletes: X11R6.1 # Glide3 (libglide3.so.3) can be provided by Glide_V3-DRI or Glide_V5-DRI %define _noautoreqdep libGL.so.1 libGLU.so.1 libOSMesa.so.3.3 libglide3.so.3 +# gcc 3.2 is still broken +%ifarch athlon +%define optflags -O2 -march=athlon -mno-mmx -mno-3dnow +%endif + %description If you want to install the X Window System (TM) on your machine, you'll need to install XFree86. @@ -1739,15 +1747,16 @@ System. %patch45 -p1 %patch46 -p1 %patch47 -p0 -# Causes build error - FIXME: -#%patch48 -p0 -#%patch49 -p0 -%patch50 -p0 +%patch48 -p0 +%patch49 -p1 +#%patch50 -p0 %patch51 -p0 #%patch52 -p1 #%patch53 -p1 %patch54 -p1 %patch55 -p0 +%patch56 -p1 +%{!?debug:%patch57 -p1} rm -f xc/config/cf/host.def