Skip to contentSkip to conversation

Robert Yang : mesa: fix do_install_append

oe-commits In review Martin Jansa 3 participants 4 messages Jun 20, 2015 – Jul 21, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 37 lines · On Thu, May 14, 2015 at 10:44:21AM +0000, [email protected] wrote:
Module: openembedded-core.git
Branch: master
Commit: 3a464d67b60f70b865f7db768e7edc53e40ff450
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3a464d67b60f70b865f7db768e7edc53e40ff450
Author: Robert Yang <[email protected]>
Date:   Wed May  6 00:08:35 2015 -0700

mesa: fix do_install_append

"ifdef MESA_EGL_NO_X11_HEADERS" -> "if defined(MESA_EGL_NO_X11_HEADERS)"

---

 meta/recipes-graphics/mesa/mesa_10.5.4.bb | 2 +-
 meta/recipes-graphics/mesa/mesa_git.bb    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa_10.5.4.bb +1 -1
index 150c664..03c9ecf 100644
@@ -9,6 +9,6 @@ SRC_URI[sha256sum] = "b51e723f3a20d842c88a92d809435b229fc4744ca0dbec0317d9d4a3ac
 #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/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
     fi
 }
meta/recipes-graphics/mesa/mesa_git.bb +0 -0
index 0260617..8f70f67 100644

meta/recipes-graphics/mesa/mesa_git.bb inherit pythonnative · line 21

Quoted 6 lines
meta/recipes-graphics/mesa/mesa_git.bb +1 -1
@@ -17,6 +17,6 @@ inherit pythonnative
 #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/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
     fi

BTW: this is still breaking qtdeclarative which is using "None" symbol which conflicts with "None" defined in Xlib.h

I've suggested renaming "None" in qtdeclarative to something more specific, but it was rejected upstream (understandably as it's already part of public API and needs changes in 5 qt components, see patch here:
https://github.com/webOS-ports/meta-webos-ports/commit/31aa85787a7513e279165a25f6f06ea72c576314)
and they suggested to undef None before qsgtexture.h is included.

Do you remember why we don't respect MESA_EGL_NO_X11_HEADERS here? If
it's to fix application not using pkg-config to pass
MESA_EGL_NO_X11_HEADERS shouldn't we respect both like this:
sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)/#if defined(MESA_EGL_NO_X11_HEADERS) and ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h

+Valentin as it was introduced first in this commit (without any explanation in commit message)

commit a5ebdb6ad8e4f94ac819275d55575230e057e4ae

Author: Valentin Popa <[email protected]>
Date:   Tue Feb 18 13:32:16 2014 +0200
    mesa: upgrade to 9.2.5

?

Quoted 7 lines
meta/recipes-graphics/mesa/mesa_git.bb +0 -0
 }
Signature · 5 lines
-- 
_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw

PATCH 1/1 mesa: respect MESA_EGL_NO_X11_HEADERS even with x11 in PACKAGECONFIG

* commit a5ebdb6ad8e4f94ac819275d55575230e057e4ae
Author: Valentin Popa <[email protected]>
Date: Tue Feb 18 13:32:16 2014 +0200
Subject: mesa: upgrade to 9.2.5

introduced this do_install_append, but doesn't explain why it doesn't respect MESA_EGL_NO_X11_HEADERS flag anymore.

Not respecting MESA_EGL_NO_X11_HEADERS breaks any build which is using qtdeclarative+egl in distribution which has x11 in mesa PACKAGECONFIG (e.g. my bitbake world builds).

The problem is that qtdeclarative is using "None" symbol in QSGTexture::Filtering enum, it's possible to rename it in qtdeclarative, but it's quite invasive and changes qtdeclarative public APIs, see:
https://github.com/webOS-ports/meta-webos-ports/commit/31aa85787a7513e279165a25f6f06ea72c576314
so it was rejected by upstream and I don't want to maintain it in meta-qt5 - changing public API in OE build is even worse than if upstream does it.

* This change returns MESA_EGL_NO_X11_HEADERS flag so it's relatively easy to resolve this conflict in such setups by preventing Xlib.h inclusion.

---
 meta/recipes-graphics/mesa/mesa_10.5.8.bb | 2 +-
 meta/recipes-graphics/mesa/mesa_git.bb    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa_10.5.8.bb +1 -1
index 7cfef0c..072cde9 100644
@@ -9,6 +9,6 @@ SRC_URI[sha256sum] = "2866b855c5299a4aed066338c77ff6467c389b2c30ada7647be8758663
 #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 ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        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
 }
meta/recipes-graphics/mesa/mesa_git.bb +1 -1
index 8f70f67..c034517 100644
@@ -17,6 +17,6 @@ inherit pythonnative
 #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 ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        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
 }
Signature · 1 line
2.4.4
#3 lore raw

Re: [PATCH] mesa: respect MESA_EGL_NO_X11_HEADERS even with x11 in PACKAGECONFIG

Hi,

I like this patch. I would like a similar patch to be made available in the fido branch, but changing "#if defined()" to "#ifdef" The defines seems to have been changed between mesa 10.4 and 10.5, so the current patch only works for 10.5 - in 10.4 ifdef is used instead so the sed does nothing. Should I submit another patch for that?

//Tobias

Quoted 77 lines · Martin Jansa

* commit a5ebdb6ad8e4f94ac819275d55575230e057e4ae
Author: Valentin Popa <[email protected]>
Date: Tue Feb 18 13:32:16 2014 +0200
Subject: mesa: upgrade to 9.2.5

introduced this do_install_append, but doesn't explain why it doesn't respect MESA_EGL_NO_X11_HEADERS flag anymore.

Not respecting MESA_EGL_NO_X11_HEADERS breaks any build which is using qtdeclarative+egl in distribution which has x11 in mesa PACKAGECONFIG (e.g. my bitbake world builds).

The problem is that qtdeclarative is using "None" symbol in QSGTexture::Filtering enum, it's possible to rename it in qtdeclarative, but it's quite invasive and changes qtdeclarative public APIs, see:

https://github.com/webOS-ports/meta-webos-ports/commit/31aa85787a7513e279165a25f6f06ea72c576314
so it was rejected by upstream and I don't want to maintain it in meta-qt5 - changing public API in OE build is even worse than if upstream does it.

* This change returns MESA_EGL_NO_X11_HEADERS flag so it's relatively easy to resolve this conflict in such setups by preventing Xlib.h inclusion.

---
 meta/recipes-graphics/mesa/mesa_10.5.8.bb | 2 +-
 meta/recipes-graphics/mesa/mesa_git.bb    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa_10.5.8.bb +0 -0
index 7cfef0c..072cde9 100644
@@ -9,6 +9,6 @@ SRC_URI[sha256sum] =

"2866b855c5299a4aed066338c77ff6467c389b2c30ada7647be8758663
#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
${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+ 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
}

meta/recipes-graphics/mesa/mesa_git.bb +0 -0
index 8f70f67..c034517 100644
@@ -17,6 +17,6 @@ inherit pythonnative
 #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
${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+ 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
}
--
2.4.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 9 lines
Tobias Olausson
M.Sc
Software Engineer

PELAGICORE | Experience Change
Ekelundsgatan 4, 6tr, SE-411 18 Gothenburg, Sweden
Mobile: +46(0)735-873444
E-Mail: [email protected]
IRC: wto @ FreeNode
#4 lore raw

Re: [PATCH] mesa: respect MESA_EGL_NO_X11_HEADERS even with x11 in PACKAGECONFIG

Quoted 5 lines · Tobias Olausson

I like this patch. I would like a similar patch to be made available in the fido branch, but changing "#if defined()" to "#ifdef" The defines seems to have been changed between mesa 10.4 and 10.5, so the current patch only works for 10.5 - in 10.4 ifdef is used instead so the sed does nothing. Should I submit another patch for that?

Yes, please do.

Ross