Patchwork [47/50] mesa-dri: Fix build on uclibc

login
register
mail settings
Submitter Saul Wold
Date July 20, 2011, 8:28 a.m.
Message ID <28d06c0e89a302478ed339d17802b4d184e6a9d3.1311150183.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/8033/
State New, archived
Headers show

Comments

Saul Wold - July 20, 2011, 8:28 a.m.
From: Khem Raj <raj.khem@gmail.com>

We do not enable locales with uclibc in oe
Imported from oe.dev rev f2253e23c7fbbf2bfa1a0d1b47342800755e71c6

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-graphics/mesa/mesa-dri/uclibc.patch |   26 ++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa-dri_7.10.2.bb    |    6 +++-
 2 files changed, 30 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-graphics/mesa/mesa-dri/uclibc.patch

Patch

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 0000000..c87c354
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-dri/uclibc.patch
@@ -0,0 +1,26 @@ 
+Index: Mesa-7.10.2/src/mesa/main/imports.c
+===================================================================
+--- Mesa-7.10.2.orig/src/mesa/main/imports.c	2011-03-01 12:57:29.000000000 -0800
++++ Mesa-7.10.2/src/mesa/main/imports.c	2011-07-19 10:02:32.593779110 -0700
+@@ -757,7 +757,7 @@
+ float
+ _mesa_strtof( const char *s, char **end )
+ {
+-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
++#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(__UCLIBC__)
+    static locale_t loc = NULL;
+    if (!loc) {
+       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
+Index: Mesa-7.10.2/src/glsl/strtod.c
+===================================================================
+--- Mesa-7.10.2.orig/src/glsl/strtod.c	2011-01-03 16:45:51.000000000 -0800
++++ Mesa-7.10.2/src/glsl/strtod.c	2011-07-19 10:02:32.643779110 -0700
+@@ -44,7 +44,7 @@
+ double
+ glsl_strtod(const char *s, char **end)
+ {
+-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
++#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(__UCLIBC__)
+    static locale_t loc = NULL;
+    if (!loc) {
+       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
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 c7bd974..aac7a1c 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
 
 DEPENDS = "${PROTO_DEPS}  ${LIB_DEPS} makedepend-native python-native"
 
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
-           file://crossfix.patch"
+           file://crossfix.patch \
+           file://uclibc.patch \
+          "
 
 SRC_URI[md5sum] = "f5de82852f1243f42cc004039e10b771"
 SRC_URI[sha256sum] = "8ced2678ce11cf30804694a92ea3ca6b82f158ae8995bdc626c7e85aac71c7c1"