aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
authorChin-San Huang <chinsan@FreeBSD.org>2008-06-14 00:01:35 +0000
committerChin-San Huang <chinsan@FreeBSD.org>2008-06-14 00:01:35 +0000
commit48a424a4738f0f3ddd4920c513c6b8419eecffab (patch)
tree1caf5ed068e41f5cd4a114eb6ed8430db52c07a1 /x11-drivers
parent9308e76c8ee2e44157c12b9f9d77e5597322f494 (diff)
downloadports-48a424a4738f0f3ddd4920c513c6b8419eecffab.tar.gz
ports-48a424a4738f0f3ddd4920c513c6b8419eecffab.zip
Add xf86-video-sis-intel 300407, x.Org sis display driver provided by
Intel. PR: ports/124461 Submitted by: Alexey Illarionov <littlesavage at orionet.ru>
Notes
Notes: svn path=/head/; revision=214801
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/Makefile1
-rw-r--r--x11-drivers/xf86-video-sis-intel/Makefile27
-rw-r--r--x11-drivers/xf86-video-sis-intel/distinfo3
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis.h55
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis300_accel.c29
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis310_accel.c122
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis_3daccel.c11
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis_accel.c29
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.c11
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.h11
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis_driver.c12
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis_memcpy.c12
-rw-r--r--x11-drivers/xf86-video-sis-intel/files/patch-src-sis_mergedfb.c18
-rw-r--r--x11-drivers/xf86-video-sis-intel/pkg-descr5
-rw-r--r--x11-drivers/xf86-video-sis-intel/pkg-plist5
15 files changed, 351 insertions, 0 deletions
diff --git a/x11-drivers/Makefile b/x11-drivers/Makefile
index a877db8334d6..446d1075876c 100644
--- a/x11-drivers/Makefile
+++ b/x11-drivers/Makefile
@@ -56,6 +56,7 @@
SUBDIR += xf86-video-savage
SUBDIR += xf86-video-siliconmotion
SUBDIR += xf86-video-sis
+ SUBDIR += xf86-video-sis-intel
SUBDIR += xf86-video-sunffb
SUBDIR += xf86-video-tdfx
SUBDIR += xf86-video-tga
diff --git a/x11-drivers/xf86-video-sis-intel/Makefile b/x11-drivers/xf86-video-sis-intel/Makefile
new file mode 100644
index 000000000000..fb9fdb082b3c
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/Makefile
@@ -0,0 +1,27 @@
+# New ports collection makefile for: xf86-video-sis-intel
+# Date Created: 30 May 2008
+# Whom: Alexey Illarionov <littlesavage@orionet.ru>
+# Based on: x11-drivers/xf86-video-sis by flz@FreeBSD.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= xf86-video-sis-intel
+PORTVERSION= 300407
+CATEGORIES= x11-drivers
+MASTER_SITES= http://downloadmirror.intel.com/15443/eng/
+DISTNAME= sis_drv_src_300407
+
+MAINTAINER= littlesavage@orionet.ru
+COMMENT= X.Org sis display driver provided by Intel
+
+CONFLICTS= xf86-video-sis-[0-9]*
+WRKSRC= ${WRKDIR}/2d-driver
+
+USE_GL= gl
+
+XORG_CAT= driver
+USE_XORG= xf86dgaproto xf86driproto xineramaproto videoproto xf86miscproto xextproto glproto
+MAN4= sis.4x
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-video-sis-intel/distinfo b/x11-drivers/xf86-video-sis-intel/distinfo
new file mode 100644
index 000000000000..c97e03d5c55f
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/distinfo
@@ -0,0 +1,3 @@
+MD5 (xorg/driver/sis_drv_src_300407.tar.bz2) = 6b2289ea047f02f7649b853329217a76
+SHA256 (xorg/driver/sis_drv_src_300407.tar.bz2) = 98bab5fe714d2eb0c1fbdde81581e3af0195c2500357de85362b8717edff24ee
+SIZE (xorg/driver/sis_drv_src_300407.tar.bz2) = 756990
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis.h b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis.h
new file mode 100644
index 000000000000..853d652af325
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis.h
@@ -0,0 +1,55 @@
+--- src/sis.h.orig 2007-05-02 05:13:01.000000000 +0400
++++ src/sis.h 2008-06-10 19:44:21.000000000 +0400
+@@ -60,7 +60,6 @@
+ #define TWDEBUG
+ #endif
+
+-#include "xf86_ansic.h"
+ #include "compiler.h"
+ #include "xf86Pci.h"
+ #include "xf86Priv.h"
+@@ -88,16 +87,16 @@
+ (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
+ #define XF86_VERSION_CURRENT XF86_VERSION_NUMERIC(4,3,99,902,0)
+ #endif
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,0,0,0)
++#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,0,0,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0)
+ #define SIS_HAVE_RR_FUNC
+ #ifdef HaveDriverFuncs
+ #undef SIS_HaveDriverFuncs
+ #define SIS_HaveDriverFuncs HaveDriverFuncs
+ #define SIS_HAVE_DRIVER_FUNC
+ #endif /* HaveDriverFuncs */
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,900,0)
++#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,900,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0)
+ #define SISISXORG6899900
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,901,0)
++#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,901,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0)
+ #define SISISXORG6899901
+ #ifdef RANDR
+ #define SIS_HAVE_RR_GET_MODE_MM
+@@ -181,7 +180,6 @@
+ #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,99,14,0)
+ #define SISNEWDRI
+ #endif
+-#define SIS315DRI /* define this if dri is adapted for 315/330 series */
+ #include "xf86drm.h"
+ #include "sarea.h"
+ #define _XF86DRI_SERVER_
+@@ -230,14 +228,14 @@
+
+ #undef SISCHECKOSSSE
+ #ifdef XORG_VERSION_CURRENT
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0)
++#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0)
+ #define SISCHECKOSSSE /* Automatic check OS for SSE; requires SigIll facility */
+ #endif
+ #endif
+
+ #undef SISGAMMARAMP
+ #ifdef XORG_VERSION_CURRENT
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0)
++#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0)
+ #define SISGAMMARAMP /* Driver can set gamma ramp; requires additional symbols in xf86sym.h */
+ #endif
+ #endif
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis300_accel.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis300_accel.c
new file mode 100644
index 000000000000..dc4b9d9bbef6
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis300_accel.c
@@ -0,0 +1,29 @@
+--- src/sis300_accel.c.orig 2008-06-06 00:43:06.000000000 +0400
++++ src/sis300_accel.c 2008-05-27 02:53:37.000000000 +0400
+@@ -1231,7 +1231,7 @@
+
+ #ifdef SIS_USE_EXA /* ----------------------- EXA ----------------------- */
+ if(pSiS->useEXA) {
+-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+
+ if(pSiS->scrnOffset < 8192) {
+ int obase = 0;
+@@ -1253,7 +1253,7 @@
+ "Not enough video RAM for offscreen memory manager. Xv disabled\n");
+ }
+
+-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0)
++#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pSiS->EXADriverPtr->card.offscreenByteAlign = 16; /* src/dst: double quad word boundary */
+ pSiS->EXADriverPtr->card.offscreenPitch = 4;
+ #else
+@@ -1430,7 +1430,7 @@
+ pSiS->exa_scratch = exaOffscreenAlloc(pScreen, 128 * 1024, 16, TRUE,
+ SiSScratchSave, pSiS);
+
+- #if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++ #if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ if(pSiS->exa_scratch) {
+ pSiS->exa_scratch_next = pSiS->exa_scratch->offset;
+ pSiS->EXADriverPtr->accel.UploadToScratch = SiSUploadToScratch;
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis310_accel.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis310_accel.c
new file mode 100644
index 000000000000..d64ac0a802bc
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis310_accel.c
@@ -0,0 +1,122 @@
+--- src/sis310_accel.c.orig 2007-05-02 05:12:57.000000000 +0400
++++ src/sis310_accel.c 2008-06-09 22:15:56.000000000 +0400
+@@ -65,7 +65,7 @@
+ # define SIS_NEED_ARRAY
+ # undef SISNEWRENDER
+ # ifdef XORG_VERSION_CURRENT
+-# if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(6,7,0,0,0)
++# if (XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(6,7,0,0,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0))
+ # define SISNEWRENDER
+ # endif
+ # endif
+@@ -1099,13 +1099,13 @@
+
+ SiSOccpyCmdQue(pSiS);
+ #ifdef SISVRAMQ
+- if(op > SiSRenderOpsMAX) return FALSE;
+- if(!SiSRenderOps[op]) return FALSE;
++ if(op > SiSRenderOpsMAX) {SiSReleaseCmdQue(pSiS); return FALSE;}
++ if(!SiSRenderOps[op]) {SiSReleaseCmdQue(pSiS); return FALSE;}
+ #else
+- if(op != PictOpOver) return FALSE;
++ if(op != PictOpOver) {SiSReleaseCmdQue(pSiS); return FALSE;}
+ #endif
+
+- if((width > 2048) || (height > 2048)) return FALSE;
++ if((width > 2048) || (height > 2048)) { SiSReleaseCmdQue(pSiS); return FALSE;}
+
+ pitch = (width + 31) & ~31;
+ sizeNeeded = (pitch << bppshift) * height;
+@@ -1115,8 +1115,10 @@
+ texType, op, width, height, texPitch, sizeNeeded, sbpp, sbppshift, bppshift);
+ #endif
+
+- if(!SiSAllocateLinear(pScrn, (sizeNeeded + sbpp - 1) >> sbppshift))
++ if(!SiSAllocateLinear(pScrn, (sizeNeeded + sbpp - 1) >> sbppshift)) {
++ SiSReleaseCmdQue(pSiS);
+ return FALSE;
++ }
+
+ width <<= bppshift; /* -> bytes (for engine and memcpy) */
+ pitch <<= bppshift; /* -> bytes */
+@@ -1159,6 +1161,7 @@
+ SiSSetupCMDFlag(ALPHA_BLEND | SRCVIDEO | A_PERPIXELALPHA)
+ break;
+ default:
++ SiSReleaseCmdQue(pSiS);
+ return FALSE;
+ }
+ SiSSyncWP
+@@ -1463,11 +1466,11 @@
+
+ w = pSrc->drawable.width;
+
+-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0)
++#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ dst_pitch = ((w * (pSrc->drawable.bitsPerPixel >> 3)) +
+ pSiS->EXADriverPtr->card.offscreenPitch - 1) &
+ ~(pSiS->EXADriverPtr->card.offscreenPitch - 1);
+-#elif XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++#elif XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ dst_pitch = ((w * (pSrc->drawable.bitsPerPixel >> 3)) +
+ pSiS->EXADriverPtr->card.pixmapPitchAlign - 1) &
+ ~(pSiS->EXADriverPtr->card.pixmapPitchAlign - 1);
+@@ -1482,11 +1485,11 @@
+ if(size > pSiS->exa_scratch->size)
+ return FALSE;
+
+-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0)
++#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pSiS->exa_scratch_next = (pSiS->exa_scratch_next +
+ pSiS->EXADriverPtr->card.offscreenByteAlign - 1) &
+ ~(pSiS->EXADriverPtr->card.offscreenByteAlign - 1);
+-#elif XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++#elif XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pSiS->exa_scratch_next = (pSiS->exa_scratch_next +
+ pSiS->EXADriverPtr->card.pixmapOffsetAlign - 1) &
+ ~(pSiS->EXADriverPtr->card.pixmapOffsetAlign - 1);
+@@ -1496,7 +1499,7 @@
+ ~(pSiS->EXADriverPtr->pixmapOffsetAlign - 1);
+ #endif
+
+-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ if(pSiS->exa_scratch_next + size >
+ pSiS->exa_scratch->offset + pSiS->exa_scratch->size) {
+ (pSiS->EXADriverPtr->accel.WaitMarker)(pSrc->drawable.pScreen, 0);
+@@ -1513,7 +1516,7 @@
+ memcpy(pDst, pSrc, sizeof(*pDst));
+ pDst->devKind = dst_pitch;
+
+-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pDst->devPrivate.ptr = pSiS->EXADriverPtr->card.memoryBase + pSiS->exa_scratch_next;
+ #else
+ pDst->devPrivate.ptr = pSiS->EXADriverPtr->memoryBase + pSiS->exa_scratch_next;
+@@ -1755,7 +1758,7 @@
+
+ #ifdef SIS_USE_EXA /* ----------------------- EXA ----------------------- */
+ if(pSiS->useEXA) {
+-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+
+ int obase = 0;
+
+@@ -1776,7 +1779,7 @@
+ "Not enough video RAM for offscreen memory manager. Xv disabled\n");
+ }
+
+-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0)
++#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pSiS->EXADriverPtr->card.offscreenByteAlign = 16; /* src/dst: double quad word boundary */
+ pSiS->EXADriverPtr->card.offscreenPitch = 4; /* pitch: double word boundary */
+ #else
+@@ -1945,7 +1948,7 @@
+ SiSScratchSave, pSiS);
+ if(pSiS->exa_scratch) {
+ pSiS->exa_scratch_next = pSiS->exa_scratch->offset;
+- #if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++ #if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pSiS->EXADriverPtr->accel.UploadToScratch = SiSUploadToScratch;
+ #else
+ pSiS->EXADriverPtr->UploadToScratch = SiSUploadToScratch;
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_3daccel.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_3daccel.c
new file mode 100644
index 000000000000..b9dd8ce8937f
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_3daccel.c
@@ -0,0 +1,11 @@
+--- src/sis_3daccel.c.orig 2008-06-06 00:41:57.000000000 +0400
++++ src/sis_3daccel.c 2008-05-27 02:54:55.000000000 +0400
+@@ -64,7 +64,7 @@
+ # define SIS_NEED_ARRAY
+ # undef SISNEWRENDER
+ # ifdef XORG_VERSION_CURRENT
+-# if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(6,7,0,0,0)
++# if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(6,7,0,0,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0)
+ # define SISNEWRENDER
+ # endif
+ # endif
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_accel.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_accel.c
new file mode 100644
index 000000000000..9fb21f3f5d32
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_accel.c
@@ -0,0 +1,29 @@
+--- src/sis_accel.c.orig 2008-06-06 00:41:32.000000000 +0400
++++ src/sis_accel.c 2008-05-27 02:53:54.000000000 +0400
+@@ -781,7 +781,7 @@
+
+ #ifdef SIS_USE_EXA /* ----------------------- EXA ----------------------- */
+ if(pSiS->useEXA) {
+-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+
+ /* data */
+ pSiS->EXADriverPtr->card.memoryBase = pSiS->FbBase;
+@@ -795,7 +795,7 @@
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Not enough video RAM for offscreen memory manager. Xv disabled\n");
+ }
+-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0)
++#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,8,2,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pSiS->EXADriverPtr->card.offscreenByteAlign = 8; /* src/dst: double quad word boundary */
+ pSiS->EXADriverPtr->card.offscreenPitch = 1;
+ #else
+@@ -946,7 +946,7 @@
+ SiSScratchSave, pSiS);
+ if(pSiS->exa_scratch) {
+ pSiS->exa_scratch_next = pSiS->exa_scratch->offset;
+- #if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0)
++ #if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,0,0,0,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ pSiS->EXADriverPtr->accel.UploadToScratch = SiSUploadToScratch;
+ #else
+ pSiS->EXADriverPtr->UploadToScratch = SiSUploadToScratch;
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.c
new file mode 100644
index 000000000000..c70fb3302e34
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.c
@@ -0,0 +1,11 @@
+--- src/sis_dri.c.orig 2007-05-02 05:13:00.000000000 +0400
++++ src/sis_dri.c 2008-06-06 01:17:19.000000000 +0400
+@@ -56,7 +56,7 @@
+
+ #ifdef XORG_VERSION_CURRENT
+ #define SISHAVECREATEBUSID
+-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,7,99,1,0)
++#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,7,99,1,0) && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(4,0,0,0,0)
+ extern char *DRICreatePCIBusID(pciVideoPtr PciInfo);
+ #endif
+ #else
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.h b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.h
new file mode 100644
index 000000000000..8d77d4b29aa7
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_dri.h
@@ -0,0 +1,11 @@
+--- src/sis_dri.h.orig 2008-06-06 01:29:26.000000000 +0400
++++ src/sis_dri.h 2008-06-06 01:29:01.000000000 +0400
+@@ -116,7 +116,7 @@
+ int dummy;
+ } SISDRIContextRec, *SISDRIContextPtr;
+
+-#ifdef XFree86Server
++#if defined(XFree86Server) || defined(XORG_VERSION_CURRENT)
+
+ #include "screenint.h"
+
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_driver.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_driver.c
new file mode 100644
index 000000000000..619fc14c42a7
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_driver.c
@@ -0,0 +1,12 @@
+--- src/sis_driver.c.orig 2007-05-02 05:13:00.000000000 +0400
++++ src/sis_driver.c 2008-05-27 03:31:36.000000000 +0400
+@@ -559,9 +559,7 @@
+ pScrn->FreeScreen = SISFreeScreen;
+ pScrn->ValidMode = SISValidMode;
+ #ifdef X_XF86MiscPassMessage
+- if(xf86GetVersion() >= XF86_VERSION_NUMERIC(4,3,99,2,0)) {
+ pScrn->HandleMessage = SISHandleMessage;
+- }
+ #endif
+ foundScreen = TRUE;
+ }
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_memcpy.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_memcpy.c
new file mode 100644
index 000000000000..ea09af0c2610
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_memcpy.c
@@ -0,0 +1,12 @@
+--- src/sis_memcpy.c.orig 2007-05-02 05:13:01.000000000 +0400
++++ src/sis_memcpy.c 2008-05-27 03:01:00.000000000 +0400
+@@ -844,9 +844,7 @@
+
+ #ifdef SISCHECKOSSSE
+
+-#ifndef XFree86LOADER
+ #include <setjmp.h>
+-#endif
+
+ static jmp_buf sigill_return;
+
diff --git a/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_mergedfb.c b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_mergedfb.c
new file mode 100644
index 000000000000..b0f4c02c5240
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/files/patch-src-sis_mergedfb.c
@@ -0,0 +1,18 @@
+--- src/sis_mergedfb.c.orig 2008-06-06 00:39:10.000000000 +0400
++++ src/sis_mergedfb.c 2008-06-06 00:32:21.000000000 +0400
+@@ -2631,13 +2631,13 @@
+
+ REQUEST_SIZE_MATCH(xXineramaSelectInputReq);
+
+- pWin = SecurityLookupWindow(stuff->window, client, SecurityWriteAccess);
++ pWin = SecurityLookupWindow(stuff->window, client, DixWriteAccess);
+ if(!pWin)
+ return BadWindow;
+
+ pHead = (SiSXineramaEventPtr *)SecurityLookupIDByType(client,
+ pWin->drawable.id, EventType,
+- SecurityWriteAccess);
++ DixWriteAccess);
+
+ if(stuff->enable & (XineramaLayoutChangeNotifyMask)) {
+
diff --git a/x11-drivers/xf86-video-sis-intel/pkg-descr b/x11-drivers/xf86-video-sis-intel/pkg-descr
new file mode 100644
index 000000000000..8b691f1c7aca
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/pkg-descr
@@ -0,0 +1,5 @@
+This package contains the X.Org SiS driver provided by Intel for their
+D201GLY/D201GLY2 motherboards
+
+- Alexey Illarionov
+littlesavage@orionet.ru
diff --git a/x11-drivers/xf86-video-sis-intel/pkg-plist b/x11-drivers/xf86-video-sis-intel/pkg-plist
new file mode 100644
index 000000000000..e1daba86088a
--- /dev/null
+++ b/x11-drivers/xf86-video-sis-intel/pkg-plist
@@ -0,0 +1,5 @@
+lib/xorg/modules/drivers/sis_drv.la
+lib/xorg/modules/drivers/sis_drv.so
+@dirrmtry lib/xorg/modules/drivers
+@dirrmtry lib/xorg/modules
+@dirrmtry lib/xorg