From 2bbeaa12091a2a453390864fee7cb09e3f69194e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Fonzo?= Date: Sat, 19 Feb 2022 20:46:50 -0300 Subject: [PATCH] recipes: xorg/driver/*: Fix build issues by fixing old cpp macros references MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Matías Fonzo --- .../4730f13b9261a00b87b3e98f070d100d8d72bef7 | 25 ++ patches/xf86-video-nv/fix-old-cpp-macros_nv.patch | 351 +++++++++++++++++++++ .../xf86-video-sis/fix-old-cpp-macros_sis.patch | 38 +++ .../fix-old-cpp-macros_vmware.patch | 167 ++++++++++ recipes/xorg/driver/xf86-video-fbdev/recipe | 21 +- recipes/xorg/driver/xf86-video-nv/recipe | 19 +- recipes/xorg/driver/xf86-video-sis/recipe | 7 +- recipes/xorg/driver/xf86-video-vmware/recipe | 5 +- 8 files changed, 607 insertions(+), 26 deletions(-) create mode 100644 patches/xf86-video-fbdev/4730f13b9261a00b87b3e98f070d100d8d72bef7 create mode 100644 patches/xf86-video-nv/fix-old-cpp-macros_nv.patch create mode 100644 patches/xf86-video-sis/fix-old-cpp-macros_sis.patch create mode 100644 patches/xf86-video-vmware/fix-old-cpp-macros_vmware.patch diff --git a/patches/xf86-video-fbdev/4730f13b9261a00b87b3e98f070d100d8d72bef7 b/patches/xf86-video-fbdev/4730f13b9261a00b87b3e98f070d100d8d72bef7 new file mode 100644 index 00000000..b8dfa5bf --- /dev/null +++ b/patches/xf86-video-fbdev/4730f13b9261a00b87b3e98f070d100d8d72bef7 @@ -0,0 +1,25 @@ +From 4730f13b9261a00b87b3e98f070d100d8d72bef7 Mon Sep 17 00:00:00 2001 +From: Tuomo Rinne +Date: Mon, 14 Jan 2019 22:33:42 +0000 +Subject: Fix build error when building with xserver built using meson + +--- + src/fbdev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fbdev.c b/src/fbdev.c +index f25ef72..e4f66a2 100644 +--- a/src/fbdev.c ++++ b/src/fbdev.c +@@ -1010,7 +1010,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL) + fPtr->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = FBDevCloseScreen; + +-#if XV ++#ifdef XV + { + XF86VideoAdaptorPtr *ptr; + +-- +cgit v1.2.1 + diff --git a/patches/xf86-video-nv/fix-old-cpp-macros_nv.patch b/patches/xf86-video-nv/fix-old-cpp-macros_nv.patch new file mode 100644 index 00000000..56fdad10 --- /dev/null +++ b/patches/xf86-video-nv/fix-old-cpp-macros_nv.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 + diff --git a/patches/xf86-video-sis/fix-old-cpp-macros_sis.patch b/patches/xf86-video-sis/fix-old-cpp-macros_sis.patch new file mode 100644 index 00000000..26ec869a --- /dev/null +++ b/patches/xf86-video-sis/fix-old-cpp-macros_sis.patch @@ -0,0 +1,38 @@ +Upstream: no (Too lazy) +Reason: Fixes build with new GCC by fixing old CPP macros +diff --git a/src/sis_driver.c b/src/sis_driver.c +index 51c9660..5e2eba2 100644 +--- a/src/sis_driver.c ++++ b/src/sis_driver.c +@@ -4166,7 +4166,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) + biossize = 0x8000; + break; + } +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + if(readpci) { + pSiS->PciInfo->rom_size = biossize; + pci_device_read_rom(pSiS->PciInfo, pSiS->BIOS); +diff --git a/src/sis_vga.c b/src/sis_vga.c +index 8b625d2..c40c140 100644 +--- a/src/sis_vga.c ++++ b/src/sis_vga.c +@@ -1715,7 +1715,7 @@ SiSVGAMapMem(ScrnInfoPtr pScrn) + if(pSiS->VGAMapPhys == 0) pSiS->VGAMapPhys = 0xA0000; + + #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0) +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + (void) pci_device_map_legacy(pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize, + PCI_DEV_MAP_FLAG_WRITABLE, &pSiS->VGAMemBase); + #else +@@ -1737,7 +1737,7 @@ SiSVGAUnmapMem(ScrnInfoPtr pScrn) + + if(pSiS->VGAMemBase == NULL) return; + +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + (void) pci_device_unmap_legacy(pSiS->PciInfo, pSiS->VGAMemBase, pSiS->VGAMapSize); + #else + xf86UnMapVidMem(pScrn->scrnIndex, pSiS->VGAMemBase, pSiS->VGAMapSize); + diff --git a/patches/xf86-video-vmware/fix-old-cpp-macros_vmware.patch b/patches/xf86-video-vmware/fix-old-cpp-macros_vmware.patch new file mode 100644 index 00000000..ac05a818 --- /dev/null +++ b/patches/xf86-video-vmware/fix-old-cpp-macros_vmware.patch @@ -0,0 +1,167 @@ +Upstream: no (Too lazy) +Reason: newer GCC don't work with these macros + +diff --git a/src/vmware.c b/src/vmware.c +index bd8ec37..1bc1fac 100644 +--- a/src/vmware.c ++++ b/src/vmware.c +@@ -341,7 +341,7 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) + SVGA_LEGACY_BASE_PORT + SVGA_VALUE_PORT*sizeof(uint32); + } else { + /* Note: This setting of valueReg causes unaligned I/O */ +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + pVMWARE->portIOBase = pVMWARE->PciInfo->regions[0].base_addr; + #else + pVMWARE->portIOBase = pVMWARE->PciInfo->ioBase[0]; +@@ -383,7 +383,7 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) + } + pVMWARE->suspensionSavedRegId = id; + +-#if !XSERVER_LIBPCIACCESS ++#ifndef XSERVER_LIBPCIACCESS + pVMWARE->PciTag = pciTag(pVMWARE->PciInfo->bus, pVMWARE->PciInfo->device, + pVMWARE->PciInfo->func); + #endif +@@ -727,13 +727,13 @@ static Bool + VMWAREMapMem(ScrnInfoPtr pScrn) + { + VMWAREPtr pVMWARE = VMWAREPTR(pScrn); +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + int err; + struct pci_device *const device = pVMWARE->PciInfo; + void *fbBase; + #endif + +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + err = pci_device_map_range(device, + pVMWARE->memPhysBase, + pVMWARE->videoRam, +@@ -770,7 +770,7 @@ VMWAREUnmapMem(ScrnInfoPtr pScrn) + + VmwareLog(("Unmapped: %p/%u\n", pVMWARE->FbBase, pVMWARE->videoRam)); + +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + pci_device_unmap_range(pVMWARE->PciInfo, pVMWARE->FbBase, pVMWARE->videoRam); + #else + xf86UnMapVidMem(pScrn->scrnIndex, pVMWARE->FbBase, pVMWARE->videoRam); +@@ -1045,7 +1045,7 @@ static void + VMWAREInitFIFO(ScrnInfoPtr pScrn) + { + VMWAREPtr pVMWARE = VMWAREPTR(pScrn); +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + struct pci_device *const device = pVMWARE->PciInfo; + int err; + void *mmioVirtBase; +@@ -1058,7 +1058,7 @@ VMWAREInitFIFO(ScrnInfoPtr pScrn) + + pVMWARE->mmioPhysBase = vmwareReadReg(pVMWARE, SVGA_REG_MEM_START); + pVMWARE->mmioSize = vmwareReadReg(pVMWARE, SVGA_REG_MEM_SIZE) & ~3; +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + err = pci_device_map_range(device, pVMWARE->mmioPhysBase, + pVMWARE->mmioSize, + PCI_DEV_MAP_FLAG_WRITABLE, +@@ -1099,7 +1099,7 @@ VMWAREStopFIFO(ScrnInfoPtr pScrn) + TRACEPOINT + + vmwareWriteReg(pVMWARE, SVGA_REG_CONFIG_DONE, 0); +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + pci_device_unmap_range(pVMWARE->PciInfo, pVMWARE->mmioVirtBase, pVMWARE->mmioSize); + #else + xf86UnMapVidMem(pScrn->scrnIndex, pVMWARE->mmioVirtBase, pVMWARE->mmioSize); +diff --git a/src/vmware.h b/src/vmware.h +index 028dff3..58676b3 100644 +--- a/src/vmware.h ++++ b/src/vmware.h +@@ -83,7 +83,7 @@ typedef xXineramaScreenInfo VMWAREXineramaRec, *VMWAREXineramaPtr; + + typedef struct { + EntityInfoPtr pEnt; +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + struct pci_device *PciInfo; + #else + pciVideoPtr PciInfo; +@@ -207,7 +207,7 @@ typedef struct { + /* Undefine this to kill all acceleration */ + #define ACCELERATE_OPS + +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + #define VENDOR_ID(p) (p)->vendor_id + #define DEVICE_ID(p) (p)->device_id + #define SUBVENDOR_ID(p) (p)->subvendor_id +diff --git a/src/vmware_bootstrap.c b/src/vmware_bootstrap.c +index 0cfac57..efe217e 100644 +--- a/src/vmware_bootstrap.c ++++ b/src/vmware_bootstrap.c +@@ -91,7 +91,7 @@ static char vmware_driver_name[] = VMWARE_DRIVER_NAME; + VMW_STRING(PACKAGE_VERSION_MAJOR) "." VMW_STRING(PACKAGE_VERSION_MINOR) \ + "." VMW_STRING(PACKAGE_VERSION_PATCHLEVEL) + +-#if !XSERVER_LIBPCIACCESS ++#ifndef XSERVER_LIBPCIACCESS + static const char VMWAREBuildStr[] = "VMware Guest X Server " + VMWARE_DRIVER_VERSION_STRING " - build=$Name$\n"; + #else +@@ -127,7 +127,7 @@ static resRange vmwareLegacyRes[] = { + #define vmwareLegacyRes NULL + #endif + +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + #define VENDOR_ID(p) (p)->vendor_id + #define DEVICE_ID(p) (p)->device_id + #define SUBVENDOR_ID(p) (p)->subvendor_id +@@ -141,7 +141,7 @@ static resRange vmwareLegacyRes[] = { + #define CHIP_REVISION(p) (p)->chipRev + #endif + +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + + #define VMWARE_DEVICE_MATCH(d, i) \ + {PCI_VENDOR_ID_VMWARE, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } +@@ -220,7 +220,7 @@ vmwgfx_hosted_detect(void); + static Bool + VMwarePreinitStub(ScrnInfoPtr pScrn, int flags) + { +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + struct pci_device *pciInfo; + #else + pciVideoPtr pciInfo; +@@ -270,7 +270,7 @@ VMwarePreinitStub(ScrnInfoPtr pScrn, int flags) + return (*pScrn->PreInit)(pScrn, flags); + }; + +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + static Bool + VMwarePciProbe (DriverPtr drv, + int entity_num, +@@ -520,7 +520,7 @@ _X_EXPORT DriverRec vmware = { + VMWARE_DRIVER_VERSION, + vmware_driver_name, + VMWAREIdentify, +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + NULL, + #else + VMWAREProbe, +@@ -532,7 +532,7 @@ _X_EXPORT DriverRec vmware = { + VMWareDriverFunc, + #endif + #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 4 +-#if XSERVER_LIBPCIACCESS ++#if defined(XSERVER_LIBPCIACCESS) + VMwareDeviceMatch, + VMwarePciProbe, + #else + diff --git a/recipes/xorg/driver/xf86-video-fbdev/recipe b/recipes/xorg/driver/xf86-video-fbdev/recipe index bc9390fc..29f61040 100644 --- a/recipes/xorg/driver/xf86-video-fbdev/recipe +++ b/recipes/xorg/driver/xf86-video-fbdev/recipe @@ -1,7 +1,7 @@ # Build recipe for xf86-video-fbdev. # # Copyright (c) 2017 Mateus P. Rodrigues . -# Copyright (c) 2017-2018 Matias Fonzo, . +# Copyright (c) 2017-2018, 2022 Matias Fonzo, . # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ set -e program=xf86-video-fbdev version=0.5.0 -release=2 +release=3 # Define a category for the output of the package name pkgcategory=xorg_driver @@ -40,7 +40,7 @@ homepage=https://www.x.org license="MIT X Consortium" # Source documentation -docs="COPYING ChangeLog README" +docs="COPYING ChangeLog README*" docsdir="${docdir}/${program}-${version}" build() @@ -49,10 +49,14 @@ build() cd "$srcdir" + # Fix build error when building with xserver built using meson + patch -p1 < "${worktree}/patches/xf86-video-fbdev/4730f13b9261a00b87b3e98f070d100d8d72bef7" + # Set sane permissions chmod -R u+w,go-w,a+rX-s . - ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS " LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \ + ./configure CPPFLAGS="$QICPPFLAGS" \ + CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \ $configure_args \ --libdir=/usr/lib${libSuffix} \ --infodir=$infodir \ @@ -87,13 +91,6 @@ build() # Copy documentation mkdir -p "${destdir}${docsdir}" - - for file in $docs - do - if test -e $file - then - cp -p $file "${destdir}${docsdir}" - fi - done + cp -p $docs "${destdir}${docsdir}" } diff --git a/recipes/xorg/driver/xf86-video-nv/recipe b/recipes/xorg/driver/xf86-video-nv/recipe index 69bd3760..3c8a2fdb 100644 --- a/recipes/xorg/driver/xf86-video-nv/recipe +++ b/recipes/xorg/driver/xf86-video-nv/recipe @@ -1,7 +1,7 @@ # Build recipe for xf86-video-nv. # # Copyright (c) 2017 Mateus P. Rodrigues . -# Copyright (c) 2017 Matias Fonzo, . +# Copyright (c) 2017, 2022 Matias Fonzo, . # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ set -e program=xf86-video-nv version=2.1.21 -release=2 +release=3 # Define a category for the output of the package name pkgcategory=xorg_driver @@ -49,10 +49,14 @@ build() cd "$srcdir" + # Fix old cpp macros references. Thanks to "Alpine Linux" + patch -p1 < "${worktree}/patches/xf86-video-nv/fix-old-cpp-macros_nv.patch" + # Set sane permissions chmod -R u+w,go-w,a+rX-s . - ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS " LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \ + ./configure CPPFLAGS="$QICPPFLAGS" \ + CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -Wl,-z,lazy" \ $configure_args \ --libdir=/usr/lib${libSuffix} \ --infodir=$infodir \ @@ -86,13 +90,6 @@ build() # Copy documentation mkdir -p "${destdir}${docsdir}" - - for file in $docs - do - if test -e $file - then - cp -p $file "${destdir}${docsdir}" - fi - done + cp -p $docs "${destdir}${docsdir}" } diff --git a/recipes/xorg/driver/xf86-video-sis/recipe b/recipes/xorg/driver/xf86-video-sis/recipe index bcd5a3ab..c78f5823 100644 --- a/recipes/xorg/driver/xf86-video-sis/recipe +++ b/recipes/xorg/driver/xf86-video-sis/recipe @@ -1,7 +1,7 @@ # Build recipe for xf86-video-sis. # # Copyright (c) 2017 Mateus P. Rodrigues . -# Copyright (c) 2017-2019, 2021 Matias Fonzo, . +# Copyright (c) 2017-2019, 2021-2022 Matias Fonzo, . # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ set -e program=xf86-video-sis version=0.12.0 -release=1 +release=2 # Define a category for the output of the package name pkgcategory=xorg_driver @@ -49,6 +49,9 @@ build() cd "$srcdir" + # Fix old cpp macros references. Thanks to "Alpine Linux" + patch -p1 < "${worktree}/patches/xf86-video-sis/fix-old-cpp-macros_sis.patch" + # Set sane permissions chmod -R u+w,go-w,a+rX-s . diff --git a/recipes/xorg/driver/xf86-video-vmware/recipe b/recipes/xorg/driver/xf86-video-vmware/recipe index 3a42445f..e846e4b7 100644 --- a/recipes/xorg/driver/xf86-video-vmware/recipe +++ b/recipes/xorg/driver/xf86-video-vmware/recipe @@ -20,7 +20,7 @@ set -e program=xf86-video-vmware version=20211130_50ab008 -release=1 +release=2 # Define a category for the output of the package name pkgcategory=xorg_driver @@ -53,6 +53,9 @@ build() cd "$srcdir" + # Fix old cpp macros references. Thanks to "Alpine Linux" + patch -p1 < "${worktree}/patches/xf86-video-vmware/fix-old-cpp-macros_vmware.patch" + # Set sane permissions chmod -R u+w,go-w,a+rX-s . -- 2.11.4.GIT