summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-07-20 23:10:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-22 11:51:04 +0100
commita9aa45ce9e5fd6cf7b38d2148a0f48b188f67430 (patch)
treefb6462be383218e04c4595d0ffc522091eb22bdc
parentc9610a3e43c48712f08aca3040f97b42ffd28f96 (diff)
downloadpoky-a9aa45ce9e5fd6cf7b38d2148a0f48b188f67430.tar.gz
mesa-xlib, mesa-dri: Probe for newlocale() before using it.
(From OE-Core rev: 1a55faf994b30101026b6c8980023f213ee1db2c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/mesa/mesa-dri/uclibc.patch40
-rw-r--r--meta/recipes-graphics/mesa/mesa-dri_7.10.2.bb6
-rw-r--r--meta/recipes-graphics/mesa/mesa-xlib_7.10.2.bb5
3 files changed, 48 insertions, 3 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-dri/uclibc.patch b/meta/recipes-graphics/mesa/mesa-dri/uclibc.patch
new file mode 100644
index 0000000000..bb5af44a36
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-dri/uclibc.patch
@@ -0,0 +1,40 @@
1Index: Mesa-7.10.2/src/mesa/main/imports.c
2===================================================================
3--- Mesa-7.10.2.orig/src/mesa/main/imports.c 2011-03-01 12:57:29.000000000 -0800
4+++ Mesa-7.10.2/src/mesa/main/imports.c 2011-07-20 19:08:49.441785510 -0700
5@@ -757,7 +757,7 @@
6 float
7 _mesa_strtof( const char *s, char **end )
8 {
9-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
10+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined (HAVE_NEWLOCALE)
11 static locale_t loc = NULL;
12 if (!loc) {
13 loc = newlocale(LC_CTYPE_MASK, "C", NULL);
14Index: Mesa-7.10.2/src/glsl/strtod.c
15===================================================================
16--- Mesa-7.10.2.orig/src/glsl/strtod.c 2011-01-03 16:45:51.000000000 -0800
17+++ Mesa-7.10.2/src/glsl/strtod.c 2011-07-20 19:10:21.441785488 -0700
18@@ -44,7 +44,7 @@
19 double
20 glsl_strtod(const char *s, char **end)
21 {
22-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
23+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined (HAVE_NEWLOCALE)
24 static locale_t loc = NULL;
25 if (!loc) {
26 loc = newlocale(LC_CTYPE_MASK, "C", NULL);
27Index: Mesa-7.10.2/configure.ac
28===================================================================
29--- Mesa-7.10.2.orig/configure.ac 2011-07-20 19:09:02.000000000 -0700
30+++ Mesa-7.10.2/configure.ac 2011-07-20 19:09:57.121785492 -0700
31@@ -450,6 +450,9 @@
32 dnl See if posix_memalign is available
33 AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
34
35+dnl See if newlocale is available
36+AC_CHECK_FUNCS_ONCE(newlocale)
37+
38 dnl SELinux awareness.
39 AC_ARG_ENABLE([selinux],
40 [AS_HELP_STRING([--enable-selinux],
diff --git a/meta/recipes-graphics/mesa/mesa-dri_7.10.2.bb b/meta/recipes-graphics/mesa/mesa-dri_7.10.2.bb
index c7bd974152..aac7a1c30e 100644
--- a/meta/recipes-graphics/mesa/mesa-dri_7.10.2.bb
+++ b/meta/recipes-graphics/mesa/mesa-dri_7.10.2.bb
@@ -8,10 +8,12 @@ LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat
8 8
9DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} makedepend-native python-native" 9DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} makedepend-native python-native"
10 10
11PR = "r0" 11PR = "r1"
12 12
13SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \ 13SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
14 file://crossfix.patch" 14 file://crossfix.patch \
15 file://uclibc.patch \
16 "
15 17
16SRC_URI[md5sum] = "f5de82852f1243f42cc004039e10b771" 18SRC_URI[md5sum] = "f5de82852f1243f42cc004039e10b771"
17SRC_URI[sha256sum] = "8ced2678ce11cf30804694a92ea3ca6b82f158ae8995bdc626c7e85aac71c7c1" 19SRC_URI[sha256sum] = "8ced2678ce11cf30804694a92ea3ca6b82f158ae8995bdc626c7e85aac71c7c1"
diff --git a/meta/recipes-graphics/mesa/mesa-xlib_7.10.2.bb b/meta/recipes-graphics/mesa/mesa-xlib_7.10.2.bb
index b77df2c666..511103da39 100644
--- a/meta/recipes-graphics/mesa/mesa-xlib_7.10.2.bb
+++ b/meta/recipes-graphics/mesa/mesa-xlib_7.10.2.bb
@@ -1,6 +1,9 @@
1include mesa-common.inc 1include mesa-common.inc
2 2
3FILESPATH =. "${FILE_DIRNAME}/mesa-dri:"
4
3SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \ 5SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
6 file://uclibc.patch \
4 " 7 "
5 8
6SRC_URI[md5sum] = "f5de82852f1243f42cc004039e10b771" 9SRC_URI[md5sum] = "f5de82852f1243f42cc004039e10b771"
@@ -14,6 +17,6 @@ LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes libxml2-nativ
14DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} makedepend-native" 17DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} makedepend-native"
15 18
16PE = "1" 19PE = "1"
17PR = "r0" 20PR = "r1"
18 21
19EXTRA_OECONF += "--with-driver=xlib" 22EXTRA_OECONF += "--with-driver=xlib"