diff options
Diffstat (limited to 'extra/mesa/PKGBUILD')
-rw-r--r-- | extra/mesa/PKGBUILD | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD index dbc313875..0e5fa22f6 100644 --- a/extra/mesa/PKGBUILD +++ b/extra/mesa/PKGBUILD @@ -4,6 +4,7 @@ pkgbase=mesa pkgname=('mesa' 'libgl' 'libglapi' 'libgles' 'libegl' 'ati-dri' 'intel-dri' 'unichrome-dri' 'mach64-dri' 'mga-dri' 'r128-dri' 'savage-dri' 'sis-dri' 'tdfx-dri' 'nouveau-dri') # 'llvm-dri') +[[ "$CARCH" = "mips64el" ]] && pkgname=('mesa' 'libgl' 'libgles' 'libegl') #_git=true _git=false @@ -15,9 +16,10 @@ if [ "${_git}" = "true" ]; then pkgver=7.11 fi pkgrel=1 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') makedepends=('glproto>=1.4.14' 'libdrm>=2.4.26' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.3' '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') +[[ "$CARCH" = "mips64el" ]] || makedepends+=('dri2proto=2.6' 'llvm') url="http://mesa3d.sourceforge.net" license=('custom') source=(LICENSE) @@ -29,12 +31,26 @@ if [ "${_git}" = "true" ]; then source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2" ) fi -md5sums=('5c65a0fe315dd347e09b1f2826a1df5a' - 'ff03aca82d0560009a076a87c888cf13') build() { cd ${srcdir}/?esa-* + # 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 autoreconf -vfi ./autogen.sh --prefix=/usr \ @@ -71,6 +87,7 @@ if [ "${_git}" = "true" ]; then --enable-texture-float \ --enable-shared-dricore fi +fi make } @@ -78,6 +95,7 @@ fi package_libgl() { depends=('libdrm>=2.4.26' '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" + [[ "$CARCH" = "mips64el" ]] && pkgdesc="Mesa 3-D graphics library (Xlib)" cd ${srcdir}/?esa-* install -m755 -d "${pkgdir}/usr/lib" @@ -87,6 +105,8 @@ package_libgl() { bin/minstall lib/libdricore.so* "${pkgdir}/usr/lib/" bin/minstall lib/libglsl.so* "${pkgdir}/usr/lib/" + if [ "$CARCH" != "mips64el" ]; then + cd src/mesa/drivers/dri #make -C swrast DESTDIR="${pkgdir}" install if [ "${_git}" = "true" ]; then @@ -97,6 +117,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/" } |