aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/mesa')
-rw-r--r--recipes-graphics/mesa/mesa-8.0.1.inc21
-rw-r--r--recipes-graphics/mesa/mesa-dri-glsl-native_8.0.1.bb27
-rw-r--r--recipes-graphics/mesa/mesa-dri.inc26
-rw-r--r--recipes-graphics/mesa/mesa-dri_8.0.1.bb4
-rw-r--r--recipes-graphics/mesa/mesa/crossfix.patch18
-rw-r--r--recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch38
-rw-r--r--recipes-graphics/mesa/mesa/remove_OES_EGL_image_externals.patch22
7 files changed, 156 insertions, 0 deletions
diff --git a/recipes-graphics/mesa/mesa-8.0.1.inc b/recipes-graphics/mesa/mesa-8.0.1.inc
new file mode 100644
index 0000000..ac464a5
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-8.0.1.inc
@@ -0,0 +1,21 @@
+DEPENDS += "mesa-dri-glsl-native"
+
+
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2 \
+ file://crossfix.patch \
+ file://crossfix-mklib.patch \
+ file://mesa_fix_for_x32.patch \
+ file://remove_OES_EGL_image_externals.patch \
+ "
+
+S = "${WORKDIR}/Mesa-${PV}"
+
+SRC_URI[md5sum] = "24eeebf66971809d8f40775a379b36c9"
+SRC_URI[sha256sum] = "593af02ea2b5b7afb057a12c550f2c03b1d1cf59a716972d601c1499545ea0a7"
+
+do_configure_prepend() {
+ #check for python not python2, because python-native does not stage python2 binary/link
+ sed -i 's/AC_CHECK_PROGS(\[PYTHON2\], \[python2 python\])/AC_CHECK_PROGS(\[PYTHON2\], \[python python\])/g' ${S}/configure.ac
+ # We need builtin_compiler built for buildhost arch instead of target (is provided by mesa-dri-glsl-native)"
+ sed -i "s#\./builtin_compiler#${STAGING_BINDIR_NATIVE}/glsl/builtin_compiler#g" ${S}/src/glsl/Makefile
+}
diff --git a/recipes-graphics/mesa/mesa-dri-glsl-native_8.0.1.bb b/recipes-graphics/mesa/mesa-dri-glsl-native_8.0.1.bb
new file mode 100644
index 0000000..9c51050
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-dri-glsl-native_8.0.1.bb
@@ -0,0 +1,27 @@
+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"
+
+DEPENDS = "makedepend-native"
+
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2"
+SRC_URI[md5sum] = "24eeebf66971809d8f40775a379b36c9"
+SRC_URI[sha256sum] = "593af02ea2b5b7afb057a12c550f2c03b1d1cf59a716972d601c1499545ea0a7"
+
+S = "${WORKDIR}/Mesa-${PV}/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}/glsl
+ install -m 755 ${S}/builtin_compiler ${D}/${bindir}/glsl/builtin_compiler
+ install -m 755 ${S}/glsl_compiler ${D}/${bindir}/glsl/glsl_compiler
+}
diff --git a/recipes-graphics/mesa/mesa-dri.inc b/recipes-graphics/mesa/mesa-dri.inc
new file mode 100644
index 0000000..4eafaa7
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-dri.inc
@@ -0,0 +1,26 @@
+PROTO_DEPS += "dri2proto"
+LIB_DEPS += "libdrm expat"
+
+# most of our targets do not have DRI so will use mesa-xlib
+DEFAULT_PREFERENCE = "-1"
+
+DRIDRIVERS = "swrast"
+DRIDRIVERS_append_x86 = ",i915,i965"
+DRIDRIVERS_append_x86-64 = ",i915,i965"
+
+EXTRA_OECONF += "--disable-gallium --without-gallium-drivers --with-dri-drivers=${DRIDRIVERS} --enable-gles2 --enable-glx --enable-dri --disable-osmesa --with-egl-platform=drm --disable-xlib-glx"
+
+python populate_packages_prepend() {
+ import os.path
+
+ dri_drivers_root = os.path.join(d.getVar('libdir', 1), "dri")
+
+ do_split_packages(d, dri_drivers_root, '^(.*)_dri\.so$', 'mesa-dri-driver-%s', 'Mesa %s DRI driver', extra_depends='')
+}
+
+PACKAGES_DYNAMIC = "mesa-dri-driver-*"
+
+FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
+
+FILES_${PN}-driver-swrast += "${libdir}/dri/libdricore.so"
+FILES_${PN}-driver-swrast += "${libdir}/dri/libglsl.so"
diff --git a/recipes-graphics/mesa/mesa-dri_8.0.1.bb b/recipes-graphics/mesa/mesa-dri_8.0.1.bb
new file mode 100644
index 0000000..09811a1
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-dri_8.0.1.bb
@@ -0,0 +1,4 @@
+include mesa-common.inc
+include mesa-${PV}.inc
+include mesa-dri.inc
+PR = "${INC_PR}.1"
diff --git a/recipes-graphics/mesa/mesa/crossfix.patch b/recipes-graphics/mesa/mesa/crossfix.patch
new file mode 100644
index 0000000..38010f4
--- /dev/null
+++ b/recipes-graphics/mesa/mesa/crossfix.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Index: Mesa-7.5/bin/mklib
+===================================================================
+--- Mesa-7.5.orig/bin/mklib 2009-08-12 13:01:34.000000000 +0100
++++ Mesa-7.5/bin/mklib 2009-08-12 13:04:19.000000000 +0100
+@@ -234,9 +234,9 @@
+ if [ "x$LINK" = "x" ] ; then
+ # -linker was not specified so set default link command now
+ if [ $CPLUSPLUS = 1 ] ; then
+- LINK=g++
++ LINK=$CXX
+ else
+- LINK=gcc
++ LINK=$CC
+ fi
+ fi
+
diff --git a/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch b/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
new file mode 100644
index 0000000..83b1587
--- /dev/null
+++ b/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
@@ -0,0 +1,38 @@
+Upstream-Status: Pending
+
+get correct compiler options for x32 gcc.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
+
+--- Mesa-7.11/bin/mklib.x32 2011-12-06 13:15:17.968695114 -0800
++++ Mesa-7.11/bin/mklib 2011-12-06 13:17:13.872152249 -0800
+@@ -335,7 +335,12 @@ case $ARCH in
+ set ${OBJECTS}
+ ABI32=`file $1 | grep 32-bit`
+ if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
+- OPTS="-m32 ${OPTS}"
++ ABIX32=`file $1 | grep x86-64`
++ if [ "${ABI32}" ]; then
++ OPTS="-mx32 ${OPTS}"
++ else
++ OPTS="-m32 ${OPTS}"
++ fi
+ fi
+
+ if [ "${ALTOPTS}" ] ; then
+@@ -392,7 +397,12 @@ case $ARCH in
+ set ${OBJECTS}
+ ABI32=`file $1 | grep 32-bit`
+ if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
+- OPTS="-m32 ${OPTS}"
++ ABIX32=`file $1 | grep x86-64`
++ if [ "${ABI32}" ]; then
++ OPTS="-mx32 ${OPTS}"
++ else
++ OPTS="-m32 ${OPTS}"
++ fi
+ fi
+ if [ "${ALTOPTS}" ] ; then
+ OPTS=${ALTOPTS}
diff --git a/recipes-graphics/mesa/mesa/remove_OES_EGL_image_externals.patch b/recipes-graphics/mesa/mesa/remove_OES_EGL_image_externals.patch
new file mode 100644
index 0000000..c231483
--- /dev/null
+++ b/recipes-graphics/mesa/mesa/remove_OES_EGL_image_externals.patch
@@ -0,0 +1,22 @@
+Index: Mesa-8.0.1/src/glsl/builtins/profiles/OES_EGL_image_external.frag
+===================================================================
+--- Mesa-8.0.1.orig/src/glsl/builtins/profiles/OES_EGL_image_external.frag 2012-03-20 18:22:02.645070696 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#version 100
+-#extension GL_OES_EGL_image_external : enable
+-
+-vec4 texture2D(samplerExternalOES sampler, vec2 coord);
+-vec4 texture2DProj(samplerExternalOES sampler, vec3 coord);
+-vec4 texture2DProj(samplerExternalOES sampler, vec4 coord);
+Index: Mesa-8.0.1/src/glsl/builtins/profiles/OES_EGL_image_external.vert
+===================================================================
+--- Mesa-8.0.1.orig/src/glsl/builtins/profiles/OES_EGL_image_external.vert 2012-03-20 18:22:02.661070696 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,6 +0,0 @@
+-#version 100
+-#extension GL_OES_EGL_image_external : enable
+-
+-vec4 texture2D(samplerExternalOES sampler, vec2 coord);
+-vec4 texture2DProj(samplerExternalOES sampler, vec3 coord);
+-vec4 texture2DProj(samplerExternalOES sampler, vec4 coord);