[arch-commits] Commit in xf86-video-tseng/trunk (3 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Sat Feb 11 06:59:05 EST 2012


    Date: Saturday, February 11, 2012 @ 06:59:05
  Author: andyrtr
Revision: 149887

upgpkg: xf86-video-tseng 1.2.4-6

Xorg 1.12 rebuild; add late git fixes, patch from FC

Added:
  xf86-video-tseng/trunk/tseng-1.2.4-git.patch
Modified:
  xf86-video-tseng/trunk/PKGBUILD
Deleted:
  xf86-video-tseng/trunk/fix-regression-from-pciaccess-conversion.patch

------------------------------------------------+
 PKGBUILD                                       |   16 -
 fix-regression-from-pciaccess-conversion.patch |   27 -
 tseng-1.2.4-git.patch                          |  317 +++++++++++++++++++++++
 3 files changed, 327 insertions(+), 33 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-02-11 11:56:00 UTC (rev 149886)
+++ PKGBUILD	2012-02-11 11:59:05 UTC (rev 149887)
@@ -3,26 +3,30 @@
 
 pkgname=xf86-video-tseng
 pkgver=1.2.4
-pkgrel=5
+pkgrel=6
 pkgdesc="X.org tseng video driver"
 arch=(i686 x86_64)
 url="http://xorg.freedesktop.org/"
 license=('custom')
 depends=('glibc')
-makedepends=('xorg-server-devel>=1.10.99.902')
-conflicts=('xorg-server<1.10.99.902')
+makedepends=('xorg-server-devel>=1.11.99.903')
+conflicts=('xorg-server<1.11.99.903')
 groups=('xorg-drivers' 'xorg')
 options=('!libtool')
 source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
-        fix-regression-from-pciaccess-conversion.patch)
+        tseng-1.2.4-git.patch)
 sha1sums=('1b45f55657b2c92f30abb0769cae57fca98d93b7'
-          'df7660ec18cce3e9f04a7c70f72c75daa947e4a9')
+          'd84bb75d62888096da7477b38e8b13f9c23d4e3a')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
-  patch -Np1 -i "${srcdir}/fix-regression-from-pciaccess-conversion.patch"
+  patch -Np1 -i ${srcdir}/tseng-1.2.4-git.patch
   ./configure --prefix=/usr
   make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
   make DESTDIR="${pkgdir}" install
   install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
   install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"

Deleted: fix-regression-from-pciaccess-conversion.patch
===================================================================
--- fix-regression-from-pciaccess-conversion.patch	2012-02-11 11:56:00 UTC (rev 149886)
+++ fix-regression-from-pciaccess-conversion.patch	2012-02-11 11:59:05 UTC (rev 149887)
@@ -1,27 +0,0 @@
-From 542e65deaf834c3d58c44064206445e4d18f6daa Mon Sep 17 00:00:00 2001
-From: BALATON Zoltan <balaton at eik.bme.hu>
-Date: Sat, 11 Jun 2011 10:50:16 +0000
-Subject: Fix regression from pciaccess conversion (bug#32682)
-
-Due to a typo in TsengGetFbAddress it is unable to get framebuffer base
-address and thus fails to load with an error message saying "No valid
-Framebuffer address in PCI config space" although previously it does
-print the correct framebuffer address.
-
-Signed-off-by: Julien Cristau <jcristau at debian.org>
----
-diff --git a/src/tseng_driver.c b/src/tseng_driver.c
-index 6992671..d36b62c 100644
---- a/src/tseng_driver.c
-+++ b/src/tseng_driver.c
-@@ -883,7 +883,7 @@ TsengGetFbAddress(ScrnInfoPtr pScrn)
-     PDEBUG("	TsengGetFbAddress\n");
- 
-     /* base0 is the framebuffer and base1 is the PCI IO space. */
--    if (PCI_REGION_BASE(pTseng->PciInfo, 0, REGION_MEM)) {
-+    if (!PCI_REGION_BASE(pTseng->PciInfo, 0, REGION_MEM)) {
-         xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                    "No valid Framebuffer address in PCI config space;\n");
-         return FALSE;
---
-cgit v0.9.0.2-2-gbebe

Added: tseng-1.2.4-git.patch
===================================================================
--- tseng-1.2.4-git.patch	                        (rev 0)
+++ tseng-1.2.4-git.patch	2012-02-11 11:59:05 UTC (rev 149887)
@@ -0,0 +1,317 @@
+diff --git a/configure.ac b/configure.ac
+index 62cc318..8458c06 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,46 +20,46 @@
+ #
+ # Process this file with autoconf to produce a configure script
+ 
+-AC_PREREQ(2.57)
++# Initialize Autoconf
++AC_PREREQ([2.60])
+ AC_INIT([xf86-video-tseng],
+-        1.2.4,
++        [1.2.4],
+         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+-        xf86-video-tseng)
+-
++        [xf86-video-tseng])
+ AC_CONFIG_SRCDIR([Makefile.am])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_AUX_DIR(.)
+ 
++# Initialize Automake
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
+-
+ AM_MAINTAINER_MODE
+ 
+-# Require xorg-macros: XORG_DEFAULT_OPTIONS
++# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+ m4_ifndef([XORG_MACROS_VERSION],
+-          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+-XORG_MACROS_VERSION(1.3)
++          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
++XORG_MACROS_VERSION(1.8)
+ XORG_DEFAULT_OPTIONS
+ 
+-# Checks for programs.
++# Initialize libtool
+ AC_DISABLE_STATIC
+ AC_PROG_LIBTOOL
+-AC_PROG_CC
+ 
+ AH_TOP([#include "xorg-server.h"])
+ 
++# Define a configure option for an alternate module directory
+ AC_ARG_WITH(xorg-module-dir,
+-            AC_HELP_STRING([--with-xorg-module-dir=DIR],
++            AS_HELP_STRING([--with-xorg-module-dir=DIR],
+                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
+             [moduledir="$withval"],
+             [moduledir="$libdir/xorg/modules"])
+ 
+-# Checks for extensions
++# Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+ XORG_DRIVER_CHECK_EXT(XV, videoproto)
+ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
+ 
+-# Checks for pkg-config packages
++# Obtain compiler/linker options for the driver dependencies
+ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
+ 
+ # Checks for libraries.
+@@ -78,17 +78,14 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ fi
+ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+ 
+-# Checks for header files.
+-AC_HEADER_STDC
+-
+-AC_SUBST([XORG_CFLAGS])
+ AC_SUBST([moduledir])
+ 
+ DRIVER_NAME=tseng
+ AC_SUBST([DRIVER_NAME])
+ 
+-AC_OUTPUT([
+-	Makefile
+-	src/Makefile
+-	man/Makefile
++AC_CONFIG_FILES([
++                Makefile
++                src/Makefile
++                man/Makefile
+ ])
++AC_OUTPUT
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 8f2454b..b3688ce 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -31,25 +31,11 @@ EXTRA_DIST = @DRIVER_NAME at .man
+ 
+ CLEANFILES = $(driverman_DATA)
+ 
+-SED = sed
+-
+-# Strings to replace in man pages
+-XORGRELSTRING = @PACKAGE_STRING@
+-  XORGMANNAME = X Version 11
+-
+-MAN_SUBSTS = \
+-	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+-	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+-	-e 's|__xservername__|Xorg|g' \
+-	-e 's|__xconfigfile__|xorg.conf|g' \
+-	-e 's|__projectroot__|$(prefix)|g' \
+-	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
+-	-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
+-	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
+-	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
+-	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
++
++# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
++
+ 
+ SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
+ 
+ .man.$(DRIVER_MAN_SUFFIX):
+-	sed $(MAN_SUBSTS) < $< > $@
++	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+diff --git a/man/tseng.man b/man/tseng.man
+index 403782f..984c8e7 100644
+--- a/man/tseng.man
++++ b/man/tseng.man
+@@ -1,4 +1,3 @@
+-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tseng/tseng.man,v 1.2 2001/01/27 18:20:55 dawes Exp $ 
+ .\" shorthand for double quote that works everywhere.
+ .ds q \N'34'
+ .TH TSENG __drivermansuffix__ __vendorversion__
+diff --git a/src/tseng_cursor.c b/src/tseng_cursor.c
+index d4fb847..2412b31 100644
+--- a/src/tseng_cursor.c
++++ b/src/tseng_cursor.c
+@@ -159,7 +159,7 @@ TsengSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
+     }
+ }
+ 
+-void 
++static void 
+ TsengLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *bits)
+ {
+     vgaHWPtr hwp = VGAHWPTR(pScrn);
+diff --git a/src/tseng_dga.c b/src/tseng_dga.c
+index 70ebe23..528ba4c 100644
+--- a/src/tseng_dga.c
++++ b/src/tseng_dga.c
+@@ -74,9 +74,9 @@ TsengDGAInit(ScreenPtr pScreen)
+   if (!pTseng->DGAnumModes) {
+     pMode = firstMode = pScrn->modes;
+     while (pMode) {
+-      newmodes = xrealloc(modes, (num + 1) * sizeof (DGAModeRec));
++      newmodes = realloc(modes, (num + 1) * sizeof (DGAModeRec));
+       if (!newmodes) {
+-	xfree(modes);
++	free(modes);
+ 	return FALSE;
+       }
+       modes = newmodes;
+@@ -135,7 +135,7 @@ Tseng_OpenFramebuffer(
+     TsengPtr pTseng = TsengPTR(pScrn);
+ 
+     *name = NULL; 		/* no special device */
+-    *mem = (unsigned char*)pTseng->FbAddress;
++    *mem = (unsigned char*)(uintptr_t)pTseng->FbAddress;
+     *size = pTseng->FbMapSize;
+     *offset = 0;                /* Always */
+     *flags = 0;                 /* Root permissions OS-dependent */
+diff --git a/src/tseng_driver.c b/src/tseng_driver.c
+index 445c17e..d36b62c 100644
+--- a/src/tseng_driver.c
++++ b/src/tseng_driver.c
+@@ -269,9 +269,9 @@ TsengFreeRec(ScrnInfoPtr pScrn)
+     pTseng = TsengPTR(pScrn);
+     
+     if (pTseng->SavedReg.RAMDAC)
+-        xfree(pTseng->SavedReg.RAMDAC);
++        free(pTseng->SavedReg.RAMDAC);
+ 
+-    xfree(pScrn->driverPrivate);
++    free(pScrn->driverPrivate);
+     pScrn->driverPrivate = NULL;
+ }
+ 
+@@ -395,10 +395,10 @@ TsengProbe(DriverPtr drv, int flags)
+                 foundScreen = TRUE;
+             }
+         }
+-        xfree(usedChips);
++        free(usedChips);
+     }
+     
+-    xfree(devSections);
++    free(devSections);
+     return foundScreen;
+ }
+ 
+@@ -806,7 +806,7 @@ TsengProcessOptions(ScrnInfoPtr pScrn)
+     xf86CollectOptions(pScrn, NULL);
+ 
+     /* Process the options */
+-    if (!(pTseng->Options = xalloc(sizeof(TsengOptions))))
++    if (!(pTseng->Options = malloc(sizeof(TsengOptions))))
+ 	return FALSE;
+     memcpy(pTseng->Options, TsengOptions, sizeof(TsengOptions));
+     xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pTseng->Options);
+@@ -883,7 +883,7 @@ TsengGetFbAddress(ScrnInfoPtr pScrn)
+     PDEBUG("	TsengGetFbAddress\n");
+ 
+     /* base0 is the framebuffer and base1 is the PCI IO space. */
+-    if (PCI_REGION_BASE(pTseng->PciInfo, 0, REGION_MEM)) {
++    if (!PCI_REGION_BASE(pTseng->PciInfo, 0, REGION_MEM)) {
+         xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+                    "No valid Framebuffer address in PCI config space;\n");
+         return FALSE;
+diff --git a/src/tseng_mode.c b/src/tseng_mode.c
+index f075226..a3ff87d 100644
+--- a/src/tseng_mode.c
++++ b/src/tseng_mode.c
+@@ -41,7 +41,11 @@ vgaHWWriteBank(vgaHWPtr hwp, CARD8 value)
+     if (hwp->MMIOBase)
+ 	MMIO_OUT8(hwp->MMIOBase, hwp->MMIOOffset + VGA_BANK, value);
+     else
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+ 	outb(hwp->PIOOffset + VGA_BANK, value);
++#else
++	pci_io_write8(hwp->io, VGA_BANK, value);
++#endif
+ }
+ 
+ CARD8
+@@ -50,7 +54,11 @@ vgaHWReadBank(vgaHWPtr hwp)
+     if (hwp->MMIOBase)
+ 	return MMIO_IN8(hwp->MMIOBase, hwp->MMIOOffset + VGA_BANK);
+     else
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+ 	return inb(hwp->PIOOffset + VGA_BANK);
++#else
++	return pci_io_read8(hwp->io, VGA_BANK);
++#endif
+ }
+ 
+ #define VGA_SEGMENT 0x3CD
+@@ -61,7 +69,11 @@ vgaHWWriteSegment(vgaHWPtr hwp, CARD8 value)
+     if (hwp->MMIOBase)
+ 	MMIO_OUT8(hwp->MMIOBase, hwp->MMIOOffset + VGA_SEGMENT, value);
+     else
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+ 	outb(hwp->PIOOffset + VGA_SEGMENT, value);
++#else
++	pci_io_write8(hwp->io, VGA_SEGMENT, value);
++#endif
+ }
+ 
+ CARD8
+@@ -70,7 +82,11 @@ vgaHWReadSegment(vgaHWPtr hwp)
+     if (hwp->MMIOBase)
+ 	return MMIO_IN8(hwp->MMIOBase, hwp->MMIOOffset + VGA_SEGMENT);
+     else
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+ 	return inb(hwp->PIOOffset + VGA_SEGMENT);
++#else
++	return pci_io_read8(hwp->io, VGA_SEGMENT);
++#endif
+ }
+ 
+ /*
+@@ -84,8 +100,12 @@ vgaHWWriteModeControl(vgaHWPtr hwp, CARD8 value)
+     if (hwp->MMIOBase)
+         MMIO_OUT8(hwp->MMIOBase,
+                   hwp->MMIOOffset + hwp->IOBase + VGA_MODE_CONTROL, value);
+-    else  
+-        outb(hwp->IOBase + hwp->PIOOffset + VGA_MODE_CONTROL, value);
++    else
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
++	outb(hwp->PIOOffset + VGA_MODE_CONTROL, value);
++#else
++	pci_io_write8(hwp->io, VGA_MODE_CONTROL, value);
++#endif
+ }
+ 
+ /*
+@@ -110,14 +130,22 @@ vgaHWHerculesSecondPage(vgaHWPtr hwp, Bool Enable)
+ 
+         MMIO_OUT8(hwp->MMIOBase, hwp->MMIOOffset + VGA_HERCULES, tmp);
+     } else {
+-        tmp = inb(hwp->PIOOffset + VGA_HERCULES);
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
++	tmp = inb(hwp->PIOOffset + VGA_HERCULES);
++#else
++	tmp = pci_io_read8(hwp->io, VGA_HERCULES);
++#endif
+ 
+         if (Enable)
+             tmp |= 0x02;
+         else
+             tmp &= ~0x02;
+ 
+-        outb(hwp->PIOOffset + VGA_HERCULES, tmp);
++#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
++	outb(hwp->PIOOffset + VGA_HERCULES, tmp);
++#else
++	pci_io_write8(hwp->io, VGA_HERCULES, tmp);
++#endif
+     }
+ }
+ 
+@@ -1502,7 +1530,7 @@ TsengModeInit(ScrnInfoPtr pScrn, DisplayModePtr OrigMode)
+ 
+     /* clean up */
+     if (new->RAMDAC)
+-        xfree(new->RAMDAC);
++        free(new->RAMDAC);
+ 
+     return TRUE;
+ }



More information about the arch-commits mailing list