summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-10-13 10:48:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-14 13:18:11 +0100
commit303df74a95aee01eac2cc942fee6e6a755a99b24 (patch)
tree4561f4b9e28e28b88490dcffd2e92ef1a5c9dff5
parentd7761be8ab9c19f75731e6fbbade22b3643d048e (diff)
downloadpoky-303df74a95aee01eac2cc942fee6e6a755a99b24.tar.gz
mesa-git: upgrade from 7.7+git to 7.11+git
* progs package is also gone like in 7.11 (moved to separate recipe) * uclibc.patch was updated a bit to apply again (From OE-Core rev: 3b37ed1ff769bac53777c037b624338691861aac) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/mesa/mesa-git.inc39
-rw-r--r--meta/recipes-graphics/mesa/mesa-git/uclibc.patch57
-rw-r--r--meta/recipes-graphics/mesa/mesa/cross2.patch46
-rw-r--r--meta/recipes-graphics/mesa/mesa/i586/matypes.h162
4 files changed, 71 insertions, 233 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-git.inc b/meta/recipes-graphics/mesa/mesa-git.inc
index 2f27ef1a16..c9b17a9cae 100644
--- a/meta/recipes-graphics/mesa/mesa-git.inc
+++ b/meta/recipes-graphics/mesa/mesa-git.inc
@@ -1,30 +1,19 @@
1SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \ 1DEPENDS += "mesa-dri-glsl-native"
2 file://cross2.patch \
3 file://matypes.h"
4# file://mesa-DRI2Swapbuffer.patch "
5S = "${WORKDIR}/git"
6
7SRCREV = "1bf94d419805538ac23a4d0b04d31ac5e4487aca"
8PV = "7.7+git${SRCPV}"
9
10PACKAGES =+ "${PN}-xprogs"
11 2
12FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" 3SRCREV = "983fa4ad523535debf2e94cf6ac1fd4c5630c0d2"
4PV = "7.11+gitr${SRCPV}"
13 5
14do_configure_prepend () { 6FILESEXTRAPATHS_prepend := "${THISDIR}/mesa-git:"
15 cp ${WORKDIR}/matypes.h ${S}/src/mesa/x86
16 touch ${S}/src/mesa/x86/matypes.h
17}
18 7
19do_compile () { 8SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git"
20 oe_runmake clean 9SRC_URI += "file://uclibc.patch \
21 oe_runmake -C src/glsl CC='${BUILD_CC}' CFLAGS="" 10 file://crossfix.patch \
22 mv ${S}/src/glsl/apps/compile ${S}/host_compile 11 "
23 oe_runmake clean 12S = "${WORKDIR}/git"
24 oe_runmake GLSL_CL="${S}/host_compile"
25}
26 13
27do_install_append () { 14do_configure_prepend() {
28 install -d ${D}/usr/bin 15 #check for python not python2, because python-native does not stage python2 binary/link
29 install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/ 16 sed -i 's/AC_CHECK_PROGS(\[PYTHON2\], \[python2 python\])/AC_CHECK_PROGS(\[PYTHON2\], \[python python\])/g' ${S}/configure.ac
17 # We need builtin_compiler built for buildhost arch instead of target (is provided by mesa-dri-glsl-native)"
18 sed -i "s#\./builtin_compiler#${STAGING_BINDIR_NATIVE}/glsl/builtin_compiler#g" ${S}/src/glsl/Makefile
30} 19}
diff --git a/meta/recipes-graphics/mesa/mesa-git/uclibc.patch b/meta/recipes-graphics/mesa/mesa-git/uclibc.patch
new file mode 100644
index 0000000000..0b031f9c35
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-git/uclibc.patch
@@ -0,0 +1,57 @@
1Upstream-Status: Pending
2
3From 904bd5127bd88f45abf4a376676e0a487cfb018a Mon Sep 17 00:00:00 2001
4From: Martin Jansa <Martin.Jansa@gmail.com>
5Date: Thu, 13 Oct 2011 12:46:53 +0200
6Subject: [PATCH] configure: add check HAVE_NEWLOCALE to fix build with uclibc
7
8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9---
10 configure.ac | 3 +++
11 src/glsl/strtod.c | 2 +-
12 src/mesa/main/imports.c | 2 +-
13 3 files changed, 5 insertions(+), 2 deletions(-)
14
15diff --git a/configure.ac b/configure.ac
16index 49e81ad..468cfd7 100644
17--- a/configure.ac
18+++ b/configure.ac
19@@ -507,6 +507,9 @@ AC_SUBST([DLOPEN_LIBS])
20 dnl See if posix_memalign is available
21 AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
22
23+dnl See if newlocale is available
24+AC_CHECK_FUNCS_ONCE(newlocale)
25+
26 dnl SELinux awareness.
27 AC_ARG_ENABLE([selinux],
28 [AS_HELP_STRING([--enable-selinux],
29diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
30index ff34591..88aa5ef 100644
31--- a/src/glsl/strtod.c
32+++ b/src/glsl/strtod.c
33@@ -44,7 +44,7 @@
34 double
35 glsl_strtod(const char *s, char **end)
36 {
37-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
38+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined (HAVE_NEWLOCALE)
39 static locale_t loc = NULL;
40 if (!loc) {
41 loc = newlocale(LC_CTYPE_MASK, "C", NULL);
42diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
43index 345a1c5..493e0fb 100644
44--- a/src/mesa/main/imports.c
45+++ b/src/mesa/main/imports.c
46@@ -767,7 +767,7 @@ float
47 _mesa_strtof( const char *s, char **end )
48 {
49 #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
50- !defined(ANDROID)
51+ !defined(ANDROID) && defined (HAVE_NEWLOCALE)
52 static locale_t loc = NULL;
53 if (!loc) {
54 loc = newlocale(LC_CTYPE_MASK, "C", NULL);
55--
561.7.7
57
diff --git a/meta/recipes-graphics/mesa/mesa/cross2.patch b/meta/recipes-graphics/mesa/mesa/cross2.patch
deleted file mode 100644
index 264c153087..0000000000
--- a/meta/recipes-graphics/mesa/mesa/cross2.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1Upstream-Status: Pending
2
3Index: git/configure.ac
4===================================================================
5--- git.orig/configure.ac 2009-09-01 16:38:26.000000000 +0100
6+++ git/configure.ac 2009-09-01 16:38:47.000000000 +0100
7@@ -269,15 +269,6 @@
8 GLAPI_ASM_SOURCES=""
9 AC_MSG_CHECKING([whether to enable assembly])
10 test "x$enable_asm" = xno && AC_MSG_RESULT([no])
11-# disable if cross compiling on x86/x86_64 since we must run gen_matypes
12-if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
13- case "$host_cpu" in
14- i?86 | x86_64)
15- enable_asm=no
16- AC_MSG_RESULT([no, cross compiling])
17- ;;
18- esac
19-fi
20 # check for supported arches
21 if test "x$enable_asm" = xyes; then
22 case "$host_cpu" in
23Index: git/src/mesa/x86/Makefile
24===================================================================
25--- git.orig/src/mesa/x86/Makefile 2009-09-01 16:40:02.000000000 +0100
26+++ git/src/mesa/x86/Makefile 2009-09-01 16:40:13.000000000 +0100
27@@ -14,19 +14,6 @@
28 -I../tnl
29
30
31-default: gen_matypes matypes.h
32-
33-clean:
34- -rm -f matypes.h gen_matypes
35-
36-
37-gen_matypes: gen_matypes.c
38- $(HOST_CC) $(ARCH_FLAGS) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
39-
40-# need some special rules here, unfortunately
41-matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
42- ./gen_matypes > matypes.h
43-
44 common_x86_asm.o: matypes.h
45 3dnow_normal.o: matypes.h
46 3dnow_xform1.o: matypes.h
diff --git a/meta/recipes-graphics/mesa/mesa/i586/matypes.h b/meta/recipes-graphics/mesa/mesa/i586/matypes.h
deleted file mode 100644
index 98d2188e75..0000000000
--- a/meta/recipes-graphics/mesa/mesa/i586/matypes.h
+++ /dev/null
@@ -1,162 +0,0 @@
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__ */