* [meta-qt5][PATCH] Use completely PKG_CONFIG which set the variables: - $libdir_raw - $incdir_raw - $libs - $cflags There is no need to have anything in the .pro files then.
@ 2016-04-25 16:05 Julien Gueytat
2016-04-26 10:09 ` Martin Jansa
0 siblings, 1 reply; 3+ messages in thread
From: Julien Gueytat @ 2016-04-25 16:05 UTC (permalink / raw)
To: openembedded-devel; +Cc: j.madieu
Please note that the variables used directly through mkspecs set the end variables
while pkgconfig set $libdir_raw - $incdir_raw - $libs - $cflags.
The previous code was trying to set the variable like QMAKE_LIBS_EGL
through pkgconfig but it was not working.
Use compileTestWithPkgconfig for the EGL test and the EGLFS RaspberryPi test.
The package config file from EGL already triggers bcm_host as a dependency.
The master branch of meta-raspberrypi does the proper job.
The way *.pro files and pkg_config needs changes.
---
config.tests/qpa/egl/egl.pro | 8 --------
config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 9 ---------
config.tests/unix/opengles2/opengles2.pro | 7 -------
configure | 12 ++----------
4 files changed, 2 insertions(+), 34 deletions(-)
diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro
index f04d053..c1889c5 100644
--- a/config.tests/qpa/egl/egl.pro
+++ b/config.tests/qpa/egl/egl.pro
@@ -1,10 +1,2 @@
SOURCES = egl.cpp
-
-for(p, QMAKE_LIBDIR_EGL) {
- exists($$p):LIBS += -L$$p
-}
-
-!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
-!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
-
CONFIG -= qt
diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
index ce16a3a..164cdb4 100644
--- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
+++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
@@ -1,11 +1,2 @@
SOURCES = eglfs-brcm.cpp
-
CONFIG -= qt
-
-INCLUDEPATH += $$QMAKE_INCDIR_EGL
-
-for(p, QMAKE_LIBDIR_EGL) {
- exists($$p):LIBS += -L$$p
-}
-
-LIBS += -lEGL -lGLESv2 -lbcm_host
diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro
index c4d7689..899ad99 100644
--- a/config.tests/unix/opengles2/opengles2.pro
+++ b/config.tests/unix/opengles2/opengles2.pro
@@ -1,12 +1,5 @@
SOURCES = opengles2.cpp
-INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
-
-for(p, QMAKE_LIBDIR_OPENGL_ES2) {
- exists($$p):LIBS += -L$$p
-}
-
CONFIG -= qt
-LIBS += $$QMAKE_LIBS_OPENGL_ES2
mac {
DEFINES += BUILD_ON_MAC
}
diff --git a/configure b/configure
index c696e7e..6d0567b 100755
--- a/configure
+++ b/configure
@@ -5796,15 +5796,7 @@ if [ "$CFG_EGL" != "no" ]; then
exit 101
fi
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
- QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
- QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
- QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
- QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
- QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
- QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
- fi # detect EGL support
- if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
+ if compileTestWithPkgConfig egl qpa/egl "EGL" EGL; then
CFG_EGL=yes
if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
CFG_EGL_X=yes
@@ -5827,7 +5819,7 @@ if [ "$CFG_EGLFS" != "no" ]; then
if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then
CFG_EGLFS="$CFG_EGL"
# Detect eglfs backends.
- if compileTest qpa/eglfs-brcm "eglfs-brcm"; then
+ if compileTestWithPkgConfig egl qpa/eglfs-brcm "eglfs-brcm" EGLFS_BRCM; then
CFG_EGLFS_BRCM=yes
else
CFG_EGLFS_BRCM=no
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-qt5][PATCH] Use completely PKG_CONFIG which set the variables: - $libdir_raw - $incdir_raw - $libs - $cflags There is no need to have anything in the .pro files then.
2016-04-25 16:05 [meta-qt5][PATCH] Use completely PKG_CONFIG which set the variables: - $libdir_raw - $incdir_raw - $libs - $cflags There is no need to have anything in the .pro files then Julien Gueytat
@ 2016-04-26 10:09 ` Martin Jansa
2016-04-26 10:31 ` Julien Gueytat
0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2016-04-26 10:09 UTC (permalink / raw)
To: openembedded-devel; +Cc: j.madieu
[-- Attachment #1: Type: text/plain, Size: 4928 bytes --]
On Mon, Apr 25, 2016 at 06:05:20PM +0200, Julien Gueytat wrote:
> Please note that the variables used directly through mkspecs set the end variables
> while pkgconfig set $libdir_raw - $incdir_raw - $libs - $cflags.
You need blank line as separator of commit summary and body, also please
follow http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
and use better summary.
This patch isn't for meta-qt5 itself, but meta-qt5/qtbase repo, you
should create and test the patch in meta-qt5 (add the patch files to
qtbase directory and qtbase_git.bb).
I'm more concerned about other MACHINEs, I assume you've tested it only
for RPi, but you're changing egl.pro and opengles2.pro also for all
other setups and MACHINEs, so I'll wait a bit more for upstream reaction
for this patch.
I know you've created reports about this in upstream, please mention
them in commit message and also add Upstream-Status flag.
Thanks
>
> The previous code was trying to set the variable like QMAKE_LIBS_EGL
> through pkgconfig but it was not working.
>
> Use compileTestWithPkgconfig for the EGL test and the EGLFS RaspberryPi test.
>
> The package config file from EGL already triggers bcm_host as a dependency.
>
> The master branch of meta-raspberrypi does the proper job.
>
> The way *.pro files and pkg_config needs changes.
> ---
> config.tests/qpa/egl/egl.pro | 8 --------
> config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 9 ---------
> config.tests/unix/opengles2/opengles2.pro | 7 -------
> configure | 12 ++----------
> 4 files changed, 2 insertions(+), 34 deletions(-)
>
> diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro
> index f04d053..c1889c5 100644
> --- a/config.tests/qpa/egl/egl.pro
> +++ b/config.tests/qpa/egl/egl.pro
> @@ -1,10 +1,2 @@
> SOURCES = egl.cpp
> -
> -for(p, QMAKE_LIBDIR_EGL) {
> - exists($$p):LIBS += -L$$p
> -}
> -
> -!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
> -!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
> -
> CONFIG -= qt
> diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
> index ce16a3a..164cdb4 100644
> --- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
> +++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
> @@ -1,11 +1,2 @@
> SOURCES = eglfs-brcm.cpp
> -
> CONFIG -= qt
> -
> -INCLUDEPATH += $$QMAKE_INCDIR_EGL
> -
> -for(p, QMAKE_LIBDIR_EGL) {
> - exists($$p):LIBS += -L$$p
> -}
> -
> -LIBS += -lEGL -lGLESv2 -lbcm_host
> diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro
> index c4d7689..899ad99 100644
> --- a/config.tests/unix/opengles2/opengles2.pro
> +++ b/config.tests/unix/opengles2/opengles2.pro
> @@ -1,12 +1,5 @@
> SOURCES = opengles2.cpp
> -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
> -
> -for(p, QMAKE_LIBDIR_OPENGL_ES2) {
> - exists($$p):LIBS += -L$$p
> -}
> -
> CONFIG -= qt
> -LIBS += $$QMAKE_LIBS_OPENGL_ES2
> mac {
> DEFINES += BUILD_ON_MAC
> }
> diff --git a/configure b/configure
> index c696e7e..6d0567b 100755
> --- a/configure
> +++ b/configure
> @@ -5796,15 +5796,7 @@ if [ "$CFG_EGL" != "no" ]; then
> exit 101
> fi
>
> - if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
> - QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
> - QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
> - QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
> - QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
> - QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
> - QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
> - fi # detect EGL support
> - if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
> + if compileTestWithPkgConfig egl qpa/egl "EGL" EGL; then
> CFG_EGL=yes
> if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
> CFG_EGL_X=yes
> @@ -5827,7 +5819,7 @@ if [ "$CFG_EGLFS" != "no" ]; then
> if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then
> CFG_EGLFS="$CFG_EGL"
> # Detect eglfs backends.
> - if compileTest qpa/eglfs-brcm "eglfs-brcm"; then
> + if compileTestWithPkgConfig egl qpa/eglfs-brcm "eglfs-brcm" EGLFS_BRCM; then
> CFG_EGLFS_BRCM=yes
> else
> CFG_EGLFS_BRCM=no
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-qt5][PATCH] Use completely PKG_CONFIG which set the variables: - $libdir_raw - $incdir_raw - $libs - $cflags There is no need to have anything in the .pro files then.
2016-04-26 10:09 ` Martin Jansa
@ 2016-04-26 10:31 ` Julien Gueytat
0 siblings, 0 replies; 3+ messages in thread
From: Julien Gueytat @ 2016-04-26 10:31 UTC (permalink / raw)
To: openembedded-devel
Thanks for your help about patch conventions.
Sorry for this.
Concerning the patch it's for now only a quick patch to have test and
compilation working for all the layers which have an existing pkg-config
files for EGL.
The bug report and the patch here are only to better understand what's
going on.
I'll see if I can make the proper correction which enables variables
defined by mkspecs or whatever and pkgconfig files.
Here are the two bug reports:
* https://bugreports.qt.io/browse/QTBUG-50838
* https://bugreports.qt.io/browse/QTBUG-52739
Best Regards,
Le 26/04/2016 12:09, Martin Jansa a écrit :
> On Mon, Apr 25, 2016 at 06:05:20PM +0200, Julien Gueytat wrote:
>> Please note that the variables used directly through mkspecs set the end variables
>> while pkgconfig set $libdir_raw - $incdir_raw - $libs - $cflags.
> You need blank line as separator of commit summary and body, also please
> follow http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
> and use better summary.
>
> This patch isn't for meta-qt5 itself, but meta-qt5/qtbase repo, you
> should create and test the patch in meta-qt5 (add the patch files to
> qtbase directory and qtbase_git.bb).
>
> I'm more concerned about other MACHINEs, I assume you've tested it only
> for RPi, but you're changing egl.pro and opengles2.pro also for all
> other setups and MACHINEs, so I'll wait a bit more for upstream reaction
> for this patch.
>
> I know you've created reports about this in upstream, please mention
> them in commit message and also add Upstream-Status flag.
>
> Thanks
>
>> The previous code was trying to set the variable like QMAKE_LIBS_EGL
>> through pkgconfig but it was not working.
>>
>> Use compileTestWithPkgconfig for the EGL test and the EGLFS RaspberryPi test.
>>
>> The package config file from EGL already triggers bcm_host as a dependency.
>>
>> The master branch of meta-raspberrypi does the proper job.
>>
>> The way *.pro files and pkg_config needs changes.
>> ---
>> config.tests/qpa/egl/egl.pro | 8 --------
>> config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 9 ---------
>> config.tests/unix/opengles2/opengles2.pro | 7 -------
>> configure | 12 ++----------
>> 4 files changed, 2 insertions(+), 34 deletions(-)
>>
>> diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro
>> index f04d053..c1889c5 100644
>> --- a/config.tests/qpa/egl/egl.pro
>> +++ b/config.tests/qpa/egl/egl.pro
>> @@ -1,10 +1,2 @@
>> SOURCES = egl.cpp
>> -
>> -for(p, QMAKE_LIBDIR_EGL) {
>> - exists($$p):LIBS += -L$$p
>> -}
>> -
>> -!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
>> -!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
>> -
>> CONFIG -= qt
>> diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
>> index ce16a3a..164cdb4 100644
>> --- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
>> +++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro
>> @@ -1,11 +1,2 @@
>> SOURCES = eglfs-brcm.cpp
>> -
>> CONFIG -= qt
>> -
>> -INCLUDEPATH += $$QMAKE_INCDIR_EGL
>> -
>> -for(p, QMAKE_LIBDIR_EGL) {
>> - exists($$p):LIBS += -L$$p
>> -}
>> -
>> -LIBS += -lEGL -lGLESv2 -lbcm_host
>> diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro
>> index c4d7689..899ad99 100644
>> --- a/config.tests/unix/opengles2/opengles2.pro
>> +++ b/config.tests/unix/opengles2/opengles2.pro
>> @@ -1,12 +1,5 @@
>> SOURCES = opengles2.cpp
>> -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
>> -
>> -for(p, QMAKE_LIBDIR_OPENGL_ES2) {
>> - exists($$p):LIBS += -L$$p
>> -}
>> -
>> CONFIG -= qt
>> -LIBS += $$QMAKE_LIBS_OPENGL_ES2
>> mac {
>> DEFINES += BUILD_ON_MAC
>> }
>> diff --git a/configure b/configure
>> index c696e7e..6d0567b 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5796,15 +5796,7 @@ if [ "$CFG_EGL" != "no" ]; then
>> exit 101
>> fi
>>
>> - if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
>> - QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
>> - QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
>> - QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
>> - QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
>> - QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
>> - QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
>> - fi # detect EGL support
>> - if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
>> + if compileTestWithPkgConfig egl qpa/egl "EGL" EGL; then
>> CFG_EGL=yes
>> if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
>> CFG_EGL_X=yes
>> @@ -5827,7 +5819,7 @@ if [ "$CFG_EGLFS" != "no" ]; then
>> if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then
>> CFG_EGLFS="$CFG_EGL"
>> # Detect eglfs backends.
>> - if compileTest qpa/eglfs-brcm "eglfs-brcm"; then
>> + if compileTestWithPkgConfig egl qpa/eglfs-brcm "eglfs-brcm" EGLFS_BRCM; then
>> CFG_EGLFS_BRCM=yes
>> else
>> CFG_EGLFS_BRCM=no
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-26 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25 16:05 [meta-qt5][PATCH] Use completely PKG_CONFIG which set the variables: - $libdir_raw - $incdir_raw - $libs - $cflags There is no need to have anything in the .pro files then Julien Gueytat
2016-04-26 10:09 ` Martin Jansa
2016-04-26 10:31 ` Julien Gueytat
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.