From 3af38f85fed26e34a7f3d3b04c19c6f1166308895b475f65c131fcf5606d38b5 Mon Sep 17 00:00:00 2001 From: Nicolas Rochard Date: Sun, 8 Aug 2021 11:18:00 +0000 Subject: [PATCH 1/6] Accepting request 910379 from home:licehunter:branches:Application:Geo - Enable PDAL The current builds of QGIS do not include PDAL (WITH_PDAL=FALSE) meaning that it is not possible to work with point clouds. This submission is my attempt at getting PDAL enabled in QGIS. Successfully tested on Tumbleweed. At the time of branching, Leap 15.x builds were broken due to unrelated changes and remain so in this package. OBS-URL: https://build.opensuse.org/request/show/910379 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=332 --- qgis-fix-cmake-findpdal.patch | 11 +++++++++++ qgis.changes | 5 +++++ qgis.spec | 9 ++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 qgis-fix-cmake-findpdal.patch diff --git a/qgis-fix-cmake-findpdal.patch b/qgis-fix-cmake-findpdal.patch new file mode 100644 index 0000000..7c9295c --- /dev/null +++ b/qgis-fix-cmake-findpdal.patch @@ -0,0 +1,11 @@ +--- a/cmake/FindPDAL.cmake 2021-08-05 12:51:21.255398497 +0000 ++++ b/cmake/FindPDAL.cmake 2021-08-05 12:51:42.319428567 +0000 +@@ -40,7 +40,7 @@ FIND_LIBRARY(PDAL_UTIL_LIBRARY NAMES pda + ) + FIND_LIBRARY(PDAL_UTIL_LIBRARY NAMES pdal_util libpdal_util) + +-FIND_PROGRAM(PDAL_BIN pdal ++FIND_PROGRAM(PDAL_BIN pdal-config + $ENV{LIB_DIR}/bin + /usr/local/bin/ + /usr/bin/ diff --git a/qgis.changes b/qgis.changes index e80369b..baf9c8c 100644 --- a/qgis.changes +++ b/qgis.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 5 17:41:56 UTC 2021 - D. Berge + +- Enable PDAL + ------------------------------------------------------------------- Tue Aug 3 08:40:57 UTC 2021 - Dirk Stoecker diff --git a/qgis.spec b/qgis.spec index c3686f4..9541e82 100644 --- a/qgis.spec +++ b/qgis.spec @@ -1,5 +1,5 @@ # -# spec file for package qgis +# spec file for package qgis-ltr # # Copyright (c) 2021 SUSE LLC # @@ -39,7 +39,11 @@ Patch1: fix-fastcgi-include.patch Patch2: qgis-fix-missing-qwt-inc.patch # PATCH-FIX-UPSTREAM - https://github.com/qgis/QGIS/commit/581cb40603dd3daca2916b564a4cd2630d005556 Patch3: qgis-fix-missing-qwt-inc-part2.patch +Patch4: qgis-fix-cmake-findpdal.patch BuildRequires: FastCGI-devel +BuildRequires: PDAL-devel +# PDAL-devel depends on this (laszip_api.h) +BuildRequires: laszip-devel BuildRequires: bison >= 2.4 BuildRequires: cmake >= 3.0.0 BuildRequires: fdupes @@ -117,6 +121,7 @@ BuildRequires: pkgconfig(Qt5Qwt6) BuildRequires: pkgconfig(gsl) >= 1.8 BuildRequires: pkgconfig(libpq) > 9.4 BuildRequires: pkgconfig(libzip) +BuildRequires: pkgconfig(pdal) >= 2.2.0 BuildRequires: pkgconfig(proj) >= 6.3.1 BuildRequires: pkgconfig(python3) >= 3.7 BuildRequires: pkgconfig(qca2-qt5) @@ -127,6 +132,7 @@ Requires: libQt5Sql5-postgresql Requires: libQt5Sql5-sqlite # proj.db is required Requires: proj +Requires: pdal Requires: python3-GDAL Requires: python3-Jinja2 Requires: python3-OWSLib @@ -222,6 +228,7 @@ export PATH=$PATH:$QTDIR/bin -DWITH_SERVER=TRUE \ -DWITH_SERVER_PLUGINS=TRUE \ -DWITH_POSTGRESQL=TRUE \ + -DWITH_PDAL=TRUE \ -DWITH_QTWEBKIT=FALSE \ -DFCGI_INCLUDE_DIR=%{_includedir}/fastcgi \ -DPOSTGRES_LIBRARY=%{_libdir}/libpq.so \ From f19d85e4566c1d391bbbedb9ffbc1e40b23298f222cd4c5adbbc35fee929326f Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Fri, 13 Aug 2021 05:57:38 +0000 Subject: [PATCH 2/6] Accepting request 911498 from home:jacraig:branches:Application:Geo - Add fix-infinite-loop.patch: fix startup of QGIS. This will be integrated upstream in 3.20.2. OBS-URL: https://build.opensuse.org/request/show/911498 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=333 --- fix-infinite-loop.patch | 214 ++++++++++++++++++++++++++++++++++++++++ qgis.changes | 6 ++ qgis.spec | 2 + 3 files changed, 222 insertions(+) create mode 100644 fix-infinite-loop.patch diff --git a/fix-infinite-loop.patch b/fix-infinite-loop.patch new file mode 100644 index 0000000..e04b4bf --- /dev/null +++ b/fix-infinite-loop.patch @@ -0,0 +1,214 @@ +From 2055199a3a4a01f5fcc9fe54a14d3ca27a21961b Mon Sep 17 00:00:00 2001 +From: PeterPetrik +Date: Fri, 2 Jul 2021 14:40:59 +0200 +Subject: [PATCH 1/2] fix infinite loop in qgsstyle + +--- + src/core/symbology/qgsstyle.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/core/symbology/qgsstyle.cpp b/src/core/symbology/qgsstyle.cpp +index 6ca37dde3a15..c87305b3c8fa 100644 +--- a/src/core/symbology/qgsstyle.cpp ++++ b/src/core/symbology/qgsstyle.cpp +@@ -2755,6 +2755,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the symbol, should already be present ++ e = e.nextSiblingElement(); + continue; + } + +@@ -2810,6 +2811,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the ramp, should already be present ++ e = e.nextSiblingElement(); + continue; + } + +@@ -2859,6 +2861,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the format, should already be present ++ e = e.nextSiblingElement(); + continue; + } + +@@ -2904,6 +2907,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the settings, should already be present ++ e = e.nextSiblingElement(); + continue; + } + +@@ -2950,6 +2954,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the shape, should already be present ++ e = e.nextSiblingElement(); + continue; + } + +@@ -2995,6 +3000,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the symbol, should already be present ++ e = e.nextSiblingElement(); + continue; + } + + +From d03c4b4806ca241c8daed446c98ae66988bd1dcd Mon Sep 17 00:00:00 2001 +From: Nyall Dawson +Date: Thu, 22 Jul 2021 10:30:05 +1000 +Subject: [PATCH 2/2] Cleanup style upgrade loop + +Refs https://github.com/qgis/QGIS/pull/44038/files#r663350654 +--- + src/core/symbology/qgsstyle.cpp | 24 ++++++------------------ + 1 file changed, 6 insertions(+), 18 deletions(-) + +diff --git a/src/core/symbology/qgsstyle.cpp b/src/core/symbology/qgsstyle.cpp +index c87305b3c8fa..b4f57116d81e 100644 +--- a/src/core/symbology/qgsstyle.cpp ++++ b/src/core/symbology/qgsstyle.cpp +@@ -2749,13 +2749,12 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + if ( version == QLatin1String( STYLE_CURRENT_VERSION ) || version == QLatin1String( "1" ) ) + { + // For the new style, load symbols individually +- while ( !e.isNull() ) ++ for ( ; !e.isNull(); e = e.nextSiblingElement() ) + { + const int entityAddedVersion = e.attribute( QStringLiteral( "addedVersion" ) ).toInt(); + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the symbol, should already be present +- e = e.nextSiblingElement(); + continue; + } + +@@ -2787,7 +2786,6 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + QgsDebugMsg( "unknown tag: " + e.tagName() ); + } +- e = e.nextSiblingElement(); + } + } + else +@@ -2805,13 +2803,12 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + // load color ramps + QDomElement rampsElement = docEl.firstChildElement( QStringLiteral( "colorramps" ) ); + e = rampsElement.firstChildElement(); +- while ( !e.isNull() ) ++ for ( ; !e.isNull(); e = e.nextSiblingElement() ) + { + const int entityAddedVersion = e.attribute( QStringLiteral( "addedVersion" ) ).toInt(); + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the ramp, should already be present +- e = e.nextSiblingElement(); + continue; + } + +@@ -2843,7 +2840,6 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + QgsDebugMsg( "unknown tag: " + e.tagName() ); + } +- e = e.nextSiblingElement(); + } + + // load text formats +@@ -2855,13 +2851,12 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + const QDomElement textFormatElement = docEl.firstChildElement( QStringLiteral( "textformats" ) ); + e = textFormatElement.firstChildElement(); +- while ( !e.isNull() ) ++ for ( ; !e.isNull(); e = e.nextSiblingElement() ) + { + const int entityAddedVersion = e.attribute( QStringLiteral( "addedVersion" ) ).toInt(); + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the format, should already be present +- e = e.nextSiblingElement(); + continue; + } + +@@ -2892,7 +2887,6 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + QgsDebugMsg( "unknown tag: " + e.tagName() ); + } +- e = e.nextSiblingElement(); + } + } + +@@ -2901,13 +2895,12 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + const QDomElement labelSettingsElement = docEl.firstChildElement( QStringLiteral( "labelsettings" ) ); + e = labelSettingsElement.firstChildElement(); +- while ( !e.isNull() ) ++ for ( ; !e.isNull(); e = e.nextSiblingElement() ) + { + const int entityAddedVersion = e.attribute( QStringLiteral( "addedVersion" ) ).toInt(); + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the settings, should already be present +- e = e.nextSiblingElement(); + continue; + } + +@@ -2938,7 +2931,6 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + QgsDebugMsg( "unknown tag: " + e.tagName() ); + } +- e = e.nextSiblingElement(); + } + } + } +@@ -2948,13 +2940,12 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + const QDomElement legendPatchShapesElement = docEl.firstChildElement( QStringLiteral( "legendpatchshapes" ) ); + e = legendPatchShapesElement.firstChildElement(); +- while ( !e.isNull() ) ++ for ( ; !e.isNull(); e = e.nextSiblingElement() ) + { + const int entityAddedVersion = e.attribute( QStringLiteral( "addedVersion" ) ).toInt(); + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the shape, should already be present +- e = e.nextSiblingElement(); + continue; + } + +@@ -2985,7 +2976,6 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + QgsDebugMsg( "unknown tag: " + e.tagName() ); + } +- e = e.nextSiblingElement(); + } + } + +@@ -2994,13 +2984,12 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + const QDomElement symbols3DElement = docEl.firstChildElement( QStringLiteral( "symbols3d" ) ); + e = symbols3DElement.firstChildElement(); +- while ( !e.isNull() ) ++ for ( ; !e.isNull(); e = e.nextSiblingElement() ) + { + const int entityAddedVersion = e.attribute( QStringLiteral( "addedVersion" ) ).toInt(); + if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion ) + { + // skip the symbol, should already be present +- e = e.nextSiblingElement(); + continue; + } + +@@ -3036,7 +3025,6 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion ) + { + QgsDebugMsg( "unknown tag: " + e.tagName() ); + } +- e = e.nextSiblingElement(); + } + } + diff --git a/qgis.changes b/qgis.changes index baf9c8c..8b22358 100644 --- a/qgis.changes +++ b/qgis.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 11 18:40:04 UTC 2021 - Jason Craig + +- Add fix-infinite-loop.patch: fix startup of QGIS. This will be + integrated upstream in 3.20.2. + ------------------------------------------------------------------- Thu Aug 5 17:41:56 UTC 2021 - D. Berge diff --git a/qgis.spec b/qgis.spec index 9541e82..0905aa3 100644 --- a/qgis.spec +++ b/qgis.spec @@ -40,6 +40,8 @@ Patch2: qgis-fix-missing-qwt-inc.patch # PATCH-FIX-UPSTREAM - https://github.com/qgis/QGIS/commit/581cb40603dd3daca2916b564a4cd2630d005556 Patch3: qgis-fix-missing-qwt-inc-part2.patch Patch4: qgis-fix-cmake-findpdal.patch +# PATCH-FIX-UPSTREAM - gh#qgis/QGIS#44293 +Patch5: fix-infinite-loop.patch BuildRequires: FastCGI-devel BuildRequires: PDAL-devel # PDAL-devel depends on this (laszip_api.h) From 7b7f96f9ae308944f3977b78ba8e0175e05cc553be6038171a5711f9bd6353e1 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Fri, 13 Aug 2021 05:59:48 +0000 Subject: [PATCH 3/6] OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=334 --- qgis.changes | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qgis.changes b/qgis.changes index 8b22358..919598a 100644 --- a/qgis.changes +++ b/qgis.changes @@ -7,7 +7,7 @@ Wed Aug 11 18:40:04 UTC 2021 - Jason Craig ------------------------------------------------------------------- Thu Aug 5 17:41:56 UTC 2021 - D. Berge -- Enable PDAL +- Enable PDAL (add qgis-fix-cmake-findpdal.patch) ------------------------------------------------------------------- Tue Aug 3 08:40:57 UTC 2021 - Dirk Stoecker @@ -758,4 +758,3 @@ Wed Sep 11 08:05:44 UTC 2013 - dassau@gbd-consult.de Mon Sep 9 14:18:59 UTC 2013 - dassau@gbd-consult.de - start building qgis packages for version 2.x - From f8ae43cb02d95052c717f39a2b71c17df213df513086b56455944fae39a756f3 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Fri, 13 Aug 2021 06:00:43 +0000 Subject: [PATCH 4/6] OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=335 --- qgis.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qgis.spec b/qgis.spec index 0905aa3..44945db 100644 --- a/qgis.spec +++ b/qgis.spec @@ -39,6 +39,7 @@ Patch1: fix-fastcgi-include.patch Patch2: qgis-fix-missing-qwt-inc.patch # PATCH-FIX-UPSTREAM - https://github.com/qgis/QGIS/commit/581cb40603dd3daca2916b564a4cd2630d005556 Patch3: qgis-fix-missing-qwt-inc-part2.patch +# PATCH-FIX-UPSTREAM - scan for pdal-config instead of pdal in cmake Patch4: qgis-fix-cmake-findpdal.patch # PATCH-FIX-UPSTREAM - gh#qgis/QGIS#44293 Patch5: fix-infinite-loop.patch From fb44f4c2ea61c820fbfe41da5dcb77f2ed907ac1d60edf3ad9e217167e30bda8 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Fri, 13 Aug 2021 08:29:52 +0000 Subject: [PATCH 5/6] Fixed PDAL package OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=336 --- qgis.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/qgis.spec b/qgis.spec index 44945db..34e8fb2 100644 --- a/qgis.spec +++ b/qgis.spec @@ -45,8 +45,6 @@ Patch4: qgis-fix-cmake-findpdal.patch Patch5: fix-infinite-loop.patch BuildRequires: FastCGI-devel BuildRequires: PDAL-devel -# PDAL-devel depends on this (laszip_api.h) -BuildRequires: laszip-devel BuildRequires: bison >= 2.4 BuildRequires: cmake >= 3.0.0 BuildRequires: fdupes From ef528c8103b7f518b8d531bfdbab3967ebf1e99d4c69cd2ed57f4ba0a9fa3557 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Fri, 13 Aug 2021 08:34:08 +0000 Subject: [PATCH 6/6] OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=337 --- qgis.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qgis.spec b/qgis.spec index 34e8fb2..a5760ca 100644 --- a/qgis.spec +++ b/qgis.spec @@ -1,5 +1,5 @@ # -# spec file for package qgis-ltr +# spec file for package qgis # # Copyright (c) 2021 SUSE LLC #