diff mbox

qt5base: fix build when egl headers need a definition

Message ID 1379503071-5446-1-git-send-email-fatih.asici@gmail.com
State Superseded
Headers show

Commit Message

Fatih Aşıcı Sept. 18, 2013, 11:17 a.m. UTC
The build with gpu-viv-bin-mx6q libraries was broken since it wasn't
using "-DEGL_API_FB=1" flag which is found in egl.pc.

Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com>
---
 package/qt5/qt5base/qt5base-egl-cflags.patch |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 package/qt5/qt5base/qt5base-egl-cflags.patch

Comments

Thomas Petazzoni Sept. 18, 2013, 4:55 p.m. UTC | #1
Dear Fatih Aşıcı,

On Wed, 18 Sep 2013 14:17:51 +0300, Fatih Aşıcı wrote:
> The build with gpu-viv-bin-mx6q libraries was broken since it wasn't
> using "-DEGL_API_FB=1" flag which is found in egl.pc.
> 
> Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com>
> ---
>  package/qt5/qt5base/qt5base-egl-cflags.patch |   21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 package/qt5/qt5base/qt5base-egl-cflags.patch
> 
> diff --git a/package/qt5/qt5base/qt5base-egl-cflags.patch b/package/qt5/qt5base/qt5base-egl-cflags.patch
> new file mode 100644
> index 0000000..7f9d779
> --- /dev/null
> +++ b/package/qt5/qt5base/qt5base-egl-cflags.patch

All patches should have a description, and a Signed-off-by line. See
http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.

> @@ -0,0 +1,21 @@
> +--- a/configure
> ++++ b/configure
> +@@ -5391,6 +5391,7 @@
> +         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 "$QMAKE_CFLAGS_EGL"
> +     fi       # detect EGL support
> +     if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
> +         CFG_EGL=yes
> +--- a/mkspecs/features/egl.prf
> ++++ b/mkspecs/features/egl.prf
> +@@ -14,6 +14,8 @@
> + } else {
> +     INCLUDEPATH += $$QMAKE_INCDIR_EGL
> +     LIBS_PRIVATE += $$QMAKE_LIBS_EGL
> ++    QMAKE_CFLAGS += $$QMAKE_CFLAGS_EGL
> ++    QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_EGL

Shouldn't we have separate QMAKE_CFLAGS_EGL and QMAKE_CXXFLAGS_EGL ? Or
are you following a pattern used in other places?

Thanks!

Thomas
Arnout Vandecappelle Sept. 18, 2013, 9:28 p.m. UTC | #2
On 18/09/13 18:55, Thomas Petazzoni wrote:
> Dear Fatih Aşıcı,
>
> On Wed, 18 Sep 2013 14:17:51 +0300, Fatih Aşıcı wrote:
>> >The build with gpu-viv-bin-mx6q libraries was broken since it wasn't
>> >using "-DEGL_API_FB=1" flag which is found in egl.pc.
>> >
>> >Signed-off-by: Fatih Aşıcı<fatih.asici@gmail.com>
>> >---
>> >  package/qt5/qt5base/qt5base-egl-cflags.patch |   21 +++++++++++++++++++++
>> >  1 file changed, 21 insertions(+)
>> >  create mode 100644 package/qt5/qt5base/qt5base-egl-cflags.patch
>> >
>> >diff --git a/package/qt5/qt5base/qt5base-egl-cflags.patch b/package/qt5/qt5base/qt5base-egl-cflags.patch
>> >new file mode 100644
>> >index 0000000..7f9d779
>> >--- /dev/null
>> >+++ b/package/qt5/qt5base/qt5base-egl-cflags.patch
> All patches should have a description, and a Signed-off-by line. See
> http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.


  Also, please give your patch a number so that the order in which 
they're applied is predictable. At the moment this probably doesn't 
matter much, but it makes it easier later on to make sure a new patch 
will be applied after this one.

  Regards,
  Arnout
Thomas Petazzoni Sept. 19, 2013, 4:12 a.m. UTC | #3
Dear Arnout Vandecappelle,

On Wed, 18 Sep 2013 23:28:03 +0200, Arnout Vandecappelle wrote:

> >> >+++ b/package/qt5/qt5base/qt5base-egl-cflags.patch
> > All patches should have a description, and a Signed-off-by line. See
> > http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.
> 
>   Also, please give your patch a number so that the order in which 
> they're applied is predictable. At the moment this probably doesn't 
> matter much, but it makes it easier later on to make sure a new patch 
> will be applied after this one.

Yeah, I also wanted to ask that, but there are existing patches for
qt5base that doesn't comply with this, so I felt that it was maybe not
appropriate to ask a contributor to fix our (my ?) mess :-)

But indeed, Fatih, as a preparation patch, you could add number to the
existing patches, and then add your own.

Best regards,

Thomas
Arnout Vandecappelle Sept. 19, 2013, 5:36 p.m. UTC | #4
On 19/09/13 06:12, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle,
>
> On Wed, 18 Sep 2013 23:28:03 +0200, Arnout Vandecappelle wrote:
>
>>>>> +++ b/package/qt5/qt5base/qt5base-egl-cflags.patch
>>> All patches should have a description, and a Signed-off-by line. See
>>> http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.
>>
>>    Also, please give your patch a number so that the order in which
>> they're applied is predictable. At the moment this probably doesn't
>> matter much, but it makes it easier later on to make sure a new patch
>> will be applied after this one.
>
> Yeah, I also wanted to ask that, but there are existing patches for
> qt5base that doesn't comply with this, so I felt that it was maybe not
> appropriate to ask a contributor to fix our (my ?) mess :-)
>
> But indeed, Fatih, as a preparation patch, you could add number to the
> existing patches, and then add your own.

  I didn't say to add a number to the existing patches. Since the order 
doesn't matter for this patch, you can just give this patch a number and 
leave the other ones alone. This is particularly relevant since your qt5 
version bumping patch removes some of the patches, so renaming would give 
a conflict...

  Regards,
  Arnout
diff mbox

Patch

diff --git a/package/qt5/qt5base/qt5base-egl-cflags.patch b/package/qt5/qt5base/qt5base-egl-cflags.patch
new file mode 100644
index 0000000..7f9d779
--- /dev/null
+++ b/package/qt5/qt5base/qt5base-egl-cflags.patch
@@ -0,0 +1,21 @@ 
+--- a/configure
++++ b/configure
+@@ -5391,6 +5391,7 @@
+         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 "$QMAKE_CFLAGS_EGL"
+     fi       # detect EGL support
+     if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
+         CFG_EGL=yes
+--- a/mkspecs/features/egl.prf
++++ b/mkspecs/features/egl.prf
+@@ -14,6 +14,8 @@
+ } else {
+     INCLUDEPATH += $$QMAKE_INCDIR_EGL
+     LIBS_PRIVATE += $$QMAKE_LIBS_EGL
++    QMAKE_CFLAGS += $$QMAKE_CFLAGS_EGL
++    QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_EGL
+     LIBS += $$QMAKE_LFLAGS_EGL
+     for(p, QMAKE_LIBDIR_EGL) {
+         exists($$p):LIBS_PRIVATE += -L$$p