diff options
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-common.inc | 24 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri-glsl-native_7.8.2.bb | 24 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri/cross2.patch | 44 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri/crossfix.patch | 16 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri/i586/matypes.h | 162 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri_7.5.bb | 48 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri_7.7.bb | 49 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri_7.8.2.bb | 53 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-dri_git.bb | 59 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-xlib_7.8.2.bb | 22 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/qemugl/versionfix.patch | 30 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/qemugl_git.bb | 37 |
12 files changed, 568 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc new file mode 100644 index 0000000000..240f956b8a --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-common.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | DESCRIPTION = "An open source implementation of the OpenGL spec" | ||
2 | HOMEPAGE = "http://mesa3d.org" | ||
3 | BUGTRACKER = "https://bugs.freedesktop.org" | ||
4 | SECTION = "x11" | ||
5 | LICENSE = "MIT" | ||
6 | |||
7 | SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \ | ||
8 | ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaDemos-${PV}.tar.bz2 " | ||
9 | |||
10 | S = "${WORKDIR}/Mesa-${PV}" | ||
11 | |||
12 | PROVIDES = "virtual/libgl" | ||
13 | |||
14 | inherit autotools pkgconfig | ||
15 | |||
16 | EXTRA_OECONF = "--disable-glu \ | ||
17 | --disable-glw \ | ||
18 | --disable-glut \ | ||
19 | --enable-glx-tls" | ||
20 | |||
21 | # Multiple virtual/gl providers being built breaks staging | ||
22 | EXCLUDE_FROM_WORLD = "1" | ||
23 | |||
24 | |||
diff --git a/meta/recipes-graphics/mesa/mesa-dri-glsl-native_7.8.2.bb b/meta/recipes-graphics/mesa/mesa-dri-glsl-native_7.8.2.bb new file mode 100644 index 0000000000..f6121c19a4 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-dri-glsl-native_7.8.2.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | DESCRIPTION = "gl shader language specific build from mesa-dri" | ||
2 | HOMEPAGE = "http://mesa3d.org" | ||
3 | BUGTRACKER = "https://bugs.freedesktop.org" | ||
4 | SECTION = "x11" | ||
5 | LICENSE = "MIT" | ||
6 | PR = "r0" | ||
7 | |||
8 | DEPENDS = "makedepend-native" | ||
9 | |||
10 | SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2" | ||
11 | |||
12 | S = "${WORKDIR}/Mesa-7.8.2/src/glsl/" | ||
13 | |||
14 | inherit native | ||
15 | |||
16 | # use default config for native build | ||
17 | do_configure_prepend() { | ||
18 | ln -s ${S}/../../configs/default ${S}/../../configs/current | ||
19 | } | ||
20 | |||
21 | do_install() { | ||
22 | install -d ${D}/${bindir} | ||
23 | install -m 755 ${S}/apps/compile ${D}/${bindir}/glsl-compile | ||
24 | } | ||
diff --git a/meta/recipes-graphics/mesa/mesa-dri/cross2.patch b/meta/recipes-graphics/mesa/mesa-dri/cross2.patch new file mode 100644 index 0000000000..d2147910ae --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-dri/cross2.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | Index: git/configure.ac | ||
2 | =================================================================== | ||
3 | --- git.orig/configure.ac 2009-09-01 16:38:26.000000000 +0100 | ||
4 | +++ git/configure.ac 2009-09-01 16:38:47.000000000 +0100 | ||
5 | @@ -269,15 +269,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 | ||
21 | Index: git/src/mesa/x86/Makefile | ||
22 | =================================================================== | ||
23 | --- git.orig/src/mesa/x86/Makefile 2009-09-01 16:40:02.000000000 +0100 | ||
24 | +++ git/src/mesa/x86/Makefile 2009-09-01 16:40:13.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) $(ARCH_FLAGS) $(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/recipes-graphics/mesa/mesa-dri/crossfix.patch b/meta/recipes-graphics/mesa/mesa-dri/crossfix.patch new file mode 100644 index 0000000000..84be428c4f --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-dri/crossfix.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Index: 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/recipes-graphics/mesa/mesa-dri/i586/matypes.h b/meta/recipes-graphics/mesa/mesa-dri/i586/matypes.h new file mode 100644 index 0000000000..98d2188e75 --- /dev/null +++ b/meta/recipes-graphics/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/recipes-graphics/mesa/mesa-dri_7.5.bb b/meta/recipes-graphics/mesa/mesa-dri_7.5.bb new file mode 100644 index 0000000000..6e9cdc9aa8 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-dri_7.5.bb | |||
@@ -0,0 +1,48 @@ | |||
1 | include mesa-common.inc | ||
2 | |||
3 | SRC_URI += "file://crossfix.patch;patch=1" | ||
4 | # file://mesa-DRI2Swapbuffer.patch;patch=1 | ||
5 | |||
6 | PROTO_DEPS = "xf86driproto glproto dri2proto" | ||
7 | LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat" | ||
8 | |||
9 | DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" | ||
10 | |||
11 | PR = "r11" | ||
12 | |||
13 | # most of our targets do not have DRI so will use mesa-xlib | ||
14 | DEFAULT_PREFERENCE = "-1" | ||
15 | |||
16 | # Netbooks have DRI support so use mesa-dri by default | ||
17 | DEFAULT_PREFERENCE_netbook = "1" | ||
18 | |||
19 | PACKAGES =+ "${PN}-xprogs" | ||
20 | PACKAGES_DYNAMIC = "mesa-dri-driver-*" | ||
21 | |||
22 | FILES_${PN}-dbg += "${libdir}/dri/.debug/*" | ||
23 | FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" | ||
24 | |||
25 | LEAD_SONAME = "libGL.so.1" | ||
26 | |||
27 | EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium" | ||
28 | |||
29 | do_install_append () { | ||
30 | install -d ${D}/usr/bin | ||
31 | install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/ | ||
32 | } | ||
33 | |||
34 | python 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 | |||
42 | COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-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/recipes-graphics/mesa/mesa-dri_7.7.bb b/meta/recipes-graphics/mesa/mesa-dri_7.7.bb new file mode 100644 index 0000000000..a5899f3892 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-dri_7.7.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | include mesa-common.inc | ||
2 | |||
3 | SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/7.7/MesaLib-${PV}.tar.bz2 \ | ||
4 | ftp://ftp.freedesktop.org/pub/mesa/7.7/MesaDemos-${PV}.tar.bz2 \ | ||
5 | file://crossfix.patch;patch=1" | ||
6 | |||
7 | PROTO_DEPS = "xf86driproto glproto dri2proto" | ||
8 | LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat" | ||
9 | |||
10 | DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" | ||
11 | |||
12 | PR = "r11" | ||
13 | |||
14 | # most of our targets do not have DRI so will use mesa-xlib | ||
15 | DEFAULT_PREFERENCE = "-1" | ||
16 | |||
17 | # Netbooks have DRI support so use mesa-dri by default | ||
18 | DEFAULT_PREFERENCE_netbook = "1" | ||
19 | |||
20 | PACKAGES =+ "${PN}-xprogs" | ||
21 | PACKAGES_DYNAMIC = "mesa-dri-driver-*" | ||
22 | |||
23 | FILES_${PN}-dbg += "${libdir}/dri/.debug/*" | ||
24 | FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" | ||
25 | |||
26 | LEAD_SONAME = "libGL.so.1" | ||
27 | |||
28 | EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium" | ||
29 | |||
30 | do_install_append () { | ||
31 | install -d ${D}/usr/bin | ||
32 | install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/ | ||
33 | } | ||
34 | |||
35 | python populate_packages_prepend() { | ||
36 | import os.path | ||
37 | |||
38 | dri_drivers_root = os.path.join(bb.data.getVar('libdir', d, 1), "dri") | ||
39 | |||
40 | do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='') | ||
41 | } | ||
42 | |||
43 | COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)' | ||
44 | |||
45 | |||
46 | # | ||
47 | # 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 | ||
48 | # then run gen_matypes > matypes.h on device | ||
49 | # \ No newline at end of file | ||
diff --git a/meta/recipes-graphics/mesa/mesa-dri_7.8.2.bb b/meta/recipes-graphics/mesa/mesa-dri_7.8.2.bb new file mode 100644 index 0000000000..ffd885f293 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-dri_7.8.2.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | include mesa-common.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://docs/license.html;md5=7a3373c039b6b925c427755a4f779c1d" | ||
4 | |||
5 | PROTO_DEPS = "xf86driproto glproto dri2proto" | ||
6 | LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat" | ||
7 | |||
8 | DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} mesa-dri-glsl-native" | ||
9 | |||
10 | PR = "r1" | ||
11 | |||
12 | SRC_URI += "file://crossfix.patch" | ||
13 | |||
14 | # most of our targets do not have DRI so will use mesa-xlib | ||
15 | DEFAULT_PREFERENCE = "-1" | ||
16 | |||
17 | # Netbooks have DRI support so use mesa-dri by default | ||
18 | DEFAULT_PREFERENCE_netbook = "1" | ||
19 | |||
20 | LEAD_SONAME = "libGL.so.1" | ||
21 | |||
22 | EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium" | ||
23 | |||
24 | # We need glsl-compile built for buildhost arch instead of target (is provided by mesa-dri-glsl-native)" | ||
25 | do_configure_prepend() { | ||
26 | sed -i "s#^GLSL_CL = .*\$#GLSL_CL = ${STAGING_BINDIR_NATIVE}/glsl-compile#g" ${S}/src/mesa/shader/slang/library/Makefile | ||
27 | } | ||
28 | |||
29 | do_install_append () { | ||
30 | install -d ${D}/usr/bin | ||
31 | install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/ | ||
32 | } | ||
33 | |||
34 | python 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 | |||
42 | COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)' | ||
43 | |||
44 | PACKAGES =+ "${PN}-xprogs" | ||
45 | PACKAGES_DYNAMIC = "mesa-dri-driver-*" | ||
46 | |||
47 | FILES_${PN}-dbg += "${libdir}/dri/.debug/*" | ||
48 | FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" | ||
49 | |||
50 | # | ||
51 | # 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 | ||
52 | # then run gen_matypes > matypes.h on device | ||
53 | # | ||
diff --git a/meta/recipes-graphics/mesa/mesa-dri_git.bb b/meta/recipes-graphics/mesa/mesa-dri_git.bb new file mode 100644 index 0000000000..fa0a7c8dc2 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-dri_git.bb | |||
@@ -0,0 +1,59 @@ | |||
1 | include mesa-common.inc | ||
2 | |||
3 | SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \ | ||
4 | file://cross2.patch;patch=1 \ | ||
5 | file://matypes.h" | ||
6 | # file://mesa-DRI2Swapbuffer.patch;patch=1 " | ||
7 | S = "${WORKDIR}/git" | ||
8 | |||
9 | PROTO_DEPS = "xf86driproto glproto dri2proto" | ||
10 | LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat" | ||
11 | |||
12 | DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" | ||
13 | |||
14 | PV = "7.7+git${SRCPV}" | ||
15 | PR = "r0" | ||
16 | |||
17 | # most of our targets do not have DRI so will use mesa-xlib | ||
18 | DEFAULT_PREFERENCE = "-1" | ||
19 | |||
20 | # Netbooks have DRI support so use mesa-dri by default | ||
21 | DEFAULT_PREFERENCE_netbook = "1" | ||
22 | |||
23 | PACKAGES =+ "${PN}-xprogs" | ||
24 | PACKAGES_DYNAMIC = "mesa-dri-driver-*" | ||
25 | |||
26 | FILES_${PN}-dbg += "${libdir}/dri/.debug/*" | ||
27 | FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" | ||
28 | |||
29 | LEAD_SONAME = "libGL.so.1" | ||
30 | |||
31 | EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium" | ||
32 | |||
33 | do_configure_prepend () { | ||
34 | cp ${WORKDIR}/matypes.h ${S}/src/mesa/x86 | ||
35 | touch ${S}/src/mesa/x86/matypes.h | ||
36 | } | ||
37 | |||
38 | do_compile () { | ||
39 | oe_runmake clean | ||
40 | oe_runmake -C src/glsl CC='${BUILD_CC}' CFLAGS="" | ||
41 | mv ${S}/src/glsl/apps/compile ${S}/host_compile | ||
42 | oe_runmake clean | ||
43 | oe_runmake GLSL_CL="${S}/host_compile" | ||
44 | } | ||
45 | |||
46 | do_install_append () { | ||
47 | install -d ${D}/usr/bin | ||
48 | install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/ | ||
49 | } | ||
50 | |||
51 | python populate_packages_prepend() { | ||
52 | import os.path | ||
53 | |||
54 | dri_drivers_root = os.path.join(bb.data.getVar('libdir', d, 1), "dri") | ||
55 | |||
56 | do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='') | ||
57 | } | ||
58 | |||
59 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
diff --git a/meta/recipes-graphics/mesa/mesa-xlib_7.8.2.bb b/meta/recipes-graphics/mesa/mesa-xlib_7.8.2.bb new file mode 100644 index 0000000000..093ad6ed7c --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-xlib_7.8.2.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | include mesa-common.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://docs/license.html;md5=7a3373c039b6b925c427755a4f779c1d" | ||
4 | |||
5 | PROTO_DEPS = "xf86driproto glproto" | ||
6 | LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes" | ||
7 | |||
8 | DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" | ||
9 | |||
10 | PE = "1" | ||
11 | PR = "r0" | ||
12 | |||
13 | EXTRA_OECONF += "--with-driver=xlib" | ||
14 | |||
15 | do_install_append () { | ||
16 | install -d ${D}/${bindir} | ||
17 | install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/${bindir} | ||
18 | } | ||
19 | |||
20 | PACKAGES =+ "${PN}-xprogs" | ||
21 | |||
22 | FILES_${PN}-xprogs = "${bindir}/glxdemo ${bindir}/glxgears ${bindir}/glxheads ${bindir}/glxinfo" | ||
diff --git a/meta/recipes-graphics/mesa/qemugl/versionfix.patch b/meta/recipes-graphics/mesa/qemugl/versionfix.patch new file mode 100644 index 0000000000..a3d33e8303 --- /dev/null +++ b/meta/recipes-graphics/mesa/qemugl/versionfix.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Index: git/Makefile | ||
2 | =================================================================== | ||
3 | --- git.orig/Makefile 2009-01-19 23:37:36.000000000 +0000 | ||
4 | +++ git/Makefile 2009-06-09 20:30:37.000000000 +0100 | ||
5 | @@ -1,9 +1,9 @@ | ||
6 | GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing | ||
7 | |||
8 | -all: libGL.so | ||
9 | +all: libGL.so.1.2 | ||
10 | |||
11 | -libGL.so: client_stub.c opengl_client.c glgetv_cst.h opengl_func.h opengl_utils.h opengl_client_xfonts.c mesa_gl.h mesa_glext.h mesa_glx.h mesa_glxext.h | ||
12 | - $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I. | ||
13 | +libGL.so.1.2: client_stub.c opengl_client.c glgetv_cst.h opengl_func.h opengl_utils.h opengl_client_xfonts.c mesa_gl.h mesa_glext.h mesa_glx.h mesa_glxext.h | ||
14 | + $(CC) -fPIC $(GL_CFLAGS) opengl_client.c -shared -o libGL.so.1.2 -lX11 -lXfixes -lm -L$(D)/usr/X11R6/lib -lpthread -I. | ||
15 | |||
16 | opengl_func.h: gl_func.h | ||
17 | |||
18 | Index: git/opengl_client.c | ||
19 | =================================================================== | ||
20 | --- git.orig/opengl_client.c 2009-06-09 21:07:15.000000000 +0100 | ||
21 | +++ git/opengl_client.c 2009-06-09 21:07:33.000000000 +0100 | ||
22 | @@ -11578,7 +11578,7 @@ | ||
23 | tab_assoc = calloc(tabSize, sizeof(AssocProcAdress)); | ||
24 | |||
25 | #ifndef WIN32 | ||
26 | - handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so" ,RTLD_LAZY); | ||
27 | + handle = dlopen(getenv("REAL_LIBGL") ? getenv("REAL_LIBGL") : "libGL.so.1.2" ,RTLD_LAZY); | ||
28 | if (!handle) { | ||
29 | log_gl("%s\n", dlerror()); | ||
30 | exit(1); | ||
diff --git a/meta/recipes-graphics/mesa/qemugl_git.bb b/meta/recipes-graphics/mesa/qemugl_git.bb new file mode 100644 index 0000000000..184c782722 --- /dev/null +++ b/meta/recipes-graphics/mesa/qemugl_git.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | DESCRIPTION = "QEMU i386 OpenGL passtrough" | ||
2 | HOMEPAGE = "http://savannah.nongnu.org/projects/qemugl" | ||
3 | SECTION = "x11/drivers" | ||
4 | LICENSE = "GPL" | ||
5 | |||
6 | DEPENDS = "virtual/libx11 xproto glproto libxfixes" | ||
7 | |||
8 | COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' | ||
9 | |||
10 | SRC_URI = "git://git.o-hand.com/qemugl.git;protocol=git \ | ||
11 | file://versionfix.patch" | ||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | PV = "0.0+git${SRCPV}" | ||
15 | PR = "r6" | ||
16 | |||
17 | DEFAULT_PREFERENCE = "-1" | ||
18 | |||
19 | do_install () { | ||
20 | install -d ${D}${libdir}/ | ||
21 | if [ "${PN}" != "qemugl-nativesdk" ]; then | ||
22 | install -m 0755 ${S}/libGL.so.1.2 ${D}${libdir}/libGL-qemu.so.1.2 | ||
23 | else | ||
24 | install -m 0755 ${S}/libGL.so.1.2 ${D}${libdir}/libGL.so.1.2 | ||
25 | ln -s libGL.so.1.2 ${D}${libdir}/libGL.so.1 | ||
26 | ln -s libGL.so.1 ${D}${libdir}/libGL.so | ||
27 | fi | ||
28 | } | ||
29 | |||
30 | pkg_postinst_${PN} () { | ||
31 | if [ "${PN}" != "qemugl-nativesdk" ]; then | ||
32 | rm -f $D${libdir}/libGL.so.1.2 | ||
33 | ln -s libGL-qemu.so.1.2 $D${libdir}/libGL.so.1.2 | ||
34 | fi | ||
35 | } | ||
36 | |||
37 | BBCLASSEXTEND = "nativesdk" | ||