diff options
author | Leo <thinkabit.ukim@gmail.com> | 2020-04-29 20:21:03 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-04-29 20:21:03 -0300 |
commit | 760f109a634b90a5fbf27f80e8bf993a16be0b4b (patch) | |
tree | a6995dd753957242b6c478ec2a34459123961b0a /main | |
parent | 6a3c36a4bbaf79fe16703ef05d26c071e9d7f5a2 (diff) | |
download | aports-760f109a634b90a5fbf27f80e8bf993a16be0b4b.tar.bz2 aports-760f109a634b90a5fbf27f80e8bf993a16be0b4b.tar.xz |
main/xf86-video-vmware: fix build
Diffstat (limited to 'main')
-rw-r--r-- | main/xf86-video-vmware/APKBUILD | 10 | ||||
-rw-r--r-- | main/xf86-video-vmware/fix-old-cpp-macros.patch | 167 |
2 files changed, 171 insertions, 6 deletions
diff --git a/main/xf86-video-vmware/APKBUILD b/main/xf86-video-vmware/APKBUILD index 10a9fd219e..17876fe44e 100644 --- a/main/xf86-video-vmware/APKBUILD +++ b/main/xf86-video-vmware/APKBUILD @@ -7,14 +7,13 @@ url="https://xorg.freedesktop.org" arch="x86 x86_64" license="MIT" subpackages="$pkgname-doc" -depends= makedepends="xorg-server-dev libdrm-dev libxi-dev eudev-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-vmware-$pkgver.tar.bz2 + fix-old-cpp-macros.patch " build() { - cd "$builddir" export LDFLAGS="$LDFLAGS -Wl,-z,lazy" ./configure \ --build=$CBUILD \ @@ -24,14 +23,13 @@ build() { } check() { - cd "$builddir" make check } package() { - cd "$builddir" make DESTDIR="$pkgdir" install install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING } -sha512sums="c318de893cae7b2b11e11c1b389ee47478b7c8d1f52c27099dbe453efec28f3e9da449217307a8c2251999eada66312f766996be1a6ead413b8b6dedc42c68ca xf86-video-vmware-13.3.0.tar.bz2" +sha512sums="c318de893cae7b2b11e11c1b389ee47478b7c8d1f52c27099dbe453efec28f3e9da449217307a8c2251999eada66312f766996be1a6ead413b8b6dedc42c68ca xf86-video-vmware-13.3.0.tar.bz2 +4598e64e71b9a2ddd6fd2b664b63fcea96e4a24b116588af92d5cf973028612055ccb70cd27d0fd34016fdd9d03e9248c39a195f9324e05e593ba3ec26d4a6d8 fix-old-cpp-macros.patch" diff --git a/main/xf86-video-vmware/fix-old-cpp-macros.patch b/main/xf86-video-vmware/fix-old-cpp-macros.patch new file mode 100644 index 0000000000..ac05a818c7 --- /dev/null +++ b/main/xf86-video-vmware/fix-old-cpp-macros.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 + |