summaryrefslogtreecommitdiffstats
path: root/xorg/mesa3d/Pkgfile
blob: a776d7873e60293ecd00ce8341be6b9f6e45dfb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Description: Librairie graphique 3D Mesa
# URL: http://www.mesa3d.org
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: talloc, expat, libdrm, xorg-makedepend, xorg-glproto, xorg-xextproto, xorg-dri2proto, xorg-libx11, xorg-libxext, xorg-libxxf86vm, xorg-libxt, xorg-libxdamage
# Run on: talloc,expat,libdrm,xorg-makedepend,xorg-libx11,xorg-libxext,xorg-libxxf86vm,xorg-libxt,xorg-libxdamage

name=mesa3d
version=7.10.3
release=1
source=(http://nutyx.meticul.eu/files/MesaLib-$version.tar.gz)

build() {
	cd Mesa-$version

	sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
               -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find $SRC -name '*.py')

	sed -i -e "s|PYTHON2 = python|PYTHON2 = python2|" $SRC/Mesa-$version/configs/{default,autoconf.in}

	sed -i -e "s|python|python2|" $SRC/Mesa-$version/src/gallium/auxiliary/Makefile

	./configure $XORG_CONFIG \
	            --enable-xcb
  	make

	# mesa
	make DESTDIR=$PKG install

	# libgl	
	cd $SRC/Mesa-*
  	bin/minstall lib/lib* $PKG/usr/lib/

	case `uname -m` in
		x86_64)
		install -m755 -d $PKG/$XORG_PREFIX/lib64
        	install -m755 -d $PKG/$XORG_PREFIX/lib64/X11/modules/extensions
        	bin/minstall lib/lib* $PKG/usr/lib64/
	esac

	cd src/mesa/drivers/dri
	make -C swrast DESTDIR=$PKG install
	case `uname -m` in
                x86_64)
			rm $PKG/usr/lib{,64}/libGL.*;;
		i?86)
			rm $PKG/usr/lib/libGL.*;;
	esac

}