# Maintainer: Natanael Copa pkgname=mesa pkgver=7.4.1 pkgrel=2 pkgdesc="Mesa DRI OpenGL library and drivers" url="http://www.mesa3d.org" license="LGPL" depends="libdrm libxxf86vm libxdamage expat libx11" subpackages="$pkgname-dev" makedepends="pkgconfig libdrm-dev libxxf86vm-dev libxdamage-dev expat-dev dri2proto xextproto libx11-dev glproto" source="http://downloads.sourceforge.net/mesa3d/MesaLib-$pkgver.tar.bz2 mesa-7.1-link-shared.patch mesa-7.4-parallel.patch" depends_dev="libdrm-dev dri2proto libx11-dev libxext-dev libxxf86vm-dev libxdamage-dev libxfixes-dev libxcb-dev" build () { cd "$srcdir"/Mesa-$pkgver for i in ../*.patch; do msg "Applying $i..." patch -p1 -i $i || return 1 done ${CC:-gcc} -dumpspecs | sed 's/%(link_now)//g' > "$srcdir"/gcc-specs export GCC_SPECS="$srcdir"/gcc-specs ./configure --prefix=/usr \ --with-dri-driverdir=/usr/lib/xorg/modules/dri \ --with-dri-drivers=swrast \ --disable-asm \ --enable-glx-tls \ --disable-ttm-api \ --with-driver=dri \ --enable-xcb \ --disable-glu \ --disable-glut \ --disable-glw || return 1 make || return 1 make -j1 DESTDIR="$pkgdir" install || return 1 install -m755 -d "$pkgdir"/usr/lib/xorg/modules/extensions ln -sf libglx.xorg "$pkgdir"/usr/lib/xorg/modules/extensions/libglx.so || return 1 } md5sums="423260578b653818ba66c2fcbde6d7ad MesaLib-7.4.1.tar.bz2 f0baa948d9810f268413111ee439d24b mesa-7.1-link-shared.patch 75e1bb69f384e9d60544fa03c15cc0ec mesa-7.4-parallel.patch"