Skip to content

Commit f5fc190

Browse files
ar-janDuncaen
authored andcommitted
qgis: update to 4.2.2.
- Disable Qt WebEngine build option for 32-bit - Disable Grass build option on cross build - Patch for separate CMake target Python Development and host Interpreter lookups
1 parent 03a571a commit f5fc190

4 files changed

Lines changed: 68 additions & 57 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
QGIS enables CMake policies through 4.3, so CMP0190 is NEW.
2+
We need separate target Development and host Interpreter lookups.
3+
https://cmake.org/cmake/help/latest/module/FindPython.html
4+
https://cmake.org/cmake/help/latest/policy/CMP0190.html
5+
6+
--- a/CMakeLists.txt
7+
+++ b/CMakeLists.txt
8+
@@ -952,7 +952,19 @@ set(MIN_PYTHON_VERSION "3.11")
9+
set(Python_FIND_FRAMEWORK "LAST")
10+
11+
if (WITH_BINDINGS)
12+
- find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter Development)
13+
+ if(CMAKE_CROSSCOMPILING)
14+
+ find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Development)
15+
+ set(Python_ARTIFACTS_PREFIX "_HOST")
16+
+ find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter)
17+
+ set(Python_ARTIFACTS_PREFIX)
18+
+
19+
+ # Build-time scripts need the host interpreter, while Python::Python must
20+
+ # continue to refer to the target development artifacts.
21+
+ set(Python_EXECUTABLE "${Python_HOST_EXECUTABLE}")
22+
+ set(Python_SITEARCH "${Python_HOST_SITEARCH}")
23+
+ else()
24+
+ find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter Development)
25+
+ endif()
26+
else()
27+
find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter)
28+
endif()

srcpkgs/qgis/patches/ftbfs.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

srcpkgs/qgis/patches/qt-6.10.patch

Lines changed: 0 additions & 23 deletions
This file was deleted.

srcpkgs/qgis/template

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,67 @@
11
# Template file for 'qgis'
22
pkgname=qgis
3-
version=3.44.4
4-
revision=6
3+
version=4.2.2
4+
revision=1
55
build_style=cmake
6-
configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True -DWITH_PDAL=True
7-
-DBUILD_WITH_QT6=ON -DWITH_PDF4QT=ON -DWITH_QTWEBKIT=NO
6+
configure_args="-DENABLE_TESTS=OFF
7+
-DWITH_3D=True
8+
-DWITH_PDAL=True
9+
-DWITH_PDF4QT=ON
810
-DPDF4QT_INSTALL_TO_USR=OFF
9-
-DGRASS_PREFIX8=${XBPS_CROSS_BASE}/usr/lib/grass"
11+
$(vopt_bool qtwebengine WITH_QTWEBENGINE)
12+
$(vopt_bool grass WITH_GRASS8)
13+
$(vopt_if grass -DGRASS_PREFIX8=${XBPS_CROSS_BASE}/usr/lib/grass)"
1014
_pyqt="python3-pyqt6 python3-pyqt6-gui python3-pyqt6-serialport
1115
python3-pyqt6-printsupport python3-pyqt6-multimedia python3-pyqt6-network
1216
python3-pyqt6-xml python3-pyqt6-declarative python3-pyqt6-sql
1317
python3-pyqt6-widgets python3-pyqt6-position python3-pyqt6-devel-tools
14-
python3-pyqt6-svg python3-pyqt6-qsci"
18+
python3-pyqt6-svg python3-pyqt6-qsci python3-pyqt6-webchannel"
1519
hostmakedepends="bison flex pkg-config protobuf python3 python3-pyqt6-sip sip"
1620
makedepends="exiv2-devel draco-devel expat-devel freexl-devel geos-devel
17-
gsl-devel grass-devel hdf5-devel libgdal-devel libpdal-devel librttopo-devel
21+
gsl-devel $(vopt_if grass grass-devel) hdf5-devel libblend2d-devel
22+
libgdal-devel libpdal-devel librttopo-devel
1823
libspatialindex-devel libspatialite-devel libxml2-devel libzip-devel
19-
minizip-devel netcdf-devel ocl-icd-devel postgresql-libs-devel
24+
libzstd-devel minizip-devel netcdf-devel ocl-icd-devel OpenCL-CLHPP
25+
postgresql-libs-devel
2026
proj-devel protobuf-devel python3-devel python3-PyQt-builder
2127
qt6-base-private-devel qt6-svg-devel qt6-position-devel qt6-qt5compat-devel
2228
qt6-declarative-devel qt6-serialport-devel qt6-3d-devel
23-
qt6-multimedia-devel
29+
qt6-multimedia-devel $(vopt_if qtwebengine qt6-webengine-devel)
2430
qt6-plugin-odbc qt6-plugin-pgsql qt6-plugin-sqlite
2531
qscintilla-qt6-devel qtkeychain-qt6-devel qca-qt6-devel qwt-qt6-devel
2632
python3-pyqt6-bindings python3-pyqt6-qsci-devel python3-pyqt6-sip ${_pyqt}
27-
python3-devel sqlite-devel zlib-devel libopenjpeg2-devel"
28-
depends="libgdal-python3 python3-dateutil python3-dateutil python3-yaml
29-
python3-Jinja2 python3-numpy python3-numpy python3-owslib python3-Pillow
33+
$(vopt_if qtwebengine python3-pyqt6-webengine)
34+
sqlite-devel zlib-devel libopenjpeg2-devel"
35+
depends="libgdal-python3 python3-dateutil python3-yaml
36+
python3-Jinja2 python3-numpy python3-owslib python3-packaging python3-Pillow
3037
python3-psycopg2 python3-Pygments python3-pytz python3-requests python3-urllib3
31-
${_pyqt} qca-qt6 qt6-plugin-sqlite qt6-plugin-tls-openssl"
38+
${_pyqt} $(vopt_if qtwebengine python3-pyqt6-webengine)
39+
qca-qt6 qt6-plugin-sqlite qt6-plugin-tls-openssl"
3240
short_desc="Open Source Geographic Information System"
3341
maintainer="Arjan Mossel <arjanmossel@gmail.com>"
3442
license="GPL-2.0-only"
3543
homepage="https://qgis.org"
3644
distfiles="https://github.com/qgis/QGIS/archive/final-${version//./_}.tar.gz"
37-
checksum=1396c84dd6c9c89c026de8b564319e0f6206c8bbc1b160bfdc0fdf49adb61748
38-
nocross="due to grass"
45+
checksum=b97bdf0e882f996be5a6fd36d965e27d6d68b0fb89fdd5fe1fc0ebeb3f4c8192
3946

40-
post_configure() {
41-
# No idea why the patch was removed on generated files
42-
sed -i 's/[.]sip[.]in$/.sip/' ftbfs.patch
43-
cd build
44-
patch -Np1 -s -i ../ftbfs.patch
45-
}
47+
build_options="grass qtwebengine"
48+
desc_option_grass="Enable GRASS GIS support"
49+
desc_option_qtwebengine="Enable Qt6 WebEngine support"
50+
51+
if [ -z "$CROSS_BUILD" ]; then
52+
build_options_default="grass"
53+
fi
54+
55+
if [ "$XBPS_WORDSIZE$XBPS_WORDSIZE" = "64$XBPS_TARGET_WORDSIZE" ]; then
56+
build_options_default+=" qtwebengine"
57+
fi
58+
59+
if [ "$CROSS_BUILD" ]; then
60+
hostmakedepends+=" python3-PyQt-builder python3-pyqt6-devel
61+
python3-pyqt6-gui python3-pyqt6-printsupport python3-pyqt6-qsci-devel
62+
python3-pyqt6-widgets qt6-base qt6-declarative-host-tools qt6-tools"
63+
configure_args+=" -DQt6LinguistTools_DIR=/usr/lib/cmake/Qt6LinguistTools"
64+
fi
4665

4766
post_install() {
4867
mv ${DESTDIR}/usr/share/qgis/python ${DESTDIR}/usr/lib/qgis/

0 commit comments

Comments
 (0)