diff options
Diffstat (limited to 'extra/mesa/PKGBUILD')
-rw-r--r-- | extra/mesa/PKGBUILD | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD index bb7e6c83f..1cba99cdf 100644 --- a/extra/mesa/PKGBUILD +++ b/extra/mesa/PKGBUILD @@ -4,6 +4,7 @@ pkgbase=mesa pkgname=('mesa' 'libgl' 'libglapi' 'libgles' 'libegl' 'khrplatform-devel' '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' 'libglapi' 'libgl' 'libgles') # prepare 7.12/8.0 #pkgname=('mesa' 'libgl' 'libglapi' 'libgles' 'libegl' 'ati-dri' 'intel-dri' 'nouveau-dri') # 'llvm-dri') @@ -18,9 +19,10 @@ if [ "${_git}" = "true" ]; then pkgver=7.11.1 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) @@ -33,12 +35,34 @@ if [ "${_git}" = "true" ]; then #source=(${source[@]} "MesaLib-git${_gitdate}.zip"::"http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-4464ee1a9aa3745109cee23531e3fb2323234d07.tar.bz2" ) fi -md5sums=('5c65a0fe315dd347e09b1f2826a1df5a' - 'a77307102cee844ff6544ffa8fafeac1') +[ "$CARCH" = "mips64el" ] && \ + source+=(mesa-7.5-mips-wmb.patch mesa-loongson.patch) build() { cd ${srcdir}/?esa-* + +if [ "$CARCH" = "mips64el" ]; then + # 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 + + configure=configure + if [ ! -f configure ]; then + autoreconf -vfi + configure=autogen.sh + fi + + ./${configure} --prefix=/usr \ + --enable-glx-tls \ + --with-driver=xlib \ + --enable-xcb \ + --disable-glut \ + --enable-gles1 \ + --enable-gles2 \ + --enable-egl \ + --disable-gallium-egl +else if [ "${_git}" = "true" ]; then autoreconf -vfi ./autogen.sh --prefix=/usr \ @@ -75,6 +99,7 @@ if [ "${_git}" = "true" ]; then --enable-texture-float \ --enable-shared-dricore fi +fi make } @@ -82,12 +107,15 @@ 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" 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/" @@ -97,6 +125,8 @@ package_libgl() { 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/" } @@ -172,7 +202,8 @@ package_khrplatform-devel() { } package_mesa() { - depends=('libgl' 'libx11>=1.4.3' 'libxt>=1.1.1' 'gcc-libs>=4.6' 'dri2proto>=2.6' 'glproto>=1.4.14') #dri2proto + glproto needed for gl.pc + depends=('libgl' 'libx11>=1.4.3' 'libxt>=1.1.1' 'gcc-libs>=4.6') +[ "$CARCH" = "mips64el" ] || depends+=('dri2proto>=2.6' 'glproto>=1.4.14') #dri2proto + glproto needed for gl.pc optdepends=('opengl-man-pages: for the OpenGL API man pages') pkgdesc="Mesa 3-D graphics libraries and include files" @@ -301,3 +332,11 @@ package_nouveau-dri() { # make -C ${srcdir}/Mesa-${pkgver}/src/gallium/targets/dri-nouveau DESTDIR="${pkgdir}" install #fi #} +md5sums=('5c65a0fe315dd347e09b1f2826a1df5a' + '774eb6f30b31fa08c04e16e00ca070e1' + 'c7788f2495060bf133771aef6ad25929' + '598c24dccfcdcc99c07d883f7c09f36a') +md5sums=('5c65a0fe315dd347e09b1f2826a1df5a' + 'a77307102cee844ff6544ffa8fafeac1' + 'c7788f2495060bf133771aef6ad25929' + '598c24dccfcdcc99c07d883f7c09f36a') |