diff options
Diffstat (limited to 'extra/mesa/PKGBUILD')
-rw-r--r-- | extra/mesa/PKGBUILD | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD index 588ad4c7f..7dbd1da55 100644 --- a/extra/mesa/PKGBUILD +++ b/extra/mesa/PKGBUILD @@ -3,7 +3,8 @@ # Maintainer: Andreas Radke <andyrtr@archlinux.org> pkgbase=mesa -pkgname=('mesa' 'libgl' 'osmesa' 'libglapi' 'libgles' 'libegl' 'khrplatform-devel' 'ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri') +pkgname=('mesa' 'libgl' 'osmesa' 'libglapi' 'libgles' 'libegl' 'khrplatform-devel') +[[ "$CARCH" != "mips64el" ]] && pkgname+=('ati-dri' 'intel-dri' 'nouveau-dri' 'svga-dri') #_git=true _gitdate=20111031 @@ -16,9 +17,10 @@ if [ "${_git}" = "true" ]; then pkgver=8.0.2 fi pkgrel=1 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') makedepends=('glproto>=1.4.15' 'libdrm>=2.4.30' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.99.1' 'libxt>=1.1.1' - 'gcc-libs>=4.6.1' 'dri2proto>=2.6' 'python2' 'libxml2' 'imake' 'llvm' 'udev') + 'gcc-libs>=4.6.1' 'python2' 'libxml2' 'imake' 'udev' 'dri2proto>=2.6') +[[ "$CARCH" != "mips64el" ]] && makedepends+=('llvm') url="http://mesa3d.sourceforge.net" license=('custom') source=(LICENSE) @@ -32,21 +34,28 @@ if [ "${_git}" = "true" ]; then #source=(${source[@]} "MesaLib-git${_gitdate}.zip"::"http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-4464ee1a9aa3745109cee23531e3fb2323234d07.tar.bz2" ) fi +source+=(mesa-loongson.patch) md5sums=('5c65a0fe315dd347e09b1f2826a1df5a' + '24eeebf66971809d8f40775a379b36c9' + '598c24dccfcdcc99c07d883f7c09f36a' 'a368104e5700707048dc3e8691a9a7a1') build() { cd ${srcdir}/?esa-* + if [ "$CARCH" = "mips64el" ]; then + extraconf="--with-gallium-drivers=swrast" + else + extraconf="--with-gallium-drivers=r300,r600,nouveau,svga,swrast --enable-gallium-llvm --enable-dri --enable-shared-dricore" + fi + + patch -Np1 -i $srcdir/mesa-loongson.patch if [ "${_git}" = "true" ]; then autoreconf -vfi ./autogen.sh --prefix=/usr \ --with-dri-driverdir=/usr/lib/xorg/modules/dri \ - --with-gallium-drivers=r300,r600,nouveau,svga,swrast \ - --enable-gallium-llvm \ --enable-gallium-egl --enable-shared-glapi\ --enable-glx-tls \ - --enable-dri \ --enable-glx \ --enable-osmesa \ --enable-gles1 \ @@ -54,7 +63,7 @@ if [ "${_git}" = "true" ]; then --enable-egl \ --enable-texture-float \ --enable-xa \ - --enable-shared-dricore + $extraconf # --enable-gallium-svga \ @@ -62,11 +71,8 @@ if [ "${_git}" = "true" ]; then autoreconf -vfi ./configure --prefix=/usr \ --with-dri-driverdir=/usr/lib/xorg/modules/dri \ - --with-gallium-drivers=r300,r600,nouveau,svga,swrast \ - --enable-gallium-llvm \ --enable-gallium-egl --enable-shared-glapi\ --enable-glx-tls \ - --enable-dri \ --enable-glx \ --enable-osmesa \ --enable-gles1 \ @@ -74,22 +80,25 @@ if [ "${_git}" = "true" ]; then --enable-egl \ --enable-texture-float \ --enable-xa \ - --enable-shared-dricore + $extraconf fi make } package_libgl() { - depends=('libdrm>=2.4.31' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libglapi' 'gcc-libs') + depends=('libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libglapi' 'gcc-libs') pkgdesc="Mesa 3-D graphics library and DRI software rasterizer" - #replaces=('unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri') +# replaces=('unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri') + [[ "$CARCH" != "mips64el" ]] && depends+=('libdrm>=2.4.31') cd ${srcdir}/?esa-* install -m755 -d "${pkgdir}/usr/lib" install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions" bin/minstall lib/libGL.so* "${pkgdir}/usr/lib/" + + if [ "$CARCH" != "mips64el" ]; then bin/minstall lib/libdricore.so* "${pkgdir}/usr/lib/" bin/minstall lib/libglsl.so* "${pkgdir}/usr/lib/" @@ -98,6 +107,8 @@ package_libgl() { 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/" } |