diff -Nur matroxdriver-1.4.3.4.orig/install.sh matroxdriver-1.4.3.5/install.sh
--- matroxdriver-1.4.3.4.orig/install.sh	2006-04-03 10:52:18.906088163 +0200
+++ matroxdriver-1.4.3.5/install.sh	2006-04-11 12:14:44.815643785 +0200
@@ -1,6 +1,9 @@
 #!/bin/sh
 #############################################################
 # Copyright 2004, All Rights Reserved, Matrox Graphics Inc. #
+#                                                           #
+# Updates 2006/04 by Alexander Griesser                     #
+#  - support for Xorg 6.9 and 7.0                           #
 #############################################################
 
 
@@ -40,14 +43,90 @@
 
 if [ "$MACHINEARCH" == "x86_64" ]; then
     XLIBRARYPATH=lib64
+    KLIBRARYPATH=lib64
 else
     XLIBRARYPATH=lib
+    KLIBRARYPATH=lib
 fi
 
-if test -e /usr/X11R6/$XLIBRARYPATH/modules/extensions/libglx.so; then
+function GetXVersion
+{
+    XVERSION=`X -version 2>&1 | grep -s "XFree86 Version" | cut -d" " -f3 | sed -e "s/\([^\.]*\.[^\.]*\.[^\.]*\)\.[^\.]*/\1/"`
+
+    if test -z $XVERSION ; then
+        XVERSION=`X -version 2>&1 | grep -s "X Protocol Version" | sed -e "s/Revision[^0-9]*\([0-9]*\), Release[^0-9]*\([0-9.]*\)/\2\.\1/" | cut -d" " -f 5-`
+    fi
+
+    export XVERSION
+
+    MAJOR=`echo $XVERSION | awk 'BEGIN {FS="."; } $1 != "" { print $1; }'`
+    MINOR=`echo $XVERSION | awk 'BEGIN {FS="."; } $2 != "" { print $2; }'`
+    PATCH=`echo $XVERSION | awk 'BEGIN {FS="."; } $3 != "" { print $3; }'`
+    export XVERSION_PATH=$MAJOR"_"$MINOR"_"$PATCH
+
+    if ! test -e ./xserver/$XVERSION_PATH ; then
+        # HACK fix for SuSE 9.1
+        if [ "$XVERSION" == "4.3.99" ]; then
+                XPRESENT=1
+                XVERSION="6.7.0"
+        elif [ "$XVERSION" == "4.3.99.902" ]; then
+                XPRESENT=1
+                XVERSION="6.7.0"
+        # HACK fix for Distros that use XFree86 4.4.0
+        elif [ "$XVERSION" == "4.4.0" ]; then
+            XPRESENT=1
+            XVERSION="6.7.0"
+        elif [ "$XVERSION" == "6.8.1.0" ]; then
+            XPRESENT=1
+            XVERSION="6.8.1"
+        elif [ "$XVERSION" == "6.8.2.0" ]; then
+            XPRESENT=1
+            XVERSION="6.8.2"
+        # HACK fix for Mandriva 2006
+        elif [ "$XVERSION" == "6.8.99" ]; then
+            XPRESENT=1
+            XVERSION="6.8.2"
+        elif [ "$XVERSION" == "6.8.99.900" ]; then
+            XPRESENT=1
+            XVERSION="6.8.2"
+        elif [ "$XVERSION" == "6.8.99.900.0" ]; then
+            XPRESENT=1
+            XVERSION="6.8.2"
+        elif [ "$XVERSION" == "6.9.0" ]; then
+            XPRESENT=1
+            XVERSION="6.9.0"
+        elif [ "$XVERSION" == "7.0.0" ]; then
+            XPRESENT=1
+            XVERSION="7.0.0"
+        else
+                echo -e "$RED\033[1mERROR\033[0m: \033[1mThe X server drivers included in this installation package"
+                echo -e "       do not support the current version of your X server.\033[0m"
+                    echo ""
+                exit 1
+        fi
+    else
+        XPRESENT=1
+    fi
+}
+
+# We need to get the X version first, to make differences between 7.0.0 and
+# previous releases
+GetXVersion
+
+if [ "$XVERSION" == "7.0.0" ]; then
+  XLIBRARYPATH="$XLIBRARYPATH/xorg"
+
+  if test -e /usr/lib/xorg/modules/extensions/libglx.so; then
     LIBSO="yes"
+  else
+    LIBSO="no"
+  fi
 else
+  if test -e /usr/X11R6/$XLIBRARYPATH/modules/extensions/libglx.so; then
+    LIBSO="yes"
+  else
     LIBSO="no"
+  fi
 fi
 
 
@@ -91,16 +170,25 @@
     XPATH=`which X 2> /dev/null`
 
     if [ $? -ne 0 ] ; then
-        XPATH="/usr/X11R6/bin/X"
+        if [ "$XVERSION" == "7.0.0" ]; then
+	  XPATH="/usr/bin/X"
+	else
+          XPATH="/usr/X11R6/bin/X"
+	fi
         if test -h $XPATH ; then
             WHEREIS=`whereis X 2> /dev/null`
-            field=`echo $WHEREIS | grep -s '/usr/X11R6/bin/X'`
+            field=`echo $WHEREIS | grep -s '$XPATH'`
             if [ $? -eq 0 ] ; then
+	      if [ "$XVERSION" == "7.0.0" ]; then
+		XPATH="/usr"
+	      else
                 XPATH="/usr/X11R6"
+	      fi
             else
                 echo ""
                 echo "Please enter the full path to your current X11R6 directory: "
-                echo "Example: /usr/X11R6"
+                echo "Example: /usr/X11R6 (for XFree86 and Xorg prior to 7.0.0)"
+		echo "         /usr (for Xorg 7.0.0 and upwards)"
                 read XPATH
             fi
         else
@@ -110,13 +198,23 @@
         fi
     else
         WHEREIS=`whereis X 2> /dev/null`
-        field=`echo $WHEREIS | grep -s '/usr/X11R6/bin/X'`
+	if [ "$XVERSION" == "7.0.0" ]; then
+	  XPATH="/usr/bin/X"
+	else
+	  XPATH="/usr/X11R6/bin/X"
+	fi
+        field=`echo $WHEREIS | grep -s '$XPATH'`
         if [ $? -eq 0 ] ; then
+	  if [ "$XVERSION" == "7.0.0" ]; then
+	    XPATH="/usr"
+	  else
             XPATH="/usr/X11R6"
+	  fi
         else
             echo ""
             echo "Please enter the full path to your current X11R6 directory: "
-            echo "Example: /usr/X11R6"
+            echo "Example: /usr/X11R6 (for XFree86 and Xorg prior to 7.0.0)"
+	    echo "         /usr (for Xorg 7.0.0 and upwards)"
             read XPATH
         fi
     fi
@@ -131,69 +229,12 @@
     fi
 }
 
-function GetXVersion
-{
-    XVERSION=`X -version 2>&1 | grep -s "XFree86 Version" | cut -d" " -f3 | sed -e "s/\([^\.]*\.[^\.]*\.[^\.]*\)\.[^\.]*/\1/"`
-
-    if test -z $XVERSION ; then 
-        XVERSION=`X -version 2>&1 | grep -s "X Protocol Version" | sed -e "s/Revision[^0-9]*\([0-9]*\), Release[^0-9]*\([0-9.]*\)/\2\.\1/" | cut -d" " -f 5-`
-    fi
-        
-    export XVERSION
-
-    MAJOR=`echo $XVERSION | awk 'BEGIN {FS="."; } $1 != "" { print $1; }'`
-    MINOR=`echo $XVERSION | awk 'BEGIN {FS="."; } $2 != "" { print $2; }'`
-    PATCH=`echo $XVERSION | awk 'BEGIN {FS="."; } $3 != "" { print $3; }'`
-    export XVERSION_PATH=$MAJOR"_"$MINOR"_"$PATCH
-
-    if ! test -e ./xserver/$XVERSION_PATH ; then
-    	# HACK fix for SuSE 9.1
-    	if [ "$XVERSION" == "4.3.99" ]; then
-                XPRESENT=1
-                XVERSION="6.7.0"
-    	elif [ "$XVERSION" == "4.3.99.902" ]; then
-                XPRESENT=1
-                XVERSION="6.7.0"
-    	# HACK fix for Distros that use XFree86 4.4.0
-    	elif [ "$XVERSION" == "4.4.0" ]; then
-    	    XPRESENT=1
-            XVERSION="6.7.0"
-    	elif [ "$XVERSION" == "6.8.1.0" ]; then
-    	    XPRESENT=1
-            XVERSION="6.8.1"
-    	elif [ "$XVERSION" == "6.8.2.0" ]; then
-    	    XPRESENT=1
-            XVERSION="6.8.2"
-    	# HACK fix for Mandriva 2006
-    	elif [ "$XVERSION" == "6.8.99" ]; then
-    	    XPRESENT=1
-            XVERSION="6.8.2"
-    	elif [ "$XVERSION" == "6.8.99.900" ]; then
-    	    XPRESENT=1
-            XVERSION="6.8.2"
-    	elif [ "$XVERSION" == "6.8.99.900.0" ]; then
-    	    XPRESENT=1
-            XVERSION="6.8.2"
-	elif [ "$XVERSION" == "6.9.0" ]; then
-	    XPRESENT=1
-	    XVERSION="6.9.0"
-    	else
-                echo -e "$RED\033[1mERROR\033[0m: \033[1mThe X server drivers included in this installation package"
-                echo -e "       do not support the current version of your X server.\033[0m"
-        	    echo ""
-                exit 1
-    	fi
-    else
-        XPRESENT=1
-    fi
-}
-
 function SetXInstallPath
 {
     if [ "$XPRESENT"=="1" ]; then
         export XINSTALLDIR=$XPATH/$XLIBRARYPATH/modules/drivers
         if ! test -e $XINSTALLDIR ; then
-            echo -e "$RED\033[1mERROR\033[0m: \033[1mCould find X server driver install path.\033[0m"
+            echo -e "$RED\033[1mERROR\033[0m: \033[1mCould not find X server driver install path.\033[0m"
             echo ""
             exit 1
         fi
@@ -212,7 +253,7 @@
 
 function GetKernelPath
 {
-    KERNELMODULESDIR=/$XLIBRARYPATH/modules/$VERSION
+    KERNELMODULESDIR=/$KLIBRARYPATH/modules/$VERSION
 
     if ! test -e $KERNELMODULESDIR ; then
         echo -e "$RED\033[1mERROR\033[0m: \033[1mCould not find the kernel modules source code path."
@@ -849,7 +890,7 @@
     ALLGLFILES="libGL.so libGL.so.1 libGL.so.1.2.0 libGL.so.1.3.0"
     for i in ALLGLFILES
     do
-        FILES3="/usr/$XLIBRARYPATH/$i"
+        FILES3="/usr/$KLIBRARYPATH/$i"
         if test -e $FILES3 ; then
             (( index++ ))
             FILES1=`echo "$FILES3" | awk 'BEGIN {FS="libGL.so"}; $2 != "" {print $2;}'`
@@ -861,7 +902,7 @@
             echo "mv $index.$FILES2 $FILES3" >> $GLBACKUPDIR/restoregl.sh
         fi
 
-        FILES3="/usr/X11R6/$XLIBRARYPATH/$i"
+        FILES3="/usr/X11R6/$KLIBRARYPATH/$i"
         if test -e $FILES3 ; then
             (( index++ ))
             FILES1=`echo "$FILES3" | awk 'BEGIN {FS="libGL.so"}; $2 != "" {print $2;}'`
@@ -873,7 +914,7 @@
             echo "mv $index.$FILES2 $FILES3" >> $GLBACKUPDIR/restoregl.sh
         fi
 
-        FILES3="/usr/local/$XLIBRARYPATH/$i"
+        FILES3="/usr/local/$KLIBRARYPATH/$i"
         if test -e $FILES3 ; then
             (( index++ ))
             FILES1=`echo "$FILES3" | awk 'BEGIN {FS="libGL.so"}; $2 != "" {print $2;}'`
Binary files matroxdriver-1.4.3.4.orig/xserver/7_0_0/mtx_drv.o and matroxdriver-1.4.3.5/xserver/7_0_0/mtx_drv.o differ
Binary files matroxdriver-1.4.3.4.orig/xserver/7_0_0/mtx_drv.so and matroxdriver-1.4.3.5/xserver/7_0_0/mtx_drv.so differ

