summaryrefslogtreecommitdiff
path: root/extra/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mesa')
-rw-r--r--extra/mesa/PKGBUILD22
-rw-r--r--extra/mesa/mesa-loongson.patch11
2 files changed, 28 insertions, 5 deletions
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD
index 96a771563..eba327774 100644
--- a/extra/mesa/PKGBUILD
+++ b/extra/mesa/PKGBUILD
@@ -3,12 +3,16 @@
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase=mesa
-pkgname=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri' 'mesa' 'mesa-libgl')
+pkgname=('mesa' 'mesa-libgl')
pkgver=9.2.2
pkgrel=1
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
makedepends=('python2' 'libxml2' 'libx11' 'glproto' 'libdrm' 'dri2proto' 'libxxf86vm' 'libxdamage'
- 'libvdpau' 'wayland' 'elfutils' 'llvm' 'systemd')
+ 'wayland' 'elfutils' 'llvm' 'systemd')
+if [ "$CARCH" != "mips64el" ]; then
+ pkgname+=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri')
+ makedepends+=('libvdpau' 'llvm-amdgpu-snapshot')
+fi
url="http://mesa3d.sourceforge.net"
license=('custom')
source=(ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2
@@ -19,7 +23,13 @@ md5sums=('20887f8020db7d1736a01ae9cd5d8c38'
build() {
cd ${srcdir}/?esa-*
- autoreconf -vfi # our automake is far too new for their build system :)
+ if [ "$CARCH" = "mips64el" ]; then
+ extraconf="--with-gallium-drivers=swrast --with-dri-drivers=swrast --disable-gallium-llvm --disable-vdpau"
+ else
+ extraconf=""
+ fi
+
+ autoreconf -vfi # our automake is far too new for their build system :)
./configure --prefix=/usr \
--sysconfdir=/etc \
@@ -42,6 +52,7 @@ build() {
--enable-texture-float \
--enable-xa \
--enable-vdpau \
+ $extraconf
# --help
make
@@ -119,11 +130,12 @@ package_svga-dri() {
package_mesa() {
pkgdesc="an open-source implementation of the OpenGL specification"
- depends=('libdrm' 'libvdpau' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 'elfutils' 'llvm-libs')
+ depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'systemd' 'elfutils' 'llvm-libs')
optdepends=('opengl-man-pages: for the OpenGL API man pages')
provides=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
conflicts=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
replaces=('libglapi' 'osmesa' 'libgbm' 'libgles' 'libegl' 'khrplatform-devel')
+ [ "$CARCH" != "mips64el" ] && depends+=('libvdpau')
mv -v ${srcdir}/fakeinstall/* ${pkgdir}
# rename libgl.so to not conflict with blobs - may break gl.pc ?
diff --git a/extra/mesa/mesa-loongson.patch b/extra/mesa/mesa-loongson.patch
new file mode 100644
index 000000000..fa82abe49
--- /dev/null
+++ b/extra/mesa/mesa-loongson.patch
@@ -0,0 +1,11 @@
+--- Mesa-6.5.2/include/GL/internal/sarea.h.orig 2007-03-01 05:27:22.000000000 +0800
++++ Mesa-6.5.2/include/GL/internal/sarea.h 2007-03-01 05:27:49.000000000 +0800
+@@ -44,6 +44,8 @@
+ /* SAREA area needs to be at least a page */
+ #if defined(__alpha__)
+ #define SAREA_MAX 0x2000
++#elif defined(__mips__)
++#define SAREA_MAX 0x4000
+ #elif defined(__ia64__)
+ #define SAREA_MAX 0x10000 /* 64kB */
+ #else