package/qt5declarative: fix gcc-11 compile failure
authorPeter Seiderer <ps.report@gmx.net>
Thu, 22 Jul 2021 21:24:34 +0000 (23:24 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 25 Jul 2021 21:29:31 +0000 (23:29 +0200)
commitfe68d894715e0cfd214444efb586f434802ae2c2
treebb002f4598e67b53e20cb2508fc450c7c072fa41
parent0ba7a0fd52dd0633b50a11686ebe486c9a6f33f8
package/qt5declarative: fix gcc-11 compile failure

- add patch for qv4regexp_p to include c++ limits include (instead of plain
  c limit.h)

Fixes:

  In file included from jsruntime/qv4regexp_p.h:62,
                   from jsruntime/qv4regexp.cpp:40:
  ../3rdparty/masm/yarr/Yarr.h:46:44: error: ‘numeric_limits’ is not a member of ‘std’
     46 | static const unsigned offsetNoMatch = std::numeric_limits<unsigned>::max();
        |                                            ^~~~~~~~~~~~~~
  ../3rdparty/masm/yarr/Yarr.h:46:59: error: expected primary-expression before ‘unsigned’
     46 | static const unsigned offsetNoMatch = std::numeric_limits<unsigned>::max();
        |                                                           ^~~~~~~~

- add patch for qqmlprofilerevent_p to include c++ limits include

Fixes:

  In file included from qqmlprofilertypedevent_p.h:43,
                   from qqmlprofilertypedevent.cpp:40:
  qqmlprofilerevent_p.h: In member function ‘void QQmlProfilerEvent::assignNumbers(const Container&)’:
  qqmlprofilerevent_p.h:314:65: error: ‘numeric_limits’ is not a member of ‘std’
    314 |                     static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
        |                                                                 ^~~~~~~~~~~~~~
  qqmlprofilerevent_p.h:314:87: error: expected primary-expression before ‘>’ token
    314 |                     static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
        |                                                                                       ^
  qqmlprofilerevent_p.h:314:90: error: ‘::max’ has not been declared; did you mean ‘std::max’?
    314 |                     static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
        |                                                                                          ^~~
        |                                                                                          std::max

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/qt5/qt5declarative/0002-qv4regexp_p-needs-c-limits-include-instead-of-plain-.patch [new file with mode: 0644]
package/qt5/qt5declarative/0003-qqmlprofilerevent_p-needs-c-limits-inlcude-fixes-gcc.patch [new file with mode: 0644]