aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/xf86-video-nv/APKBUILD12
-rw-r--r--main/xf86-video-nv/fix-old-cpp-macros.patch351
2 files changed, 356 insertions, 7 deletions
diff --git a/main/xf86-video-nv/APKBUILD b/main/xf86-video-nv/APKBUILD
index 12921a25e0..841c3bbe5e 100644
--- a/main/xf86-video-nv/APKBUILD
+++ b/main/xf86-video-nv/APKBUILD
@@ -7,13 +7,12 @@ url="https://xorg.freedesktop.org"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
-depends=
makedepends="xorg-server-dev libxi-dev util-macros xorgproto"
-source="https://www.x.org/releases/individual/driver/$pkgname-$pkgver.tar.bz2"
+source="https://www.x.org/releases/individual/driver/xf86-video-nv-$pkgver.tar.bz2
+ fix-old-cpp-macros.patch
+ "
-builddir="$srcdir"/$pkgname-$pkgver
build() {
- cd "$builddir"
export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
./configure \
--build=$CBUILD \
@@ -23,13 +22,12 @@ build() {
}
check() {
- cd "$builddir"
make check
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
-sha512sums="97cec43100b00609d43cf45937bafea387fd656cb5e321fcbed426973320097ba6601e4e548026618b3cf0c480f58956874a201791dc0cc39297b5fd54979ca7 xf86-video-nv-2.1.21.tar.bz2"
+sha512sums="97cec43100b00609d43cf45937bafea387fd656cb5e321fcbed426973320097ba6601e4e548026618b3cf0c480f58956874a201791dc0cc39297b5fd54979ca7 xf86-video-nv-2.1.21.tar.bz2
+9d706c5535ddc22976d4e33f2e0ead79bf18356f71b6118f5beea0a48a6cd211a94e75b69bf1f8d91b33023fb877e4111ef8ae47e6a0a0a6f3bae8d9ba87d001 fix-old-cpp-macros.patch"
diff --git a/main/xf86-video-nv/fix-old-cpp-macros.patch b/main/xf86-video-nv/fix-old-cpp-macros.patch
new file mode 100644
index 0000000000..56fdad1083
--- /dev/null
+++ b/main/xf86-video-nv/fix-old-cpp-macros.patch
@@ -0,0 +1,351 @@
+Upstream: no (Too lazy)
+Reason: Fixes building the package by getting rid of old cpp macros
+ that are no longer accepted
+diff --git a/src/g80_driver.c b/src/g80_driver.c
+index 719b96c..3b8e55b 100644
+--- a/src/g80_driver.c
++++ b/src/g80_driver.c
+@@ -151,7 +151,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
+ {
+ G80Ptr pNv;
+ EntityInfoPtr pEnt;
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ struct pci_device *pPci;
+ int err;
+ void *p;
+@@ -184,14 +184,14 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
+ pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
+ if(pEnt->location.type != BUS_PCI) goto fail;
+ pPci = xf86GetPciInfoForEntity(pEnt->index);
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ /* Need this to unmap */
+ pNv->pPci = pPci;
+ #endif
+ primary = xf86IsPrimaryPci(pPci);
+
+ /* The ROM size sometimes isn't read correctly, so fix it up here. */
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ if(pPci->rom_size == 0)
+ /* The BIOS is 64k */
+ pPci->rom_size = 64 * 1024;
+@@ -304,7 +304,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
+ pScrn->memPhysBase = MEMBASE(pPci, 1);
+ pScrn->fbOffset = 0;
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ err = pci_device_map_range(pPci, pPci->regions[0].base_addr, G80_REG_SIZE,
+ PCI_DEV_MAP_FLAG_WRITABLE, &p);
+ if(err) {
+@@ -336,7 +336,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
+
+ /* Determine the size of BAR1 */
+ /* Some configs have BAR1 < total RAM < 256 MB */
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ BAR1sizeKB = pPci->regions[1].size / 1024;
+ #else
+ BAR1sizeKB = 1UL << (pPci->size[1] - 10);
+@@ -366,7 +366,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
+ xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " Mapped memory: %.1f MB\n",
+ pScrn->videoRam / 1024.0);
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ err = pci_device_map_range(pPci, pPci->regions[1].base_addr,
+ pScrn->videoRam * 1024,
+ PCI_DEV_MAP_FLAG_WRITABLE |
+@@ -521,7 +521,7 @@ G80CloseScreen(CLOSE_SCREEN_ARGS_DECL)
+
+ if(xf86ServerIsExiting()) {
+ if(pNv->int10) xf86FreeInt10(pNv->int10);
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ pci_device_unmap_range(pNv->pPci, pNv->mem, pNv->videoRam * 1024);
+ pci_device_unmap_range(pNv->pPci, (void*)pNv->reg, G80_REG_SIZE);
+ #else
+diff --git a/src/g80_type.h b/src/g80_type.h
+index f4b73a3..5b1f975 100644
+--- a/src/g80_type.h
++++ b/src/g80_type.h
+@@ -41,7 +41,7 @@ typedef enum AccelMethod {
+ } AccelMethod;
+
+ typedef struct G80Rec {
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ struct pci_device *pPci;
+ #endif
+ volatile CARD32 * reg;
+diff --git a/src/nv_const.h b/src/nv_const.h
+index 8f9799c..b0cc14f 100644
+--- a/src/nv_const.h
++++ b/src/nv_const.h
+@@ -6,7 +6,7 @@
+ #define NV_DRIVER_NAME "nv"
+
+ /* libpciaccess gratuitous API changes */
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ #define MEMBASE(p,n) (p)->regions[n].base_addr
+ #define VENDOR_ID(p) (p)->vendor_id
+ #define DEVICE_ID(p) (p)->device_id
+diff --git a/src/nv_dac.c b/src/nv_dac.c
+index 2269ae3..8d79ed8 100644
+--- a/src/nv_dac.c
++++ b/src/nv_dac.c
+@@ -42,7 +42,7 @@ NVDACPanelTweaks(NVPtr pNv, NVRegPtr state)
+ we can do is experiment and apply hacks. */
+
+ if(((pNv->Chipset & 0xffff) == 0x0328) && (state->bpp == 32)) {
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ if (((pNv->PciInfo->subvendor_id & 0xffff) == 0x1179) &&
+ ((pNv->PciInfo->subdevice_id & 0xffff) == 0x0020))
+ #else
+diff --git a/src/nv_driver.c b/src/nv_driver.c
+index 3a74038..cf185f8 100644
+--- a/src/nv_driver.c
++++ b/src/nv_driver.c
+@@ -43,7 +43,7 @@ Bool G80GetScrnInfoRec(PciChipsets *chips, int chip);
+ /* Mandatory functions */
+ static const OptionInfoRec * NVAvailableOptions(int chipid, int busid);
+ static void NVIdentify(int flags);
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ static Bool NVPciProbe(DriverPtr, int entity, struct pci_device*, intptr_t data);
+ #else
+ static Bool NVProbe(DriverPtr drv, int flags);
+@@ -76,7 +76,7 @@ static void NVRestore(ScrnInfoPtr pScrn);
+ static Bool NVModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
+ static Bool NVSetModeVBE(ScrnInfoPtr pScrn, DisplayModePtr pMode);
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ /* For now, just match any NVIDIA display device and sort through them in the
+ * probe routine */
+
+@@ -109,7 +109,7 @@ _X_EXPORT DriverRec NV = {
+ NV_VERSION,
+ NV_DRIVER_NAME,
+ NVIdentify,
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ NULL,
+ #else
+ NVProbe,
+@@ -118,7 +118,7 @@ _X_EXPORT DriverRec NV = {
+ NULL,
+ 0,
+ NULL,
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ NVPciIdMatchList,
+ NVPciProbe,
+ #endif
+@@ -712,7 +712,7 @@ nvSetup(pointer module, pointer opts, int *errmaj, int *errmin)
+ if (!setupDone) {
+ setupDone = TRUE;
+ xf86AddDriver(&NV, module,
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ HaveDriverFuncs
+ #else
+ 0
+@@ -785,14 +785,14 @@ NVGetScrnInfoRec(PciChipsets *chips, int chip)
+
+
+ static CARD32
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ NVGetPCIXpressChip (struct pci_device *dev)
+ #else
+ NVGetPCIXpressChip (pciVideoPtr pVideo)
+ #endif
+ {
+ volatile CARD32 *regs;
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ uint32_t pciid, pcicmd;
+ void *tmp;
+
+@@ -902,7 +902,7 @@ NVIsSupported(CARD32 id)
+ }
+
+ /* Mandatory */
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ static Bool
+ NVPciProbe(DriverPtr drv, int entity, struct pci_device *dev, intptr_t data)
+ {
+@@ -2097,7 +2097,7 @@ NVMapMem(ScrnInfoPtr pScrn)
+ {
+ NVPtr pNv = NVPTR(pScrn);
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ void *tmp;
+
+ pci_device_map_range(pNv->PciInfo, pNv->FbAddress, pNv->FbMapSize,
+@@ -2144,7 +2144,7 @@ NVUnmapMem(ScrnInfoPtr pScrn)
+
+ pNv = NVPTR(pScrn);
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ pci_device_unmap_range(pNv->PciInfo, pNv->FbBase, pNv->FbMapSize);
+ #else
+ xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pNv->FbBase, pNv->FbMapSize);
+diff --git a/src/nv_hw.c b/src/nv_hw.c
+index 9291912..90c7ac7 100644
+--- a/src/nv_hw.c
++++ b/src/nv_hw.c
+@@ -653,7 +653,7 @@ static void nv30UpdateArbitrationSettings (
+ *lwm = graphics_lwm >> 3;
+ }
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ static inline uint32_t
+ pciaccessReadLong(struct pci_device *const dev, pciaddr_t offset) {
+ uint32_t tmp;
+@@ -670,7 +670,7 @@ static void nForceUpdateArbitrationSettings (
+ NVPtr pNv
+ )
+ {
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ struct pci_device *const dev1 = pci_device_find_by_slot(0, 0, 0, 1);
+ struct pci_device *const dev2 = pci_device_find_by_slot(0, 0, 0, 2);
+ struct pci_device *const dev3 = pci_device_find_by_slot(0, 0, 0, 3);
+diff --git a/src/nv_setup.c b/src/nv_setup.c
+index 92ca3ec..8c57675 100644
+--- a/src/nv_setup.c
++++ b/src/nv_setup.c
+@@ -287,7 +287,7 @@ static void nv10GetConfig (NVPtr pNv)
+ }
+ #endif
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ {
+ /* [AGP]: I don't know if this is correct */
+ struct pci_device *dev = pci_device_find_by_slot(0, 0, 0, 1);
+@@ -346,7 +346,7 @@ NVCommonSetup(ScrnInfoPtr pScrn)
+ int FlatPanel = -1; /* really means the CRTC is slaved */
+ Bool Television = FALSE;
+ void *tmp;
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ int err;
+ #endif
+
+@@ -378,7 +378,7 @@ NVCommonSetup(ScrnInfoPtr pScrn)
+ pVga->MMIOBase = (CARD8 *)pNv;
+ pVga->MMIOOffset = 0;
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ err = pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000,
+ PCI_DEV_MAP_FLAG_WRITABLE, &tmp);
+ if (err != 0) {
+diff --git a/src/nv_type.h b/src/nv_type.h
+index e705d4c..68ca210 100644
+--- a/src/nv_type.h
++++ b/src/nv_type.h
+@@ -78,7 +78,7 @@ typedef struct {
+ CARD32 Architecture;
+ CARD32 CursorStart;
+ EntityInfoPtr pEnt;
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ struct pci_device *PciInfo;
+ #else
+ pciVideoPtr PciInfo;
+diff --git a/src/riva_driver.c b/src/riva_driver.c
+index 759501e..910e63d 100644
+--- a/src/riva_driver.c
++++ b/src/riva_driver.c
+@@ -825,7 +825,7 @@ RivaMapMem(ScrnInfoPtr pScrn)
+ /*
+ * Map IO registers to virtual address space
+ */
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ void *tmp;
+
+ pci_device_map_range(pRiva->PciInfo, pRiva->IOAddress, 0x1000000,
+@@ -890,7 +890,7 @@ RivaUnmapMem(ScrnInfoPtr pScrn)
+ /*
+ * Unmap IO registers to virtual address space
+ */
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ pci_device_unmap_range(pRiva->PciInfo, pRiva->IOBase, 0x1000000);
+ pci_device_unmap_range(pRiva->PciInfo, pRiva->FbBase, pRiva->FbMapSize);
+ #else
+diff --git a/src/riva_setup.c b/src/riva_setup.c
+index 533f6e8..602e6dc 100644
+--- a/src/riva_setup.c
++++ b/src/riva_setup.c
+@@ -233,7 +233,7 @@ Riva3Setup(ScrnInfoPtr pScrn)
+ pRiva->riva.EnableIRQ = 0;
+ pRiva->riva.IO = VGA_IOBASE_COLOR;
+
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ #define MAP(ptr, offset, size) { \
+ void *tmp; \
+ pci_device_map_range(pRiva->PciInfo, (offset), (size), \
+diff --git a/src/riva_type.h b/src/riva_type.h
+index 4adeb2b..ee999c8 100644
+--- a/src/riva_type.h
++++ b/src/riva_type.h
+@@ -53,7 +53,7 @@ typedef struct {
+ RIVA_HW_STATE SavedReg;
+ RIVA_HW_STATE ModeReg;
+ EntityInfoPtr pEnt;
+-#if XSERVER_LIBPCIACCESS
++#if defined(XSERVER_LIBPCIACCESS)
+ struct pci_device *PciInfo;
+ #else
+ pciVideoPtr PciInfo;
+diff --git a/src/nv_driver.c b/src/nv_driver.c
+index cf185f8..d35af55 100644
+--- a/src/nv_driver.c
++++ b/src/nv_driver.c
+@@ -766,7 +766,7 @@ NVGetScrnInfoRec(PciChipsets *chips, int chip)
+ pScrn->driverName = NV_DRIVER_NAME;
+ pScrn->name = NV_NAME;
+
+-#if !XSERVER_LIBPCIACCESS
++#ifndef XSERVER_LIBPCIACCESS
+ pScrn->Probe = NVProbe;
+ #endif
+ pScrn->PreInit = NVPreInit;
+@@ -1390,7 +1390,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
+
+ /* Find the PCI info for this screen */
+ pNv->PciInfo = xf86GetPciInfoForEntity(pNv->pEnt->index);
+-#if !XSERVER_LIBPCIACCESS
++#ifndef XSERVER_LIBPCIACCESS
+ pNv->PciTag = pciTag(pNv->PciInfo->bus, pNv->PciInfo->device,
+ pNv->PciInfo->func);
+ #endif
+diff --git a/src/riva_driver.c b/src/riva_driver.c
+index 910e63d..a365380 100644
+--- a/src/riva_driver.c
++++ b/src/riva_driver.c
+@@ -385,7 +385,7 @@ RivaPreInit(ScrnInfoPtr pScrn, int flags)
+
+ /* Find the PCI info for this screen */
+ pRiva->PciInfo = xf86GetPciInfoForEntity(pRiva->pEnt->index);
+-#if !XSERVER_LIBPCIACCESS
++#ifndef XSERVER_LIBPCIACCESS
+ pRiva->PciTag = pciTag(pRiva->PciInfo->bus, pRiva->PciInfo->device,
+ pRiva->PciInfo->func);
+ #endif
+