aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
Diffstat (limited to 'community')
-rw-r--r--community/xf86-video-s3virge/APKBUILD38
-rw-r--r--community/xf86-video-s3virge/check-max-value.patch24
2 files changed, 62 insertions, 0 deletions
diff --git a/community/xf86-video-s3virge/APKBUILD b/community/xf86-video-s3virge/APKBUILD
new file mode 100644
index 0000000000..aaf6faf45a
--- /dev/null
+++ b/community/xf86-video-s3virge/APKBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xf86-video-s3virge
+pkgver=1.11.0
+pkgrel=0
+pkgdesc="S3 ViRGE video driver"
+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
+ check-max-value.patch
+ "
+builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$builddir"
+ export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
+sha512sums="43ec2b4d910a5f659dd19fd623ef615f3ba7dcb282f61b95438cb279c6e0de75419b381adb70c92a084e375a04435cbb20fa0fe30ac23b2c8f4ed26d762d418e xf86-video-s3virge-1.11.0.tar.bz2
+af7fdc0f850103fb9e8631c1b26b1eb6117eac83b76a9d575b33affeb55985ffe9f61c1c7dcb4c7b00656edfc5df4c2d4c75e56f2dd4c2112dedf654564ff259 check-max-value.patch"
diff --git a/community/xf86-video-s3virge/check-max-value.patch b/community/xf86-video-s3virge/check-max-value.patch
new file mode 100644
index 0000000000..0573a05c9c
--- /dev/null
+++ b/community/xf86-video-s3virge/check-max-value.patch
@@ -0,0 +1,24 @@
+--- a/src/s3v_driver.c
++++ b/src/s3v_driver.c
+@@ -1212,8 +1212,6 @@
+ /* todo - The virge limit is 2048 vertical & horizontal */
+ /* pixels, not clock register settings. */
+ /* true for all ViRGE? */
+- pScrn->maxHValue = 2048;
+- pScrn->maxVValue = 2048;
+
+ /* Lower depths default to config file */
+ pScrn->virtualX = pScrn->display->virtualX;
+@@ -2566,6 +2564,12 @@
+ if ((pScrn->bitsPerPixel + 7)/8 * mode->HDisplay > 4095)
+ return MODE_VIRTUAL_X;
+
++ if (mode->HTotal > 2048)
++ return MODE_BAD_HVALUE;
++
++ if (mode->VTotal > 2048)
++ return MODE_BAD_VVALUE;
++
+ return MODE_OK;
+ }
+