All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies
@ 2020-08-22 18:25 Fabrice Fontaine
  2020-08-22 18:25 ` [Buildroot] [PATCH 2/2] package/qt5/qt5imageformats: fix build with jasper Fabrice Fontaine
  2020-08-23 13:28 ` [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies Yann E. MORIN
  0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2020-08-22 18:25 UTC (permalink / raw)
  To: buildroot

Add optional dependencies which are enabled by default:
 - libmng and tiff are optional dependencies since version 5.0.0 and
   https://github.com/qt/qtimageformats/commit/5373e3e821c7f43d9c941384437b1d39d6e9d47e
 - webp is an optional dependency since version 5.3.0 and
   https://github.com/qt/qtimageformats/commit/4522b350e53471c2ebc6d4692736ee4708445b66
 - jasper is an optional dependency since version 5.7.0 and
   https://github.com/qt/qtimageformats/commit/2d59367241aafbfe6acb30202f64e30697028bd9

Ideally we should use the configure options to disable those
dependencies if needed especially webp to avoid using the embedded one
These options are defined here:
https://code.qt.io/cgit/qt/qtimageformats.git/tree/config_help.txt
but I'm not skilled enough with the qmake-infrastructure

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/qt5/qt5imageformats/qt5imageformats.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk
index ffb094d566..33631a39b2 100644
--- a/package/qt5/qt5imageformats/qt5imageformats.mk
+++ b/package/qt5/qt5imageformats/qt5imageformats.mk
@@ -12,4 +12,10 @@ QT5IMAGEFORMATS_INSTALL_STAGING = YES
 QT5IMAGEFORMATS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.GPL3-EXCEPT LICENSE.LGPLv3 LICENSE.FDL
 
+QT5IMAGEFORMATS_DEPENDENCIES += \
+	$(if $(BR2_PACKAGE_JASPER),jasper) \
+	$(if $(BR2_PACKAGE_LIBMNG),libmng) \
+	$(if $(BR2_PACKAGE_TIFF),tiff) \
+	$(if $(BR2_PACKAGE_WEBP),webp)
+
 $(eval $(qmake-package))
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] package/qt5/qt5imageformats: fix build with jasper
  2020-08-22 18:25 [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies Fabrice Fontaine
@ 2020-08-22 18:25 ` Fabrice Fontaine
  2020-08-23 13:29   ` Yann E. MORIN
  2020-08-23 13:28 ` [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies Yann E. MORIN
  1 sibling, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2020-08-22 18:25 UTC (permalink / raw)
  To: buildroot

Fixes:
 - http://autobuild.buildroot.org/results/ea3bc0d3110cb54421ecf433317ca79ca0ff834a
 - http://autobuild.buildroot.org/results/6831dfdd1ecaaa3812de481882040c1742a72aec

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0001-fix-build-on-Arch-Linux.patch        | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch

diff --git a/package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch b/package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch
new file mode 100644
index 0000000000..c348c65260
--- /dev/null
+++ b/package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch
@@ -0,0 +1,37 @@
+From 704868db61be1542c2d9e2b75ead00c45c56cc36 Mon Sep 17 00:00:00 2001
+From: "Evgeniy A. Dushistov" <dushistov@mail.ru>
+Date: Sat, 15 Aug 2020 15:09:08 +0300
+Subject: fix build on Arch Linux
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+qtimageformats/src/plugins/imageformats/jp2/qjp2handler.cpp:844:41:
+error: no declaration of ?pow?
+  844 |     const double jasperRate = minRate + pow((double(quality) / double(maxQuality)), 2) * maxRate;
+
+Pick-to: 5.15
+Change-Id: I085996c2db2251903b2a3e52e6e648831637c8f9
+Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
+[Retrieved from:
+https://code.qt.io/cgit/qt/qtimageformats.git/commit/?id=704868db61be1542c2d9e2b75ead00c45c56cc36]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/plugins/imageformats/jp2/qjp2handler.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/plugins/imageformats/jp2/qjp2handler.cpp b/src/plugins/imageformats/jp2/qjp2handler.cpp
+index 4311d26..05c7bc1 100644
+--- a/src/plugins/imageformats/jp2/qjp2handler.cpp
++++ b/src/plugins/imageformats/jp2/qjp2handler.cpp
+@@ -45,6 +45,7 @@
+ #include "qcolor.h"
+ 
+ #include <jasper/jasper.h>
++#include <math.h> // for pow
+ 
+ QT_BEGIN_NAMESPACE
+ 
+-- 
+cgit v1.2.1
+
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies
  2020-08-22 18:25 [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies Fabrice Fontaine
  2020-08-22 18:25 ` [Buildroot] [PATCH 2/2] package/qt5/qt5imageformats: fix build with jasper Fabrice Fontaine
@ 2020-08-23 13:28 ` Yann E. MORIN
  2020-08-23 14:16   ` Fabrice Fontaine
  1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2020-08-23 13:28 UTC (permalink / raw)
  To: buildroot

On 2020-08-22 20:25 +0200, Fabrice Fontaine spake thusly:
> Add optional dependencies which are enabled by default:
>  - libmng and tiff are optional dependencies since version 5.0.0 and
>    https://github.com/qt/qtimageformats/commit/5373e3e821c7f43d9c941384437b1d39d6e9d47e
>  - webp is an optional dependency since version 5.3.0 and
>    https://github.com/qt/qtimageformats/commit/4522b350e53471c2ebc6d4692736ee4708445b66
>  - jasper is an optional dependency since version 5.7.0 and
>    https://github.com/qt/qtimageformats/commit/2d59367241aafbfe6acb30202f64e30697028bd9
> 
> Ideally we should use the configure options to disable those
> dependencies if needed especially webp to avoid using the embedded one
> These options are defined here:
> https://code.qt.io/cgit/qt/qtimageformats.git/tree/config_help.txt
> but I'm not skilled enough with the qmake-infrastructure

https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_qmake_based_packages
It would probably be something along the lines of:

    ifeq ($(BR2_PACKAGE_JASPER),y)
    QT5IMAGEFORMATS_DEPENDENCIES += jasper
    QT5IMAGEFORMATS_CONF_OPTS += QT_CONFIG+=jasper
    else
    QT5IMAGEFORMATS_CONF_OPTS += QT_CONFIG-=jasper
    endif

Would you rework this patch, and split it into four patches, one for
each optional dependency, please?

Regards,
Yann E. MORIN.

> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/qt5/qt5imageformats/qt5imageformats.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk
> index ffb094d566..33631a39b2 100644
> --- a/package/qt5/qt5imageformats/qt5imageformats.mk
> +++ b/package/qt5/qt5imageformats/qt5imageformats.mk
> @@ -12,4 +12,10 @@ QT5IMAGEFORMATS_INSTALL_STAGING = YES
>  QT5IMAGEFORMATS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
>  QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.GPL3-EXCEPT LICENSE.LGPLv3 LICENSE.FDL
>  
> +QT5IMAGEFORMATS_DEPENDENCIES += \
> +	$(if $(BR2_PACKAGE_JASPER),jasper) \
> +	$(if $(BR2_PACKAGE_LIBMNG),libmng) \
> +	$(if $(BR2_PACKAGE_TIFF),tiff) \
> +	$(if $(BR2_PACKAGE_WEBP),webp)
> +
>  $(eval $(qmake-package))
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] package/qt5/qt5imageformats: fix build with jasper
  2020-08-22 18:25 ` [Buildroot] [PATCH 2/2] package/qt5/qt5imageformats: fix build with jasper Fabrice Fontaine
@ 2020-08-23 13:29   ` Yann E. MORIN
  0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-08-23 13:29 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2020-08-22 20:25 +0200, Fabrice Fontaine spake thusly:
> Fixes:
>  - http://autobuild.buildroot.org/results/ea3bc0d3110cb54421ecf433317ca79ca0ff834a
>  - http://autobuild.buildroot.org/results/6831dfdd1ecaaa3812de481882040c1742a72aec
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  .../0001-fix-build-on-Arch-Linux.patch        | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch
> 
> diff --git a/package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch b/package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch
> new file mode 100644
> index 0000000000..c348c65260
> --- /dev/null
> +++ b/package/qt5/qt5imageformats/0001-fix-build-on-Arch-Linux.patch
> @@ -0,0 +1,37 @@
> +From 704868db61be1542c2d9e2b75ead00c45c56cc36 Mon Sep 17 00:00:00 2001
> +From: "Evgeniy A. Dushistov" <dushistov@mail.ru>
> +Date: Sat, 15 Aug 2020 15:09:08 +0300
> +Subject: fix build on Arch Linux
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +qtimageformats/src/plugins/imageformats/jp2/qjp2handler.cpp:844:41:
> +error: no declaration of ?pow?
> +  844 |     const double jasperRate = minRate + pow((double(quality) / double(maxQuality)), 2) * maxRate;
> +
> +Pick-to: 5.15
> +Change-Id: I085996c2db2251903b2a3e52e6e648831637c8f9
> +Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
> +[Retrieved from:
> +https://code.qt.io/cgit/qt/qtimageformats.git/commit/?id=704868db61be1542c2d9e2b75ead00c45c56cc36]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + src/plugins/imageformats/jp2/qjp2handler.cpp | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/src/plugins/imageformats/jp2/qjp2handler.cpp b/src/plugins/imageformats/jp2/qjp2handler.cpp
> +index 4311d26..05c7bc1 100644
> +--- a/src/plugins/imageformats/jp2/qjp2handler.cpp
> ++++ b/src/plugins/imageformats/jp2/qjp2handler.cpp
> +@@ -45,6 +45,7 @@
> + #include "qcolor.h"
> + 
> + #include <jasper/jasper.h>
> ++#include <math.h> // for pow
> + 
> + QT_BEGIN_NAMESPACE
> + 
> +-- 
> +cgit v1.2.1
> +
> -- 
> 2.28.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies
  2020-08-23 13:28 ` [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies Yann E. MORIN
@ 2020-08-23 14:16   ` Fabrice Fontaine
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2020-08-23 14:16 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le dim. 23 ao?t 2020 ? 15:28, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
>
> On 2020-08-22 20:25 +0200, Fabrice Fontaine spake thusly:
> > Add optional dependencies which are enabled by default:
> >  - libmng and tiff are optional dependencies since version 5.0.0 and
> >    https://github.com/qt/qtimageformats/commit/5373e3e821c7f43d9c941384437b1d39d6e9d47e
> >  - webp is an optional dependency since version 5.3.0 and
> >    https://github.com/qt/qtimageformats/commit/4522b350e53471c2ebc6d4692736ee4708445b66
> >  - jasper is an optional dependency since version 5.7.0 and
> >    https://github.com/qt/qtimageformats/commit/2d59367241aafbfe6acb30202f64e30697028bd9
> >
> > Ideally we should use the configure options to disable those
> > dependencies if needed especially webp to avoid using the embedded one
> > These options are defined here:
> > https://code.qt.io/cgit/qt/qtimageformats.git/tree/config_help.txt
> > but I'm not skilled enough with the qmake-infrastructure
>
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_qmake_based_packages
> It would probably be something along the lines of:
>
>     ifeq ($(BR2_PACKAGE_JASPER),y)
>     QT5IMAGEFORMATS_DEPENDENCIES += jasper
>     QT5IMAGEFORMATS_CONF_OPTS += QT_CONFIG+=jasper
>     else
>     QT5IMAGEFORMATS_CONF_OPTS += QT_CONFIG-=jasper
>     endif
This doesn't work, this has no effect on the build (i.e. jasper is
enabled if it is found on the system even if I passed QT_CONFIG -=
jasper or more importantly the embedded webp is used even if I passed
QT_CONFIG -= webp).

>> qt5imageformats 5.15.0 Configuring
cd /home/fabrice/buildroot/output/build/qt5imageformats-5.15.0/ &&
PATH="/home/fabrice/buildroot/output/host/bin:/home/fabrice/buildroot/output/host/sbin:/home/fabrice/perl5/bin:/home/fabrice/.local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
 /home/fabrice/buildroot/output/host/bin/qmake -spec
devices/linux-buildroot-g++ QT_CONFIG-=jasper QT_CONFIG-=tiff
QT_CONFIG-=webp
Info: creating stash file
/home/fabrice/buildroot/output/build/qt5imageformats-5.15.0/.qmake.stash
Info: creating cache file
/home/fabrice/buildroot/output/build/qt5imageformats-5.15.0/.qmake.cache

Running configuration tests...
Done running configuration tests.

Configure summary:

Further Image Formats:
  JasPer ................................. yes
  MNG .................................... no
  TIFF ................................... yes
    Using system libtiff ................. no
  WEBP ................................... yes
    Using system libwebp ................. no

From my understanding, the build option should be -webp=system or
-webp=no but this option is not recognized by qmake but I know nearly
nothing about Qt.
>
> Would you rework this patch, and split it into four patches, one for
> each optional dependency, please?
>
> Regards,
> Yann E. MORIN.
>
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/qt5/qt5imageformats/qt5imageformats.mk | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk
> > index ffb094d566..33631a39b2 100644
> > --- a/package/qt5/qt5imageformats/qt5imageformats.mk
> > +++ b/package/qt5/qt5imageformats/qt5imageformats.mk
> > @@ -12,4 +12,10 @@ QT5IMAGEFORMATS_INSTALL_STAGING = YES
> >  QT5IMAGEFORMATS_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
> >  QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.GPL3-EXCEPT LICENSE.LGPLv3 LICENSE.FDL
> >
> > +QT5IMAGEFORMATS_DEPENDENCIES += \
> > +     $(if $(BR2_PACKAGE_JASPER),jasper) \
> > +     $(if $(BR2_PACKAGE_LIBMNG),libmng) \
> > +     $(if $(BR2_PACKAGE_TIFF),tiff) \
> > +     $(if $(BR2_PACKAGE_WEBP),webp)

> > +
> >  $(eval $(qmake-package))
> > --
> > 2.28.0
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Best Regards,

Fabrice

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-23 14:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 18:25 [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies Fabrice Fontaine
2020-08-22 18:25 ` [Buildroot] [PATCH 2/2] package/qt5/qt5imageformats: fix build with jasper Fabrice Fontaine
2020-08-23 13:29   ` Yann E. MORIN
2020-08-23 13:28 ` [Buildroot] [PATCH 1/2] package/qt5/qt5imageformats: add optional dependencies Yann E. MORIN
2020-08-23 14:16   ` Fabrice Fontaine

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.