summaryrefslogtreecommitdiffstats
path: root/mesa3d/Pkgfile
blob: 5f3cd2b6ef38236d1739ad2723561c5b14de2c1b (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Description: Bibliothèque graphique 3D Mesa
# URL: http://www.mesa3d.org
# Maintainer: cgit.freedesktop.org/mesa/mesa/
# 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, xorg-libxmu, xorg-libxi, llvm, xorg-libxvmc, libvdpau
# Run on: talloc,expat,libdrm,xorg-makedepend,xorg-libx11,xorg-libxext,xorg-libxxf86vm,xorg-libxt,xorg-libxdamage,xorg-libxmu,xorg-libxi,xorg-libxvmc,libvdpau

name=mesa3d
version=8.0.99
release=284325d9-1
#source=(ftp://ftp.freedesktop.org/pub/mesa/$version/MesaLib-$version.tar.bz2)
source=(http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-${release%-*}.tar.gz)

build() {
	cd mesa-${release%-*}
	./autogen.sh

	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|" configs/{default,current.in}
	sed -i -e "s|python|python2|" src/gallium/auxiliary/Makefile

	sed -i 's|$(LLVM_LIBS)|$(LLVM_LIBS) $(LLVM_LDFLAGS)|'  src/gallium/tests/trivial/Makefile
#	sed -i 's|$(LLVM_LIBS)|$(LLVM_LIBS) $(LLVM_LDFLAGS)|' src/gallium/targets/opencl/Makefile.am

	./configure $XORG_CONFIG \
		--enable-opengl \
		--enable-gles1 \
		--enable-gles2 \
		--enable-openvg \
		--enable-dri \
		--enable-glx \
		--enable-osmesa \
		--enable-egl \
		--disable-xorg \
		--enable-xa \
		--enable-gbm \
		--enable-xvmc \
		--enable-vdpau \
		--disable-va \
		--enable-opencl \
		--disable-xlib-glx \
		--enable-gallium-egl \
		--enable-gallium-gbm \
		--enable-r600-llvm-compiler \
		--enable-gallium-tests \
		--enable-shared-glapi \
		--enable-driglx-direct \
		--enable-glx-tls \
		--enable-gallium-g3dvl \
		--enable-glu \
		--enable-gallium-llvm \
		--with-gallium-drivers="i915,nouveau,r300,r600,swrast,svga"  \
		--with-dri-driverdir=$XORG_PREFIX/lib/dri \
		--with-dri-drivers="i915,i965,intel,nouveau,r200,radeon,swrast" \
		--with-clang-libdir=/usr/lib
#		--enable-d3d1x
#		--with-dri-drivers="i915,i965,intel,nouveau,r200,radeon,swrast"
#		--with-gallium-drivers="i915,nouveau,r300,r600,radeonsi,svga"
	make

	# mesa
	make DESTDIR=$PKG install

	cp src/mesa/gl.pc $PKG/usr/lib/pkgconfig

	# libgl
	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

}