aboutsummaryrefslogtreecommitdiffstats
path: root/community/xf86-video-sis
diff options
context:
space:
mode:
Diffstat (limited to 'community/xf86-video-sis')
-rw-r--r--community/xf86-video-sis/APKBUILD34
-rw-r--r--community/xf86-video-sis/fix-old-cpp-macros.patch38
2 files changed, 72 insertions, 0 deletions
diff --git a/community/xf86-video-sis/APKBUILD b/community/xf86-video-sis/APKBUILD
new file mode 100644
index 0000000000..2eb83ce5cd
--- /dev/null
+++ b/community/xf86-video-sis/APKBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xf86-video-sis
+pkgver=0.12.0
+pkgrel=0
+pkgdesc="X.org SiS video driver"
+url="https://xorg.freedesktop.org"
+arch="all"
+license="MIT"
+subpackages="$pkgname-doc"
+makedepends="xorg-server-dev util-macros mesa-dev libxi-dev xorgproto"
+source="https://www.x.org/releases/individual/driver/xf86-video-sis-$pkgver.tar.bz2
+ fix-old-cpp-macros.patch
+ "
+
+build() {
+ export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
+
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+sha512sums="5aa101e5217f15667f2c94f7a76f4afcf47717b61f5d206ce65efe35dc3f674ca294f98ca8586971c6467f31decdd94d8255ebfc7dc220fac0179afc61995952 xf86-video-sis-0.12.0.tar.bz2
+d4262ac8c17d04547473df260518247afb09a5bf6ddbe85d7877534f1e99d316d52fb933839f56a4e61b3706b124fa91c6926d432ba542e525f2007af253ff2a fix-old-cpp-macros.patch"
diff --git a/community/xf86-video-sis/fix-old-cpp-macros.patch b/community/xf86-video-sis/fix-old-cpp-macros.patch
new file mode 100644
index 0000000000..26ec869a73
--- /dev/null
+++ b/community/xf86-video-sis/fix-old-cpp-macros.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);
+