summaryrefslogtreecommitdiff
path: root/extra/mesa/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mesa/PKGBUILD')
-rw-r--r--extra/mesa/PKGBUILD50
1 files changed, 41 insertions, 9 deletions
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD
index dfb6008fb..431a69083 100644
--- a/extra/mesa/PKGBUILD
+++ b/extra/mesa/PKGBUILD
@@ -3,7 +3,8 @@
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase=mesa
-pkgname=('mesa' 'libgl' 'libgles' 'libegl' 'ati-dri' 'intel-dri' 'unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri' 'nouveau-dri') # 'llvm-dri')
+pkgname=('mesa' 'libgl' 'libgles' 'libegl' 'ati-dri' 'intel-dri' 'unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri' 'nouveau-dri')
+[[ "$CARCH" = "mips64el" ]] && pkgname=('mesa' 'libgl' 'libgles' 'libegl')
#_git=true
_git=false
@@ -14,12 +15,14 @@ if [ "${_git}" = "true" ]; then
pkgver=7.10.3
fi
pkgrel=1
-arch=('i686' 'x86_64')
-makedepends=('glproto>=1.4.12' 'pkgconfig' 'libdrm>=2.4.25' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.3' 'libxt>=1.1.1'
- 'gcc-libs>=4.5' 'dri2proto=2.3' 'python2' 'libxml2' 'imake' 'llvm')
+arch=('i686' 'x86_64' 'mips64el')
+makedepends=('glproto>=1.4.12' 'pkgconfig' 'libdrm>=2.4.25' 'libxxf86vm>=1.1.1'
+ 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.3' 'libxt>=1.1.1'
+ 'gcc-libs>=4.5' 'dri2proto=2.3' 'python2' 'libxml2' 'imake')
+[[ "$CARCH" = "mips64el" ]] || makedepends+=('dri2proto=2.3' 'llvm')
url="http://mesa3d.sourceforge.net"
license=('custom')
-source=(LICENSE gnome-shell-shader-fix.patch nouveau-fix-header.patch)
+source=(LICENSE gnome-shell-shader-fix.patch nouveau-fix-header.patch mesa-7.5-mips-wmb.patch mesa-loongson.patch)
if [ "${_git}" = "true" ]; then
# mesa git shot from mastee (will become 7.11) branch - see for state: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a00dd974699e369b1eb292103fbde8bc6adfb87
source=(${source[@]} 'ftp://ftp.archlinux.org/other/mesa/mesa-9a00dd974699e369b1eb292103fbde8bc6adfb87.tar.bz2')
@@ -27,10 +30,6 @@ if [ "${_git}" = "true" ]; then
source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.zip"
)
fi
-md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
- '3ec78f340f9387abd7a37b195e764cbf'
- '67c87b77cc2236b52a3b47dad3fbb5d4'
- '614d063ecd170940d9ae7b355d365d59')
build() {
if [ "${_git}" = "true" ]; then
@@ -47,6 +46,22 @@ patch -Np1 -i "${srcdir}/gnome-shell-shader-fix.patch"
patch -Np1 -i "${srcdir}/nouveau-fix-header.patch"
fi
+ # WMB for MIPS patch from Fedora and Gentoo
+ patch -Np1 -i $srcdir/mesa-7.5-mips-wmb.patch
+ patch -Np1 -i $srcdir/mesa-loongson.patch
+
+if [ "$CARCH" = "mips64el" ]; then
+ ./configure --prefix=/usr \
+ --enable-glx-tls \
+ --with-driver=xlib \
+ --enable-xcb \
+ --with-state-trackers=glx \
+ --disable-glut \
+ --enable-gles1 \
+ --enable-gles2 \
+ --enable-egl \
+ --disable-gallium-egl
+else
if [ "${_git}" = "true" ]; then
./autogen.sh --prefix=/usr \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
@@ -89,6 +104,7 @@ if [ "${_git}" = "true" ]; then
--enable-egl \
--disable-gallium-egl
fi
+fi
make
}
@@ -96,6 +112,7 @@ fi
package_libgl() {
depends=('libdrm>=2.4.25' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1')
pkgdesc="Mesa 3-D graphics library and DRI software rasterizer"
+ [[ "$CARCH" = "mips64el" ]] && pkgdesc="Mesa 3-D graphics library (Xlib)"
if [ "${_git}" = "true" ]; then
cd ${srcdir}/mesa-*
@@ -107,6 +124,8 @@ fi
bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/"
+ if [ "$CARCH" != "mips64el" ]; then
+
cd src/mesa/drivers/dri
#make -C swrast DESTDIR="${pkgdir}" install
if [ "${_git}" = "true" ]; then
@@ -117,6 +136,8 @@ fi
ln -s swrastg_dri.so "${pkgdir}/usr/lib/xorg/modules/dri/swrast_dri.so"
ln -s libglx.xorg "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
+ fi
+
install -m755 -d "${pkgdir}/usr/share/licenses/libgl"
install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/libgl/"
}
@@ -375,3 +396,14 @@ fi
# make -C ${srcdir}/Mesa-${pkgver}/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install
#fi
#}
+md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
+ '3ec78f340f9387abd7a37b195e764cbf'
+ '67c87b77cc2236b52a3b47dad3fbb5d4'
+ 'c7788f2495060bf133771aef6ad25929'
+ '614d063ecd170940d9ae7b355d365d59')
+md5sums=('5c65a0fe315dd347e09b1f2826a1df5a'
+ '3ec78f340f9387abd7a37b195e764cbf'
+ '67c87b77cc2236b52a3b47dad3fbb5d4'
+ 'c7788f2495060bf133771aef6ad25929'
+ '598c24dccfcdcc99c07d883f7c09f36a'
+ '614d063ecd170940d9ae7b355d365d59')