summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-08-14 18:02:13 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-08-14 18:02:13 +0100
commita0a9a2c6dfea1d6cf0cfb7bed6bd866850198656 (patch)
treee103828eb6419b36534f8f666e307f463e9d1bdd /meta/packages
parentc57e2d63159bc2af7f6e72dd3a83fa02ad91fc04 (diff)
downloadpoky-a0a9a2c6dfea1d6cf0cfb7bed6bd866850198656.tar.gz
mesa: Update mesa-dri git recipe and add recipe for 7.5
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/mesa/mesa-dri/cross2.patch44
-rw-r--r--meta/packages/mesa/mesa-dri/crossfix.patch16
-rw-r--r--meta/packages/mesa/mesa-dri/i586/matypes.h162
-rw-r--r--meta/packages/mesa/mesa-dri_7.5.bb48
-rw-r--r--meta/packages/mesa/mesa-dri_git.bb23
5 files changed, 286 insertions, 7 deletions
diff --git a/meta/packages/mesa/mesa-dri/cross2.patch b/meta/packages/mesa/mesa-dri/cross2.patch
new file mode 100644
index 0000000000..3c62a469ed
--- /dev/null
+++ b/meta/packages/mesa/mesa-dri/cross2.patch
@@ -0,0 +1,44 @@
1Index: git/configure.ac
2===================================================================
3--- git.orig/configure.ac 2009-08-14 16:16:23.000000000 +0100
4+++ git/configure.ac 2009-08-14 16:17:27.000000000 +0100
5@@ -268,15 +268,6 @@
6 GLAPI_ASM_SOURCES=""
7 AC_MSG_CHECKING([whether to enable assembly])
8 test "x$enable_asm" = xno && AC_MSG_RESULT([no])
9-# disable if cross compiling on x86/x86_64 since we must run gen_matypes
10-if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
11- case "$host_cpu" in
12- i?86 | x86_64)
13- enable_asm=no
14- AC_MSG_RESULT([no, cross compiling])
15- ;;
16- esac
17-fi
18 # check for supported arches
19 if test "x$enable_asm" = xyes; then
20 case "$host_cpu" in
21Index: git/src/mesa/x86/Makefile
22===================================================================
23--- git.orig/src/mesa/x86/Makefile 2009-08-14 16:18:23.000000000 +0100
24+++ git/src/mesa/x86/Makefile 2009-08-14 16:19:10.000000000 +0100
25@@ -14,19 +14,6 @@
26 -I../tnl
27
28
29-default: gen_matypes matypes.h
30-
31-clean:
32- -rm -f matypes.h gen_matypes
33-
34-
35-gen_matypes: gen_matypes.c
36- $(HOST_CC) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
37-
38-# need some special rules here, unfortunately
39-matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
40- ./gen_matypes > matypes.h
41-
42 common_x86_asm.o: matypes.h
43 3dnow_normal.o: matypes.h
44 3dnow_xform1.o: matypes.h
diff --git a/meta/packages/mesa/mesa-dri/crossfix.patch b/meta/packages/mesa/mesa-dri/crossfix.patch
new file mode 100644
index 0000000000..84be428c4f
--- /dev/null
+++ b/meta/packages/mesa/mesa-dri/crossfix.patch
@@ -0,0 +1,16 @@
1Index: Mesa-7.5/bin/mklib
2===================================================================
3--- Mesa-7.5.orig/bin/mklib 2009-08-12 13:01:34.000000000 +0100
4+++ Mesa-7.5/bin/mklib 2009-08-12 13:04:19.000000000 +0100
5@@ -234,9 +234,9 @@
6 if [ "x$LINK" = "x" ] ; then
7 # -linker was not specified so set default link command now
8 if [ $CPLUSPLUS = 1 ] ; then
9- LINK=g++
10+ LINK=$CXX
11 else
12- LINK=gcc
13+ LINK=$CC
14 fi
15 fi
16
diff --git a/meta/packages/mesa/mesa-dri/i586/matypes.h b/meta/packages/mesa/mesa-dri/i586/matypes.h
new file mode 100644
index 0000000000..98d2188e75
--- /dev/null
+++ b/meta/packages/mesa/mesa-dri/i586/matypes.h
@@ -0,0 +1,162 @@
1/*
2 * This file is automatically generated from the Mesa internal type
3 * definitions. Do not edit directly.
4 */
5
6#ifndef __ASM_TYPES_H__
7#define __ASM_TYPES_H__
8
9
10
11/* =============================================================
12 * Offsets for GLcontext
13 */
14
15#define CTX_DRIVER_CTX 996
16
17#define CTX_LIGHT_ENABLED 39404
18#define CTX_LIGHT_SHADE_MODEL 39408
19#define CTX_LIGHT_COLOR_MAT_FACE 39412
20#define CTX_LIGHT_COLOR_MAT_MODE 39416
21#define CTX_LIGHT_COLOR_MAT_MASK 39420
22#define CTX_LIGHT_COLOR_MAT_ENABLED 39424
23#define CTX_LIGHT_ENABLED_LIST 39432
24#define CTX_LIGHT_NEED_VERTS 43793
25#define CTX_LIGHT_FLAGS 43796
26#define CTX_LIGHT_BASE_COLOR 43800
27
28
29/* =============================================================
30 * Offsets for struct vertex_buffer
31 */
32
33#define VB_SIZE 0
34#define VB_COUNT 4
35
36#define VB_ELTS 8
37#define VB_OBJ_PTR 12
38#define VB_EYE_PTR 16
39#define VB_CLIP_PTR 20
40#define VB_PROJ_CLIP_PTR 24
41#define VB_CLIP_OR_MASK 28
42#define VB_CLIP_MASK 32
43#define VB_NORMAL_PTR 36
44#define VB_EDGE_FLAG 44
45#define VB_TEX0_COORD_PTR 48
46#define VB_TEX1_COORD_PTR 52
47#define VB_TEX2_COORD_PTR 56
48#define VB_TEX3_COORD_PTR 60
49#define VB_INDEX_PTR 80
50#define VB_COLOR_PTR 88
51#define VB_SECONDARY_COLOR_PTR 96
52#define VB_FOG_COORD_PTR 104
53#define VB_PRIMITIVE 108
54
55
56/*
57 * Flags for struct vertex_buffer
58 */
59
60#define VERT_BIT_OBJ 0x1
61#define VERT_BIT_NORM 0x4
62#define VERT_BIT_RGBA 0x8
63#define VERT_BIT_SPEC_RGB 0x10
64#define VERT_BIT_FOG_COORD 0x20
65#define VERT_BIT_TEX0 0x100
66#define VERT_BIT_TEX1 0x200
67#define VERT_BIT_TEX2 0x400
68#define VERT_BIT_TEX3 0x800
69
70
71/* =============================================================
72 * Offsets for GLvector4f
73 */
74
75#define V4F_DATA 0
76#define V4F_START 4
77#define V4F_COUNT 8
78#define V4F_STRIDE 12
79#define V4F_SIZE 16
80#define V4F_FLAGS 20
81
82/*
83 * Flags for GLvector4f
84 */
85
86#define VEC_MALLOC 0x10
87#define VEC_NOT_WRITEABLE 0x40
88#define VEC_BAD_STRIDE 0x100
89
90#define VEC_SIZE_1 0x1
91#define VEC_SIZE_2 0x3
92#define VEC_SIZE_3 0x7
93#define VEC_SIZE_4 0xf
94
95
96/* =============================================================
97 * Offsets for GLmatrix
98 */
99
100#define MATRIX_DATA 0
101#define MATRIX_INV 4
102#define MATRIX_FLAGS 8
103#define MATRIX_TYPE 12
104
105
106/* =============================================================
107 * Offsets for struct gl_light
108 */
109
110#define LIGHT_NEXT 0
111#define LIGHT_PREV 4
112
113#define LIGHT_AMBIENT 8
114#define LIGHT_DIFFUSE 24
115#define LIGHT_SPECULAR 40
116#define LIGHT_EYE_POSITION 56
117#define LIGHT_SPOT_DIRECTION 72
118#define LIGHT_SPOT_EXPONENT 88
119#define LIGHT_SPOT_CUTOFF 92
120#define LIGHT_COS_CUTOFF 100
121#define LIGHT_CONST_ATTEN 104
122#define LIGHT_LINEAR_ATTEN 108
123#define LIGHT_QUADRATIC_ATTEN 112
124#define LIGHT_ENABLED 116
125
126#define LIGHT_FLAGS 120
127
128#define LIGHT_POSITION 124
129#define LIGHT_VP_INF_NORM 140
130#define LIGHT_H_INF_NORM 152
131#define LIGHT_NORM_DIRECTION 164
132#define LIGHT_VP_INF_SPOT_ATTEN 180
133
134#define LIGHT_SPOT_EXP_TABLE 184
135#define LIGHT_MAT_AMBIENT 4280
136#define LIGHT_MAT_DIFFUSE 4304
137#define LIGHT_MAT_SPECULAR 4328
138
139#define SIZEOF_GL_LIGHT 4360
140
141/*
142 * Flags for struct gl_light
143 */
144
145#define LIGHT_SPOT 0x1
146#define LIGHT_LOCAL_VIEWER 0x2
147#define LIGHT_POSITIONAL 0x4
148
149#define LIGHT_NEED_VERTICES 0x6
150
151
152/* =============================================================
153 * Offsets for struct gl_lightmodel
154 */
155
156#define LIGHT_MODEL_AMBIENT 0
157#define LIGHT_MODEL_LOCAL_VIEWER 16
158#define LIGHT_MODEL_TWO_SIDE 17
159#define LIGHT_MODEL_COLOR_CONTROL 20
160
161
162#endif /* __ASM_TYPES_H__ */
diff --git a/meta/packages/mesa/mesa-dri_7.5.bb b/meta/packages/mesa/mesa-dri_7.5.bb
new file mode 100644
index 0000000000..8b5fa7bc92
--- /dev/null
+++ b/meta/packages/mesa/mesa-dri_7.5.bb
@@ -0,0 +1,48 @@
1include mesa-common.inc
2
3SRC_URI += "file://crossfix.patch;patch=1 \
4 file://mesa-DRI2Swapbuffer.patch;patch=1 "
5
6PROTO_DEPS = "xf86driproto glproto dri2proto"
7LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat"
8
9DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}"
10
11PR = "r10"
12
13# most of our targets do not have DRI so will use mesa-xlib
14DEFAULT_PREFERENCE = "-1"
15
16# Netbooks have DRI support so use mesa-dri by default
17DEFAULT_PREFERENCE_netbook = "1"
18
19PACKAGES =+ "${PN}-xprogs"
20PACKAGES_DYNAMIC = "mesa-dri-driver-*"
21
22FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
23FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo"
24
25LEAD_SONAME = "libGL.so.1"
26
27EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium"
28
29do_install_append () {
30 install -d ${D}/usr/bin
31 install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/
32}
33
34python populate_packages_prepend() {
35 import os.path
36
37 dri_drivers_root = os.path.join(bb.data.getVar('libdir', d, 1), "dri")
38
39 do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='')
40}
41
42COMPATIBLE_HOST = '(i.86.*-linux)'
43
44
45#
46# Header generated by i586-poky-linux-gcc gen_matypes.c -o gen_matypes -I ../../../include/GL -I ../../../include -I .. -I ../main/ -I ../math -I ../glapi/ -I ../tnl
47# then run gen_matypes > matypes.h on device
48# \ No newline at end of file
diff --git a/meta/packages/mesa/mesa-dri_git.bb b/meta/packages/mesa/mesa-dri_git.bb
index 65a4a03656..a316d580e4 100644
--- a/meta/packages/mesa/mesa-dri_git.bb
+++ b/meta/packages/mesa/mesa-dri_git.bb
@@ -1,12 +1,18 @@
1include mesa-common.inc 1include mesa-common.inc
2 2
3SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git;branch=mesa_7_5_branch \
4 file://cross2.patch;patch=1 \
5 file://matypes.h"
6# file://mesa-DRI2Swapbuffer.patch;patch=1 "
7S = "${WORKDIR}/git"
8
3PROTO_DEPS = "xf86driproto glproto dri2proto" 9PROTO_DEPS = "xf86driproto glproto dri2proto"
4LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat" 10LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat"
5 11
6DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" 12DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}"
7 13
8PV = "7.4+git${SRCPV}" 14PV = "7.5+git${SRCPV}"
9PR = "r4" 15PR = "r14"
10 16
11# most of our targets do not have DRI so will use mesa-xlib 17# most of our targets do not have DRI so will use mesa-xlib
12DEFAULT_PREFERENCE = "-1" 18DEFAULT_PREFERENCE = "-1"
@@ -14,21 +20,24 @@ DEFAULT_PREFERENCE = "-1"
14# Netbooks have DRI support so use mesa-dri by default 20# Netbooks have DRI support so use mesa-dri by default
15DEFAULT_PREFERENCE_netbook = "1" 21DEFAULT_PREFERENCE_netbook = "1"
16 22
17SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git;branch=master"
18S = "${WORKDIR}/git"
19
20PACKAGES =+ "${PN}-xprogs" 23PACKAGES =+ "${PN}-xprogs"
21PACKAGES_DYNAMIC = "mesa-dri-driver-*" 24PACKAGES_DYNAMIC = "mesa-dri-driver-*"
22 25
23FILES_${PN}-dbg += "${libdir}/dri/.debug/*" 26FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
24FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" 27FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo"
25 28
26EXTRA_OECONF += "--with-driver=dri --with-state-trackers=glx" 29LEAD_SONAME = "libGL.so.1"
30
31EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium"
32
33do_configure_prepend () {
34 cp ${WORKDIR}/matypes.h ${S}/src/mesa/x86
35 touch ${S}/src/mesa/x86/matypes.h
36}
27 37
28do_install_append () { 38do_install_append () {
29 install -d ${D}/usr/bin 39 install -d ${D}/usr/bin
30 install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/ 40 install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/
31 rm ${D}/usr/lib/libEGL* || /bin/true
32} 41}
33 42
34python populate_packages_prepend() { 43python populate_packages_prepend() {