Patchwork [3/8] mesa: Add a mesa-dri-glsl-native_git recipe

login
register
mail settings
Submitter Ross Burton
Date Aug. 13, 2012, 6:58 p.m.
Message ID <00170828443823b0f79988640a23740ec34f4caf.1344884283.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/34359/
State Accepted
Commit 63667a138616c551cedbd10d4ed87172fcf9dfff
Headers show

Comments

Ross Burton - Aug. 13, 2012, 6:58 p.m.
From: Damien Lespiau <damien.lespiau@intel.com>

If you have both a fixed version of mesa and a git version of mesa, you
also need the mesa-dri-glsl-native recipe for each versions. The code
generation that happens natively has to be done with the tool extracted
from the version you are compiling.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../recipes-graphics/mesa/mesa-dri-glsl-native.inc |    7 ++++++
 .../mesa/mesa-dri-glsl-native_8.0.4.bb             |    9 ++------
 .../mesa/mesa-dri-glsl-native_git.bb               |   23 ++++++++++++++++++++
 3 files changed, 32 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-graphics/mesa/mesa-dri-glsl-native.inc
 create mode 100644 meta/recipes-graphics/mesa/mesa-dri-glsl-native_git.bb

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-dri-glsl-native.inc b/meta/recipes-graphics/mesa/mesa-dri-glsl-native.inc
new file mode 100644
index 0000000..c8b80e8
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-dri-glsl-native.inc
@@ -0,0 +1,7 @@ 
+DESCRIPTION = "gl shader language specific build from mesa-dri"
+HOMEPAGE = "http://mesa3d.org"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "x11"
+LICENSE = "GPLv3+"
+
+DEPENDS = "makedepend-native"
diff --git a/meta/recipes-graphics/mesa/mesa-dri-glsl-native_8.0.4.bb b/meta/recipes-graphics/mesa/mesa-dri-glsl-native_8.0.4.bb
index a81fb6d..d551598 100644
--- a/meta/recipes-graphics/mesa/mesa-dri-glsl-native_8.0.4.bb
+++ b/meta/recipes-graphics/mesa/mesa-dri-glsl-native_8.0.4.bb
@@ -1,11 +1,6 @@ 
-DESCRIPTION = "gl shader language specific build from mesa-dri"
-HOMEPAGE = "http://mesa3d.org"
-BUGTRACKER = "https://bugs.freedesktop.org"
-SECTION = "x11"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://glsl_parser.cpp;beginline=3;endline=33;md5=d078f1cddc2fc355719c090482254bd9"
+require mesa-dri-glsl-native.inc
 
-DEPENDS = "makedepend-native"
+LIC_FILES_CHKSUM = "file://glsl_parser.cpp;beginline=3;endline=33;md5=d078f1cddc2fc355719c090482254bd9"
 
 SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2"
 SRC_URI[md5sum] = "d546f988adfdf986cff45b1efa2d8a46"
diff --git a/meta/recipes-graphics/mesa/mesa-dri-glsl-native_git.bb b/meta/recipes-graphics/mesa/mesa-dri-glsl-native_git.bb
new file mode 100644
index 0000000..4611f80
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-dri-glsl-native_git.bb
@@ -0,0 +1,23 @@ 
+require mesa-dri-glsl-native.inc
+
+LIC_FILES_CHKSUM = "file://../../docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
+
+SRCREV = "c1f4867c89adb1a6b19d66ec8ad146115909f0a7"
+PV = "8.0.4+git${SRCPV}"
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git"
+S = "${WORKDIR}/git/src/glsl"
+
+inherit native
+
+# use default config for native build
+do_configure_prepend() {
+	ln -sf ${S}/../../configs/default ${S}/../../configs/current
+}
+
+do_install() {
+	install -d ${D}/${bindir}/glsl
+	install -m 755 ${S}/builtin_compiler ${D}/${bindir}/glsl/builtin_compiler
+	install -m 755 ${S}/glsl_compiler ${D}/${bindir}/glsl/glsl_compiler
+}