pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/xf86-video-vga Pull in two patches from upstream g...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/32583ed067d0
branches:  trunk
changeset: 560206:32583ed067d0
user:      hasso <hasso%pkgsrc.org@localhost>
date:      Tue Jun 09 08:18:39 2009 +0000

description:
Pull in two patches from upstream git to make it build with new xserver:

* Add libpciaccess and remove xf1bpp and xf4bpp support.
* Make ISA support optional.

Bump PKGREVISION.

diffstat:

 x11/xf86-video-vga/Makefile         |    9 +-
 x11/xf86-video-vga/distinfo         |    4 +-
 x11/xf86-video-vga/patches/patch-aa |   38 +++
 x11/xf86-video-vga/patches/patch-ab |  372 ++++++++++++++++++++++++++++++++++++
 4 files changed, 419 insertions(+), 4 deletions(-)

diffs (truncated from 456 to 300 lines):

diff -r 3381135d1ced -r 32583ed067d0 x11/xf86-video-vga/Makefile
--- a/x11/xf86-video-vga/Makefile       Tue Jun 09 07:25:55 2009 +0000
+++ b/x11/xf86-video-vga/Makefile       Tue Jun 09 08:18:39 2009 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2009/06/07 11:24:38 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2009/06/09 08:18:39 hasso Exp $
 #
 
 DISTNAME=      xf86-video-vga-4.1.0
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    x11
 MASTER_SITES=  ${MASTER_SITE_XORG:=driver/}
 EXTRACT_SUFX=  .tar.bz2
@@ -15,7 +15,10 @@
 
 USE_LIBTOOL=    yes
 GNU_CONFIGURE=  yes
-USE_TOOLS+=     pkg-config
+USE_TOOLS+=     autoconf autoheader automake autoreconf pkg-config
+
+pre-configure:
+       cd ${WRKSRC} && autoreconf -vif
 
 .include "../../x11/modular-xorg-server/buildlink3.mk"
 .include "../../x11/randrproto/buildlink3.mk"
diff -r 3381135d1ced -r 32583ed067d0 x11/xf86-video-vga/distinfo
--- a/x11/xf86-video-vga/distinfo       Tue Jun 09 07:25:55 2009 +0000
+++ b/x11/xf86-video-vga/distinfo       Tue Jun 09 08:18:39 2009 +0000
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/03/21 00:20:45 joerg Exp $
+$NetBSD: distinfo,v 1.2 2009/06/09 08:18:39 hasso Exp $
 
 SHA1 (xf86-video-vga-4.1.0.tar.bz2) = a3b5562e5714d956647389cc8c089fac85d7177e
 RMD160 (xf86-video-vga-4.1.0.tar.bz2) = ff87eab31181abb5aba2bc29dbb7a883392ef95b
 Size (xf86-video-vga-4.1.0.tar.bz2) = 233642 bytes
+SHA1 (patch-aa) = d1d926e4e4ccfe4f810834c33c05be388e33eb2e
+SHA1 (patch-ab) = 04c37e11b5f8234c1588196c483c3a1682831211
diff -r 3381135d1ced -r 32583ed067d0 x11/xf86-video-vga/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-vga/patches/patch-aa       Tue Jun 09 08:18:39 2009 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-aa,v 1.1 2009/06/09 08:18:39 hasso Exp $
+
+http://cgit.freedesktop.org/xorg/driver/xf86-video-vga/commit/?id=97e2d125
+http://cgit.freedesktop.org/xorg/driver/xf86-video-vga/commit/?id=a0d4a475
+
+--- configure.ac.orig  2006-04-08 00:48:23 +0300
++++ configure.ac       2009-06-09 10:27:54 +0300
+@@ -57,6 +57,30 @@ PKG_CHECK_MODULES(XORG, [xorg-server >= 
+ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+ 
+ # Checks for libraries.
++SAVE_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
++AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
++              [XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no],
++              [#include "xorg-server.h"])
++AC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[])
++AC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[])
++CPPFLAGS="$SAVE_CPPFLAGS"
++
++SAVE_CFLAGS="$CFLAGS"
++CFLAGS="$XORG_CFLAGS"
++AC_CHECK_DECL(xf86ConfigIsaEntity,
++            [AC_DEFINE(HAVE_ISA, 1, [Have ISA support])],
++            [],
++            [#include "xf86.h"])
++CFLAGS="$SAVE_CFLAGS"
++
++if test "x$XSERVER_LIBPCIACCESS" = xyes; then
++    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
++    XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
++fi
++AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
++
++# Checks for libraries.
+ 
+ # Checks for header files.
+ AC_HEADER_STDC
diff -r 3381135d1ced -r 32583ed067d0 x11/xf86-video-vga/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/xf86-video-vga/patches/patch-ab       Tue Jun 09 08:18:39 2009 +0000
@@ -0,0 +1,372 @@
+$NetBSD: patch-ab,v 1.1 2009/06/09 08:18:39 hasso Exp $
+
+http://cgit.freedesktop.org/xorg/driver/xf86-video-vga/commit/?id=97e2d125
+http://cgit.freedesktop.org/xorg/driver/xf86-video-vga/commit/?id=a0d4a475
+
+--- src/generic.c.orig 2006-04-08 00:48:01 +0300
++++ src/generic.c      2009-06-09 10:27:54 +0300
+@@ -50,8 +50,13 @@
+ 
+ #include "fb.h"
+ 
++#if HAVE_XF4BPP
+ #include "xf4bpp.h"
++#endif
++
++#if HAVE_XF1BPP
+ #include "xf1bpp.h"
++#endif
+ 
+ #include "shadowfb.h"
+ 
+@@ -62,6 +67,10 @@
+ #include "xf86Resources.h"
+ #include "xf86int10.h"
+ 
++#ifdef XSERVER_LIBPCIACCESS
++#include <pciaccess.h>
++#endif
++
+ /* Some systems #define VGA for their own purposes */
+ #undef VGA
+ 
+@@ -79,10 +88,31 @@
+ #define CLOCK_TOLERANCE 2000 /* Clock matching tolerance (2MHz) */
+ #endif
+ 
++/*
++ * This structure is used to wrap the screen's CloseScreen vector.
++ */
++typedef struct _GenericRec
++{
++    Bool ShadowFB;
++    Bool KGAUniversal;
++    CARD8 * ShadowPtr;
++    CARD32 ShadowPitch;
++    CloseScreenProcPtr CloseScreen;
++    OptionInfoPtr Options;
++#ifdef XSERVER_LIBPCIACCESS
++    struct pci_device *pciInfo;
++#endif
++} GenericRec, *GenericPtr;
++
++
+ /* Forward definitions */
+ static const OptionInfoRec *GenericAvailableOptions(int chipid, int busid);
+ static void                 GenericIdentify(int);
+ static Bool                 GenericProbe(DriverPtr, int);
++#ifdef XSERVER_LIBPCIACCESS
++static Bool GenericPciProbe(DriverPtr drv, int entity_num,
++                          struct pci_device *dev, intptr_t match_data);
++#endif
+ static Bool                 GenericPreInit(ScrnInfoPtr, int);
+ static Bool                 GenericScreenInit(int, ScreenPtr, int, char **);
+ static Bool                 GenericSwitchMode(int, DisplayModePtr, int);
+@@ -90,13 +120,33 @@ static void                 GenericAdjus
+ static Bool                 GenericEnterVT(int, int);
+ static void                 GenericLeaveVT(int, int);
+ static void                 GenericFreeScreen(int, int);
++#ifdef HAVE_ISA
+ static int                  VGAFindIsaDevice(GDevPtr dev);
++#endif
+ #ifdef SPECIAL_FB_BYTE_ACCESS
+ static Bool                 GenericMapMem(ScrnInfoPtr scrp);
+ #endif
+ 
+ static ModeStatus GenericValidMode(int, DisplayModePtr, Bool, int);
+ 
++static GenericPtr GenericGetRec(ScrnInfoPtr pScreenInfo);
++
++enum GenericTypes
++{
++    CHIP_VGA_GENERIC
++};
++
++#ifdef XSERVER_LIBPCIACCESS
++static const struct pci_id_match generic_device_match[] = {
++    {
++      PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
++      0x00030000, 0x00ffffff, CHIP_VGA_GENERIC
++    },
++
++    { 0, 0, 0 },
++};
++#endif
++
+ /* The root of all evil... */
+ _X_EXPORT DriverRec VGA =
+ {
+@@ -106,7 +156,13 @@ _X_EXPORT DriverRec VGA =
+     GenericProbe,
+     GenericAvailableOptions,
+     NULL,
+-    0
++    0,
++    NULL,
++
++#ifdef XSERVER_LIBPCIACCESS
++    generic_device_match,
++    GenericPciProbe
++#endif
+ };
+ 
+ typedef enum
+@@ -146,8 +202,12 @@ static const char *vgahwSymbols[] =
+ #ifdef XFree86LOADER
+ static const char *miscfbSymbols[] =
+ {
++#if HAVE_XF1BPP
+     "xf1bppScreenInit",
++#endif
++#if HAVE_XF4BPP
+     "xf4bppScreenInit",
++#endif
+     NULL
+ };
+ #endif
+@@ -210,7 +270,13 @@ GenericSetup(pointer Module, pointer Opt
+     if (!Initialised)
+     {
+       Initialised = TRUE;
+-      xf86AddDriver(&VGA, Module, 0);
++      xf86AddDriver(&VGA, Module,
++#ifdef XSERVER_LIBPCIACCESS
++                    HaveDriverFuncs
++#else
++                    0
++#endif
++                    );
+       LoaderRefSymLists(vgahwSymbols, miscfbSymbols, fbSymbols,
+                         shadowfbSymbols, int10Symbols, NULL);
+       return (pointer)TRUE;
+@@ -224,11 +290,6 @@ GenericSetup(pointer Module, pointer Opt
+ #endif
+ 
+ 
+-enum GenericTypes
+-{
+-    CHIP_VGA_GENERIC
+-};
+-
+ /* Supported chipsets */
+ static SymTabRec GenericChipsets[] =
+ {
+@@ -236,17 +297,21 @@ static SymTabRec GenericChipsets[] =
+     {-1,               NULL}
+ };
+ 
++#ifndef XSERVER_LIBPCIACCESS
+ static PciChipsets GenericPCIchipsets[] =
+ {
+     {CHIP_VGA_GENERIC, PCI_CHIP_VGA, RES_SHARED_VGA},
+     {-1,               -1,           RES_UNDEFINED},
+ };
++#endif
+ 
++#ifdef HAVE_ISA
+ static IsaChipsets GenericISAchipsets[] =
+ {
+     {CHIP_VGA_GENERIC, RES_EXCLUSIVE_VGA},
+     {-1,               0}
+ };
++#endif
+ 
+ static void
+ GenericIdentify(int flags)
+@@ -267,6 +332,37 @@ GenericAvailableOptions(int chipid, int 
+  * do a minimal probe for supported hardware.
+  */
+ 
++#ifdef XSERVER_LIBPCIACCESS
++static Bool
++GenericPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
++              intptr_t match_data)
++{
++    ScrnInfoPtr pScrn;
++
++    pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL,
++                              NULL, NULL, NULL, NULL, NULL);
++    if (pScrn != NULL) {
++      GenericPtr pGeneric = GenericGetRec(pScrn);
++
++      pScrn->driverVersion = VGA_VERSION_CURRENT;
++      pScrn->driverName    = VGA_DRIVER_NAME;
++      pScrn->name          = VGA_NAME;
++      pScrn->Probe         = GenericProbe;
++      pScrn->PreInit       = GenericPreInit;
++      pScrn->ScreenInit    = GenericScreenInit;
++      pScrn->SwitchMode    = GenericSwitchMode;
++      pScrn->AdjustFrame   = GenericAdjustFrame;
++      pScrn->EnterVT       = GenericEnterVT;
++      pScrn->LeaveVT       = GenericLeaveVT;
++      pScrn->FreeScreen    = GenericFreeScreen;
++
++      pGeneric->pciInfo    = dev;
++    }
++
++    return (pScrn != NULL);
++}
++#endif
++
+ static Bool
+ GenericProbe(DriverPtr drv, int flags)
+ {
+@@ -283,6 +379,7 @@ GenericProbe(DriverPtr drv, int flags)
+     if ((numDevSections = xf86MatchDevice(VGA_NAME, &devSections)) <= 0)
+       return FALSE;



Home | Main Index | Thread Index | Old Index