From 7e2248e49a59e844d86f13e003915cd00d8de4fb Mon Sep 17 00:00:00 2001
From: Michael Hanson <hansonorders@verizon.net>
Date: Mon, 15 Nov 2010 22:22:42 +0000
Subject: mesa: recompile for libx11 and add python2 patch

---
 abs/core/mesa/PKGBUILD      | 23 ++++++++++++++---------
 abs/core/mesa/python2.patch | 25 +++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 9 deletions(-)
 create mode 100644 abs/core/mesa/python2.patch

diff --git a/abs/core/mesa/PKGBUILD b/abs/core/mesa/PKGBUILD
index a731cb1..0486a8f 100644
--- a/abs/core/mesa/PKGBUILD
+++ b/abs/core/mesa/PKGBUILD
@@ -4,9 +4,9 @@
 pkgbase=mesa
 pkgname=('mesa' 'libgl' 'ati-dri' 'intel-dri' 'unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri' 'nouveau-dri')
 pkgver=7.8.2
-pkgrel=1
-arch=(i686 x86_64)
-makedepends=('glproto>=1.4.11' 'pkgconfig' 'libdrm>=2.4.21' 'libxxf86vm>=1.1.0' 'libxdamage>=1.1.2' 'expat>=2.0.1' 'libx11>=1.3.3' 'libxt>=1.0.8' 'gcc-libs>=4.5' 'dri2proto=2.3' 'python')
+pkgrel=2
+arch=('i686' 'x86_64')
+makedepends=('glproto>=1.4.11' 'pkgconfig' 'libdrm>=2.4.21' 'libxxf86vm>=1.1.0' 'libxdamage>=1.1.2' 'expat>=2.0.1' 'libx11>=1.3.3' 'libxt>=1.0.8' 'gcc-libs>=4.5' 'dri2proto=2.3' 'python2')
 url="http://mesa3d.sourceforge.net"
 license=('custom')
 #options=(!makeflags)
@@ -14,16 +14,15 @@ source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
         ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaDemos-${pkgver}.tar.bz2
         ftp://ftp.archlinux.org/other/mesa/gl-manpages-1.0.1.tar.bz2
         nouveau_class.h
-        LICENSE)
-md5sums=('6be2d343a0089bfd395ce02aaf8adb57'
-         '757d9e2e06f48b1a52848be9b0307ced'
-         '6ae05158e678f4594343f32c2ca50515'
-         '850546127f5185959407a78b55f898d8'
-         '5c65a0fe315dd347e09b1f2826a1df5a')
+        LICENSE
+        python2.patch)
 
 build() {
   cd "${srcdir}/Mesa-${pkgver}"
   cp "${srcdir}/nouveau_class.h" "src/gallium/drivers/nouveau/" || return 1
+# patch for python2
+  patch -Np0 < ${srcdir}/python2.patch || return 1
+
   ./configure --prefix=/usr \
     --with-dri-driverdir=/usr/lib/xorg/modules/dri \
     --with-dri-drivers=swrast,radeon,r200,r300,r600,i810,i915,i965,unichrome,mach64,mga,r128,savage,sis,tdfx \
@@ -174,3 +173,9 @@ package_nouveau-dri() {
   cd "${srcdir}/Mesa-${pkgver}/src/gallium/winsys/drm/nouveau/dri"
   make DESTDIR="${pkgdir}" install || return 1
 }
+md5sums=('6be2d343a0089bfd395ce02aaf8adb57'
+         '757d9e2e06f48b1a52848be9b0307ced'
+         '6ae05158e678f4594343f32c2ca50515'
+         '850546127f5185959407a78b55f898d8'
+         '5c65a0fe315dd347e09b1f2826a1df5a'
+         '95aa06928f2263e4309a845b1c28d8e9')
diff --git a/abs/core/mesa/python2.patch b/abs/core/mesa/python2.patch
new file mode 100644
index 0000000..0fe22ed
--- /dev/null
+++ b/abs/core/mesa/python2.patch
@@ -0,0 +1,25 @@
+--- src/gallium/auxiliary/Makefile.orig	2010-11-15 21:12:40.000000000 +0000
++++ src/gallium/auxiliary/Makefile	2010-11-15 21:13:09.000000000 +0000
+@@ -183,17 +183,17 @@
+ 
+ 
+ indices/u_indices_gen.c: indices/u_indices_gen.py
+-	python $< > $@
++	python2 $< > $@
+ 
+ indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
+-	python $< > $@
++	python2 $< > $@
+ 
+ util/u_format_table.c: util/u_format_table.py util/u_format_parse.py util/u_format.csv
+-	python util/u_format_table.py util/u_format.csv > $@
++	python2 util/u_format_table.py util/u_format.csv > $@
+ 
+ util/u_format_pack.h: util/u_format_pack.py util/u_format_parse.py util/u_format.csv
+-	python util/u_format_pack.py util/u_format.csv > $@
++	python2 util/u_format_pack.py util/u_format.csv > $@
+ 
+ util/u_format_access.c: util/u_format_access.py util/u_format_parse.py util/u_format.csv
+-	python util/u_format_access.py util/u_format.csv > $@
++	python2 util/u_format_access.py util/u_format.csv > $@
+ 
-- 
cgit v0.12