]> code.ossystems Code Review - openembedded-core.git/commitdiff
mesa-dri: fix x86-64 target compilation
authorKevin Tian <kevin.tian@intel.com>
Mon, 2 Aug 2010 12:24:09 +0000 (20:24 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 2 Aug 2010 15:33:51 +0000 (16:33 +0100)
mesa-dri first generates glsl compiler and then use it to compile GL
shader sources. Target glsl compiler can't run on build system, and
thus port from openembedded by introducing a native recipe dedicated
to creating a native glsl-compiler.

This has to be an explicit -native recipe since its un-native sibling
is already part of mesa-dri

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
meta/packages/mesa/mesa-dri-glsl-native_7.8.2.bb [new file with mode: 0644]
meta/packages/mesa/mesa-dri_7.8.2.bb

diff --git a/meta/packages/mesa/mesa-dri-glsl-native_7.8.2.bb b/meta/packages/mesa/mesa-dri-glsl-native_7.8.2.bb
new file mode 100644 (file)
index 0000000..f6121c1
--- /dev/null
@@ -0,0 +1,24 @@
+DESCRIPTION = "gl shader language specific build from mesa-dri"
+HOMEPAGE = "http://mesa3d.org"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "x11"
+LICENSE = "MIT"
+PR = "r0"
+
+DEPENDS = "makedepend-native"
+
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2"
+
+S = "${WORKDIR}/Mesa-7.8.2/src/glsl/"
+
+inherit native
+
+# use default config for native build
+do_configure_prepend() {
+       ln -s ${S}/../../configs/default ${S}/../../configs/current
+}
+
+do_install() {
+       install -d ${D}/${bindir}
+       install -m 755 ${S}/apps/compile ${D}/${bindir}/glsl-compile
+}
index 6c8c824fa0edf771023f38052efe7f7498062dff..ffd885f29374b14d29bf08ebfcf666fdc150232a 100644 (file)
@@ -5,9 +5,9 @@ LIC_FILES_CHKSUM = "file://docs/license.html;md5=7a3373c039b6b925c427755a4f779c1
 PROTO_DEPS = "xf86driproto glproto dri2proto"
 LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat"
 
-DEPENDS = "${PROTO_DEPS}  ${LIB_DEPS}"
+DEPENDS = "${PROTO_DEPS}  ${LIB_DEPS} mesa-dri-glsl-native"
 
-PR = "r0"
+PR = "r1"
 
 SRC_URI += "file://crossfix.patch"
 
@@ -21,9 +21,14 @@ LEAD_SONAME = "libGL.so.1"
 
 EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium"
 
+# We need glsl-compile built for buildhost arch instead of target (is provided by mesa-dri-glsl-native)"
+do_configure_prepend() {
+       sed -i "s#^GLSL_CL = .*\$#GLSL_CL = ${STAGING_BINDIR_NATIVE}/glsl-compile#g" ${S}/src/mesa/shader/slang/library/Makefile
+}
+
 do_install_append () {
-    install -d ${D}/usr/bin
-    install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/
+       install -d ${D}/usr/bin
+       install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/
 }
 
 python populate_packages_prepend() {