mesa: fix and enable out-of-tree builds

One patch (submitted upstream) for when Gallium is enabled, and another
(inappropriate for upstream) to fix out-of-tree builds with
0003-EGL-Mutate-NativeDisplayType-depending-on-config.

(From OE-Core rev: fbc7092f0ae07538d4363679b1597ba4e556d1a8)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2013-08-09 16:32:24 +01:00 committed by Richard Purdie
parent 07fdfd61b3
commit 32a36db2a8
5 changed files with 95 additions and 1 deletions

View File

@ -441,7 +441,7 @@ B_pn-mc = "${SEPB}"
B_pn-menu-cache = "${SEPB}"
B_pn-mesa-demos = "${SEPB}"
# src/mapi/mapi/stub.c:51:39: error: 'MAPI_TABLE_NUM_DYNAMIC' undeclared here (not in a function)
#B_pn-mesa-dri = "${SEPB}"
B_pn-mesa = "${SEPB}"
B_pn-minicom = "${SEPB}"
# Not automake, no external tree support
#B_pn-mkelfimage = "${SEPB}"

View File

@ -0,0 +1,42 @@
Upstream-Status: Submitted
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 9e31e15ebb0adbf3cc0394c30cbc1ccd2b35a27f Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Fri, 28 Jun 2013 11:44:58 +0100
Subject: [PATCH] build: fix out-of-tree builds in gallium/auxiliary
The rules were writing files to e.g. util/u_indices_gen.py, but in an
out-of-tree build this directory doesn't exist in the build directory. So,
create the directories just in case.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
src/gallium/auxiliary/Makefile.am | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
index f14279b..0c3e7ba 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -38,13 +38,17 @@ libgallium_la_SOURCES += \
endif
indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
+ mkdir --parents indices
$(AM_V_GEN) $(PYTHON2) $< > $@
indices/u_unfilled_gen.c: $(srcdir)/indices/u_unfilled_gen.py
+ mkdir --parents indices
$(AM_V_GEN) $(PYTHON2) $< > $@
util/u_format_srgb.c: $(srcdir)/util/u_format_srgb.py
+ mkdir --parents util
$(AM_V_GEN) $(PYTHON2) $< > $@
util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py $(srcdir)/util/u_format.csv
+ mkdir --parents util
$(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@
--
1.7.10.4

View File

@ -0,0 +1,48 @@
Fix out of tree compilation failure due to
0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch.
Upstream-Status: Inappropriate (upstream has different solution to root problem)
Signed-off-by: Ross Burton <ross.burton@intel.com>
diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am
index 45f7dfa..ed0e777 100644
--- a/src/egl/drivers/dri2/Makefile.am
+++ b/src/egl/drivers/dri2/Makefile.am
@@ -21,6 +21,7 @@
AM_CFLAGS = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/src/egl/main \
-I$(top_srcdir)/src/gbm/main \
-I$(top_srcdir)/src/gbm/backends/dri \
diff --git a/src/egl/drivers/glx/Makefile.am b/src/egl/drivers/glx/Makefile.am
index 6bf67ea..7b87047 100644
--- a/src/egl/drivers/glx/Makefile.am
+++ b/src/egl/drivers/glx/Makefile.am
@@ -21,6 +21,7 @@
AM_CFLAGS = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/src/egl/main \
$(X11_CFLAGS) \
$(DEFINES)
diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index ca5257a..13a5734 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -27,6 +27,7 @@ endif
AM_CFLAGS = \
-I$(top_srcdir)/include \
+ -I$(top_builddir)/include \
-I$(top_srcdir)/src/gbm/main \
$(DEFINES) \
$(EGL_CFLAGS) \
@@ -135,4 +136,4 @@ egl_HEADERS = \
$(top_srcdir)/include/EGL/eglext.h \
$(top_srcdir)/include/EGL/egl.h \
$(top_srcdir)/include/EGL/eglmesaext.h \
- $(top_srcdir)/include/EGL/eglplatform.h
+ $(top_builddir)/include/EGL/eglplatform.h

View File

@ -6,6 +6,8 @@ SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
file://0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch \
file://0004-glsl-fix-builtin_compiler-cross-compilation.patch \
file://0005-llvmpipe-remove-the-power-of-two-sizeof-struct-cmd_b.patch \
file://0005-fix-out-of-tree-builds-gallium.patch \
file://0006-fix-out-of-tree-egl.patch \
"
SRC_URI[md5sum] = "443a2a352667294b53d56cb1a74114e9"

View File

@ -13,6 +13,8 @@ SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git \
file://0002-pipe_loader_sw-include-xlib_sw_winsys.h-only-when-HA.patch \
file://0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch \
file://0004-glsl-fix-builtin_compiler-cross-compilation.patch \
file://0005-fix-out-of-tree-builds-gallium.patch \
file://0006-fix-out-of-tree-egl.patch \
"
S = "${WORKDIR}/git"