From be60ffcbbdcd370f9d367db887d31a8ccc6b2519 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Thu, 17 Nov 2016 17:21:03 +0200 Subject: mesa: Upgrade 12.0.3 -> 13.0.1 New major release with OpenGL 4.4 support. Dependency on libudev has been removed. * Rebase replace_glibc_check_with_linux.patch * Add patch to find native wayland-scanner * Add PACKAGECONFIG[osmesa], disabled by default * package osmesa header correctly Signed-off-by: Jussi Kukkonen Signed-off-by: Ross Burton --- .../0001-Use-wayland-scanner-in-the-path.patch | 37 ++++++++++++++++++++++ .../files/replace_glibc_check_with_linux.patch | 25 ++++++++++----- meta/recipes-graphics/mesa/mesa-gl_12.0.3.bb | 13 -------- meta/recipes-graphics/mesa/mesa-gl_13.0.1.bb | 13 ++++++++ meta/recipes-graphics/mesa/mesa.inc | 7 ++-- meta/recipes-graphics/mesa/mesa_12.0.3.bb | 17 ---------- meta/recipes-graphics/mesa/mesa_13.0.1.bb | 18 +++++++++++ 7 files changed, 90 insertions(+), 40 deletions(-) create mode 100644 meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch delete mode 100644 meta/recipes-graphics/mesa/mesa-gl_12.0.3.bb create mode 100644 meta/recipes-graphics/mesa/mesa-gl_13.0.1.bb delete mode 100644 meta/recipes-graphics/mesa/mesa_12.0.3.bb create mode 100644 meta/recipes-graphics/mesa/mesa_13.0.1.bb diff --git a/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch b/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch new file mode 100644 index 0000000000..e49695bf85 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch @@ -0,0 +1,37 @@ +From 2f68fcaaf4964e7feeb383f5c26851965cda037c Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 15 Nov 2016 15:20:49 +0200 +Subject: [PATCH] Simplify wayland-scanner lookup + +Don't use pkg-config to lookup the path of a binary that's in the path. + +Alternatively we'd have to prefix the path returned by pkg-config with +PKG_CONFIG_SYSROOT_DIR. + +Upstream-Status: Pending +Signed-off-by: Jussi Kukkonen +--- + configure.ac | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e56e35a..a92005a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2020,12 +2020,7 @@ if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + +-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner], +- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`, +- WAYLAND_SCANNER='') +-if test "x$WAYLAND_SCANNER" = x; then +- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner]) +-fi ++AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner]) + + # Do per-EGL platform setups and checks + egl_platforms=`IFS=', '; echo $with_egl_platforms` +-- +2.1.4 + diff --git a/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch b/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch index e4461ef177..0280ee8599 100644 --- a/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch +++ b/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch @@ -2,16 +2,25 @@ endianness check is OS wide and not specific to libc Signed-off-by: Khem Raj Upstream-Status: Pending -Index: mesa-11.1.1/src/gallium/include/pipe/p_config.h -=================================================================== ---- mesa-11.1.1.orig/src/gallium/include/pipe/p_config.h -+++ mesa-11.1.1/src/gallium/include/pipe/p_config.h -@@ -130,7 +130,7 @@ - * Endian detection. - */ + +Signed-off-by: Jussi Kukkonen +--- + src/util/u_endian.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/util/u_endian.h b/src/util/u_endian.h +index b9d563d..2d5eab9 100644 +--- a/src/util/u_endian.h ++++ b/src/util/u_endian.h +@@ -27,7 +27,7 @@ + #ifndef U_ENDIAN_H + #define U_ENDIAN_H --#ifdef __GLIBC__ +-#if defined(__GLIBC__) || defined(ANDROID) +#if defined(__linux__) #include #if __BYTE_ORDER == __LITTLE_ENDIAN +-- +2.1.4 + diff --git a/meta/recipes-graphics/mesa/mesa-gl_12.0.3.bb b/meta/recipes-graphics/mesa/mesa-gl_12.0.3.bb deleted file mode 100644 index f06a3e9b58..0000000000 --- a/meta/recipes-graphics/mesa/mesa-gl_12.0.3.bb +++ /dev/null @@ -1,13 +0,0 @@ -require mesa_${PV}.bb - -SUMMARY += " (OpenGL only, no EGL/GLES)" - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/mesa:" - -PROVIDES = "virtual/libgl virtual/mesa" - -S = "${WORKDIR}/mesa-${PV}" - -PACKAGECONFIG ??= "dri ${MESA_CRYPTO} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" - -EXCLUDE_FROM_WORLD = "1" diff --git a/meta/recipes-graphics/mesa/mesa-gl_13.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_13.0.1.bb new file mode 100644 index 0000000000..f06a3e9b58 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-gl_13.0.1.bb @@ -0,0 +1,13 @@ +require mesa_${PV}.bb + +SUMMARY += " (OpenGL only, no EGL/GLES)" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/mesa:" + +PROVIDES = "virtual/libgl virtual/mesa" + +S = "${WORKDIR}/mesa-${PV}" + +PACKAGECONFIG ??= "dri ${MESA_CRYPTO} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" + +EXCLUDE_FROM_WORLD = "1" diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index e4880ffedd..4ec496143c 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://docs/license.html;md5=899fbe7e42d494c7c8c159c7001693d PE = "2" -DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native udev" +DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa" @@ -64,6 +64,9 @@ PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --enable-llvm-shared-libs, export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" PACKAGECONFIG[xa] = "--enable-xa, --disable-xa" +OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}" +PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}" + # Mesa requires one of the following crypto implementation, pick one of them MESA_CRYPTO ??= "openssl" PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl" @@ -183,7 +186,7 @@ FILES_libglapi-dev = "${libdir}/libglapi.*" FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" FILES_libgles3-mesa-dev = "${includedir}/GLES3" -FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc" +FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*" FILES_libxvmcsoftpipe-dev = "${libdir}/libXvMCsoftpipe.so ${libdir}/libXvMCsoftpipe.la" FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ diff --git a/meta/recipes-graphics/mesa/mesa_12.0.3.bb b/meta/recipes-graphics/mesa/mesa_12.0.3.bb deleted file mode 100644 index acc8353ddb..0000000000 --- a/meta/recipes-graphics/mesa/mesa_12.0.3.bb +++ /dev/null @@ -1,17 +0,0 @@ -require ${BPN}.inc - -SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \ - file://replace_glibc_check_with_linux.patch \ - file://disable-asm-on-non-gcc.patch \ -" - -SRC_URI[md5sum] = "1113699c714042d8c4df4766be8c57d8" -SRC_URI[sha256sum] = "1dc86dd9b51272eee1fad3df65e18cda2e556ef1bc0b6e07cd750b9757f493b1" - -#because we cannot rely on the fact that all apps will use pkgconfig, -#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER -do_install_append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then - sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h - fi -} diff --git a/meta/recipes-graphics/mesa/mesa_13.0.1.bb b/meta/recipes-graphics/mesa/mesa_13.0.1.bb new file mode 100644 index 0000000000..37ac15fdba --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa_13.0.1.bb @@ -0,0 +1,18 @@ +require ${BPN}.inc + +SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \ + file://replace_glibc_check_with_linux.patch \ + file://disable-asm-on-non-gcc.patch \ + file://0001-Use-wayland-scanner-in-the-path.patch \ +" + +SRC_URI[md5sum] = "72b7f4d0c2407f367484abd201cb8276" +SRC_URI[sha256sum] = "71962fb2bf77d33b0ad4a565b490dbbeaf4619099c6d9722f04a73187957a731" + +#because we cannot rely on the fact that all apps will use pkgconfig, +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then + sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h + fi +} -- cgit 1.2.3-korg