diff options
author | James Meyer <james.meyer@operamail.com> | 2009-01-12 19:19:50 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-01-12 19:19:50 (GMT) |
commit | 6c619a60fd89b5e75a93cff06977c552ddf1e621 (patch) | |
tree | 630ca50ea1c128c4be85ce920ecf034c561bf7fe /abs/core-testing/xf86-video-vga | |
parent | 0b2b9b97e95f8f8bfda1d1fe09136d121cd0750d (diff) | |
parent | 634dff8fdd0a9c866c92f0020f282c23d1a438d8 (diff) | |
download | linhes_pkgbuild-6c619a60fd89b5e75a93cff06977c552ddf1e621.zip linhes_pkgbuild-6c619a60fd89b5e75a93cff06977c552ddf1e621.tar.gz linhes_pkgbuild-6c619a60fd89b5e75a93cff06977c552ddf1e621.tar.bz2 |
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD.git
Conflicts:
abs/core-testing/LinHES-config/PKGBUILD
Diffstat (limited to 'abs/core-testing/xf86-video-vga')
-rw-r--r-- | abs/core-testing/xf86-video-vga/PKGBUILD | 26 | ||||
-rw-r--r-- | abs/core-testing/xf86-video-vga/pciaccess.patch | 371 |
2 files changed, 387 insertions, 10 deletions
diff --git a/abs/core-testing/xf86-video-vga/PKGBUILD b/abs/core-testing/xf86-video-vga/PKGBUILD index 1ac84a7..034c440 100644 --- a/abs/core-testing/xf86-video-vga/PKGBUILD +++ b/abs/core-testing/xf86-video-vga/PKGBUILD @@ -1,23 +1,29 @@ -# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $ +# $Id: PKGBUILD 15043 2008-10-12 12:14:52Z jgc $ #Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=xf86-video-vga pkgver=4.1.0 -pkgrel=4 +pkgrel=6 pkgdesc="X.org VGA 16 color video driver" arch=(i686 x86_64) url="http://xorg.freedesktop.org/" depends=('glibc') -makedepends=('pkgconfig' 'xorg-server>=1.1.1') -groups=('xorg-video-drivers') +makedepends=('pkgconfig' 'xorg-server>=1.5.2') +conflicts=('xorg-server<1.5.2') options=('!libtool') -source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2) -md5sums=('b93e5fe9757db779a75cd3ce97b9613d') +source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 + pciaccess.patch) +md5sums=('b93e5fe9757db779a75cd3ce97b9613d' + 'fe3a45179f51fb86215f6fd2b5ac0747') build() { - cd ${startdir}/src/${pkgname}-${pkgver} - ./configure --prefix=/usr \ - --build=${CHOST} --host=${CHOST} + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/pciaccess.patch" || return 1 + libtoolize --force || return 1 + aclocal || return 1 + autoconf || return 1 + automake || return 1 + ./configure --prefix=/usr || return 1 make || return 1 - make DESTDIR=${startdir}/pkg install || return 1 + make DESTDIR="${pkgdir}" install || return 1 } diff --git a/abs/core-testing/xf86-video-vga/pciaccess.patch b/abs/core-testing/xf86-video-vga/pciaccess.patch new file mode 100644 index 0000000..141701f --- /dev/null +++ b/abs/core-testing/xf86-video-vga/pciaccess.patch @@ -0,0 +1,371 @@ +From: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri, 18 Jul 2008 21:27:26 +0000 (-0300) +Subject: Add libpciaccess and remove xf1bpp and xf4bpp support. +X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-vga.git;a=commitdiff;h=97e2d12548921d92b6dc2dcce8abee48f25981d2 + +Add libpciaccess and remove xf1bpp and xf4bpp support. + + The driver is not fully functional, starts at 320x200, but may require +running something like vbetool post before starting the X Server, and does +not restore console as usually linux consoles use vesafb, but should work +correctly if console is in a "standard vga mode". +--- + +--- a/configure.ac ++++ b/configure.ac +@@ -57,6 +57,22 @@ 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" ++ ++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 +--- a/src/generic.c ++++ b/src/generic.c +@@ -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); +@@ -97,6 +127,24 @@ static Bool GenericMapMe + + 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 +154,13 @@ _X_EXPORT DriverRec VGA = + GenericProbe, + GenericAvailableOptions, + NULL, +- 0 ++ 0, ++ NULL, ++ ++#ifdef XSERVER_LIBPCIACCESS ++ generic_device_match, ++ GenericPciProbe ++#endif + }; + + typedef enum +@@ -146,8 +200,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 +268,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 +288,6 @@ GenericSetup(pointer Module, pointer Opt + #endif + + +-enum GenericTypes +-{ +- CHIP_VGA_GENERIC +-}; +- + /* Supported chipsets */ + static SymTabRec GenericChipsets[] = + { +@@ -236,11 +295,13 @@ 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 + + static IsaChipsets GenericISAchipsets[] = + { +@@ -267,6 +328,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 +375,7 @@ GenericProbe(DriverPtr drv, int flags) + if ((numDevSections = xf86MatchDevice(VGA_NAME, &devSections)) <= 0) + return FALSE; + ++#ifndef XSERVER_LIBPCIACCESS + /* PCI BUS */ + if (xf86GetPciVideoInfo()) + { +@@ -324,6 +417,7 @@ GenericProbe(DriverPtr drv, int flags) + xfree(usedChips); + } + } ++#endif + + /* Isa Bus */ + numUsed = xf86MatchIsaInstances(VGA_NAME, GenericChipsets, +@@ -391,20 +485,6 @@ VGAFindIsaDevice(GDevPtr dev) + return (int)CHIP_VGA_GENERIC; + } + +-/* +- * 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; +-} GenericRec, *GenericPtr; +- +- + static GenericPtr + GenericGetRec(ScrnInfoPtr pScreenInfo) + { +@@ -509,8 +589,14 @@ GenericPreInit(ScrnInfoPtr pScreenInfo, + + switch (pScreenInfo->depth) + { +- case 1: Module = "xf1bpp"; Sym = "xf1bppScreenInit"; break; +- case 4: Module = "xf4bpp"; Sym = "xf4bppScreenInit"; break; ++ case 1: ++#if HAVE_XF1BPP ++ Module = "xf1bpp"; Sym = "xf1bppScreenInit"; break; ++#endif ++ case 4: ++#if HAVE_XF4BPP ++ Module = "xf4bpp"; Sym = "xf4bppScreenInit"; break; ++#endif + case 8: Module = "fb"; break; + + default: +@@ -673,6 +759,8 @@ GenericPreInit(ScrnInfoPtr pScreenInfo, + /* Set display resolution */ + xf86SetDpi(pScreenInfo, 0, 0); + ++ ++#if HAVE_XF1BPP && HAVE_XF4BPP + if (xf86ReturnOptValBool(pGenericPriv->Options, OPTION_SHADOW_FB, FALSE)) + { + pGenericPriv->ShadowFB = TRUE; +@@ -688,7 +776,7 @@ GenericPreInit(ScrnInfoPtr pScreenInfo, + "Enabling universal \"KGA\" treatment.\n"); + } + +-#ifdef SPECIAL_FB_BYTE_ACCESS ++# ifdef SPECIAL_FB_BYTE_ACCESS + if (!pGenericPriv->ShadowFB && (pScreenInfo->depth == 4)) + { + xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, +@@ -696,8 +784,13 @@ GenericPreInit(ScrnInfoPtr pScreenInfo, + " ShadowFB enabled.\n"); + pGenericPriv->ShadowFB = TRUE; + } ++# endif ++ ++#else ++ pGenericPriv->ShadowFB = TRUE; + #endif + ++ + if (pGenericPriv->ShadowFB) + { + pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; +@@ -1378,6 +1471,7 @@ GenericScreenInit(int scrnIndex, ScreenP + #endif + ShadowFBInit(pScreen, GenericRefreshArea1bpp); + } ++#if HAVE_XF1BPP + else + { + Inited = xf1bppScreenInit(pScreen, pvgaHW->Base, +@@ -1386,6 +1480,7 @@ GenericScreenInit(int scrnIndex, ScreenP + pScreenInfo->xDpi, pScreenInfo->yDpi, + pScreenInfo->displayWidth); + } ++#endif + break; + case 4: + if (pGenericPriv->ShadowFB) +@@ -1410,6 +1505,7 @@ GenericScreenInit(int scrnIndex, ScreenP + #endif + ShadowFBInit(pScreen, GenericRefreshArea4bpp); + } ++#if HAVE_XF4BPP + else + { + Inited = xf4bppScreenInit(pScreen, pvgaHW->Base, +@@ -1418,6 +1514,7 @@ GenericScreenInit(int scrnIndex, ScreenP + pScreenInfo->xDpi, pScreenInfo->yDpi, + pScreenInfo->displayWidth); + } ++#endif + break; + case 8: + Inited = fbScreenInit(pScreen, pvgaHW->Base, +@@ -1579,6 +1676,9 @@ GenericMapMem(ScrnInfoPtr scrp) + { + vgaHWPtr hwp = VGAHWPTR(scrp); + int scr_index = scrp->scrnIndex; ++#ifdef XSERVER_LIBPCIACCESS ++ GenericPtr pPriv = GenericGetRec(scrp); ++#endif + + if (hwp->Base) + return TRUE; +@@ -1589,7 +1689,12 @@ GenericMapMem(ScrnInfoPtr scrp) + if (hwp->MapPhys == 0) + hwp->MapPhys = VGA_DEFAULT_PHYS_ADDR; + +- hwp->Base = xf86MapDomainMemory(scr_index, VIDMEM_MMIO, hwp->Tag, ++ hwp->Base = xf86MapDomainMemory(scr_index, VIDMEM_MMIO, ++#ifdef XSERVER_LIBPCIACCESS ++ pPriv->pciInfo, ++#else ++ hwp->Tag, ++#endif + hwp->MapPhys, hwp->MapSize); + return hwp->Base != NULL; + } |