Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Update proj to 7.2.1
@ 2022-11-05 15:37 ar-jan
  2022-11-05 16:58 ` proj: update " nezos
                   ` (69 more replies)
  0 siblings, 70 replies; 71+ messages in thread
From: ar-jan @ 2022-11-05 15:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1256 bytes --]

There is a new pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

Update proj to 7.2.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 10577 bytes --]

From e1b2860966f0eba4ec9e47d4b28301ed3f0ee3ba Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 5136df346db0..fbee1be164fc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3068,7 +3068,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..2adf17d18d77 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From f620c52365f4c3c159c7ced7fc41a07e88c34915 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:40:25 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 7.2.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index f10280ce4f54..fde371e71338 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=1
+revision=2
 wrksrc="gdal-${version}"
 build_style=cmake
 build_helper=python3

From 57d5dc966f802bf62caa5976e250e693ec8fa095 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 7.2.1

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 917091ad9e752c6644198873f2c56d921d66b22d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index a58109d65246..6eee77d4c74f 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=5
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 046caa4531c144298665a1ed2b24ca5f3aa1beaa Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index ea024d3093a7..052654f674a7 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 01cd12a343c6d3d1da7f6cdc0808a341fc4b62df Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:01 +0100
Subject: [PATCH 06/12] grass: rebuild for proj 7.2.1

---
 srcpkgs/grass/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..a8fc7640d869 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=5
+revision=6
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure

From 2969d42902f164c031a9d71707e0fc9fcadcf4ad Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 07/12] merkaartor: rebuild for proj 7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..f1f4b270b4e7 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 5a6b5470d60073b002a193a90d5387143e2e1e05 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:27:14 +0100
Subject: [PATCH 08/12] XyGrib: rebuild for proj 7.2.1; fix build

Do not use ninja ("unknown target" error)
---
 srcpkgs/XyGrib/template | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..a8c61c144712 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -3,6 +3,7 @@ pkgname=XyGrib
 version=1.2.6.1
 revision=3
 build_style=cmake
+make_cmd=make
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
  qwt-devel libopenjpeg2-devel"
@@ -13,6 +14,8 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 if [ "$CROSS_BUILD" ]; then
 	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
 fi

From 7e392ff9870920743251cb1802e14bb34a1bf0f7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 09/12] sumo: rebuild for proj 7.2.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From f3b24149f4f3e2bd743b580761216001f5596ae6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:00 +0100
Subject: [PATCH 10/12] OpenOrienteering-Mapper: rebuild for proj 7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fe114ce24e8e..42b976e1bdf2 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From 1ee8212c42520d7e243d967c288ddb8b0eb51341 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:29 +0100
Subject: [PATCH 11/12] osg: rebuild for proj 7.2.1

---
 srcpkgs/osg/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 6f2cb49b9cba..2a6bcad2b31e 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=13
+revision=14
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"

From 7941876d3605a810b8ce9bf4643415117568a0dc Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 553cf9198465..dfcc9dca8376 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=8
+revision=9
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
@ 2022-11-05 16:58 ` nezos
  2022-11-05 17:20 ` ar-jan
                   ` (68 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: nezos @ 2022-11-05 16:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by nezos on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1304588957

Comment:
proj 7.2.1 is two major versions behind. I am running 9.1 without problems.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
  2022-11-05 16:58 ` proj: update " nezos
@ 2022-11-05 17:20 ` ar-jan
  2022-11-05 18:31 ` [PR REVIEW] " classabbyamp
                   ` (67 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-05 17:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1304594620

Comment:
I tested everything with 7.2 and have been using that. When v8 came out there were some issues with v8 in combination with other packages as I recall. That may well have been solved but I'd rather get this in now since it's ready and tested.

The CI failures are unrelated (Python 3.11 packages not yet available).

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

* Re: [PR REVIEW] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
  2022-11-05 16:58 ` proj: update " nezos
  2022-11-05 17:20 ` ar-jan
@ 2022-11-05 18:31 ` classabbyamp
  2022-11-05 18:43 ` ar-jan
                   ` (66 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-11-05 18:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1014675844

Comment:
does it not work with ninja? 

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

* Re: [PR REVIEW] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (2 preceding siblings ...)
  2022-11-05 18:31 ` [PR REVIEW] " classabbyamp
@ 2022-11-05 18:43 ` ar-jan
  2022-11-06 11:51 ` ar-jan
                   ` (65 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-05 18:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1014678321

Comment:
No, builds failed with `unknown target`.

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

* Re: [PR REVIEW] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (3 preceding siblings ...)
  2022-11-05 18:43 ` ar-jan
@ 2022-11-06 11:51 ` ar-jan
  2022-11-06 19:58 ` [PR PATCH] [Updated] " ar-jan
                   ` (64 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-06 11:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1014815727

Comment:
I just set up a new build env and checked again, and build now does work with ninja. Will update branch when Python 3.11 settles.

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

* Re: [PR PATCH] [Updated] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (4 preceding siblings ...)
  2022-11-06 11:51 ` ar-jan
@ 2022-11-06 19:58 ` ar-jan
  2022-11-06 21:50 ` [PR REVIEW] " kruceter
                   ` (63 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-06 19:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 7.2.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 10201 bytes --]

From e1b2860966f0eba4ec9e47d4b28301ed3f0ee3ba Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 5136df346db0..fbee1be164fc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3068,7 +3068,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..2adf17d18d77 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From f620c52365f4c3c159c7ced7fc41a07e88c34915 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:40:25 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 7.2.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index f10280ce4f54..fde371e71338 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=1
+revision=2
 wrksrc="gdal-${version}"
 build_style=cmake
 build_helper=python3

From 57d5dc966f802bf62caa5976e250e693ec8fa095 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 7.2.1

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 917091ad9e752c6644198873f2c56d921d66b22d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index a58109d65246..6eee77d4c74f 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=5
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 046caa4531c144298665a1ed2b24ca5f3aa1beaa Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index ea024d3093a7..052654f674a7 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 01cd12a343c6d3d1da7f6cdc0808a341fc4b62df Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:01 +0100
Subject: [PATCH 06/12] grass: rebuild for proj 7.2.1

---
 srcpkgs/grass/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..a8fc7640d869 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=5
+revision=6
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure

From 2969d42902f164c031a9d71707e0fc9fcadcf4ad Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 07/12] merkaartor: rebuild for proj 7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..f1f4b270b4e7 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 5ebd02030142585066bb858a19a3d6980c2ccaf6 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:27:14 +0100
Subject: [PATCH 08/12] XyGrib: rebuild for proj 7.2.1

---
 srcpkgs/XyGrib/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..641dd730c786 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel

From 383f2462c4447d89a336f307de7f396c3520a8e0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 09/12] sumo: rebuild for proj 7.2.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From a9414e450275eadad72e2a9fd77e2898849b3765 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:00 +0100
Subject: [PATCH 10/12] OpenOrienteering-Mapper: rebuild for proj 7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fe114ce24e8e..42b976e1bdf2 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From 01b81237c4686a0ff98de94ad19c9793c32e8682 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:29 +0100
Subject: [PATCH 11/12] osg: rebuild for proj 7.2.1

---
 srcpkgs/osg/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 6f2cb49b9cba..2a6bcad2b31e 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=13
+revision=14
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"

From 386fff1e8d4bd2d42c196d99c82389070af4b946 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 553cf9198465..dfcc9dca8376 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=8
+revision=9
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

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

* Re: [PR REVIEW] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (5 preceding siblings ...)
  2022-11-06 19:58 ` [PR PATCH] [Updated] " ar-jan
@ 2022-11-06 21:50 ` kruceter
  2022-11-07 11:33 ` ar-jan
                   ` (62 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-06 21:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

New review comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1014898184

Comment:
I could reproduce this "unknown target" in attempt to crosscompile because of this block:

```diff
if [ "$CROSS_BUILD" ]; then
	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
fi
```

Removal of that block did not bring up any other issues.

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

* Re: [PR REVIEW] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (6 preceding siblings ...)
  2022-11-06 21:50 ` [PR REVIEW] " kruceter
@ 2022-11-07 11:33 ` ar-jan
  2022-11-08 13:24 ` [PR PATCH] [Updated] " ar-jan
                   ` (61 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-07 11:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1015314582

Comment:
Thanks, confirmed.

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

* Re: [PR PATCH] [Updated] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (7 preceding siblings ...)
  2022-11-07 11:33 ` ar-jan
@ 2022-11-08 13:24 ` ar-jan
  2022-11-08 15:29 ` kruceter
                   ` (60 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-08 13:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 7.2.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 10605 bytes --]

From e1b2860966f0eba4ec9e47d4b28301ed3f0ee3ba Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 5136df346db0..fbee1be164fc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3068,7 +3068,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..2adf17d18d77 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From f620c52365f4c3c159c7ced7fc41a07e88c34915 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:40:25 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 7.2.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index f10280ce4f54..fde371e71338 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=1
+revision=2
 wrksrc="gdal-${version}"
 build_style=cmake
 build_helper=python3

From 57d5dc966f802bf62caa5976e250e693ec8fa095 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 7.2.1

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 917091ad9e752c6644198873f2c56d921d66b22d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index a58109d65246..6eee77d4c74f 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=5
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 046caa4531c144298665a1ed2b24ca5f3aa1beaa Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index ea024d3093a7..052654f674a7 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 wrksrc="postgis-${version}"
 build_style=gnu-configure
 configure_args="

From 01cd12a343c6d3d1da7f6cdc0808a341fc4b62df Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:01 +0100
Subject: [PATCH 06/12] grass: rebuild for proj 7.2.1

---
 srcpkgs/grass/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..a8fc7640d869 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=5
+revision=6
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure

From 2969d42902f164c031a9d71707e0fc9fcadcf4ad Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 07/12] merkaartor: rebuild for proj 7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..f1f4b270b4e7 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 4f1554f536903ce1c124bf5ea54ba05caddbd971 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:27:14 +0100
Subject: [PATCH 08/12] XyGrib: rebuild for proj 7.2.1

---
 srcpkgs/XyGrib/template | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 33b77a51024a2611295aa688240e86022d0953c5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 09/12] sumo: rebuild for proj 7.2.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From d0feb9bc56a23048ed1b590d1c5ce8f7d41ad063 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:00 +0100
Subject: [PATCH 10/12] OpenOrienteering-Mapper: rebuild for proj 7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index fe114ce24e8e..42b976e1bdf2 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,14 +1,15 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 wrksrc="mapper-${version}"
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From fe6b93dd6a2fa3cf81971de273b0371a18c7d21e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:29 +0100
Subject: [PATCH 11/12] osg: rebuild for proj 7.2.1

---
 srcpkgs/osg/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osg/template b/srcpkgs/osg/template
index 6f2cb49b9cba..2a6bcad2b31e 100644
--- a/srcpkgs/osg/template
+++ b/srcpkgs/osg/template
@@ -2,7 +2,7 @@
 pkgname=osg
 reverts=3.6.0_1
 version=3.4.1
-revision=13
+revision=14
 wrksrc=OpenSceneGraph-OpenSceneGraph-${version}
 build_style=cmake
 build_helper="qemu"

From f9868514777ac0042ec401fc2e5db6c81c4b339a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 553cf9198465..dfcc9dca8376 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=8
+revision=9
 wrksrc=VTK-${version}
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (8 preceding siblings ...)
  2022-11-08 13:24 ` [PR PATCH] [Updated] " ar-jan
@ 2022-11-08 15:29 ` kruceter
  2022-11-08 16:09 ` ar-jan
                   ` (59 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-08 15:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307403572

Comment:
@ar-jan, I have updated proj to 9.1.0 in the forked repository (https://github.com/kruceter/void-packages/tree/proj).

In my attempts to revbump reverse dependencies I could fix some issues related
to the new API of PROJ (>=8.0.0) and tested them briefly.

I hope my changes will prove to be useful for you in some way.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (9 preceding siblings ...)
  2022-11-08 15:29 ` kruceter
@ 2022-11-08 16:09 ` ar-jan
  2022-11-08 17:00 ` [PR PATCH] [Updated] " ar-jan
                   ` (58 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-08 16:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307460826

Comment:
Ah great. I've also been testing proj 9.1.0 and I thought there's a few more things to solve. Here's my notes:

- grass: v7.6 still uses `proj_api.h`, but the build does succeed. [Do you know if it functions correctly without proj4 api?]
- XyGrib: can be patched like https://github.com/opengribs/XyGrib/pull/289 [I see you used that].
- merkaartor: with `DACCEPT_USE_OF_DEPRECATED_PROJ_API_H` removed, build still failed for me. Did it build correctly for you?
- vtk: current version fails due to proj_api.h, but it can be upgraded to >= 9.1.0 to fix.

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

* Re: [PR PATCH] [Updated] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (10 preceding siblings ...)
  2022-11-08 16:09 ` ar-jan
@ 2022-11-08 17:00 ` ar-jan
  2022-11-08 17:00 ` kruceter
                   ` (57 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-08 17:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 7.2.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 10731 bytes --]

From 461108ddbba5408b3cfd0e77a68a7ab346bd5495 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 7.2.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 5136df346db0..fbee1be164fc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3068,7 +3068,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.19 proj-7.2.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..2adf17d18d77 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=7.2.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 47d1641f8417dee2d56a3552150bd7029e5dab94 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:40:25 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 7.2.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 526b2b944999..de4f0fef1254 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=1
+revision=2
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From ff2be94a80e70d3b6946dabb7105b13a438ae8ae Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 7.2.1

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 08202134cb42311eae4e6f94156f33a33d4db867 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From a2e8da951f9f90d9efb71e0906b9bca329e1f7d9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 7.2.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 64e94687ce860d6951c4436e0a7d115edbf6c9e5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:01 +0100
Subject: [PATCH 06/12] grass: rebuild for proj 7.2.1

---
 srcpkgs/grass/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..a8fc7640d869 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,7 +1,7 @@
 # Template file for 'grass'
 pkgname=grass
 version=7.6.1
-revision=5
+revision=6
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure

From 6daae30b73b335b36fca02559be71053684016e9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 07/12] merkaartor: rebuild for proj 7.2.1

---
 srcpkgs/merkaartor/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..f1f4b270b4e7 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"

From 17ee635fbf7bd94808c475dff19d838247006d43 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:27:14 +0100
Subject: [PATCH 08/12] XyGrib: rebuild for proj 7.2.1

---
 srcpkgs/XyGrib/template | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 3aa2bea53c677335ddc9bbd8d92b81da11d297bf Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 09/12] sumo: rebuild for proj 7.2.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 1d06f568f404afef9722b85a6930831c6d52cbb5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:00 +0100
Subject: [PATCH 10/12] OpenOrienteering-Mapper: rebuild for proj 7.2.1

---
 srcpkgs/OpenOrienteering-Mapper/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..3ccdcb55285f 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ tiff-devel libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From 938fac8d5672c26bf37f22958a82e8619399d5e1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 11/12] vtk: rebuild for proj 7.2.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index eff6e114c7b6..59c664d082e8 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.0.1
-revision=8
+revision=9
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now

From 398fd228000fb82cd17001b71b913b1219a27625 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 12/12] osm2pgsql: rebuild for proj 7.2.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (11 preceding siblings ...)
  2022-11-08 17:00 ` [PR PATCH] [Updated] " ar-jan
@ 2022-11-08 17:00 ` kruceter
  2022-11-08 17:04 ` kruceter
                   ` (56 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-08 17:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307533681

Comment:
> * grass: v7.6 still uses `proj_api.h`, but the build does succeed. [Do you know if it functions correctly without proj4 api?]

It should work. `configure` has the following lines confirming this:

```
# PROJ version check: if proj.h exists, it must be proj 5+

ac_save_cppflags="$CPPFLAGS"
CPPFLAGS="$PROJINC $CPPFLAGS"
for ac_hdr in proj.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5727: checking for $ac_hdr" >&5

cat > conftest.$ac_ext <<EOF
#line 5730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
```

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (12 preceding siblings ...)
  2022-11-08 17:00 ` kruceter
@ 2022-11-08 17:04 ` kruceter
  2022-11-08 17:13 ` kruceter
                   ` (55 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-08 17:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307533681

Comment:
> * grass: v7.6 still uses `proj_api.h`, but the build does succeed. [Do you know if it functions correctly without proj4 api?]

It should work. `configure` has the following lines confirming this:

```
# PROJ version check: if proj.h exists, it must be proj 5+

ac_save_cppflags="$CPPFLAGS"
CPPFLAGS="$PROJINC $CPPFLAGS"
for ac_hdr in proj.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5727: checking for $ac_hdr" >&5

cat > conftest.$ac_ext <<EOF
#line 5730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
```

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (13 preceding siblings ...)
  2022-11-08 17:04 ` kruceter
@ 2022-11-08 17:13 ` kruceter
  2022-11-08 17:14 ` kruceter
                   ` (54 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-08 17:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307533681

Comment:
> * grass: v7.6 still uses `proj_api.h`, but the build does succeed. [Do you know if it functions correctly without proj4 api?]

It should work. `configure` has the following lines confirming this:

```
# PROJ version check: if proj.h exists, it must be proj 5+

ac_save_cppflags="$CPPFLAGS"
CPPFLAGS="$PROJINC $CPPFLAGS"
for ac_hdr in proj.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5727: checking for $ac_hdr" >&5

cat > conftest.$ac_ext <<EOF
#line 5730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
```

UPD: I could not open it due to "missing GUI" (possibly refers to wxPython). I will look into it on my side.

> * merkaartor: with DACCEPT_USE_OF_DEPRECATED_PROJ_API_H removed, build still failed for me. Did it build correctly for you?

It did for me with proj 9.0.1.

> * vtk: current version fails due to proj_api.h, but it can be upgraded to >= 9.1.0 to fix.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (14 preceding siblings ...)
  2022-11-08 17:13 ` kruceter
@ 2022-11-08 17:14 ` kruceter
  2022-11-08 17:32 ` ar-jan
                   ` (53 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-08 17:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307533681

Comment:
> * grass: v7.6 still uses `proj_api.h`, but the build does succeed. [Do you know if it functions correctly without proj4 api?]

It should work. `configure` has the following lines confirming this:

```
# PROJ version check: if proj.h exists, it must be proj 5+

ac_save_cppflags="$CPPFLAGS"
CPPFLAGS="$PROJINC $CPPFLAGS"
for ac_hdr in proj.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5727: checking for $ac_hdr" >&5

cat > conftest.$ac_ext <<EOF
#line 5730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
```

UPD: I could not open it due to "missing GUI" (possibly refers to wxPython). I will look into it on my side.

---

> * merkaartor: with DACCEPT_USE_OF_DEPRECATED_PROJ_API_H removed, build still failed for me. Did it build correctly for you?

It did for me with proj 9.0.1.

---

> * vtk: current version fails due to proj_api.h, but it can be upgraded to >= 9.1.0 to fix.

I am at fault for overlooking it. I will update it on my side to see whether it works or not.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (15 preceding siblings ...)
  2022-11-08 17:14 ` kruceter
@ 2022-11-08 17:32 ` ar-jan
  2022-11-08 17:39 ` kruceter
                   ` (52 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-08 17:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307579560

Comment:
> UPD: I could not open it due to "missing GUI" (possibly refers to wxPython). I will look into it on my side.

Iirc had to start explicitly using something like `GRASS_PYTHON=python2`. Could also update to v7.8, done that in previous PR.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (16 preceding siblings ...)
  2022-11-08 17:32 ` ar-jan
@ 2022-11-08 17:39 ` kruceter
  2022-11-08 17:40 ` kruceter
                   ` (51 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-08 17:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307594487

Comment:
> > UPD: I could not open it due to "missing GUI" (possibly refers to wxPython). I will look into it on my side.
> 
> Iirc had to start explicitly using something like `GRASS_PYTHON=python2`. Could also update to v7.8, done that in previous PR.

Still the same outcome. I will try to update it 7.8.7 and see how it turns out.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (17 preceding siblings ...)
  2022-11-08 17:39 ` kruceter
@ 2022-11-08 17:40 ` kruceter
  2022-11-08 23:15 ` nezos
                   ` (50 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-08 17:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307594487

Comment:
> Iirc had to start explicitly using something like `GRASS_PYTHON=python2`. Could also update to v7.8, done that in previous PR.

Still the same outcome. I will try to update it 7.8.7 and see how it turns out.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (18 preceding siblings ...)
  2022-11-08 17:40 ` kruceter
@ 2022-11-08 23:15 ` nezos
  2022-11-08 23:17 ` nezos
                   ` (49 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: nezos @ 2022-11-08 23:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

New comment by nezos on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307964995

Comment:
Grass GUI never worked, in older version on Void, I had to hack the startup script. Now that I use v8.2, it doesn't start also but I don't need it as I use QGIS. If I try to start the grass GUI I get:

`TypeError: ToolBar.AddTool(): arguments did not match any overloaded call:`

The problem refers to the wxPython package, it's an old issue:

https://github.com/OSGeo/grass/issues/2019#issuecomment-995015759

Hope this helps

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (19 preceding siblings ...)
  2022-11-08 23:15 ` nezos
@ 2022-11-08 23:17 ` nezos
  2022-11-08 23:29 ` ar-jan
                   ` (48 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: nezos @ 2022-11-08 23:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

New comment by nezos on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307964995

Comment:
Grass GUI never worked, in older version on Void, I had to hack the startup script. Now that I use v8.2, it doesn't start also but I don't need it as I use QGIS. If I try to start the grass GUI I get:

`TypeError: ToolBar.AddTool(): arguments did not match any overloaded call:`

The problem refers to the wxPython package, it's an old issue:

https://github.com/OSGeo/grass/issues/2019#issuecomment-995015759

Updating also grass would pave the way for having qgis as a package.

Hope this helps

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (20 preceding siblings ...)
  2022-11-08 23:17 ` nezos
@ 2022-11-08 23:29 ` ar-jan
  2022-11-09  1:43 ` kruceter
                   ` (47 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-08 23:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1307975317

Comment:
Yeah, grass was the reason my previous PR #31687 didn't get merged, and I spent a long time trying things with wxPython, but I did actually get it to work with `python2` and v7.8. Also grass is optional for QGIS, I have a branch ready for QGIS 3.28 which just doesn't include grass.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (21 preceding siblings ...)
  2022-11-08 23:29 ` ar-jan
@ 2022-11-09  1:43 ` kruceter
  2022-11-09  1:46 ` kruceter
                   ` (46 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-09  1:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1308081350

Comment:
I managed to build grass 7.8.7 with proj 9.1.0.

Its GUI started without any surprises; and what is more important, it works with python 3 (at least I swapped out everything related to python 2). That was my original purpose for picking this package, so I am content.

vtk 9.1.0 is not tested yet; it is quite a large piece of software to build on my machine.

@ar-jan, I have pushed all changes to the "proj" branch in kruceter/void-packages, so you can use them however you wish.

---

@nezos

> Grass GUI never worked

Thank you for mentioning this. I was a little afraid to think that I broke grass by tampering with it in a related pull request.

As for versions starting from 8, I had learned of incompatibility with the current wxPython4 through trial and error; this includes that issue you had referred to.

Unless wxPython4 is updated, nothing can be done about upgrading to grass 8.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (22 preceding siblings ...)
  2022-11-09  1:43 ` kruceter
@ 2022-11-09  1:46 ` kruceter
  2022-11-09 13:45 ` nezos
                   ` (45 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-09  1:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1308081350

Comment:
I managed to build grass 7.8.7 with proj 9.1.0.

Its GUI started without any surprises; and what is more important, it works with python 3 (at least I swapped out everything related to python 2). That was my original purpose for picking this package, so I am content.

vtk 9.1.0 is not tested yet; it is quite a large piece of software to build on my machine.

@ar-jan, I have pushed all changes to the "proj" branch in kruceter/void-packages, so you can use them however you wish.

---

@nezos

> Grass GUI never worked

Thank you for mentioning this. I was a little afraid to think that I broke grass by tampering with it in a related pull request.

As for versions starting from 8, I had learned of incompatibility with the current wxPython4 through trial and error; this includes that issue you have referred to.

Unless wxPython4 is updated, nothing can be done about upgrading to grass 8.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (23 preceding siblings ...)
  2022-11-09  1:46 ` kruceter
@ 2022-11-09 13:45 ` nezos
  2022-11-09 15:53 ` kruceter
                   ` (44 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: nezos @ 2022-11-09 13:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

New comment by nezos on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1308788433

Comment:
> Also grass is optional for QGIS, I have a branch ready for QGIS 3.28 which just doesn't include grass.
My opinion is that in such software  you need all the tools possible to handle different kinds of data. QGIS still relies on tools provided by GRASS to perform many tasks.

@kruceter I see though in the grass template you have in your fork that you still rely on python2.

I confirm also that grass and QGIS 3.28 builds with proj 9.1.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (24 preceding siblings ...)
  2022-11-09 13:45 ` nezos
@ 2022-11-09 15:53 ` kruceter
  2022-11-09 17:26 ` ar-jan
                   ` (43 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2022-11-09 15:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1308970149

Comment:
> @kruceter I see though in the grass template you have in your fork that you still rely on python2.

https://github.com/kruceter/void-packages/commit/f494f414a06f5c1855cb2fca12e3c3e5b82cea4a#diff-ebae98cb097fc36b8a6f7cc1d8ca2b9a319bcb740ecf0e2cfc9d995c07d4ebf2

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (25 preceding siblings ...)
  2022-11-09 15:53 ` kruceter
@ 2022-11-09 17:26 ` ar-jan
  2022-11-10  0:06 ` ar-jan
                   ` (42 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-09 17:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1309094986

Comment:
> I have pushed all changes to the "proj" branch in kruceter/void-packages, so you can use them however you wish.

Thanks @kruceter. I've cherry-picked your commits for grass, XyGrib, and OpenOrienteering-Mapper. Now building 9.1 &co again.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (26 preceding siblings ...)
  2022-11-09 17:26 ` ar-jan
@ 2022-11-10  0:06 ` ar-jan
  2022-11-10  0:10 ` ar-jan
                   ` (41 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-10  0:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1309566220

Comment:
As discussed on irc, vtk will have to be upgraded first separately because it provides shlibs which are used by other packages: #40423.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (27 preceding siblings ...)
  2022-11-10  0:06 ` ar-jan
@ 2022-11-10  0:10 ` ar-jan
  2022-11-10  0:20 ` ar-jan
                   ` (40 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-10  0:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1309566220

Comment:
As discussed on irc, vtk will have to be upgraded first separately because it provides shlibs which are used by other packages: #40423.

Pushed the branch [here](https://github.com/ar-jan/void-packages/tree/proj910_v3), but not adding it to the PR branch yet since it would fail.

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

* Re: proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (28 preceding siblings ...)
  2022-11-10  0:10 ` ar-jan
@ 2022-11-10  0:20 ` ar-jan
  2022-11-15 16:57 ` [PR PATCH] [Updated] " ar-jan
                   ` (39 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-10  0:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1309566220

Comment:
As discussed on irc, vtk will have to be upgraded first separately because it provides shlibs which are used by other packages: #40423.

Pushed the proj-9.1.0 branch [here](https://github.com/ar-jan/void-packages/tree/proj910_v3), but not adding it to the PR branch yet since it would fail.

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

* Re: [PR PATCH] [Updated] proj: update to 7.2.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (29 preceding siblings ...)
  2022-11-10  0:20 ` ar-jan
@ 2022-11-15 16:57 ` ar-jan
  2022-11-15 17:02 ` proj: update to 9.1.0 ar-jan
                   ` (38 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-15 16:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 7.2.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 75674 bytes --]

From 2007bc50b235e28384cf73f8d09853e260fa7283 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/11] proj: update to 9.1.0.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..21d526dd7767 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3067,7 +3067,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.0_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..cb61e678498f 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.0
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 7254166804810bd7c3862a4eb86ed0801880f52d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 02/11] libspatialite: rebuild for proj 9.1.0

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From df102b7a464363e27d0c3d472e7d47062a8f36be Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 03/11] postgis-postgresql14: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From d76de13fe59857804ee85dbd56407840120dc322 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 04/11] postgis-postgresql13: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 5a6c297927d2ec66e40ae2f01a58776b1e2c35c3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 05/11] merkaartor: rebuild for proj 9.1.0

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 1938526f4f33b4b816eb3e2b5e394bfa1ef04ea4 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 06/11] sumo: rebuild for proj 9.1.0

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From e1a7130829838fbb8dca11fd2b275af0db9d2db7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 07/11] osm2pgsql: rebuild for proj 9.1.0

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From f854285ce91ee9fd82181579d346397fbb7e88b8 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 08/11] grass: update to 7.8.7.

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  21 +--
 4 files changed, 159 insertions(+), 167 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..8660382536e7 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
 	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From a61922e07c5876e0e21f819fbb4a9cdedfafd9f9 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:42:35 +0300
Subject: [PATCH 09/11] OpenOrienteering-Mapper: revbump for proj, fix build

proj's cmake config automatically tries to include libcurl-devel as an
additional make dependency, hence the reason for it being added to
makedepends.
---
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 2 files changed, 324 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..f396c5e99a9b 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From 06e49c5ebf23a1f88d356c4237edb729d2169e8a Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/11] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 13c884c956748b2604547ee13bd94d1590bc623e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 11/11] vtk: update to 9.2.2

---
 common/shlibs                                 | 214 +++++-----
 srcpkgs/vtk/patches/include.patch             | 396 ------------------
 ...etype-2.10.3-provide-FT_CALLBACK_DEF.patch |  19 -
 .../vtkeigen-disable-build-type-check.patch   |  19 +
 srcpkgs/vtk/patches/vtkioss-unistd.patch      |  25 ++
 srcpkgs/vtk/template                          |  17 +-
 6 files changed, 164 insertions(+), 526 deletions(-)
 delete mode 100644 srcpkgs/vtk/patches/include.patch
 delete mode 100644 srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
 create mode 100644 srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch
 create mode 100644 srcpkgs/vtk/patches/vtkioss-unistd.patch

diff --git a/common/shlibs b/common/shlibs
index 21d526dd7767..f8037ebf9526 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3259,110 +3259,116 @@ libgnuradio-pdu.so.3.10.3 gnuradio-3.10.3.0_1
 libgnuradio-osmosdr.so.0.2.0 gnuradio-osmosdr-0.2.0_1
 libflann_cpp.so.1.9 flann-1.9.1_1
 libflann.so.1.9 flann-1.9.1_1
-libvtkChartsCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonColor-9.0.so.1 vtk-9.0.1_1
-libvtkCommonComputationalGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkCommonCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonDataModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonExecutionModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMath-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMisc-9.0.so.1 vtk-9.0.1_1
-libvtkCommonSystem-9.0.so.1 vtk-9.0.1_1
-libvtkCommonTransforms-9.0.so.1 vtk-9.0.1_1
-libvtkDICOMParser-9.0.so.1 vtk-9.0.1_1
-libvtkDomainsChemistry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersAMR-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersCore-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersExtraction-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersFlowPaths-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneric-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHyperTree-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersModeling-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallel-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallelImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersPoints-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersProgrammable-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSMP-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSelection-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSources-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTexture-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTopology-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersVerdict-9.0.so.1 vtk-9.0.1_1
-libvtkGeovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOAMR-9.0.so.1 vtk-9.0.1_1
-libvtkIOAsynchronous-9.0.so.1 vtk-9.0.1_1
-libvtkIOCityGML-9.0.so.1 vtk-9.0.1_1
-libvtkIOCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOEnSight-9.0.so.1 vtk-9.0.1_1
-libvtkIOExodus-9.0.so.1 vtk-9.0.1_1
-libvtkIOExport-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportGL2PS-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportPDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkIOImage-9.0.so.1 vtk-9.0.1_1
-libvtkIOImport-9.0.so.1 vtk-9.0.1_1
-libvtkIOInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkIOLSDyna-9.0.so.1 vtk-9.0.1_1
-libvtkIOLegacy-9.0.so.1 vtk-9.0.1_1
-libvtkIOMotionFX-9.0.so.1 vtk-9.0.1_1
-libvtkIOMINC-9.0.so.1 vtk-9.0.1_1
-libvtkIOMovie-9.0.so.1 vtk-9.0.1_1
-libvtkIONetCDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOOggTheora-9.0.so.1 vtk-9.0.1_1
-libvtkIOPLY-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallel-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallelXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOSQL-9.0.so.1 vtk-9.0.1_1
-libvtkIOSegY-9.0.so.1 vtk-9.0.1_1
-libvtkIOTecplotTable-9.0.so.1 vtk-9.0.1_1
-libvtkIOVeraOut-9.0.so.1 vtk-9.0.1_1
-libvtkIOVideo-9.0.so.1 vtk-9.0.1_1
-libvtkIOXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOXMLParser-9.0.so.1 vtk-9.0.1_1
-libvtkImagingColor-9.0.so.1 vtk-9.0.1_1
-libvtkImagingCore-9.0.so.1 vtk-9.0.1_1
-libvtkImagingFourier-9.0.so.1 vtk-9.0.1_1
-libvtkImagingGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkImagingHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMath-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMorphological-9.0.so.1 vtk-9.0.1_1
-libvtkImagingSources-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStencil-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisLayout-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionImage-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionStyle-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionWidgets-9.0.so.1 vtk-9.0.1_1
-libvtkParallelCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingAnnotation-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingFreeType-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingGL2PSOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingImage-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLOD-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLabel-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingSceneGraph-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingUI-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolume-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolumeOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVtkJS-9.0.so.1 vtk-9.0.1_1
-libvtkTestingRendering-9.0.so.1 vtk-9.0.1_1
-libvtkViewsContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkViewsCore-9.0.so.1 vtk-9.0.1_1
-libvtkViewsInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkexodusII-9.0.so.1 vtk-9.0.1_1
-libvtklibharu-9.0.so.1 vtk-9.0.1_1
-libvtkmetaio-9.0.so.1 vtk-9.0.1_1
-libvtksys-9.0.so.1 vtk-9.0.1_1
-libvtkverdict-9.0.so.1 vtk-9.0.1_1
+libvtkCommonCore-9.2.so.1 vtk-9.2.2_1
+libvtksys-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMisc-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkCommonTransforms-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMath-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLOD-9.2.so.1 vtk-9.2.2_1
+libvtkViewsInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkIOIOSS-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLabel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersPoints-9.2.so.1 vtk-9.2.2_1
+libvtkCommonExecutionModel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingHyperTreeGrid-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkCommonDataModel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTopology-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSources-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolumeOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOOggTheora-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportGL2PS-9.2.so.1 vtk-9.2.2_1
+libvtkIOAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOCesium3DTiles-9.2.so.1 vtk-9.2.2_1
+libvtkIOSegY-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVtkJS-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTexture-9.2.so.1 vtk-9.2.2_1
+libvtkIOVideo-9.2.so.1 vtk-9.2.2_1
+libvtkImagingSources-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStencil-9.2.so.1 vtk-9.2.2_1
+libvtkIOCGNSReader-9.2.so.1 vtk-9.2.2_1
+libvtkCommonComputationalGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkIOVeraOut-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionImage-9.2.so.1 vtk-9.2.2_1
+libvtkChartsCore-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkImagingHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkGeovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionWidgets-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersImaging-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersVerdict-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSMP-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingUI-9.2.so.1 vtk-9.2.2_1
+libvtkIOHDF-9.2.so.1 vtk-9.2.2_1
+libvtkCommonSystem-9.2.so.1 vtk-9.2.2_1
+libvtkImagingColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingSceneGraph-9.2.so.1 vtk-9.2.2_1
+libvtkParallelCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkImagingFourier-9.2.so.1 vtk-9.2.2_1
+libvtkCommonColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingAnnotation-9.2.so.1 vtk-9.2.2_1
+libvtkIOSQL-9.2.so.1 vtk-9.2.2_1
+libvtkIOImage-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersExtraction-9.2.so.1 vtk-9.2.2_1
+libvtkIOGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersFlowPaths-9.2.so.1 vtk-9.2.2_1
+libvtkIOMovie-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolume-9.2.so.1 vtk-9.2.2_1
+libvtkIOEnSight-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistryOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSelection-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersModeling-9.2.so.1 vtk-9.2.2_1
+libvtkViewsCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOMotionFX-9.2.so.1 vtk-9.2.2_1
+libvtkIOLSDyna-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContextOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingImage-9.2.so.1 vtk-9.2.2_1
+libvtkIOXMLParser-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMorphological-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallel-9.2.so.1 vtk-9.2.2_1
+libvtkViewsContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkIOImport-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLICOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkIOAsynchronous-9.2.so.1 vtk-9.2.2_1
+libvtkIOTecplotTable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCityGML-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMath-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallelXML-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingGL2PSOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneric-9.2.so.1 vtk-9.2.2_1
+libvtkIONetCDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisLayout-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHyperTree-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportPDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkIOXML-9.2.so.1 vtk-9.2.2_1
+libvtkIOChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionStyle-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOMINC-9.2.so.1 vtk-9.2.2_1
+libvtkTestingRendering-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallelImaging-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkIOExport-9.2.so.1 vtk-9.2.2_1
+libvtkIOCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersProgrammable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCONVERGECFD-9.2.so.1 vtk-9.2.2_1
+libvtkIOLegacy-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingFreeType-9.2.so.1 vtk-9.2.2_1
+libvtkIOPLY-9.2.so.1 vtk-9.2.2_1
+libvtkIOExodus-9.2.so.1 vtk-9.2.2_1
+libvtkkissfft-9.2.so.1 vtk-9.2.2_1
 libvolume_key.so.1 volume_key-0.3.9_1
 librand48_r.so.0 rand48_r-0.1_1
 libxxhash.so.0 libxxHash-0.6.5_2
diff --git a/srcpkgs/vtk/patches/include.patch b/srcpkgs/vtk/patches/include.patch
deleted file mode 100644
index 008068b4deb8..000000000000
--- a/srcpkgs/vtk/patches/include.patch
+++ /dev/null
@@ -1,396 +0,0 @@
-Index: VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkGenericDataArrayLookupHelper.h
-+++ VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-@@ -25,6 +25,7 @@
- #include "vtkIdList.h"
- #include <algorithm>
- #include <cmath>
-+#include <limits>
- #include <unordered_map>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPiecewiseFunction.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-@@ -22,6 +22,7 @@
- #include <cassert>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/Core/vtkColorTransferFunction.cxx
-+++ VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-@@ -21,6 +21,7 @@
- #include <algorithm>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-+++ VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-@@ -22,6 +22,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <cmath>
-+#include <limits>
- 
- #include "vtkTestErrorObserver.h"
- 
-Index: VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/Testing/Cxx/UnitTestMath.cxx
-+++ VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-@@ -24,6 +24,7 @@
- #include "vtkUnsignedCharArray.h"
- #include "vtkUnsignedShortArray.h"
- 
-+#include <limits>
- #include <vector>
- 
- static int TestPi();
-Index: VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkMersenneTwister.cxx
-+++ VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-@@ -28,6 +28,7 @@
- #include "vtkMultiThreader.h"
- #include "vtkNew.h"
- 
-+#include <limits>
- #include <map>
- 
- namespace
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-@@ -22,6 +22,7 @@
- #include "vtkCellArray.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-@@ -58,6 +58,7 @@
- #include "vtkMath.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-@@ -19,6 +19,7 @@
- #include "vtkMath.h"
- #include "vtkMinimalStandardRandomSequence.h"
- #include "vtkSmartPointer.h"
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPolyhedron.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-@@ -33,6 +33,7 @@ PURPOSE.  See the above copyright notice
- #include "vtkVector.h"
- 
- #include <functional>
-+#include <limits>
- #include <map>
- #include <set>
- #include <unordered_map>
-Index: VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-+++ VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <algorithm>
-+#include <limits>
- #include <sstream>
- #include <string>
- #include <vector>
-Index: VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-@@ -55,6 +55,7 @@ PURPOSE.  See the above copyright notice
- #include <array>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <vector>
- 
- vtkObjectFactoryNewMacro(vtkEvenlySpacedStreamlines2D);
-Index: VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-@@ -25,6 +25,7 @@
- #include "vtkStringArray.h"
- 
- #include <cstring>
-+#include <limits>
- 
- vtkObjectFactoryNewMacro(vtkLagrangianMatidaIntegrationModel);
- 
-Index: VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-+++ VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-@@ -28,6 +28,7 @@
- #include "vtkHyperTreeGridNonOrientedCursor.h"
- 
- #include <cmath>
-+#include <limits>
- 
- vtkStandardNewMacro(vtkHyperTreeGridThreshold);
- 
-Index: VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-+++ VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-@@ -31,6 +31,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <algorithm>
-+#include <limits>
- 
- // Histogram precision to divide space in two
- static const int HISTOGRAM_SIZE = 1024;
-Index: VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-+++ VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-@@ -30,6 +30,7 @@
- #include "vtkVoronoiKernel.h"
- 
- #include <cmath>
-+#include <limits>
- #include <sstream>
- #include <string>
- 
-Index: VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-@@ -22,6 +22,7 @@
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
- 
-+#include <limits>
- vtkStandardNewMacro(vtkEllipsoidalGaussianKernel);
- 
- //----------------------------------------------------------------------------
-Index: VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkGaussianKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkProbabilisticVoronoiKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkShepardKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkShepardKernel);
- 
-Index: VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-+++ VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestUtilities.h"
- 
- #include "vtksys/SystemTools.hxx"
-+#include <limits>
- 
- // Perform a fuzzy compare of floats/doubles
- template <class A>
-Index: VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/CityGML/vtkCityGMLReader.cxx
-+++ VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-@@ -46,6 +46,7 @@
- #include <cstdlib>
- #include <cstring>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <stdexcept>
- #include <string>
-Index: VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/GDAL/vtkGDALRasterReader.cxx
-+++ VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-@@ -48,6 +48,7 @@
- #include <cassert>
- #include <cmath>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <vector>
- 
-Index: VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/Geometry/vtkSTLWriter.cxx
-+++ VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-@@ -34,6 +34,7 @@
- #include <io.h> /* unlink */
- #endif
- 
-+#include <limits>
- namespace
- {
- // For C format strings
-Index: VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/NetCDF/vtkNetCDFCAMReader.cxx
-+++ VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-@@ -32,6 +32,7 @@
- #include "vtkStreamingDemandDrivenPipeline.h"
- #include "vtkUnstructuredGrid.h"
- 
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <vector>
-Index: VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/TecplotTable/vtkTecplotTableReader.cxx
-+++ VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-@@ -35,6 +35,7 @@
- #include <algorithm>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <stdexcept>
-Index: VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-+++ VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-@@ -20,6 +20,7 @@
- #include "vtkPoints.h"
- 
- #include "vtkTestUtilities.h"
-+#include <limits>
- #include <string>
- 
- namespace
-Index: VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-+++ VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-@@ -31,6 +31,7 @@
- 
- #include <algorithm>
- #include <array>
-+#include <limits>
- #include <sstream>
- 
- vtkStandardNewMacro(vtkOpenGLInstanceCulling);
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-@@ -35,6 +35,7 @@
- 
- #include <cstddef>
- #include <cstdlib>
-+#include <limits>
- 
- namespace vtkm
- {
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-@@ -11,6 +11,7 @@
- #include <random>
- #include <vtkm/cont/Algorithm.h>
- #include <vtkm/worklet/KdTree3D.h>
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-===================================================================
---- VTK-9.0.1.orig/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-+++ VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-@@ -19,6 +19,7 @@
- #if defined (__BORLANDC__) && (__BORLANDC__ >= 0x0580)
- #include <mem.h>
- #endif
-+#include <limits>
- 
- #if (METAIO_USE_NAMESPACE)
- namespace METAIO_NAMESPACE {
diff --git a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
deleted file mode 100644
index b95015c859cf..000000000000
--- a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
+++ /dev/null
@@ -1,19 +0,0 @@
- https://gitlab.kitware.com/vtk/vtk/-/issues/18033
---- VTK/ThirdParty/freetype/vtk_freetype.h.in.orig
-+++ VTK/ThirdParty/freetype/vtk_freetype.h.in
-@@ -20,6 +20,15 @@
- 
- #ifdef VTK_USE_SYSTEM_FREETYPE
- # include <ft2build.h>
-+/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */
-+/* has been moved to <freetype/internal/compiler-macros.h> */
-+# ifndef FT_CALLBACK_DEF
-+#  ifdef __cplusplus
-+#   define FT_CALLBACK_DEF( x )  extern "C"  x
-+#  else
-+#   define FT_CALLBACK_DEF( x )  static  x
-+#  endif
-+# endif /* FT_CALLBACK_DEF */
- #else
- # include <vtkfreetype/include/ft2build.h>
- #endif
diff --git a/srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch b/srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch
new file mode 100644
index 000000000000..a89ee8ffd21c
--- /dev/null
+++ b/srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch
@@ -0,0 +1,19 @@
+"CMake Error at ThirdParty/eigen/vtkeigen/CMakeLists.txt:28 (message): Unknown build type "None".  Allowed values are Debug, Release, RelWithDebInfo (case-insensitive)."
+
+diff --git a/ThirdParty/eigen/vtkeigen/CMakeLists.txt b/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+index 1f97f20a..10173ad4 100644
+--- a/ThirdParty/eigen/vtkeigen/CMakeLists.txt
++++ b/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+@@ -21,12 +21,6 @@ if (NOT CMAKE_BUILD_TYPE)
+   set(CMAKE_BUILD_TYPE "Release")
+ endif()
+
+-string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+
+
+ #############################################################################
diff --git a/srcpkgs/vtk/patches/vtkioss-unistd.patch b/srcpkgs/vtk/patches/vtkioss-unistd.patch
new file mode 100644
index 000000000000..24820d76c17b
--- /dev/null
+++ b/srcpkgs/vtk/patches/vtkioss-unistd.patch
@@ -0,0 +1,25 @@
+Build fails on musl-based Linux distributions.
+
+diff --git a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+index ca5f15de..99c2bbdd 100644
+--- a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
++++ b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+@@ -26,7 +26,7 @@
+ #define S_ISDIR(m) (((m)&_S_IFMT) == _S_IFDIR)
+ #endif
+ #else
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #endif
+ 
+ #ifdef SEACAS_HAVE_MPI
+@@ -35,9 +35,6 @@
+ 
+ #include <cstdio>
+ #include <sys/stat.h>
+-#ifndef _MSC_VER
+-#include <unistd.h>
+-#endif
+ 
+ namespace {
+   bool internal_access(const std::string &name, int mode);
diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index eff6e114c7b6..dfabbb649a81 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,15 +1,19 @@
 # Template file for 'vtk'
 pkgname=vtk
-version=9.0.1
-revision=8
+version=9.2.2
+revision=1
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now
 configure_args="-DBUILD_SHARED_LIBS=ON -DVTK_FORBID_DOWNLOADS=ON
- -DVTK_USE_EXTERNAL=ON
+ -DVTK_USE_EXTERNAL=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_utf8=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_fmt=OFF
+ -DVTK_MODULE_USE_EXTERNAL_vtknlohmannjson=OFF
+ -DVTK_MODULE_USE_EXTERNAL_vtkeigen=OFF
  -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3"
 # vtk forks libharu, bumps to v2.4.0, and requires libharu>=2.4.0
 makedepends="zlib-devel freetype-devel liblz4-devel expat-devel MesaLib-devel
@@ -22,8 +26,7 @@ maintainer="Piraty <piraty1@inbox.ru>"
 license="BSD-3-Clause"
 homepage="https://www.vtk.org"
 distfiles="https://www.vtk.org/files/release/${version:0:3}/VTK-${version}.tar.gz"
-checksum=1b39a5e191c282861e7af4101eaa8585969a2de05f5646c9199a161213a622c7
-nocross="hdf5 is nocross"
+checksum=1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" libexecinfo-devel"
@@ -46,7 +49,7 @@ post_install() {
 
 	# Mangle CPython extension names in CMake like xbps-src will do
 	vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \
-		-i "${DESTDIR}/usr/lib/cmake/vtk-9.0/VTKPython-targets-none.cmake"
+		-i "${DESTDIR}/usr/lib/cmake/vtk-9.2/VTKPython-targets-none.cmake"
 }
 
 vtk-devel_package() {
@@ -66,6 +69,6 @@ vtk-python3_package() {
 		vmove usr/bin/vtkpython
 		vmove "${py3_sitelib}"
 		vmove "usr/lib/lib*Python*.so.*"
-		vmove "usr/lib/vtk/hierarchy/VTK/vtk*Python*.txt"
+		vmove "usr/lib/vtk-9.2/hierarchy/VTK/vtk*Python*.txt"
 	}
 }

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

* Re: proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (30 preceding siblings ...)
  2022-11-15 16:57 ` [PR PATCH] [Updated] " ar-jan
@ 2022-11-15 17:02 ` ar-jan
  2022-11-15 17:12 ` [PR PATCH] [Updated] " ar-jan
                   ` (37 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-15 17:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1309566220

Comment:
As discussed on irc, vtk will have to be upgraded first separately because it provides shlibs which are used by other packages: #40423.

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (31 preceding siblings ...)
  2022-11-15 17:02 ` proj: update to 9.1.0 ar-jan
@ 2022-11-15 17:12 ` ar-jan
  2022-11-20 17:23 ` ar-jan
                   ` (36 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-15 17:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

Depends on #40423 being merged first because vtk update has shlib dependents.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 76317 bytes --]

From 2007bc50b235e28384cf73f8d09853e260fa7283 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.0.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..21d526dd7767 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3067,7 +3067,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.0_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..cb61e678498f 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.0
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From c77a0fdf28ef29e7f28bebe879225af8a41cded1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 15 Nov 2022 18:11:49 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1.0

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index 2e5591511b71..efe7a2adcf50 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=2
+revision=3
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From 916ca6669565fe910ac7e90c78dbd9ff05e759b8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1.0

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 743db0e2c1102d6a47245a84873f4fc97cebca11 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From df431dad1c67838b01edc13c8474490589848bb9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From e9b42347089d8fd97e3a8b8481149d13734d5173 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1.0

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 7755b98287acab7010f6a5467ff67fc56e91e8d0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1.0

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 4ea8b80f2c039ed371e95b894836774a89eecca1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1.0

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From e374891f164fc27248c2094d4374eae366bb1736 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 7.8.7.

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  21 +--
 4 files changed, 159 insertions(+), 167 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..8660382536e7 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
 	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From f6cc40a78d09d1696935770ba9fe1b89081ffa96 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:42:35 +0300
Subject: [PATCH 10/12] OpenOrienteering-Mapper: revbump for proj, fix build

proj's cmake config automatically tries to include libcurl-devel as an
additional make dependency, hence the reason for it being added to
makedepends.
---
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 2 files changed, 324 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..f396c5e99a9b 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From 4bb973dccccd97cecb7408ae9a54d1fe807b878c Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 11/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 21720d1e9d1e543e5c9fa27aa59a8a6adb0b205e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 12/12] vtk: update to 9.2.2

---
 common/shlibs                                 | 214 +++++-----
 srcpkgs/vtk/patches/include.patch             | 396 ------------------
 ...etype-2.10.3-provide-FT_CALLBACK_DEF.patch |  19 -
 .../vtkeigen-disable-build-type-check.patch   |  19 +
 srcpkgs/vtk/patches/vtkioss-unistd.patch      |  25 ++
 srcpkgs/vtk/template                          |  17 +-
 6 files changed, 164 insertions(+), 526 deletions(-)
 delete mode 100644 srcpkgs/vtk/patches/include.patch
 delete mode 100644 srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
 create mode 100644 srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch
 create mode 100644 srcpkgs/vtk/patches/vtkioss-unistd.patch

diff --git a/common/shlibs b/common/shlibs
index 21d526dd7767..f8037ebf9526 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3259,110 +3259,116 @@ libgnuradio-pdu.so.3.10.3 gnuradio-3.10.3.0_1
 libgnuradio-osmosdr.so.0.2.0 gnuradio-osmosdr-0.2.0_1
 libflann_cpp.so.1.9 flann-1.9.1_1
 libflann.so.1.9 flann-1.9.1_1
-libvtkChartsCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonColor-9.0.so.1 vtk-9.0.1_1
-libvtkCommonComputationalGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkCommonCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonDataModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonExecutionModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMath-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMisc-9.0.so.1 vtk-9.0.1_1
-libvtkCommonSystem-9.0.so.1 vtk-9.0.1_1
-libvtkCommonTransforms-9.0.so.1 vtk-9.0.1_1
-libvtkDICOMParser-9.0.so.1 vtk-9.0.1_1
-libvtkDomainsChemistry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersAMR-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersCore-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersExtraction-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersFlowPaths-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneric-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHyperTree-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersModeling-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallel-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallelImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersPoints-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersProgrammable-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSMP-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSelection-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSources-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTexture-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTopology-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersVerdict-9.0.so.1 vtk-9.0.1_1
-libvtkGeovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOAMR-9.0.so.1 vtk-9.0.1_1
-libvtkIOAsynchronous-9.0.so.1 vtk-9.0.1_1
-libvtkIOCityGML-9.0.so.1 vtk-9.0.1_1
-libvtkIOCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOEnSight-9.0.so.1 vtk-9.0.1_1
-libvtkIOExodus-9.0.so.1 vtk-9.0.1_1
-libvtkIOExport-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportGL2PS-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportPDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkIOImage-9.0.so.1 vtk-9.0.1_1
-libvtkIOImport-9.0.so.1 vtk-9.0.1_1
-libvtkIOInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkIOLSDyna-9.0.so.1 vtk-9.0.1_1
-libvtkIOLegacy-9.0.so.1 vtk-9.0.1_1
-libvtkIOMotionFX-9.0.so.1 vtk-9.0.1_1
-libvtkIOMINC-9.0.so.1 vtk-9.0.1_1
-libvtkIOMovie-9.0.so.1 vtk-9.0.1_1
-libvtkIONetCDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOOggTheora-9.0.so.1 vtk-9.0.1_1
-libvtkIOPLY-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallel-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallelXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOSQL-9.0.so.1 vtk-9.0.1_1
-libvtkIOSegY-9.0.so.1 vtk-9.0.1_1
-libvtkIOTecplotTable-9.0.so.1 vtk-9.0.1_1
-libvtkIOVeraOut-9.0.so.1 vtk-9.0.1_1
-libvtkIOVideo-9.0.so.1 vtk-9.0.1_1
-libvtkIOXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOXMLParser-9.0.so.1 vtk-9.0.1_1
-libvtkImagingColor-9.0.so.1 vtk-9.0.1_1
-libvtkImagingCore-9.0.so.1 vtk-9.0.1_1
-libvtkImagingFourier-9.0.so.1 vtk-9.0.1_1
-libvtkImagingGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkImagingHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMath-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMorphological-9.0.so.1 vtk-9.0.1_1
-libvtkImagingSources-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStencil-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisLayout-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionImage-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionStyle-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionWidgets-9.0.so.1 vtk-9.0.1_1
-libvtkParallelCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingAnnotation-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingFreeType-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingGL2PSOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingImage-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLOD-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLabel-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingSceneGraph-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingUI-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolume-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolumeOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVtkJS-9.0.so.1 vtk-9.0.1_1
-libvtkTestingRendering-9.0.so.1 vtk-9.0.1_1
-libvtkViewsContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkViewsCore-9.0.so.1 vtk-9.0.1_1
-libvtkViewsInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkexodusII-9.0.so.1 vtk-9.0.1_1
-libvtklibharu-9.0.so.1 vtk-9.0.1_1
-libvtkmetaio-9.0.so.1 vtk-9.0.1_1
-libvtksys-9.0.so.1 vtk-9.0.1_1
-libvtkverdict-9.0.so.1 vtk-9.0.1_1
+libvtkCommonCore-9.2.so.1 vtk-9.2.2_1
+libvtksys-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMisc-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkCommonTransforms-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMath-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLOD-9.2.so.1 vtk-9.2.2_1
+libvtkViewsInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkIOIOSS-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLabel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersPoints-9.2.so.1 vtk-9.2.2_1
+libvtkCommonExecutionModel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingHyperTreeGrid-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkCommonDataModel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTopology-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSources-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolumeOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOOggTheora-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportGL2PS-9.2.so.1 vtk-9.2.2_1
+libvtkIOAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOCesium3DTiles-9.2.so.1 vtk-9.2.2_1
+libvtkIOSegY-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVtkJS-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTexture-9.2.so.1 vtk-9.2.2_1
+libvtkIOVideo-9.2.so.1 vtk-9.2.2_1
+libvtkImagingSources-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStencil-9.2.so.1 vtk-9.2.2_1
+libvtkIOCGNSReader-9.2.so.1 vtk-9.2.2_1
+libvtkCommonComputationalGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkIOVeraOut-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionImage-9.2.so.1 vtk-9.2.2_1
+libvtkChartsCore-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkImagingHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkGeovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionWidgets-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersImaging-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersVerdict-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSMP-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingUI-9.2.so.1 vtk-9.2.2_1
+libvtkIOHDF-9.2.so.1 vtk-9.2.2_1
+libvtkCommonSystem-9.2.so.1 vtk-9.2.2_1
+libvtkImagingColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingSceneGraph-9.2.so.1 vtk-9.2.2_1
+libvtkParallelCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkImagingFourier-9.2.so.1 vtk-9.2.2_1
+libvtkCommonColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingAnnotation-9.2.so.1 vtk-9.2.2_1
+libvtkIOSQL-9.2.so.1 vtk-9.2.2_1
+libvtkIOImage-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersExtraction-9.2.so.1 vtk-9.2.2_1
+libvtkIOGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersFlowPaths-9.2.so.1 vtk-9.2.2_1
+libvtkIOMovie-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolume-9.2.so.1 vtk-9.2.2_1
+libvtkIOEnSight-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistryOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSelection-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersModeling-9.2.so.1 vtk-9.2.2_1
+libvtkViewsCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOMotionFX-9.2.so.1 vtk-9.2.2_1
+libvtkIOLSDyna-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContextOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingImage-9.2.so.1 vtk-9.2.2_1
+libvtkIOXMLParser-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMorphological-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallel-9.2.so.1 vtk-9.2.2_1
+libvtkViewsContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkIOImport-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLICOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkIOAsynchronous-9.2.so.1 vtk-9.2.2_1
+libvtkIOTecplotTable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCityGML-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMath-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallelXML-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingGL2PSOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneric-9.2.so.1 vtk-9.2.2_1
+libvtkIONetCDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisLayout-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHyperTree-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportPDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkIOXML-9.2.so.1 vtk-9.2.2_1
+libvtkIOChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionStyle-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOMINC-9.2.so.1 vtk-9.2.2_1
+libvtkTestingRendering-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallelImaging-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkIOExport-9.2.so.1 vtk-9.2.2_1
+libvtkIOCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersProgrammable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCONVERGECFD-9.2.so.1 vtk-9.2.2_1
+libvtkIOLegacy-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingFreeType-9.2.so.1 vtk-9.2.2_1
+libvtkIOPLY-9.2.so.1 vtk-9.2.2_1
+libvtkIOExodus-9.2.so.1 vtk-9.2.2_1
+libvtkkissfft-9.2.so.1 vtk-9.2.2_1
 libvolume_key.so.1 volume_key-0.3.9_1
 librand48_r.so.0 rand48_r-0.1_1
 libxxhash.so.0 libxxHash-0.6.5_2
diff --git a/srcpkgs/vtk/patches/include.patch b/srcpkgs/vtk/patches/include.patch
deleted file mode 100644
index 008068b4deb8..000000000000
--- a/srcpkgs/vtk/patches/include.patch
+++ /dev/null
@@ -1,396 +0,0 @@
-Index: VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkGenericDataArrayLookupHelper.h
-+++ VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-@@ -25,6 +25,7 @@
- #include "vtkIdList.h"
- #include <algorithm>
- #include <cmath>
-+#include <limits>
- #include <unordered_map>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPiecewiseFunction.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-@@ -22,6 +22,7 @@
- #include <cassert>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/Core/vtkColorTransferFunction.cxx
-+++ VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-@@ -21,6 +21,7 @@
- #include <algorithm>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-+++ VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-@@ -22,6 +22,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <cmath>
-+#include <limits>
- 
- #include "vtkTestErrorObserver.h"
- 
-Index: VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/Testing/Cxx/UnitTestMath.cxx
-+++ VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-@@ -24,6 +24,7 @@
- #include "vtkUnsignedCharArray.h"
- #include "vtkUnsignedShortArray.h"
- 
-+#include <limits>
- #include <vector>
- 
- static int TestPi();
-Index: VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkMersenneTwister.cxx
-+++ VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-@@ -28,6 +28,7 @@
- #include "vtkMultiThreader.h"
- #include "vtkNew.h"
- 
-+#include <limits>
- #include <map>
- 
- namespace
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-@@ -22,6 +22,7 @@
- #include "vtkCellArray.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-@@ -58,6 +58,7 @@
- #include "vtkMath.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-@@ -19,6 +19,7 @@
- #include "vtkMath.h"
- #include "vtkMinimalStandardRandomSequence.h"
- #include "vtkSmartPointer.h"
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPolyhedron.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-@@ -33,6 +33,7 @@ PURPOSE.  See the above copyright notice
- #include "vtkVector.h"
- 
- #include <functional>
-+#include <limits>
- #include <map>
- #include <set>
- #include <unordered_map>
-Index: VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-+++ VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <algorithm>
-+#include <limits>
- #include <sstream>
- #include <string>
- #include <vector>
-Index: VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-@@ -55,6 +55,7 @@ PURPOSE.  See the above copyright notice
- #include <array>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <vector>
- 
- vtkObjectFactoryNewMacro(vtkEvenlySpacedStreamlines2D);
-Index: VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-@@ -25,6 +25,7 @@
- #include "vtkStringArray.h"
- 
- #include <cstring>
-+#include <limits>
- 
- vtkObjectFactoryNewMacro(vtkLagrangianMatidaIntegrationModel);
- 
-Index: VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-+++ VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-@@ -28,6 +28,7 @@
- #include "vtkHyperTreeGridNonOrientedCursor.h"
- 
- #include <cmath>
-+#include <limits>
- 
- vtkStandardNewMacro(vtkHyperTreeGridThreshold);
- 
-Index: VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-+++ VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-@@ -31,6 +31,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <algorithm>
-+#include <limits>
- 
- // Histogram precision to divide space in two
- static const int HISTOGRAM_SIZE = 1024;
-Index: VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-+++ VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-@@ -30,6 +30,7 @@
- #include "vtkVoronoiKernel.h"
- 
- #include <cmath>
-+#include <limits>
- #include <sstream>
- #include <string>
- 
-Index: VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-@@ -22,6 +22,7 @@
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
- 
-+#include <limits>
- vtkStandardNewMacro(vtkEllipsoidalGaussianKernel);
- 
- //----------------------------------------------------------------------------
-Index: VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkGaussianKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkProbabilisticVoronoiKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkShepardKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkShepardKernel);
- 
-Index: VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-+++ VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestUtilities.h"
- 
- #include "vtksys/SystemTools.hxx"
-+#include <limits>
- 
- // Perform a fuzzy compare of floats/doubles
- template <class A>
-Index: VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/CityGML/vtkCityGMLReader.cxx
-+++ VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-@@ -46,6 +46,7 @@
- #include <cstdlib>
- #include <cstring>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <stdexcept>
- #include <string>
-Index: VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/GDAL/vtkGDALRasterReader.cxx
-+++ VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-@@ -48,6 +48,7 @@
- #include <cassert>
- #include <cmath>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <vector>
- 
-Index: VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/Geometry/vtkSTLWriter.cxx
-+++ VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-@@ -34,6 +34,7 @@
- #include <io.h> /* unlink */
- #endif
- 
-+#include <limits>
- namespace
- {
- // For C format strings
-Index: VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/NetCDF/vtkNetCDFCAMReader.cxx
-+++ VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-@@ -32,6 +32,7 @@
- #include "vtkStreamingDemandDrivenPipeline.h"
- #include "vtkUnstructuredGrid.h"
- 
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <vector>
-Index: VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/TecplotTable/vtkTecplotTableReader.cxx
-+++ VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-@@ -35,6 +35,7 @@
- #include <algorithm>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <stdexcept>
-Index: VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-+++ VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-@@ -20,6 +20,7 @@
- #include "vtkPoints.h"
- 
- #include "vtkTestUtilities.h"
-+#include <limits>
- #include <string>
- 
- namespace
-Index: VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-+++ VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-@@ -31,6 +31,7 @@
- 
- #include <algorithm>
- #include <array>
-+#include <limits>
- #include <sstream>
- 
- vtkStandardNewMacro(vtkOpenGLInstanceCulling);
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-@@ -35,6 +35,7 @@
- 
- #include <cstddef>
- #include <cstdlib>
-+#include <limits>
- 
- namespace vtkm
- {
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-@@ -11,6 +11,7 @@
- #include <random>
- #include <vtkm/cont/Algorithm.h>
- #include <vtkm/worklet/KdTree3D.h>
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-===================================================================
---- VTK-9.0.1.orig/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-+++ VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-@@ -19,6 +19,7 @@
- #if defined (__BORLANDC__) && (__BORLANDC__ >= 0x0580)
- #include <mem.h>
- #endif
-+#include <limits>
- 
- #if (METAIO_USE_NAMESPACE)
- namespace METAIO_NAMESPACE {
diff --git a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
deleted file mode 100644
index b95015c859cf..000000000000
--- a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
+++ /dev/null
@@ -1,19 +0,0 @@
- https://gitlab.kitware.com/vtk/vtk/-/issues/18033
---- VTK/ThirdParty/freetype/vtk_freetype.h.in.orig
-+++ VTK/ThirdParty/freetype/vtk_freetype.h.in
-@@ -20,6 +20,15 @@
- 
- #ifdef VTK_USE_SYSTEM_FREETYPE
- # include <ft2build.h>
-+/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */
-+/* has been moved to <freetype/internal/compiler-macros.h> */
-+# ifndef FT_CALLBACK_DEF
-+#  ifdef __cplusplus
-+#   define FT_CALLBACK_DEF( x )  extern "C"  x
-+#  else
-+#   define FT_CALLBACK_DEF( x )  static  x
-+#  endif
-+# endif /* FT_CALLBACK_DEF */
- #else
- # include <vtkfreetype/include/ft2build.h>
- #endif
diff --git a/srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch b/srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch
new file mode 100644
index 000000000000..a89ee8ffd21c
--- /dev/null
+++ b/srcpkgs/vtk/patches/vtkeigen-disable-build-type-check.patch
@@ -0,0 +1,19 @@
+"CMake Error at ThirdParty/eigen/vtkeigen/CMakeLists.txt:28 (message): Unknown build type "None".  Allowed values are Debug, Release, RelWithDebInfo (case-insensitive)."
+
+diff --git a/ThirdParty/eigen/vtkeigen/CMakeLists.txt b/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+index 1f97f20a..10173ad4 100644
+--- a/ThirdParty/eigen/vtkeigen/CMakeLists.txt
++++ b/ThirdParty/eigen/vtkeigen/CMakeLists.txt
+@@ -21,12 +21,6 @@ if (NOT CMAKE_BUILD_TYPE)
+   set(CMAKE_BUILD_TYPE "Release")
+ endif()
+
+-string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+-if(    NOT cmake_build_type_tolower STREQUAL "debug"
+-   AND NOT cmake_build_type_tolower STREQUAL "release"
+-   AND NOT cmake_build_type_tolower STREQUAL "relwithdebinfo")
+-  message(FATAL_ERROR "Unknown build type \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
+-endif()
+
+
+ #############################################################################
diff --git a/srcpkgs/vtk/patches/vtkioss-unistd.patch b/srcpkgs/vtk/patches/vtkioss-unistd.patch
new file mode 100644
index 000000000000..24820d76c17b
--- /dev/null
+++ b/srcpkgs/vtk/patches/vtkioss-unistd.patch
@@ -0,0 +1,25 @@
+Build fails on musl-based Linux distributions.
+
+diff --git a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+index ca5f15de..99c2bbdd 100644
+--- a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
++++ b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+@@ -26,7 +26,7 @@
+ #define S_ISDIR(m) (((m)&_S_IFMT) == _S_IFDIR)
+ #endif
+ #else
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #endif
+ 
+ #ifdef SEACAS_HAVE_MPI
+@@ -35,9 +35,6 @@
+ 
+ #include <cstdio>
+ #include <sys/stat.h>
+-#ifndef _MSC_VER
+-#include <unistd.h>
+-#endif
+ 
+ namespace {
+   bool internal_access(const std::string &name, int mode);
diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index eff6e114c7b6..dfabbb649a81 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,15 +1,19 @@
 # Template file for 'vtk'
 pkgname=vtk
-version=9.0.1
-revision=8
+version=9.2.2
+revision=1
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now
 configure_args="-DBUILD_SHARED_LIBS=ON -DVTK_FORBID_DOWNLOADS=ON
- -DVTK_USE_EXTERNAL=ON
+ -DVTK_USE_EXTERNAL=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_utf8=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_fmt=OFF
+ -DVTK_MODULE_USE_EXTERNAL_vtknlohmannjson=OFF
+ -DVTK_MODULE_USE_EXTERNAL_vtkeigen=OFF
  -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3"
 # vtk forks libharu, bumps to v2.4.0, and requires libharu>=2.4.0
 makedepends="zlib-devel freetype-devel liblz4-devel expat-devel MesaLib-devel
@@ -22,8 +26,7 @@ maintainer="Piraty <piraty1@inbox.ru>"
 license="BSD-3-Clause"
 homepage="https://www.vtk.org"
 distfiles="https://www.vtk.org/files/release/${version:0:3}/VTK-${version}.tar.gz"
-checksum=1b39a5e191c282861e7af4101eaa8585969a2de05f5646c9199a161213a622c7
-nocross="hdf5 is nocross"
+checksum=1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" libexecinfo-devel"
@@ -46,7 +49,7 @@ post_install() {
 
 	# Mangle CPython extension names in CMake like xbps-src will do
 	vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \
-		-i "${DESTDIR}/usr/lib/cmake/vtk-9.0/VTKPython-targets-none.cmake"
+		-i "${DESTDIR}/usr/lib/cmake/vtk-9.2/VTKPython-targets-none.cmake"
 }
 
 vtk-devel_package() {
@@ -66,6 +69,6 @@ vtk-python3_package() {
 		vmove usr/bin/vtkpython
 		vmove "${py3_sitelib}"
 		vmove "usr/lib/lib*Python*.so.*"
-		vmove "usr/lib/vtk/hierarchy/VTK/vtk*Python*.txt"
+		vmove "usr/lib/vtk-9.2/hierarchy/VTK/vtk*Python*.txt"
 	}
 }

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (32 preceding siblings ...)
  2022-11-15 17:12 ` [PR PATCH] [Updated] " ar-jan
@ 2022-11-20 17:23 ` ar-jan
  2022-11-20 18:41 ` ar-jan
                   ` (35 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-20 17:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

Depends on #40423 being merged first because vtk update has shlib dependents.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 76708 bytes --]

From 3d5f918d3f6f0a65f66cb5ab67a999b4e1ab50be Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/11] proj: update to 9.1.0.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 3b103f479d5a..8622b145f116 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3067,7 +3067,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.0_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..cb61e678498f 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.0
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From b2259f6f539cf20354bfbcc343db305b20b29e9a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 02/11] libspatialite: rebuild for proj 9.1.0

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 69b35d09d791a0351bfb22eb393dd51966f0c6b2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 03/11] postgis-postgresql14: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From fafdee1684c76d0eecc36a0bc18374e6d25ae89a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 04/11] postgis-postgresql13: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From c93d8f54f85732b913f1b953eee599cf3bcec48c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 05/11] merkaartor: rebuild for proj 9.1.0

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 10330ec6a7f7c907dc5c119e3a00e9569d8b235a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 06/11] sumo: rebuild for proj 9.1.0

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 1757069a14edf993e0169cd5605ca1b2546a9c4a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 07/11] osm2pgsql: rebuild for proj 9.1.0

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From cb5c32fa9dc2b4be036a3b2d73b59d6061461094 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 08/11] grass: update to 7.8.7.

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  21 +--
 4 files changed, 159 insertions(+), 167 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..8660382536e7 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
 	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From fa84789ab8bbcc9d84da9faae87ac496cee4e17d Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 09/11] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 96c7c1cf04f90a8ee8db2dbd259729258673e4ad Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 10/11] vtk: update to 9.2.2

---
 common/shlibs                                 | 214 +++++-----
 srcpkgs/vtk/patches/include.patch             | 396 ------------------
 ...etype-2.10.3-provide-FT_CALLBACK_DEF.patch |  19 -
 srcpkgs/vtk/patches/vtkioss-unistd.patch      |  26 ++
 srcpkgs/vtk/template                          |  17 +-
 5 files changed, 146 insertions(+), 526 deletions(-)
 delete mode 100644 srcpkgs/vtk/patches/include.patch
 delete mode 100644 srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
 create mode 100644 srcpkgs/vtk/patches/vtkioss-unistd.patch

diff --git a/common/shlibs b/common/shlibs
index 8622b145f116..5f77ce4c3e84 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3259,110 +3259,116 @@ libgnuradio-pdu.so.3.10.3 gnuradio-3.10.3.0_1
 libgnuradio-osmosdr.so.0.2.0 gnuradio-osmosdr-0.2.0_1
 libflann_cpp.so.1.9 flann-1.9.1_1
 libflann.so.1.9 flann-1.9.1_1
-libvtkChartsCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonColor-9.0.so.1 vtk-9.0.1_1
-libvtkCommonComputationalGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkCommonCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonDataModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonExecutionModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMath-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMisc-9.0.so.1 vtk-9.0.1_1
-libvtkCommonSystem-9.0.so.1 vtk-9.0.1_1
-libvtkCommonTransforms-9.0.so.1 vtk-9.0.1_1
-libvtkDICOMParser-9.0.so.1 vtk-9.0.1_1
-libvtkDomainsChemistry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersAMR-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersCore-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersExtraction-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersFlowPaths-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneric-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHyperTree-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersModeling-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallel-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallelImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersPoints-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersProgrammable-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSMP-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSelection-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSources-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTexture-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTopology-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersVerdict-9.0.so.1 vtk-9.0.1_1
-libvtkGeovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOAMR-9.0.so.1 vtk-9.0.1_1
-libvtkIOAsynchronous-9.0.so.1 vtk-9.0.1_1
-libvtkIOCityGML-9.0.so.1 vtk-9.0.1_1
-libvtkIOCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOEnSight-9.0.so.1 vtk-9.0.1_1
-libvtkIOExodus-9.0.so.1 vtk-9.0.1_1
-libvtkIOExport-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportGL2PS-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportPDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkIOImage-9.0.so.1 vtk-9.0.1_1
-libvtkIOImport-9.0.so.1 vtk-9.0.1_1
-libvtkIOInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkIOLSDyna-9.0.so.1 vtk-9.0.1_1
-libvtkIOLegacy-9.0.so.1 vtk-9.0.1_1
-libvtkIOMotionFX-9.0.so.1 vtk-9.0.1_1
-libvtkIOMINC-9.0.so.1 vtk-9.0.1_1
-libvtkIOMovie-9.0.so.1 vtk-9.0.1_1
-libvtkIONetCDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOOggTheora-9.0.so.1 vtk-9.0.1_1
-libvtkIOPLY-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallel-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallelXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOSQL-9.0.so.1 vtk-9.0.1_1
-libvtkIOSegY-9.0.so.1 vtk-9.0.1_1
-libvtkIOTecplotTable-9.0.so.1 vtk-9.0.1_1
-libvtkIOVeraOut-9.0.so.1 vtk-9.0.1_1
-libvtkIOVideo-9.0.so.1 vtk-9.0.1_1
-libvtkIOXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOXMLParser-9.0.so.1 vtk-9.0.1_1
-libvtkImagingColor-9.0.so.1 vtk-9.0.1_1
-libvtkImagingCore-9.0.so.1 vtk-9.0.1_1
-libvtkImagingFourier-9.0.so.1 vtk-9.0.1_1
-libvtkImagingGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkImagingHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMath-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMorphological-9.0.so.1 vtk-9.0.1_1
-libvtkImagingSources-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStencil-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisLayout-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionImage-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionStyle-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionWidgets-9.0.so.1 vtk-9.0.1_1
-libvtkParallelCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingAnnotation-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingFreeType-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingGL2PSOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingImage-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLOD-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLabel-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingSceneGraph-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingUI-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolume-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolumeOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVtkJS-9.0.so.1 vtk-9.0.1_1
-libvtkTestingRendering-9.0.so.1 vtk-9.0.1_1
-libvtkViewsContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkViewsCore-9.0.so.1 vtk-9.0.1_1
-libvtkViewsInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkexodusII-9.0.so.1 vtk-9.0.1_1
-libvtklibharu-9.0.so.1 vtk-9.0.1_1
-libvtkmetaio-9.0.so.1 vtk-9.0.1_1
-libvtksys-9.0.so.1 vtk-9.0.1_1
-libvtkverdict-9.0.so.1 vtk-9.0.1_1
+libvtkCommonCore-9.2.so.1 vtk-9.2.2_1
+libvtksys-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMisc-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkCommonTransforms-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMath-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLOD-9.2.so.1 vtk-9.2.2_1
+libvtkViewsInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkIOIOSS-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLabel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersPoints-9.2.so.1 vtk-9.2.2_1
+libvtkCommonExecutionModel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingHyperTreeGrid-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkCommonDataModel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTopology-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSources-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolumeOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOOggTheora-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportGL2PS-9.2.so.1 vtk-9.2.2_1
+libvtkIOAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOCesium3DTiles-9.2.so.1 vtk-9.2.2_1
+libvtkIOSegY-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVtkJS-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTexture-9.2.so.1 vtk-9.2.2_1
+libvtkIOVideo-9.2.so.1 vtk-9.2.2_1
+libvtkImagingSources-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStencil-9.2.so.1 vtk-9.2.2_1
+libvtkIOCGNSReader-9.2.so.1 vtk-9.2.2_1
+libvtkCommonComputationalGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkIOVeraOut-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionImage-9.2.so.1 vtk-9.2.2_1
+libvtkChartsCore-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkImagingHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkGeovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionWidgets-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersImaging-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersVerdict-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSMP-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingUI-9.2.so.1 vtk-9.2.2_1
+libvtkIOHDF-9.2.so.1 vtk-9.2.2_1
+libvtkCommonSystem-9.2.so.1 vtk-9.2.2_1
+libvtkImagingColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingSceneGraph-9.2.so.1 vtk-9.2.2_1
+libvtkParallelCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkImagingFourier-9.2.so.1 vtk-9.2.2_1
+libvtkCommonColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingAnnotation-9.2.so.1 vtk-9.2.2_1
+libvtkIOSQL-9.2.so.1 vtk-9.2.2_1
+libvtkIOImage-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersExtraction-9.2.so.1 vtk-9.2.2_1
+libvtkIOGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersFlowPaths-9.2.so.1 vtk-9.2.2_1
+libvtkIOMovie-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolume-9.2.so.1 vtk-9.2.2_1
+libvtkIOEnSight-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistryOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSelection-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersModeling-9.2.so.1 vtk-9.2.2_1
+libvtkViewsCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOMotionFX-9.2.so.1 vtk-9.2.2_1
+libvtkIOLSDyna-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContextOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingImage-9.2.so.1 vtk-9.2.2_1
+libvtkIOXMLParser-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMorphological-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallel-9.2.so.1 vtk-9.2.2_1
+libvtkViewsContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkIOImport-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLICOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkIOAsynchronous-9.2.so.1 vtk-9.2.2_1
+libvtkIOTecplotTable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCityGML-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMath-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallelXML-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingGL2PSOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneric-9.2.so.1 vtk-9.2.2_1
+libvtkIONetCDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisLayout-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHyperTree-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportPDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkIOXML-9.2.so.1 vtk-9.2.2_1
+libvtkIOChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionStyle-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOMINC-9.2.so.1 vtk-9.2.2_1
+libvtkTestingRendering-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallelImaging-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkIOExport-9.2.so.1 vtk-9.2.2_1
+libvtkIOCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersProgrammable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCONVERGECFD-9.2.so.1 vtk-9.2.2_1
+libvtkIOLegacy-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingFreeType-9.2.so.1 vtk-9.2.2_1
+libvtkIOPLY-9.2.so.1 vtk-9.2.2_1
+libvtkIOExodus-9.2.so.1 vtk-9.2.2_1
+libvtkkissfft-9.2.so.1 vtk-9.2.2_1
 libvolume_key.so.1 volume_key-0.3.9_1
 librand48_r.so.0 rand48_r-0.1_1
 libxxhash.so.0 libxxHash-0.6.5_2
diff --git a/srcpkgs/vtk/patches/include.patch b/srcpkgs/vtk/patches/include.patch
deleted file mode 100644
index 008068b4deb8..000000000000
--- a/srcpkgs/vtk/patches/include.patch
+++ /dev/null
@@ -1,396 +0,0 @@
-Index: VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkGenericDataArrayLookupHelper.h
-+++ VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-@@ -25,6 +25,7 @@
- #include "vtkIdList.h"
- #include <algorithm>
- #include <cmath>
-+#include <limits>
- #include <unordered_map>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPiecewiseFunction.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-@@ -22,6 +22,7 @@
- #include <cassert>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/Core/vtkColorTransferFunction.cxx
-+++ VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-@@ -21,6 +21,7 @@
- #include <algorithm>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-+++ VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-@@ -22,6 +22,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <cmath>
-+#include <limits>
- 
- #include "vtkTestErrorObserver.h"
- 
-Index: VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/Testing/Cxx/UnitTestMath.cxx
-+++ VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-@@ -24,6 +24,7 @@
- #include "vtkUnsignedCharArray.h"
- #include "vtkUnsignedShortArray.h"
- 
-+#include <limits>
- #include <vector>
- 
- static int TestPi();
-Index: VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkMersenneTwister.cxx
-+++ VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-@@ -28,6 +28,7 @@
- #include "vtkMultiThreader.h"
- #include "vtkNew.h"
- 
-+#include <limits>
- #include <map>
- 
- namespace
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-@@ -22,6 +22,7 @@
- #include "vtkCellArray.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-@@ -58,6 +58,7 @@
- #include "vtkMath.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-@@ -19,6 +19,7 @@
- #include "vtkMath.h"
- #include "vtkMinimalStandardRandomSequence.h"
- #include "vtkSmartPointer.h"
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPolyhedron.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-@@ -33,6 +33,7 @@ PURPOSE.  See the above copyright notice
- #include "vtkVector.h"
- 
- #include <functional>
-+#include <limits>
- #include <map>
- #include <set>
- #include <unordered_map>
-Index: VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-+++ VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <algorithm>
-+#include <limits>
- #include <sstream>
- #include <string>
- #include <vector>
-Index: VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-@@ -55,6 +55,7 @@ PURPOSE.  See the above copyright notice
- #include <array>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <vector>
- 
- vtkObjectFactoryNewMacro(vtkEvenlySpacedStreamlines2D);
-Index: VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-@@ -25,6 +25,7 @@
- #include "vtkStringArray.h"
- 
- #include <cstring>
-+#include <limits>
- 
- vtkObjectFactoryNewMacro(vtkLagrangianMatidaIntegrationModel);
- 
-Index: VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-+++ VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-@@ -28,6 +28,7 @@
- #include "vtkHyperTreeGridNonOrientedCursor.h"
- 
- #include <cmath>
-+#include <limits>
- 
- vtkStandardNewMacro(vtkHyperTreeGridThreshold);
- 
-Index: VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-+++ VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-@@ -31,6 +31,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <algorithm>
-+#include <limits>
- 
- // Histogram precision to divide space in two
- static const int HISTOGRAM_SIZE = 1024;
-Index: VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-+++ VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-@@ -30,6 +30,7 @@
- #include "vtkVoronoiKernel.h"
- 
- #include <cmath>
-+#include <limits>
- #include <sstream>
- #include <string>
- 
-Index: VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-@@ -22,6 +22,7 @@
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
- 
-+#include <limits>
- vtkStandardNewMacro(vtkEllipsoidalGaussianKernel);
- 
- //----------------------------------------------------------------------------
-Index: VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkGaussianKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkProbabilisticVoronoiKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkShepardKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkShepardKernel);
- 
-Index: VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-+++ VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestUtilities.h"
- 
- #include "vtksys/SystemTools.hxx"
-+#include <limits>
- 
- // Perform a fuzzy compare of floats/doubles
- template <class A>
-Index: VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/CityGML/vtkCityGMLReader.cxx
-+++ VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-@@ -46,6 +46,7 @@
- #include <cstdlib>
- #include <cstring>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <stdexcept>
- #include <string>
-Index: VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/GDAL/vtkGDALRasterReader.cxx
-+++ VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-@@ -48,6 +48,7 @@
- #include <cassert>
- #include <cmath>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <vector>
- 
-Index: VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/Geometry/vtkSTLWriter.cxx
-+++ VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-@@ -34,6 +34,7 @@
- #include <io.h> /* unlink */
- #endif
- 
-+#include <limits>
- namespace
- {
- // For C format strings
-Index: VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/NetCDF/vtkNetCDFCAMReader.cxx
-+++ VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-@@ -32,6 +32,7 @@
- #include "vtkStreamingDemandDrivenPipeline.h"
- #include "vtkUnstructuredGrid.h"
- 
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <vector>
-Index: VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/TecplotTable/vtkTecplotTableReader.cxx
-+++ VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-@@ -35,6 +35,7 @@
- #include <algorithm>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <stdexcept>
-Index: VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-+++ VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-@@ -20,6 +20,7 @@
- #include "vtkPoints.h"
- 
- #include "vtkTestUtilities.h"
-+#include <limits>
- #include <string>
- 
- namespace
-Index: VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-+++ VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-@@ -31,6 +31,7 @@
- 
- #include <algorithm>
- #include <array>
-+#include <limits>
- #include <sstream>
- 
- vtkStandardNewMacro(vtkOpenGLInstanceCulling);
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-@@ -35,6 +35,7 @@
- 
- #include <cstddef>
- #include <cstdlib>
-+#include <limits>
- 
- namespace vtkm
- {
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-@@ -11,6 +11,7 @@
- #include <random>
- #include <vtkm/cont/Algorithm.h>
- #include <vtkm/worklet/KdTree3D.h>
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-===================================================================
---- VTK-9.0.1.orig/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-+++ VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-@@ -19,6 +19,7 @@
- #if defined (__BORLANDC__) && (__BORLANDC__ >= 0x0580)
- #include <mem.h>
- #endif
-+#include <limits>
- 
- #if (METAIO_USE_NAMESPACE)
- namespace METAIO_NAMESPACE {
diff --git a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
deleted file mode 100644
index b95015c859cf..000000000000
--- a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
+++ /dev/null
@@ -1,19 +0,0 @@
- https://gitlab.kitware.com/vtk/vtk/-/issues/18033
---- VTK/ThirdParty/freetype/vtk_freetype.h.in.orig
-+++ VTK/ThirdParty/freetype/vtk_freetype.h.in
-@@ -20,6 +20,15 @@
- 
- #ifdef VTK_USE_SYSTEM_FREETYPE
- # include <ft2build.h>
-+/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */
-+/* has been moved to <freetype/internal/compiler-macros.h> */
-+# ifndef FT_CALLBACK_DEF
-+#  ifdef __cplusplus
-+#   define FT_CALLBACK_DEF( x )  extern "C"  x
-+#  else
-+#   define FT_CALLBACK_DEF( x )  static  x
-+#  endif
-+# endif /* FT_CALLBACK_DEF */
- #else
- # include <vtkfreetype/include/ft2build.h>
- #endif
diff --git a/srcpkgs/vtk/patches/vtkioss-unistd.patch b/srcpkgs/vtk/patches/vtkioss-unistd.patch
new file mode 100644
index 000000000000..df43a1fe5bba
--- /dev/null
+++ b/srcpkgs/vtk/patches/vtkioss-unistd.patch
@@ -0,0 +1,26 @@
+Build fails on musl-based Linux distributions
+https://github.com/sandialabs/seacas/pull/348
+
+diff --git a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+index ca5f15de..99c2bbdd 100644
+--- a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
++++ b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+@@ -26,7 +26,7 @@
+ #define S_ISDIR(m) (((m)&_S_IFMT) == _S_IFDIR)
+ #endif
+ #else
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #endif
+ 
+ #ifdef SEACAS_HAVE_MPI
+@@ -35,9 +35,6 @@
+ 
+ #include <cstdio>
+ #include <sys/stat.h>
+-#ifndef _MSC_VER
+-#include <unistd.h>
+-#endif
+ 
+ namespace {
+   bool internal_access(const std::string &name, int mode);
diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index eff6e114c7b6..659328293f70 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
-version=9.0.1
-revision=8
+version=9.2.2
+revision=1
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now
@@ -10,20 +10,23 @@ configure_args="-DBUILD_SHARED_LIBS=ON -DVTK_FORBID_DOWNLOADS=ON
  -DVTK_MODULE_USE_EXTERNAL_VTK_utf8=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_cgns=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
  -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3"
 # vtk forks libharu, bumps to v2.4.0, and requires libharu>=2.4.0
 makedepends="zlib-devel freetype-devel liblz4-devel expat-devel MesaLib-devel
  libXt-devel libjpeg-turbo-devel tiff-devel hdf5-devel netcdf-devel
  libxml2-devel jsoncpp-devel openmpi-devel libogg-devel libtheora-devel
  eigen double-conversion-devel glew-devel pugixml-devel sqlite-devel
- gl2ps-devel proj-devel python3-devel"
+ gl2ps-devel proj-devel python3-devel json-c++ fmt-devel"
 short_desc="System for 3D computer graphics, image processing, and visualization"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="BSD-3-Clause"
 homepage="https://www.vtk.org"
 distfiles="https://www.vtk.org/files/release/${version:0:3}/VTK-${version}.tar.gz"
-checksum=1b39a5e191c282861e7af4101eaa8585969a2de05f5646c9199a161213a622c7
-nocross="hdf5 is nocross"
+checksum=1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" libexecinfo-devel"
@@ -46,7 +49,7 @@ post_install() {
 
 	# Mangle CPython extension names in CMake like xbps-src will do
 	vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \
-		-i "${DESTDIR}/usr/lib/cmake/vtk-9.0/VTKPython-targets-none.cmake"
+		-i "${DESTDIR}/usr/lib/cmake/vtk-9.2/VTKPython-targets-none.cmake"
 }
 
 vtk-devel_package() {
@@ -66,6 +69,6 @@ vtk-python3_package() {
 		vmove usr/bin/vtkpython
 		vmove "${py3_sitelib}"
 		vmove "usr/lib/lib*Python*.so.*"
-		vmove "usr/lib/vtk/hierarchy/VTK/vtk*Python*.txt"
+		vmove "usr/lib/vtk-9.2/hierarchy/VTK/vtk*Python*.txt"
 	}
 }

From fa3d286659c7709d8c73e0907304c4d048c4c5d9 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/11] OpenOrienteering-Mapper: rebuild for proj 9.1.0

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 3 files changed, 359 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..f396c5e99a9b 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (33 preceding siblings ...)
  2022-11-20 17:23 ` ar-jan
@ 2022-11-20 18:41 ` ar-jan
  2022-12-03 23:14 ` ar-jan
                   ` (34 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-11-20 18:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

Depends on #40423 being merged first because vtk update has shlib dependents.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 77351 bytes --]

From 3d5f918d3f6f0a65f66cb5ab67a999b4e1ab50be Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.0.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 3b103f479d5a..8622b145f116 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3067,7 +3067,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.0_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..cb61e678498f 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.0
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 844fcb74df73be37c1483b24e40bb8dbe81bce19 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1.0

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index efe7a2adcf50..d6a527322ec3 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=3
+revision=4
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From 3a5d46b64161c0e0c68f53a62661f2df5c38232e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1.0

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 8a80c9c1d38832f7895b4ea8587d78c63de2f053 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From a0bbd1fb62df19c1ef872dfdbdbe7b455391ca6d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From f4e16c043de998779e801b6aa97471c35b66a1ec Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1.0

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From e33d52f8326bec5fc492f99ce151f4c8236c0517 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1.0

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 37356f40cca9c28ae61b53f0ca957ce85f6a637d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1.0

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From fe83ebca37f78e321939163e90dbf722b453bc8d Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 7.8.7.

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  21 +--
 4 files changed, 159 insertions(+), 167 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..8660382536e7 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
 	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From b2420a93358ebb257d9971cece60062052e2557d Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 10d6fed888c016d25a7f24c9ebbe47ee58518eb2 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:30:58 +0100
Subject: [PATCH 11/12] vtk: update to 9.2.2

---
 common/shlibs                                 | 214 +++++-----
 srcpkgs/vtk/patches/include.patch             | 396 ------------------
 ...etype-2.10.3-provide-FT_CALLBACK_DEF.patch |  19 -
 srcpkgs/vtk/patches/vtkioss-unistd.patch      |  26 ++
 srcpkgs/vtk/template                          |  17 +-
 5 files changed, 146 insertions(+), 526 deletions(-)
 delete mode 100644 srcpkgs/vtk/patches/include.patch
 delete mode 100644 srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
 create mode 100644 srcpkgs/vtk/patches/vtkioss-unistd.patch

diff --git a/common/shlibs b/common/shlibs
index 8622b145f116..5f77ce4c3e84 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3259,110 +3259,116 @@ libgnuradio-pdu.so.3.10.3 gnuradio-3.10.3.0_1
 libgnuradio-osmosdr.so.0.2.0 gnuradio-osmosdr-0.2.0_1
 libflann_cpp.so.1.9 flann-1.9.1_1
 libflann.so.1.9 flann-1.9.1_1
-libvtkChartsCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonColor-9.0.so.1 vtk-9.0.1_1
-libvtkCommonComputationalGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkCommonCore-9.0.so.1 vtk-9.0.1_1
-libvtkCommonDataModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonExecutionModel-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMath-9.0.so.1 vtk-9.0.1_1
-libvtkCommonMisc-9.0.so.1 vtk-9.0.1_1
-libvtkCommonSystem-9.0.so.1 vtk-9.0.1_1
-libvtkCommonTransforms-9.0.so.1 vtk-9.0.1_1
-libvtkDICOMParser-9.0.so.1 vtk-9.0.1_1
-libvtkDomainsChemistry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersAMR-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersCore-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersExtraction-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersFlowPaths-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeneric-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersHyperTree-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersModeling-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallel-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersParallelImaging-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersPoints-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersProgrammable-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSMP-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSelection-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersSources-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTexture-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersTopology-9.0.so.1 vtk-9.0.1_1
-libvtkFiltersVerdict-9.0.so.1 vtk-9.0.1_1
-libvtkGeovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOAMR-9.0.so.1 vtk-9.0.1_1
-libvtkIOAsynchronous-9.0.so.1 vtk-9.0.1_1
-libvtkIOCityGML-9.0.so.1 vtk-9.0.1_1
-libvtkIOCore-9.0.so.1 vtk-9.0.1_1
-libvtkIOEnSight-9.0.so.1 vtk-9.0.1_1
-libvtkIOExodus-9.0.so.1 vtk-9.0.1_1
-libvtkIOExport-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportGL2PS-9.0.so.1 vtk-9.0.1_1
-libvtkIOExportPDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOGeometry-9.0.so.1 vtk-9.0.1_1
-libvtkIOImage-9.0.so.1 vtk-9.0.1_1
-libvtkIOImport-9.0.so.1 vtk-9.0.1_1
-libvtkIOInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkIOLSDyna-9.0.so.1 vtk-9.0.1_1
-libvtkIOLegacy-9.0.so.1 vtk-9.0.1_1
-libvtkIOMotionFX-9.0.so.1 vtk-9.0.1_1
-libvtkIOMINC-9.0.so.1 vtk-9.0.1_1
-libvtkIOMovie-9.0.so.1 vtk-9.0.1_1
-libvtkIONetCDF-9.0.so.1 vtk-9.0.1_1
-libvtkIOOggTheora-9.0.so.1 vtk-9.0.1_1
-libvtkIOPLY-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallel-9.0.so.1 vtk-9.0.1_1
-libvtkIOParallelXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOSQL-9.0.so.1 vtk-9.0.1_1
-libvtkIOSegY-9.0.so.1 vtk-9.0.1_1
-libvtkIOTecplotTable-9.0.so.1 vtk-9.0.1_1
-libvtkIOVeraOut-9.0.so.1 vtk-9.0.1_1
-libvtkIOVideo-9.0.so.1 vtk-9.0.1_1
-libvtkIOXML-9.0.so.1 vtk-9.0.1_1
-libvtkIOXMLParser-9.0.so.1 vtk-9.0.1_1
-libvtkImagingColor-9.0.so.1 vtk-9.0.1_1
-libvtkImagingCore-9.0.so.1 vtk-9.0.1_1
-libvtkImagingFourier-9.0.so.1 vtk-9.0.1_1
-libvtkImagingGeneral-9.0.so.1 vtk-9.0.1_1
-libvtkImagingHybrid-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMath-9.0.so.1 vtk-9.0.1_1
-libvtkImagingMorphological-9.0.so.1 vtk-9.0.1_1
-libvtkImagingSources-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStatistics-9.0.so.1 vtk-9.0.1_1
-libvtkImagingStencil-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisCore-9.0.so.1 vtk-9.0.1_1
-libvtkInfovisLayout-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionImage-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionStyle-9.0.so.1 vtk-9.0.1_1
-libvtkInteractionWidgets-9.0.so.1 vtk-9.0.1_1
-libvtkParallelCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingAnnotation-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingCore-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingFreeType-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingGL2PSOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingImage-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLOD-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingLabel-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingSceneGraph-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingUI-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolume-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVolumeOpenGL2-9.0.so.1 vtk-9.0.1_1
-libvtkRenderingVtkJS-9.0.so.1 vtk-9.0.1_1
-libvtkTestingRendering-9.0.so.1 vtk-9.0.1_1
-libvtkViewsContext2D-9.0.so.1 vtk-9.0.1_1
-libvtkViewsCore-9.0.so.1 vtk-9.0.1_1
-libvtkViewsInfovis-9.0.so.1 vtk-9.0.1_1
-libvtkexodusII-9.0.so.1 vtk-9.0.1_1
-libvtklibharu-9.0.so.1 vtk-9.0.1_1
-libvtkmetaio-9.0.so.1 vtk-9.0.1_1
-libvtksys-9.0.so.1 vtk-9.0.1_1
-libvtkverdict-9.0.so.1 vtk-9.0.1_1
+libvtkCommonCore-9.2.so.1 vtk-9.2.2_1
+libvtksys-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMisc-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkCommonTransforms-9.2.so.1 vtk-9.2.2_1
+libvtkCommonMath-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLOD-9.2.so.1 vtk-9.2.2_1
+libvtkViewsInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkIOIOSS-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLabel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersPoints-9.2.so.1 vtk-9.2.2_1
+libvtkCommonExecutionModel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingHyperTreeGrid-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkCommonDataModel-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTopology-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSources-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolumeOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOOggTheora-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportGL2PS-9.2.so.1 vtk-9.2.2_1
+libvtkIOAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOCesium3DTiles-9.2.so.1 vtk-9.2.2_1
+libvtkIOSegY-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVtkJS-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersTexture-9.2.so.1 vtk-9.2.2_1
+libvtkIOVideo-9.2.so.1 vtk-9.2.2_1
+libvtkImagingSources-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStencil-9.2.so.1 vtk-9.2.2_1
+libvtkIOCGNSReader-9.2.so.1 vtk-9.2.2_1
+libvtkCommonComputationalGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkIOVeraOut-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionImage-9.2.so.1 vtk-9.2.2_1
+libvtkChartsCore-9.2.so.1 vtk-9.2.2_1
+libvtkImagingStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkImagingHybrid-9.2.so.1 vtk-9.2.2_1
+libvtkGeovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionWidgets-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersImaging-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersVerdict-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSMP-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingUI-9.2.so.1 vtk-9.2.2_1
+libvtkIOHDF-9.2.so.1 vtk-9.2.2_1
+libvtkCommonSystem-9.2.so.1 vtk-9.2.2_1
+libvtkImagingColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingSceneGraph-9.2.so.1 vtk-9.2.2_1
+libvtkParallelCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOInfovis-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkImagingFourier-9.2.so.1 vtk-9.2.2_1
+libvtkCommonColor-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingAnnotation-9.2.so.1 vtk-9.2.2_1
+libvtkIOSQL-9.2.so.1 vtk-9.2.2_1
+libvtkIOImage-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersExtraction-9.2.so.1 vtk-9.2.2_1
+libvtkIOGeometry-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersFlowPaths-9.2.so.1 vtk-9.2.2_1
+libvtkIOMovie-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingVolume-9.2.so.1 vtk-9.2.2_1
+libvtkIOEnSight-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistryOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersStatistics-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersSelection-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersModeling-9.2.so.1 vtk-9.2.2_1
+libvtkViewsCore-9.2.so.1 vtk-9.2.2_1
+libvtkIOMotionFX-9.2.so.1 vtk-9.2.2_1
+libvtkIOLSDyna-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallel-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingContextOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingImage-9.2.so.1 vtk-9.2.2_1
+libvtkIOXMLParser-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMorphological-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallel-9.2.so.1 vtk-9.2.2_1
+libvtkViewsContext2D-9.2.so.1 vtk-9.2.2_1
+libvtkIOImport-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingLICOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkIOAsynchronous-9.2.so.1 vtk-9.2.2_1
+libvtkIOTecplotTable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCityGML-9.2.so.1 vtk-9.2.2_1
+libvtkImagingMath-9.2.so.1 vtk-9.2.2_1
+libvtkIOParallelXML-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingGL2PSOpenGL2-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersGeneric-9.2.so.1 vtk-9.2.2_1
+libvtkIONetCDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingCore-9.2.so.1 vtk-9.2.2_1
+libvtkInfovisLayout-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersHyperTree-9.2.so.1 vtk-9.2.2_1
+libvtkIOExportPDF-9.2.so.1 vtk-9.2.2_1
+libvtkImagingGeneral-9.2.so.1 vtk-9.2.2_1
+libvtkIOXML-9.2.so.1 vtk-9.2.2_1
+libvtkIOChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkInteractionStyle-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersAMR-9.2.so.1 vtk-9.2.2_1
+libvtkIOMINC-9.2.so.1 vtk-9.2.2_1
+libvtkTestingRendering-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersParallelImaging-9.2.so.1 vtk-9.2.2_1
+libvtkDomainsChemistry-9.2.so.1 vtk-9.2.2_1
+libvtkIOExport-9.2.so.1 vtk-9.2.2_1
+libvtkIOCore-9.2.so.1 vtk-9.2.2_1
+libvtkFiltersProgrammable-9.2.so.1 vtk-9.2.2_1
+libvtkIOCONVERGECFD-9.2.so.1 vtk-9.2.2_1
+libvtkIOLegacy-9.2.so.1 vtk-9.2.2_1
+libvtkRenderingFreeType-9.2.so.1 vtk-9.2.2_1
+libvtkIOPLY-9.2.so.1 vtk-9.2.2_1
+libvtkIOExodus-9.2.so.1 vtk-9.2.2_1
+libvtkkissfft-9.2.so.1 vtk-9.2.2_1
 libvolume_key.so.1 volume_key-0.3.9_1
 librand48_r.so.0 rand48_r-0.1_1
 libxxhash.so.0 libxxHash-0.6.5_2
diff --git a/srcpkgs/vtk/patches/include.patch b/srcpkgs/vtk/patches/include.patch
deleted file mode 100644
index 008068b4deb8..000000000000
--- a/srcpkgs/vtk/patches/include.patch
+++ /dev/null
@@ -1,396 +0,0 @@
-Index: VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkGenericDataArrayLookupHelper.h
-+++ VTK-9.0.1/Common/Core/vtkGenericDataArrayLookupHelper.h
-@@ -25,6 +25,7 @@
- #include "vtkIdList.h"
- #include <algorithm>
- #include <cmath>
-+#include <limits>
- #include <unordered_map>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPiecewiseFunction.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPiecewiseFunction.cxx
-@@ -22,6 +22,7 @@
- #include <cassert>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/Core/vtkColorTransferFunction.cxx
-+++ VTK-9.0.1/Rendering/Core/vtkColorTransferFunction.cxx
-@@ -21,6 +21,7 @@
- #include <algorithm>
- #include <cmath>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <vector>
- 
-Index: VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-+++ VTK-9.0.1/Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
-@@ -22,6 +22,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <cmath>
-+#include <limits>
- 
- #include "vtkTestErrorObserver.h"
- 
-Index: VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/Testing/Cxx/UnitTestMath.cxx
-+++ VTK-9.0.1/Common/Core/Testing/Cxx/UnitTestMath.cxx
-@@ -24,6 +24,7 @@
- #include "vtkUnsignedCharArray.h"
- #include "vtkUnsignedShortArray.h"
- 
-+#include <limits>
- #include <vector>
- 
- static int TestPi();
-Index: VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Core/vtkMersenneTwister.cxx
-+++ VTK-9.0.1/Common/Core/vtkMersenneTwister.cxx
-@@ -28,6 +28,7 @@
- #include "vtkMultiThreader.h"
- #include "vtkNew.h"
- 
-+#include <limits>
- #include <map>
- 
- namespace
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/TestPentagonalPrism.cxx
-@@ -22,6 +22,7 @@
- #include "vtkCellArray.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestCells.cxx
-@@ -58,6 +58,7 @@
- #include "vtkMath.h"
- #include "vtkMathUtilities.h"
- #include "vtkPoints.h"
-+#include <limits>
- #include <map>
- #include <sstream>
- #include <string>
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitDataSet.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestImplicitVolume.cxx
-@@ -20,6 +20,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <cstdio>
-+#include <limits>
- #include <sstream>
- 
- static vtkSmartPointer<vtkImageData> MakeVolume(int, int, int);
-Index: VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-+++ VTK-9.0.1/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
-@@ -19,6 +19,7 @@
- #include "vtkMath.h"
- #include "vtkMinimalStandardRandomSequence.h"
- #include "vtkSmartPointer.h"
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/DataModel/vtkPolyhedron.cxx
-+++ VTK-9.0.1/Common/DataModel/vtkPolyhedron.cxx
-@@ -33,6 +33,7 @@ PURPOSE.  See the above copyright notice
- #include "vtkVector.h"
- 
- #include <functional>
-+#include <limits>
- #include <map>
- #include <set>
- #include <unordered_map>
-Index: VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-===================================================================
---- VTK-9.0.1.orig/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-+++ VTK-9.0.1/Common/Misc/Testing/Cxx/UnitTestFunctionParser.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestErrorObserver.h"
- 
- #include <algorithm>
-+#include <limits>
- #include <sstream>
- #include <string>
- #include <vector>
-Index: VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkEvenlySpacedStreamlines2D.cxx
-@@ -55,6 +55,7 @@ PURPOSE.  See the above copyright notice
- #include <array>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <vector>
- 
- vtkObjectFactoryNewMacro(vtkEvenlySpacedStreamlines2D);
-Index: VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-+++ VTK-9.0.1/Filters/FlowPaths/vtkLagrangianMatidaIntegrationModel.cxx
-@@ -25,6 +25,7 @@
- #include "vtkStringArray.h"
- 
- #include <cstring>
-+#include <limits>
- 
- vtkObjectFactoryNewMacro(vtkLagrangianMatidaIntegrationModel);
- 
-Index: VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-+++ VTK-9.0.1/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
-@@ -28,6 +28,7 @@
- #include "vtkHyperTreeGridNonOrientedCursor.h"
- 
- #include <cmath>
-+#include <limits>
- 
- vtkStandardNewMacro(vtkHyperTreeGridThreshold);
- 
-Index: VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-+++ VTK-9.0.1/Filters/ParallelMPI/vtkDistributedPointCloudFilter.cxx
-@@ -31,6 +31,7 @@
- #include "vtkSmartPointer.h"
- 
- #include <algorithm>
-+#include <limits>
- 
- // Histogram precision to divide space in two
- static const int HISTOGRAM_SIZE = 1024;
-Index: VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-+++ VTK-9.0.1/Filters/Points/Testing/Cxx/UnitTestKernels.cxx
-@@ -30,6 +30,7 @@
- #include "vtkVoronoiKernel.h"
- 
- #include <cmath>
-+#include <limits>
- #include <sstream>
- #include <string>
- 
-Index: VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkEllipsoidalGaussianKernel.cxx
-@@ -22,6 +22,7 @@
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
- 
-+#include <limits>
- vtkStandardNewMacro(vtkEllipsoidalGaussianKernel);
- 
- //----------------------------------------------------------------------------
-Index: VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkGaussianKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkGaussianKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkGaussianKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkProbabilisticVoronoiKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkProbabilisticVoronoiKernel);
- 
-Index: VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Points/vtkShepardKernel.cxx
-+++ VTK-9.0.1/Filters/Points/vtkShepardKernel.cxx
-@@ -21,6 +21,7 @@
- #include "vtkMathUtilities.h"
- #include "vtkObjectFactory.h"
- #include "vtkPointData.h"
-+#include <limits>
- 
- vtkStandardNewMacro(vtkShepardKernel);
- 
-Index: VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-===================================================================
---- VTK-9.0.1.orig/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-+++ VTK-9.0.1/Filters/Statistics/Testing/Cxx/TestPCAStatistics.cxx
-@@ -22,6 +22,7 @@
- #include "vtkTestUtilities.h"
- 
- #include "vtksys/SystemTools.hxx"
-+#include <limits>
- 
- // Perform a fuzzy compare of floats/doubles
- template <class A>
-Index: VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/CityGML/vtkCityGMLReader.cxx
-+++ VTK-9.0.1/IO/CityGML/vtkCityGMLReader.cxx
-@@ -46,6 +46,7 @@
- #include <cstdlib>
- #include <cstring>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <stdexcept>
- #include <string>
-Index: VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/GDAL/vtkGDALRasterReader.cxx
-+++ VTK-9.0.1/IO/GDAL/vtkGDALRasterReader.cxx
-@@ -48,6 +48,7 @@
- #include <cassert>
- #include <cmath>
- #include <iostream>
-+#include <limits>
- #include <sstream>
- #include <vector>
- 
-Index: VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/Geometry/vtkSTLWriter.cxx
-+++ VTK-9.0.1/IO/Geometry/vtkSTLWriter.cxx
-@@ -34,6 +34,7 @@
- #include <io.h> /* unlink */
- #endif
- 
-+#include <limits>
- namespace
- {
- // For C format strings
-Index: VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/NetCDF/vtkNetCDFCAMReader.cxx
-+++ VTK-9.0.1/IO/NetCDF/vtkNetCDFCAMReader.cxx
-@@ -32,6 +32,7 @@
- #include "vtkStreamingDemandDrivenPipeline.h"
- #include "vtkUnstructuredGrid.h"
- 
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <vector>
-Index: VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/TecplotTable/vtkTecplotTableReader.cxx
-+++ VTK-9.0.1/IO/TecplotTable/vtkTecplotTableReader.cxx
-@@ -35,6 +35,7 @@
- #include <algorithm>
- #include <iostream>
- #include <iterator>
-+#include <limits>
- #include <set>
- #include <sstream>
- #include <stdexcept>
-Index: VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-===================================================================
---- VTK-9.0.1.orig/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-+++ VTK-9.0.1/IO/XML/Testing/Cxx/TestXMLWriteRead.cxx
-@@ -20,6 +20,7 @@
- #include "vtkPoints.h"
- 
- #include "vtkTestUtilities.h"
-+#include <limits>
- #include <string>
- 
- namespace
-Index: VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-===================================================================
---- VTK-9.0.1.orig/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-+++ VTK-9.0.1/Rendering/OpenGL2/vtkOpenGLInstanceCulling.cxx
-@@ -31,6 +31,7 @@
- 
- #include <algorithm>
- #include <array>
-+#include <limits>
- #include <sstream>
- 
- vtkStandardNewMacro(vtkOpenGLInstanceCulling);
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/StorageBasic.cxx
-@@ -35,6 +35,7 @@
- 
- #include <cstddef>
- #include <cstdlib>
-+#include <limits>
- 
- namespace vtkm
- {
-Index: VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-===================================================================
---- VTK-9.0.1.orig/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-+++ VTK-9.0.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx
-@@ -11,6 +11,7 @@
- #include <random>
- #include <vtkm/cont/Algorithm.h>
- #include <vtkm/worklet/KdTree3D.h>
-+#include <limits>
- 
- namespace
- {
-Index: VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-===================================================================
---- VTK-9.0.1.orig/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-+++ VTK-9.0.1/Utilities/MetaIO/vtkmetaio/metaObject.cxx
-@@ -19,6 +19,7 @@
- #if defined (__BORLANDC__) && (__BORLANDC__ >= 0x0580)
- #include <mem.h>
- #endif
-+#include <limits>
- 
- #if (METAIO_USE_NAMESPACE)
- namespace METAIO_NAMESPACE {
diff --git a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
deleted file mode 100644
index b95015c859cf..000000000000
--- a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
+++ /dev/null
@@ -1,19 +0,0 @@
- https://gitlab.kitware.com/vtk/vtk/-/issues/18033
---- VTK/ThirdParty/freetype/vtk_freetype.h.in.orig
-+++ VTK/ThirdParty/freetype/vtk_freetype.h.in
-@@ -20,6 +20,15 @@
- 
- #ifdef VTK_USE_SYSTEM_FREETYPE
- # include <ft2build.h>
-+/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */
-+/* has been moved to <freetype/internal/compiler-macros.h> */
-+# ifndef FT_CALLBACK_DEF
-+#  ifdef __cplusplus
-+#   define FT_CALLBACK_DEF( x )  extern "C"  x
-+#  else
-+#   define FT_CALLBACK_DEF( x )  static  x
-+#  endif
-+# endif /* FT_CALLBACK_DEF */
- #else
- # include <vtkfreetype/include/ft2build.h>
- #endif
diff --git a/srcpkgs/vtk/patches/vtkioss-unistd.patch b/srcpkgs/vtk/patches/vtkioss-unistd.patch
new file mode 100644
index 000000000000..df43a1fe5bba
--- /dev/null
+++ b/srcpkgs/vtk/patches/vtkioss-unistd.patch
@@ -0,0 +1,26 @@
+Build fails on musl-based Linux distributions
+https://github.com/sandialabs/seacas/pull/348
+
+diff --git a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+index ca5f15de..99c2bbdd 100644
+--- a/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
++++ b/ThirdParty/ioss/vtkioss/Ioss_FileInfo.C
+@@ -26,7 +26,7 @@
+ #define S_ISDIR(m) (((m)&_S_IFMT) == _S_IFDIR)
+ #endif
+ #else
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #endif
+ 
+ #ifdef SEACAS_HAVE_MPI
+@@ -35,9 +35,6 @@
+ 
+ #include <cstdio>
+ #include <sys/stat.h>
+-#ifndef _MSC_VER
+-#include <unistd.h>
+-#endif
+ 
+ namespace {
+   bool internal_access(const std::string &name, int mode);
diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index eff6e114c7b6..659328293f70 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
-version=9.0.1
-revision=8
+version=9.2.2
+revision=1
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now
@@ -10,20 +10,23 @@ configure_args="-DBUILD_SHARED_LIBS=ON -DVTK_FORBID_DOWNLOADS=ON
  -DVTK_MODULE_USE_EXTERNAL_VTK_utf8=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF
  -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_cgns=OFF
+ -DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
  -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3"
 # vtk forks libharu, bumps to v2.4.0, and requires libharu>=2.4.0
 makedepends="zlib-devel freetype-devel liblz4-devel expat-devel MesaLib-devel
  libXt-devel libjpeg-turbo-devel tiff-devel hdf5-devel netcdf-devel
  libxml2-devel jsoncpp-devel openmpi-devel libogg-devel libtheora-devel
  eigen double-conversion-devel glew-devel pugixml-devel sqlite-devel
- gl2ps-devel proj-devel python3-devel"
+ gl2ps-devel proj-devel python3-devel json-c++ fmt-devel"
 short_desc="System for 3D computer graphics, image processing, and visualization"
 maintainer="Piraty <piraty1@inbox.ru>"
 license="BSD-3-Clause"
 homepage="https://www.vtk.org"
 distfiles="https://www.vtk.org/files/release/${version:0:3}/VTK-${version}.tar.gz"
-checksum=1b39a5e191c282861e7af4101eaa8585969a2de05f5646c9199a161213a622c7
-nocross="hdf5 is nocross"
+checksum=1c5b0a2be71fac96ff4831af69e350f7a0ea3168981f790c000709dcf9121075
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" libexecinfo-devel"
@@ -46,7 +49,7 @@ post_install() {
 
 	# Mangle CPython extension names in CMake like xbps-src will do
 	vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \
-		-i "${DESTDIR}/usr/lib/cmake/vtk-9.0/VTKPython-targets-none.cmake"
+		-i "${DESTDIR}/usr/lib/cmake/vtk-9.2/VTKPython-targets-none.cmake"
 }
 
 vtk-devel_package() {
@@ -66,6 +69,6 @@ vtk-python3_package() {
 		vmove usr/bin/vtkpython
 		vmove "${py3_sitelib}"
 		vmove "usr/lib/lib*Python*.so.*"
-		vmove "usr/lib/vtk/hierarchy/VTK/vtk*Python*.txt"
+		vmove "usr/lib/vtk-9.2/hierarchy/VTK/vtk*Python*.txt"
 	}
 }

From 6e016c8f6e4944928b10d5f81c373c536a5f3c77 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 12/12] OpenOrienteering-Mapper: rebuild for proj 9.1.0

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 3 files changed, 359 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..f396c5e99a9b 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (34 preceding siblings ...)
  2022-11-20 18:41 ` ar-jan
@ 2022-12-03 23:14 ` ar-jan
  2022-12-03 23:17 ` ar-jan
                   ` (33 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-03 23:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

Depends on #40423 being merged first because vtk update has shlib dependents.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 48678 bytes --]

From 9825b0db1386346017d380d7b0ace13a498bb68e Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/11] proj: update to 9.1.0.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index fc5bb4dda7e6..2f112f3608d4 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3068,7 +3068,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.0_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..cb61e678498f 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.0
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From d4e55b8af1ec4bbbbdf1af53075a4e9d4a88f72f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/11] libgdal: rebuild for proj 9.1.0

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index efe7a2adcf50..d6a527322ec3 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=3
+revision=4
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From 4a8c34d37b4d0b50285a783bec24138090137315 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/11] libspatialite: rebuild for proj 9.1.0

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 68da23fccefc84a42f421b98d3528896d8252e2a Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/11] postgis-postgresql14: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 0ea09373c9f26b526cda20e9cad569c6d1af1575 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/11] postgis-postgresql13: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 02d3ef8fb49eb60f5d1b21608a8b006412f500e0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/11] merkaartor: rebuild for proj 9.1.0

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From ef6a26812cae7d75b35549f2c6f320b65ec9cbe1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/11] sumo: rebuild for proj 9.1.0

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 7ed40264174c779a7e06e02a47eb824ad82a85ab Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/11] osm2pgsql: rebuild for proj 9.1.0

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 5a12fb6e51fd57bc1339d0c32b8c5954e5df824c Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/11] grass: update to 7.8.7.

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  21 +--
 4 files changed, 159 insertions(+), 167 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..8660382536e7 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
 	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From f6607c58cdea874de764b50e76197b59e6eb2ed8 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/11] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From e0766a6bbde871de81ff95fb95266de8353f71a0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/11] OpenOrienteering-Mapper: rebuild for proj 9.1.0

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 3 files changed, 359 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..f396c5e99a9b 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (35 preceding siblings ...)
  2022-12-03 23:14 ` ar-jan
@ 2022-12-03 23:17 ` ar-jan
  2022-12-03 23:22 ` ar-jan
                   ` (32 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-03 23:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

Depends on #40423 being merged first because vtk update has shlib dependents.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 49352 bytes --]

From 2a2bdee23c830ca4397b0dcf8fdf66b2ff527e3f Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.0.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 6446b42400da..52cb8cd8e0c0 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.0_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..cb61e678498f 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.0
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553db2315
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 6efa5b0550c513a17ca88c5ec39efba8a7a76098 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1.0

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index efe7a2adcf50..d6a527322ec3 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=3
+revision=4
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From faa23da685aae912272a7806ee842a49038a472c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1.0

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 7032c21ca6fbd9ab089f25dcb9db88c20802f745 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 9391631ee60d3d70a6f80db21ba90ed7058261f1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1.0

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From be11a5e4fd28e7eb10d11e78a48c5e519e705e99 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1.0

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 3a4a565b238fdd8fa3e43df24176cb71cd52a291 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1.0

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 45157453e0f60ec37d2f1d59efa68761dfe5f753 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1.0

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 88c3f258ee06ec40822cfc11e8542cfff7de57e4 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 7.8.7.

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  21 +--
 4 files changed, 159 insertions(+), 167 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..8660382536e7 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
 	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From 82f5f6f9b5a268d745b3f265b82d9a4aa6558e84 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 2af777da27a2822cb9463a4ffda3388baa5d5cf3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/12] OpenOrienteering-Mapper: rebuild for proj 9.1.0

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 3 files changed, 359 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..f396c5e99a9b 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From f8e13ea23fe885b89ed1bbeab696915453a9de5c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 4 Dec 2022 00:16:39 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 9.1.0

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 6870bdcf0857..d448f31fa762 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.2.2
-revision=1
+revision=2
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now

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

* Re: proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (36 preceding siblings ...)
  2022-12-03 23:17 ` ar-jan
@ 2022-12-03 23:22 ` ar-jan
  2022-12-03 23:22 ` ar-jan
                   ` (31 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-03 23:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1336277183

Comment:
Oh, proj-9.1.1 was just released. Will update to that.

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

* Re: proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (37 preceding siblings ...)
  2022-12-03 23:22 ` ar-jan
@ 2022-12-03 23:22 ` ar-jan
  2022-12-04 13:43 ` [PR PATCH] [Updated] " ar-jan
                   ` (30 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-03 23:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1336277183

Comment:
Oh, proj-9.1.1 was just released, I'll update to that.

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.0
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (38 preceding siblings ...)
  2022-12-03 23:22 ` ar-jan
@ 2022-12-04 13:43 ` ar-jan
  2022-12-04 21:38 ` [PR REVIEW] proj: update to 9.1.1 classabbyamp
                   ` (29 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-04 13:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

Depends on #40423 being merged first because vtk update has shlib dependents.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 49355 bytes --]

From 7c65074a9feb6c0ab496ef826c8a12f464240de3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 6446b42400da..fbac3976a7b2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..86d8a16f8a6d 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,17 +1,17 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39
 
 post_install() {
 	vlicense COPYING
@@ -22,7 +22,6 @@ proj-devel_package() {
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 0c43fa6a1ff8efb51e4769a12565cae1313a59bf Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index efe7a2adcf50..d6a527322ec3 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=3
+revision=4
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From f629f80900d20b1a2ee787f078abed7e088a093d Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1

---
 srcpkgs/libspatialite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..0333e6807d7b 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,9 +1,9 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
-hostmakedepends="pkg-config geos-devel"
+hostmakedepends="pkg-config geos-devel librttopo"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel
  geos-devel librttopo-devel libxml2-devel minizip-devel"
 short_desc="SQLite extension for Spatial SQL capabilities"

From 003bbd763ce0fd48e081ca058034525838ad1d78 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From e99962820d6ce5f823398a9028686715184d7207 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From ccbce79f2ef809a954eadf406d895634cb59c4c0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 3c46f3ed994c265950e4a7bd2fec676d01bac3ab Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From ed7920fedbc80d99f230ec09d4f9c13ccfaa5fd0 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From c8216078898fd19d843d45ada572538f2b087467 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 7.8.7; rebuild for proj 9.1

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  21 +--
 4 files changed, 159 insertions(+), 167 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..8660382536e7 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
 distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
 	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From 26ec314155f850dd2f9b542891ddc54ed0d0ea6f Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 08901c3a26504141d70592b8e170dd72978dc961 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/12] OpenOrienteering-Mapper: rebuild for proj 9.1

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 3 files changed, 359 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..f396c5e99a9b 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
+ libcurl-devel"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From ff85cdd5163c2b464892aefba2eff3e4a4fb4deb Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 4 Dec 2022 00:16:39 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 9.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 6870bdcf0857..d448f31fa762 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.2.2
-revision=1
+revision=2
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (40 preceding siblings ...)
  2022-12-04 21:38 ` [PR REVIEW] proj: update to 9.1.1 classabbyamp
@ 2022-12-04 21:38 ` classabbyamp
  2022-12-04 21:38 ` classabbyamp
                   ` (27 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 21:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 186 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039033714

Comment:
why a library in hostmakedepends?

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (41 preceding siblings ...)
  2022-12-04 21:38 ` classabbyamp
@ 2022-12-04 21:38 ` classabbyamp
  2022-12-04 21:38 ` classabbyamp
                   ` (26 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 21:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039033283

Comment:
```suggestion
distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
```

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (42 preceding siblings ...)
  2022-12-04 21:38 ` classabbyamp
@ 2022-12-04 21:38 ` classabbyamp
  2022-12-04 22:10 ` ar-jan
                   ` (25 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 21:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039033922

Comment:
if this is caused by proj now needing libcurl, libcurl-devel should be specified in the depends of the proj-devel subpackage instead

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (39 preceding siblings ...)
  2022-12-04 13:43 ` [PR PATCH] [Updated] " ar-jan
@ 2022-12-04 21:38 ` classabbyamp
  2022-12-04 21:38 ` classabbyamp
                   ` (28 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 21:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039033620

Comment:
can this become a vsed?

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (43 preceding siblings ...)
  2022-12-04 21:38 ` classabbyamp
@ 2022-12-04 22:10 ` ar-jan
  2022-12-04 22:15 ` classabbyamp
                   ` (24 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-04 22:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039038005

Comment:
I got this error, which went away after adding librttopo to hostmakedepends:

> checking for librttopo.h... yes
> checking for library containing rtt_AddLineNoFace... no
> configure: error: 'librttopo' (>= v.1.1.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-rttopo parameter.

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (44 preceding siblings ...)
  2022-12-04 22:10 ` ar-jan
@ 2022-12-04 22:15 ` classabbyamp
  2022-12-04 22:18 ` ar-jan
                   ` (23 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 22:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039038849

Comment:
hm weird. and it works on cross too?

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (45 preceding siblings ...)
  2022-12-04 22:15 ` classabbyamp
@ 2022-12-04 22:18 ` ar-jan
  2022-12-04 22:36 ` ar-jan
                   ` (22 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-04 22:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039039319

Comment:
Hmm, this was definitely the case then, but I can't reproduce this now so I'll remove it. Could this have been something with my build environment, like forgetting to clean after a failed build?

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (46 preceding siblings ...)
  2022-12-04 22:18 ` ar-jan
@ 2022-12-04 22:36 ` ar-jan
  2022-12-04 22:41 ` [PR PATCH] [Updated] " ar-jan
                   ` (21 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-04 22:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 159 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039041762

Comment:
You're right

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (47 preceding siblings ...)
  2022-12-04 22:36 ` ar-jan
@ 2022-12-04 22:41 ` ar-jan
  2022-12-04 22:41 ` [PR REVIEW] " classabbyamp
                   ` (20 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-04 22:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 49399 bytes --]

From b8ab13609cfc8b24da8ac371e5f06aebcc5fdd16 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 6446b42400da..fbac3976a7b2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..451606a453c2 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,28 +1,27 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39
 
 post_install() {
 	vlicense COPYING
 }
 
 proj-devel_package() {
-	depends="${sourcepkg}-${version}_${revision}"
+	depends="${sourcepkg}-${version}_${revision} libcurl-devel"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 7f600d4eac2a341396436e459f9837c9271e9218 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index efe7a2adcf50..d6a527322ec3 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=3
+revision=4
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From be072b64a54ad98e49e6bf477b93caddb37e8ac5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1

---
 srcpkgs/libspatialite/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..ec03354fdfe7 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,7 +1,7 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
 hostmakedepends="pkg-config geos-devel"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel

From 4255f32186dce87251a015961a7799121d2a72f8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 5eb68cc753129fa737ebd4982d5656aca8e30fdb Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 252cff59c2284952050fa0231b366eabd85f5726 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 728bc0f10a8feb2b76010f04d0a1ee3818612370 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 212d545a80597e2a0c5d9b2952a20ebf62fca3cd Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 673acf01928cfe3cc7aed1fb20cef4e3934cbfd5 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 7.8.7; rebuild for proj 9.1

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  25 +--
 4 files changed, 161 insertions(+), 169 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..b7048806554d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	vsed -i ${DESTDIR}/usr/bin/grass${_binver} \
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From 014a8c552e12a8ca8a823b1c66be9c1c1d5515c5 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 000a9ef7ecb9a668060481dc7e9e7f89e7432344 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/12] OpenOrienteering-Mapper: rebuild for proj 9.1

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   5 +-
 3 files changed, 359 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..df5e71ddf7fb 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,13 +1,14 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel
  qt5-tools-devel sqlite-devel cups-devel $(vopt_if location qt5-location-devel)
  $(vopt_if sensors qt5-sensors-devel)
- qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds"
+ qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite
+ qt5-plugin-tds"
 short_desc="Orienteering mapmaking program"
 maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-or-later"

From 0f7814e36077b813c543f890455f298e0797d391 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 4 Dec 2022 00:16:39 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 9.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 6870bdcf0857..d448f31fa762 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.2.2
-revision=1
+revision=2
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (48 preceding siblings ...)
  2022-12-04 22:41 ` [PR PATCH] [Updated] " ar-jan
@ 2022-12-04 22:41 ` classabbyamp
  2022-12-04 22:44 ` classabbyamp
                   ` (19 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 22:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039042620

Comment:
yeah could be

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (49 preceding siblings ...)
  2022-12-04 22:41 ` [PR REVIEW] " classabbyamp
@ 2022-12-04 22:44 ` classabbyamp
  2022-12-04 22:44 ` ar-jan
                   ` (18 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 22:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039042780

Comment:
let's put this change back to how it was, if the only change is the line break

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (50 preceding siblings ...)
  2022-12-04 22:44 ` classabbyamp
@ 2022-12-04 22:44 ` ar-jan
  2022-12-04 23:02 ` [PR PATCH] [Updated] " ar-jan
                   ` (17 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-04 22:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039042995

Comment:
It was 85 columns though?

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (51 preceding siblings ...)
  2022-12-04 22:44 ` ar-jan
@ 2022-12-04 23:02 ` ar-jan
  2022-12-04 23:09 ` [PR REVIEW] " classabbyamp
                   ` (16 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2022-12-04 23:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 48989 bytes --]

From b8ab13609cfc8b24da8ac371e5f06aebcc5fdd16 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 6446b42400da..fbac3976a7b2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3069,7 +3069,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..451606a453c2 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,28 +1,27 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39
 
 post_install() {
 	vlicense COPYING
 }
 
 proj-devel_package() {
-	depends="${sourcepkg}-${version}_${revision}"
+	depends="${sourcepkg}-${version}_${revision} libcurl-devel"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 7f600d4eac2a341396436e459f9837c9271e9218 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index efe7a2adcf50..d6a527322ec3 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=3
+revision=4
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From be072b64a54ad98e49e6bf477b93caddb37e8ac5 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1

---
 srcpkgs/libspatialite/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..ec03354fdfe7 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,7 +1,7 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
 hostmakedepends="pkg-config geos-devel"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel

From 4255f32186dce87251a015961a7799121d2a72f8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 5eb68cc753129fa737ebd4982d5656aca8e30fdb Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 252cff59c2284952050fa0231b366eabd85f5726 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 728bc0f10a8feb2b76010f04d0a1ee3818612370 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 212d545a80597e2a0c5d9b2952a20ebf62fca3cd Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index 1d5f71b70140..e67e67513b8f 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 673acf01928cfe3cc7aed1fb20cef4e3934cbfd5 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 7.8.7; rebuild for proj 9.1

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  25 +--
 4 files changed, 161 insertions(+), 169 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..b7048806554d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	vsed -i ${DESTDIR}/usr/bin/grass${_binver} \
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From 014a8c552e12a8ca8a823b1c66be9c1c1d5515c5 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From bfa86a23cdc37573b4c759b5b29e496773e019df Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/12] OpenOrienteering-Mapper: rebuild for proj 9.1

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   2 +-
 3 files changed, 357 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..dd2ae82385e3 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,7 +1,7 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel

From db740ea558e8fd7f24e19e94553e75e69f86d500 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 4 Dec 2022 00:16:39 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 9.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 6870bdcf0857..d448f31fa762 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.2.2
-revision=1
+revision=2
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (52 preceding siblings ...)
  2022-12-04 23:02 ` [PR PATCH] [Updated] " ar-jan
@ 2022-12-04 23:09 ` classabbyamp
  2023-01-09  0:42 ` kruceter
                   ` (15 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2022-12-04 23:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1039046644

Comment:
it's a soft limit, and that kind of change can make it harder to understand when things were done to a template 🤷‍♀️

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (53 preceding siblings ...)
  2022-12-04 23:09 ` [PR REVIEW] " classabbyamp
@ 2023-01-09  0:42 ` kruceter
  2023-01-11 21:38 ` [PR PATCH] [Updated] " ar-jan
                   ` (14 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2023-01-09  0:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

New review comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1064229658

Comment:
The package has been revbumped for boost-devel in master, swallowing this revbump.

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (54 preceding siblings ...)
  2023-01-09  0:42 ` kruceter
@ 2023-01-11 21:38 ` ar-jan
  2023-01-11 21:39 ` [PR REVIEW] " ar-jan
                   ` (13 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2023-01-11 21:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 48989 bytes --]

From 123af3e57df64369be9631b1cb197e44cc84b648 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 7a0b6a98a6d2..2cfa1748ac42 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3064,7 +3064,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..451606a453c2 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,28 +1,27 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39
 
 post_install() {
 	vlicense COPYING
 }
 
 proj-devel_package() {
-	depends="${sourcepkg}-${version}_${revision}"
+	depends="${sourcepkg}-${version}_${revision} libcurl-devel"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 9970c369d81a212d16084c97c4977916cd3cc63c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d6a527322ec3..0f13822bfbe2 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=4
+revision=5
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From ef2add9203c1f271057cb9f6634375251d8842ac Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1

---
 srcpkgs/libspatialite/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..ec03354fdfe7 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,7 +1,7 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
 hostmakedepends="pkg-config geos-devel"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel

From c32008052388cf52a03140ef2fc53f3611f77dd7 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 74c0d56cb2359ee4c1be0c98e755aa6c33f8ee01 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From f34287e16364e74346acf09c9fc0538424e0d8a3 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 3006cdb4ab70b8e280262c74e2fbbf429c807c6b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 563ee2e983da8554c113d2210e40a84e5822fd07 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index e67e67513b8f..c3cd45f42116 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 335832abfe4f4a975d8934e61d73fa80dedefcac Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 7.8.7; rebuild for proj 9.1

---
 srcpkgs/grass/patches/c99-bool.patch          | 157 ------------------
 .../grass/patches/fix-gettext-python.patch    |  18 ++
 srcpkgs/grass/patches/fix-locale-python.patch | 130 +++++++++++++++
 srcpkgs/grass/template                        |  25 +--
 4 files changed, 161 insertions(+), 169 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch
 create mode 100644 srcpkgs/grass/patches/fix-gettext-python.patch
 create mode 100644 srcpkgs/grass/patches/fix-locale-python.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/patches/fix-gettext-python.patch b/srcpkgs/grass/patches/fix-gettext-python.patch
new file mode 100644
index 000000000000..bb407fc8bcdf
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-gettext-python.patch
@@ -0,0 +1,18 @@
+"codeset" in gettext.install() is deprecated with python 3.11
+
+Backported from https://github.com/OSGeo/grass/pull/2539
+
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -1392,10 +1392,7 @@
+         del os.environ['LC_ALL']  # Remove LC_ALL to not override LC_NUMERIC
+ 
+     # From now on enforce the new language
+-    if encoding:
+-        gettext.install('grasslibs', gpath('locale'), codeset=encoding)
+-    else:
+-        gettext.install('grasslibs', gpath('locale'))
++    gettext.install('grasslibs', gpath('locale'))
+ 
+ 
+ # TODO: grass_gui parameter is a hack and should be removed, see below
diff --git a/srcpkgs/grass/patches/fix-locale-python.patch b/srcpkgs/grass/patches/fix-locale-python.patch
new file mode 100644
index 000000000000..a8a0529b2013
--- /dev/null
+++ b/srcpkgs/grass/patches/fix-locale-python.patch
@@ -0,0 +1,130 @@
+locale.getdefaultlocale() is deprecated with python 3.11
+
+Adapted from https://github.com/OSGeo/grass/pull/2550
+
+diff a/gui/wxpython/core/gcmd.py
+--- a/gui/wxpython/core/gcmd.py
++++ b/gui/wxpython/core/gcmd.py
+@@ -773,7 +773,7 @@
+ 
+     :return: system encoding (can be None)
+     """
+-    enc = locale.getdefaultlocale()[1]
++    enc = locale.getencoding()
+     if forceUTF8 and (enc is None or enc == 'UTF8'):
+         return 'UTF-8'
+ 
+diff a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py
+--- a/gui/wxpython/core/gconsole.py
++++ b/gui/wxpython/core/gconsole.py
+@@ -399,7 +399,7 @@
+             sys.stdout = self.cmdStdOut
+             sys.stderr = self.cmdStdErr
+         else:
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             if enc:
+                 if sys.version_info.major == 2:
+                     sys.stdout = codecs.getwriter(enc)(sys.__stdout__)
+diff a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py
+--- a/gui/wxpython/gui_core/forms.py
++++ b/gui/wxpython/gui_core/forms.py
+@@ -1858,7 +1858,7 @@
+                                         size=(-1, 75))
+                         if p.get('value', '') and os.path.isfile(p['value']):
+                             ifbb.Clear()
+-                            enc = locale.getdefaultlocale()[1]
++                            enc = locale.getencoding()
+                             with codecs.open(p['value'], encoding=enc, errors='ignore') as f:
+                                 nonascii = bytearray(range(0x80, 0x100))
+                                 for line in f.readlines():
+@@ -2389,7 +2389,7 @@
+ 
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+-            enc = locale.getdefaultlocale()[1]
++            enc = locale.getencoding()
+             f = codecs.open(path, encoding=enc, mode='w', errors='replace')
+             try:
+                 f.write(text + os.linesep)
+diff a/gui/wxpython/gui_core/ghelp.py b/gui/wxpython/gui_core/ghelp.py
+--- a/gui/wxpython/gui_core/ghelp.py
++++ b/gui/wxpython/gui_core/ghelp.py
+@@ -234,7 +234,7 @@
+         self.langUsed = grass.gisenv().get('LANG', None)
+         if not self.langUsed:
+             import locale
+-            loc = locale.getdefaultlocale()
++            loc = locale.getlocale()
+             if loc == (None, None):
+                 self.langUsed = _('unknown')
+             else:
+diff a/gui/wxpython/rlisetup/frame.py b/gui/wxpython/rlisetup/frame.py
+--- a/gui/wxpython/rlisetup/frame.py
++++ b/gui/wxpython/rlisetup/frame.py
+@@ -49,7 +49,7 @@
+         self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
+         self.btn_ok.Bind(wx.EVT_BUTTON, self.OnOk)
+         self._layout()
+-        self.enc = locale.getdefaultlocale()[1]
++        self.enc = locale.getencoding()
+ 
+     def _layout(self):
+         """Set the layout"""
+diff a/lib/init/grass.py b/lib/init/grass.py
+--- a/lib/init/grass.py
++++ b/lib/init/grass.py
+@@ -62,7 +62,7 @@
+ # for wxpath
+ _WXPYTHON_BASE = None
+ 
+-ENCODING = locale.getdefaultlocale()[1]
++ENCODING = locale.getencoding()
+ if ENCODING is None:
+     ENCODING = 'UTF-8'
+     print("Default locale not found, using UTF-8")  # intentionally not translatable
+@@ -1278,7 +1278,7 @@
+             locale.setlocale(locale.LC_ALL, 'C')
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+ 
+-        language, encoding = locale.getdefaultlocale()
++        language, encoding = locale.getlocale()
+         if not language:
+             sys.stderr.write("Default locale settings are missing. GRASS running with C locale.\n")
+             install_notranslation()
+diff a/lib/python/gunittest/multirunner.py b/lib/python/gunittest/multirunner.py
+--- a/lib/python/gunittest/multirunner.py
++++ b/lib/python/gunittest/multirunner.py
+@@ -28,7 +28,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/lib/python/script/utils.py b/lib/python/script/utils.py
+--- a/lib/python/script/utils.py
++++ b/lib/python/script/utils.py
+@@ -160,7 +160,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
+diff a/tools/mkhtml.py b/tools/mkhtml.py
+--- a/tools/mkhtml.py
++++ b/tools/mkhtml.py
+@@ -91,7 +91,7 @@
+ 
+ 
+ def _get_encoding():
+-    encoding = locale.getdefaultlocale()[1]
++    encoding = locale.getencoding()
+     if not encoding:
+         encoding = 'UTF-8'
+     return encoding
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..b7048806554d 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,31 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=7.8.7
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/usr/share --bindir=/usr/bin
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
  fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
+checksum=4fff7be556d820ed81704bb27fe3ed913c173076bb3ed036bcc3a49bd4027f69
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
+	# move grass libraries from /usr/share to /usr/lib
 	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
+	mv ${DESTDIR}/usr/share/grass${_binver} ${DESTDIR}/usr/lib
 	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	vsed -i ${DESTDIR}/usr/bin/grass${_binver} \
+		-e "87s;\(GISBASE =\).*;\1 \"/usr/lib/grass${_binver}\";"
 }

From 5b8b80ffdb1d6e031289e4e3ea9e0ac3475d68d7 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 40f3571d9a03119ea4a2e2bee368bd9c38ae8687 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/12] OpenOrienteering-Mapper: rebuild for proj 9.1

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   2 +-
 3 files changed, 357 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..dd2ae82385e3 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,7 +1,7 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel

From 1b08cd9ddc8e75e13abcbc4bae1fc31b6329cdb8 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 4 Dec 2022 00:16:39 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 9.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 6870bdcf0857..d448f31fa762 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.2.2
-revision=1
+revision=2
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now

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

* Re: [PR REVIEW] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (55 preceding siblings ...)
  2023-01-11 21:38 ` [PR PATCH] [Updated] " ar-jan
@ 2023-01-11 21:39 ` ar-jan
  2023-01-12 20:29 ` ar-jan
                   ` (12 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2023-01-11 21:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

New review comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#discussion_r1067482814

Comment:
updated; libgdal too.

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (56 preceding siblings ...)
  2023-01-11 21:39 ` [PR REVIEW] " ar-jan
@ 2023-01-12 20:29 ` ar-jan
  2023-01-12 23:30 ` ar-jan
                   ` (11 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2023-01-12 20:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1380961177

Comment:
I think this is ready, I've been running proj-9.1.1 for over a month.

Only sore point is grass. But afaict the version of grass that's currently packaged is **more broken** than the update to 7.8.7 included here, because here only the gui is broken while text mode works.

Or maybe grass could be removed? I wonder if anyone is even using it on Void given that it *seems* to be broken to several of us.

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (57 preceding siblings ...)
  2023-01-12 20:29 ` ar-jan
@ 2023-01-12 23:30 ` ar-jan
  2023-01-13  1:00 ` kruceter
                   ` (10 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2023-01-12 23:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1381104327

Comment:
@kruceter Would you care to see if you can get it to work? I gathered these from the error messages involved. I didn't get it working but iirc I stopped before trying all of them combined.

Need to backport fixes to wxPython 4.0.7 with Python 3.8+
Via https://github.com/OSGeo/grass/issues/1971#issuecomment-1000119382:
https://src.fedoraproject.org/rpms/python-wxpython4/c/f55a17c2d3b336c82fb44f7816ec63219847f4cc?branch=rawhide:
https://github.com/wxWidgets/Phoenix/commit/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch [from https://github.com/wxWidgets/Phoenix/pull/1533 Add __index__...]
https://github.com/wxWidgets/Phoenix/commit/3eb9eb32dc3285435039f6c420c398665372a1ad.patch [from https://github.com/wxWidgets/Phoenix/pull/2005 ScrolledWindow.SetScrollbars]
https://github.com/wxWidgets/Phoenix/commit/0d449626d6d298ad96ebd1d514d0e42833bce470.patch [from https://github.com/wxWidgets/Phoenix/pull/2026 integer division]

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (58 preceding siblings ...)
  2023-01-12 23:30 ` ar-jan
@ 2023-01-13  1:00 ` kruceter
  2023-01-14  2:58 ` kruceter
                   ` (9 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2023-01-13  1:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1381173689

Comment:
Applied proposed patches and rebuilt wxPython4 with grass. The outcome is same.

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (59 preceding siblings ...)
  2023-01-13  1:00 ` kruceter
@ 2023-01-14  2:58 ` kruceter
  2023-01-14 20:10 ` kruceter
                   ` (8 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2023-01-14  2:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1382643933

Comment:
There is no way to disable GUI using build arguments, their old manual misled me.

Rebase and apply this patch (and change version in the commit message too):

[0001-fixup-grass-update-to-7.8.7-rebuild-for-proj-9.1.txt](https://github.com/void-linux/void-packages/files/10416401/0001-fixup-grass-update-to-7.8.7-rebuild-for-proj-9.1.txt)

There is nothing we can do about broken gui at present time, so leave it be.

If GUI does not work, grass falls back to the text mode. We can live with it at least until wxPython is updated. If you are interested in enforcing the text mode, add the following block to the template:

```sh
post_install() {
	# This package is broken with wxPython4 (<=4.0.7),
	# hence the GUI is compulsorily disabled.
	vsed -i "${DESTDIR}/usr/bin/grass" -e "s/\(default_gui =\).*/\1 \"text\"/"
}
```

Aside from grass I think this pull request can be merged.

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (60 preceding siblings ...)
  2023-01-14  2:58 ` kruceter
@ 2023-01-14 20:10 ` kruceter
  2023-01-15 12:00 ` ar-jan
                   ` (7 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2023-01-14 20:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1382643933

Comment:
There is no way to disable GUI using build arguments, their old manual misled me.

Rebase and apply this patch (and change version in the commit message too):

[0001-fixup-grass-update-to-7.8.7-rebuild-for-proj-9.1.txt](https://github.com/void-linux/void-packages/files/10418752/0001-fixup-grass-update-to-7.8.7-rebuild-for-proj-9.1.txt)

There is nothing we can do about broken gui at present time, so leave it be.

If GUI does not work, grass falls back to the text mode. We can live with it at least until wxPython is updated. If you are interested in enforcing the text mode, add the following block to the template:

```sh
post_install() {
	# This package is broken with wxPython4 (<=4.0.7),
	# hence the GUI is compulsorily disabled.
	vsed -i "${DESTDIR}/usr/bin/grass" -e "s/\(default_gui =\).*/\1 \"text\"/"
}
```

Aside from grass I think this pull request can be merged.

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (61 preceding siblings ...)
  2023-01-14 20:10 ` kruceter
@ 2023-01-15 12:00 ` ar-jan
  2023-01-16  9:29 ` nezos
                   ` (6 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2023-01-15 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1383131764

Comment:
I wonder if it wouldn't be cleaner to drop the grass package for now, instead of patching it to be text-only. Any thoughts, @alexjarosch @classabbyamp?

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (62 preceding siblings ...)
  2023-01-15 12:00 ` ar-jan
@ 2023-01-16  9:29 ` nezos
  2023-01-16  9:34 ` classabbyamp
                   ` (5 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: nezos @ 2023-01-16  9:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

New comment by nezos on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1383737420

Comment:
> I wonder if it wouldn't be cleaner to drop the grass package for now, instead of patching it to be text-only. Any thoughts, @alexjarosch @classabbyamp?

If you drop GRASS then you will lose the functionality also from the QGIS Toolbox. I have read that GRASS8 works with the latest QGIS (since v3.24). Even if as a standalone it does not work, the toolbox options are handy.

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (63 preceding siblings ...)
  2023-01-16  9:29 ` nezos
@ 2023-01-16  9:34 ` classabbyamp
  2023-01-16  9:50 ` alexjarosch
                   ` (4 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2023-01-16  9:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1383751180

Comment:
removing grass is not the right way. i think the right way would be to update wxpython but that's a bit of scope creep :)

better to just patch it for now

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (64 preceding siblings ...)
  2023-01-16  9:34 ` classabbyamp
@ 2023-01-16  9:50 ` alexjarosch
  2023-01-22 15:45 ` [PR PATCH] [Updated] " ar-jan
                   ` (3 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: alexjarosch @ 2023-01-16  9:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

New comment by alexjarosch on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1383771661

Comment:
I agree with the two posts above from @classabbyamp and @nezos . I think we don't want to loose the functionality in QGIS as well as GRASS. Updating wxpython is really another scope as pointed out above, so I second the opinion tp better just patch it for now. 

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

* Re: [PR PATCH] [Updated] proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (65 preceding siblings ...)
  2023-01-16  9:50 ` alexjarosch
@ 2023-01-22 15:45 ` ar-jan
  2023-01-22 15:52 ` ar-jan
                   ` (2 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2023-01-22 15:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

There is an updated pull request by ar-jan against master on the void-packages repository

https://github.com/ar-jan/void-packages proj-721
https://github.com/void-linux/void-packages/pull/40347

proj: update to 9.1.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

A patch file from https://github.com/void-linux/void-packages/pull/40347.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-proj-721-40347.patch --]
[-- Type: text/x-diff, Size: 42842 bytes --]

From 3a4756c3b888162e0627d10c636843d0f337208c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 15:08:33 +0100
Subject: [PATCH 01/12] proj: update to 9.1.1.

---
 common/shlibs         |  2 +-
 srcpkgs/proj/template | 13 ++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index ca4bda546fe7..0a617c379b1a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3065,7 +3065,7 @@ libwithsctp.so.1 lksctp-tools-1.0.17_1
 libnss_ldap.so.2 nss-pam-ldapd-0.9.7_4
 libunshield.so.0 libunshield-0.6_1
 libMyGUIEngine.so.3.4.1 libmygui-3.4.1_1
-libproj.so.18 proj-6.3.0_1
+libproj.so.25 proj-9.1.1_1
 libnlopt.so.0 nlopt-2.4.2_1
 libeb.so.16 libeb-4.3.3_1
 libchipcard.so.6 libchipcard-5.0.4_1
diff --git a/srcpkgs/proj/template b/srcpkgs/proj/template
index 51c4638234bd..451606a453c2 100644
--- a/srcpkgs/proj/template
+++ b/srcpkgs/proj/template
@@ -1,28 +1,27 @@
 # Template file for 'proj'
 pkgname=proj
-version=6.3.2
+version=9.1.1
 revision=1
 build_style=cmake
-configure_args="-DPROJ_TESTS=OFF"
+configure_args="-DBUILD_TESTING=OFF"
 hostmakedepends="python3"
-makedepends="sqlite-devel"
+makedepends="libcurl-devel sqlite-devel tiff-devel"
 short_desc="Cartographic Projections Library"
 maintainer="John <me@johnnynator.dev>"
 license="MIT"
-homepage="https://proj4.org"
+homepage="https://proj.org"
 distfiles="https://download.osgeo.org/proj/proj-${version}.tar.gz"
-checksum=cb776a70f40c35579ae4ba04fb4a388c1d1ce025a1df6171350dc19f25b80311
+checksum=003cd4010e52bb5eb8f7de1c143753aa830c8902b6ed01209f294846e40e6d39
 
 post_install() {
 	vlicense COPYING
 }
 
 proj-devel_package() {
-	depends="${sourcepkg}-${version}_${revision}"
+	depends="${sourcepkg}-${version}_${revision} libcurl-devel"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
-		vmove usr/share/man/man3
 		vmove usr/lib/cmake
 		vmove "usr/lib/*.so"
 	}

From 3db6f78345fef919e802f7f3a798da2e72da35eb Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 19:40:30 +0100
Subject: [PATCH 02/12] libgdal: rebuild for proj 9.1

---
 srcpkgs/libgdal/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libgdal/template b/srcpkgs/libgdal/template
index d6a527322ec3..0f13822bfbe2 100644
--- a/srcpkgs/libgdal/template
+++ b/srcpkgs/libgdal/template
@@ -1,7 +1,7 @@
 # Template file for 'libgdal'
 pkgname=libgdal
 version=3.5.3
-revision=4
+revision=5
 build_style=cmake
 build_helper=python3
 configure_args="-DGDAL_USE_OPENCL=ON

From 7833a17495aa7d991f59b2c3132eba94c176eb77 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:12:34 +0100
Subject: [PATCH 03/12] libspatialite: rebuild for proj 9.1

---
 srcpkgs/libspatialite/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libspatialite/template b/srcpkgs/libspatialite/template
index 54885e5e8b8c..ec03354fdfe7 100644
--- a/srcpkgs/libspatialite/template
+++ b/srcpkgs/libspatialite/template
@@ -1,7 +1,7 @@
 # Template file for 'libspatialite'
 pkgname=libspatialite
 version=5.0.1
-revision=1
+revision=2
 build_style=gnu-configure
 hostmakedepends="pkg-config geos-devel"
 makedepends="sqlite-devel zlib-devel proj-devel freexl-devel

From 48130885ee4ad8841eac28f1b887231bdebc806b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:21:32 +0100
Subject: [PATCH 04/12] postgis-postgresql14: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql14/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..5b07a5bd027d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql14'
 pkgname=postgis-postgresql14
 version=3.2.1
-revision=3
+revision=4
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From f41f5ef91df1032b32638c4c74c8ea68ee721104 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:24:22 +0100
Subject: [PATCH 05/12] postgis-postgresql13: rebuild for proj 9.1

---
 srcpkgs/postgis-postgresql13/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
index 6a6cedb505e7..b95707840357 100644
--- a/srcpkgs/postgis-postgresql13/template
+++ b/srcpkgs/postgis-postgresql13/template
@@ -1,7 +1,7 @@
 # Template file for 'postgis-postgresql13'
 pkgname=postgis-postgresql13
 version=3.2.1
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="
  --with-projdir=${XBPS_CROSS_BASE}/usr

From 41593b905857adca881de7f05bb516baf7ea1372 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:25:40 +0100
Subject: [PATCH 06/12] merkaartor: rebuild for proj 9.1

---
 srcpkgs/merkaartor/template | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/srcpkgs/merkaartor/template b/srcpkgs/merkaartor/template
index 6603376111f2..c5848acf7d22 100644
--- a/srcpkgs/merkaartor/template
+++ b/srcpkgs/merkaartor/template
@@ -1,7 +1,7 @@
 # Template file for 'merkaartor'
 pkgname=merkaartor
 version=0.19.0
-revision=2
+revision=3
 build_style=qmake
 configure_args="SYSTEM_QUAZIP=1 SYSTEM_QUAZIP_LDFLAGS=-lquazip5"
 hostmakedepends="qt5-qmake libgdal-tools qt5-host-tools"
@@ -13,5 +13,3 @@ license="GPL-2.0-or-later"
 homepage="http://merkaartor.be"
 distfiles="https://github.com/openstreetmap/merkaartor/archive/${version}.tar.gz"
 checksum=f538d1eb380005cbd5d047070b276da59c58bb7ff47218e20a080b893d0ba457
-
-CXXFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"

From 0e01beda477c14769af79ea289cfbdd7eb878ee1 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sat, 5 Nov 2022 16:29:13 +0100
Subject: [PATCH 07/12] sumo: rebuild for proj 9.1

---
 srcpkgs/sumo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/sumo/template b/srcpkgs/sumo/template
index dfc342f19a51..595a4d4e4c4e 100644
--- a/srcpkgs/sumo/template
+++ b/srcpkgs/sumo/template
@@ -1,7 +1,7 @@
 # Template file for 'sumo'
 pkgname=sumo
 version=1.12.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="libgdal-tools pkg-config swig python3-setuptools"
 makedepends="python3-devel ffmpeg-devel fox-devel gl2ps-devel libgdal-devel

From 59fb7fae66226fe8ec357c37d52f5731e0ae719c Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Tue, 8 Nov 2022 17:39:17 +0100
Subject: [PATCH 08/12] osm2pgsql: rebuild for proj 9.1

---
 srcpkgs/osm2pgsql/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/osm2pgsql/template b/srcpkgs/osm2pgsql/template
index e67e67513b8f..c3cd45f42116 100644
--- a/srcpkgs/osm2pgsql/template
+++ b/srcpkgs/osm2pgsql/template
@@ -1,7 +1,7 @@
 # Template file for 'osm2pgsql'
 pkgname=osm2pgsql
 version=1.6.0
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="boost"
 makedepends="expat-devel proj-devel bzip2-devel zlib-devel boost-devel

From 52193ccf8bb7150f31b215efc9d80341f95d189c Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Tue, 8 Nov 2022 14:08:01 +0300
Subject: [PATCH 09/12] grass: update to 8.2.1; disable gui; rebuild for proj
 9.1

---
 srcpkgs/grass/patches/c99-bool.patch | 157 ---------------------------
 srcpkgs/grass/template               |  28 +++--
 2 files changed, 13 insertions(+), 172 deletions(-)
 delete mode 100644 srcpkgs/grass/patches/c99-bool.patch

diff --git a/srcpkgs/grass/patches/c99-bool.patch b/srcpkgs/grass/patches/c99-bool.patch
deleted file mode 100644
index ce0cdfcd6928..000000000000
--- a/srcpkgs/grass/patches/c99-bool.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From 1e0c11f526f64755f877957ce6c14b2159c3823f Mon Sep 17 00:00:00 2001
-From: nilason <n_larsson@yahoo.com>
-Date: Wed, 19 May 2021 11:38:49 +0200
-Subject: [PATCH] libgis: Enable the C99 bool type (#1567)
-
-Enables globally the C99 'bool' type with its values 'true' and 'false'.
-
-The old boolean constants 'TRUE' and 'FALSE' are still valid but
-redefined to 'true' and 'false' to emphasize their equivalence.
-
-(Re-)definitions of TRUE/FALSE in modules are removed.
-
-This change was originally triggered by a conflict of v.hull -- defining
-a local bool type -- with GDAL 3.3 which introduced the inclusion of
-stdbool.h (#1563).
----
- lib/lidar/lidar.h            |  3 ---
- raster/r.param.scale/param.h |  2 --
- raster/r.surf.idw/main.h     |  2 --
- raster3d/r3.showdspf/Ball.c  |  2 --
- raster3d/r3.showdspf/togif.c |  3 ---
- vector/v.hull/chull.c        | 20 ++++++++------------
- 7 files changed, 14 insertions(+), 27 deletions(-)
-
-diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h
-index 89a25de3bf..978894ea74 100644
---- a/lib/lidar/lidar.h
-+++ b/lib/lidar/lidar.h
-@@ -62,9 +62,6 @@
-     /* INTERPOLATOR */
- #define P_BILINEAR 		1
- #define P_BICUBIC 		0
--    /* Boolean definitions */
--#define TRUE 			1
--#define FALSE 			0
- 
- /*----------------------------------------------------------------------------------------------------------*/
-     /*STRUCTS DECLARATION */
-diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h
-index 9c1dab4e81..2512fedaa2 100644
---- a/raster/r.param.scale/param.h
-+++ b/raster/r.param.scale/param.h
-@@ -18,8 +18,6 @@
- 				/* 'blank' edge around raster.          */
- #define MAX_WSIZE 499		/* Maximum dimensions of window.        */
- 				/* Some useful labels.                  */
--#define TRUE 1
--#define FALSE 0
- 
- #define RAD2DEG M_R2D
- #define DEG2RAD M_D2R
-diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h
-index 33164f43cb..47028e7444 100644
---- a/raster/r.surf.idw/main.h
-+++ b/raster/r.surf.idw/main.h
-@@ -1,8 +1,6 @@
- #include <grass/raster.h>
- 
- #define         SHORT           short
--#define         TRUE    1
--#define         FALSE   0
- 
- #define MELEMENT        struct Melement
- MELEMENT {
-diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c
-index fb3b79882f..ae3ec3933a 100644
---- a/raster3d/r3.showdspf/Ball.c
-+++ b/raster3d/r3.showdspf/Ball.c
-@@ -7,8 +7,6 @@
- #include "Ball.h"
- #include "BallMath.h"
- #include <stdio.h>
--#define TRUE 1
--#define FALSE 0
- 
- HMatrix mId = { {1, 0, 0, 0}
- , {0, 1, 0, 0}
-diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c
-index 589f243a8d..b48236b33f 100644
---- a/raster3d/r3.showdspf/togif.c
-+++ b/raster3d/r3.showdspf/togif.c
-@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b,
-  *
-  *****************************************************************************/
- 
--#define TRUE 1
--#define FALSE 0
--
- 
- /************************** BumpPixel() ********************************/
- /*
-diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
-index 1ad97396fa..584af5d8ba 100644
---- a/vector/v.hull/chull.c
-+++ b/vector/v.hull/chull.c
-@@ -29,10 +29,6 @@
- 
- #include "globals.h"
- 
--/*Define Boolean type */
--typedef enum
--{ BFALSE, BTRUE } bool;
--
- /* Define vertex indices. */
- #define X   0
- #define Y   1
-@@ -76,10 +72,10 @@ struct tFaceStructure
- };
- 
- /* Define flags */
--#define ONHULL   	BTRUE
--#define REMOVED  	BTRUE
--#define VISIBLE  	BTRUE
--#define PROCESSED	BTRUE
-+#define ONHULL   	true
-+#define REMOVED  	true
-+#define VISIBLE  	true
-+#define PROCESSED	true
- 
- /* Global variable definitions */
- tVertex vertices = NULL;
-@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
-     tFace f;
-     tEdge e, temp;
-     long int vol;
--    bool vis = BFALSE;
-+    bool vis = false;
- 
- 
-     /* Mark faces visible from p. */
-@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
- 
- 	if (vol < 0) {
- 	    f->visible = VISIBLE;
--	    vis = BTRUE;
-+	    vis = true;
- 	}
- 	f = f->next;
-     } while (f != faces);
-@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
-     /* If no faces are visible from p, then p is inside the hull. */
-     if (!vis) {
- 	p->onhull = !ONHULL;
--	return BFALSE;
-+	return false;
-     }
- 
-     /* Mark edges in interior of visible region for deletion.
-@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
- 	    e->newface = MakeConeFace(e, p);
- 	e = temp;
-     } while (e != edges);
--    return BTRUE;
-+    return true;
- }
- 
- /*---------------------------------------------------------------------
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index 5863a61a300d..cc129d8b77fe 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,30 +1,28 @@
 # Template file for 'grass'
 pkgname=grass
-version=7.6.1
-revision=5
+version=8.2.1
+revision=1
 _binver=${version//./}
 _binver=${_binver:0:2}
 build_style=gnu-configure
-configure_args="--prefix=\${DESTDIR}/usr/share --bindir=\${DESTDIR}/usr/bin
+configure_args="--prefix=/opt/grass
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python-numpy tar"
+hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
 makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel wxPython-devel"
-depends="python-numpy wxPython"
+ fftw-devel cairo-devel glu-devel"
+depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
+ python3-six python3-ply wxPython4"
 short_desc="Geographic Resources Analysis Support System - GIS"
 maintainer="Alex Jarosch <research@alexj.at>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/${pkgname}-${version}.tar.gz"
-checksum=9e25c99cafd16ed8f5e2dca75b5a10dc2af0568dbedf3fc39f1c5a0a9c840b0b
-python_version=2
+distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
+checksum=8116202fb15352646442862230c7ca48ff8943b7bb83626160ce134980843abd
+python_version=3
 nocross="tries to execute target binaries"
 
 post_install() {
-	# move grass76 libraries from /usr/share to /usr/lib
-	vmkdir usr/lib
-	mv ${DESTDIR}/usr/share/grass* ${DESTDIR}/usr/lib
-	# fixes a todo in GISBASE
-	sed -i ${DESTDIR}/usr/bin/grass${_binver} \
-		-e "105s;\(gisbase =\).*;\1 \"/usr/lib/grass-${version}\";"
+	# This package is broken with wxPython4 (<=4.0.7),
+	# hence the GUI is compulsorily disabled.
+	vsed -i "${DESTDIR}/usr/bin/grass" -e "s/\(default_gui =\).*/\1 \"text\"/"
 }

From 45863dd0d3d4f2cc2486b0688c9747acffacc731 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sun, 6 Nov 2022 23:20:14 +0300
Subject: [PATCH 10/12] XyGrib: revbump for proj, fix build

The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
---
 srcpkgs/XyGrib/patches/proj8_port.patch | 301 ++++++++++++++++++++++++
 srcpkgs/XyGrib/template                 |   6 +-
 2 files changed, 302 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/XyGrib/patches/proj8_port.patch

diff --git a/srcpkgs/XyGrib/patches/proj8_port.patch b/srcpkgs/XyGrib/patches/proj8_port.patch
new file mode 100644
index 000000000000..9d7b08f74c9c
--- /dev/null
+++ b/srcpkgs/XyGrib/patches/proj8_port.patch
@@ -0,0 +1,301 @@
+reference: https://github.com/opengribs/XyGrib/pull/289
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -124,11 +124,11 @@
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+ 
+ if(NOT WIN32)
+-    include(cmake/FindPROJ4.cmake)
+-    if(NOT PROJ4_FOUND)
+-      message(FATAL_ERROR "PROJ.4 library not found!")
++    include(cmake/FindPROJ.cmake)
++    if(NOT PROJ_FOUND)
++      message(FATAL_ERROR "PROJ library not found!")
+     endif()
+-    include_directories(${PROJ4_INCLUDE_DIRS})
++    include_directories(${PROJ_INCLUDE_DIRS})
+ endif()
+ if(WIN32)
+     find_library(PROJ4_LIBRARIES
+diff a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -122,7 +122,7 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/map ${MAP_GENERATED_HEADERS})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/GUI ${GUI_GENERATED_HEADERS})
+ 
+-target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ4_LIBRARIES} ${PNG_LIBRARIES})
++target_link_libraries(${CMAKE_PROJECT_NAME} g2clib gui util map ${LIBNOVA_LIBRARY} ${OPENJPEG_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5PrintSupport_LIBRARIES} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${PROJ_LIBRARIES} ${PNG_LIBRARIES})
+ 
+ # Sanitizers, part 2/2
+ if ( CMAKE_VERSION VERSION_GREATER 3.4 )
+diff a/src/map/Projection.h b/src/map/Projection.h
+--- a/src/map/Projection.h
++++ b/src/map/Projection.h
+@@ -21,10 +21,7 @@
+ #include <QObject>
+ #include <cstdio>
+ 
+-#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
+-#endif
+-#include "proj_api.h"
++#include "proj.h"
+ 
+ class Projection : public QObject
+ {
+@@ -141,7 +138,7 @@
+ 		int   getProjection()   {return currentProj;}
+ 
+ 	private :
+-		projPJ libProj;
++		PJ * libProj;
+ 		int  currentProj;
+ };
+ 
+diff a/src/map/Projection_libproj.cpp b/src/map/Projection_libproj.cpp
+--- a/src/map/Projection_libproj.cpp
++++ b/src/map/Projection_libproj.cpp
+@@ -92,10 +92,9 @@
+     params[nbpar++] = "ellps=WGS84";
+     params[nbpar++] = "no_defs";
+     params[nbpar++] = "over";	// allow longitude > 180°
+-    // XXX ouch pj_init
+-    libProj = pj_init(nbpar, (char **)params);
++    libProj = proj_create_argv(PJ_DEFAULT_CTX, nbpar, (char **)params);
+ 	if (!libProj)
+-		printf("proj error: %s\n", pj_strerrno(pj_errno));
++		printf("proj error: %s\n", proj_errno_string(proj_errno(libProj)));
+ 	assert(libProj);
+ 	currentProj = code;
+ //	libProj->over = 1;		// allow longitude > 180°
+@@ -106,23 +105,23 @@
+ Projection_libproj::~Projection_libproj()
+ {
+     if (libProj != nullptr) {
+-		pj_free(libProj);
++		proj_destroy(libProj);
+ 	}
+ }
+ 
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::map2screen(double x, double y, int *i, int *j) const
+ {
+-	projUV data, res;
++	PJ_COORD data, res;
+ 	if (y <= -90.0)
+ 		y = -90.0+1e-5;
+ 	if (y >= 90.0)
+ 		y = 90.0-1e-5;
+-	data.v =  y * DEG_TO_RAD;
+-	data.u =  x * DEG_TO_RAD;
+-	res = pj_fwd(data, libProj);
+-	*i =  (int) (W/2.0 + scale * (res.u/111319.0-CX) + 0.5);
+-	*j =  (int) (H/2.0 - scale * (res.v/111319.0-CY) + 0.5);
++	data.uv.v =  y;
++	data.uv.u =  x;
++	res = proj_trans(libProj, PJ_FWD, data);
++	*i =  (int) (W/2.0 + scale * (res.uv.u/111319.0-CX) + 0.5);
++	*j =  (int) (H/2.0 - scale * (res.uv.v/111319.0-CY) + 0.5);
+ 	//printf("PROJ   map2screen (%f %f) -> (%3d %3d)\n", x,y, *i,*j);
+ }
+ 
+@@ -130,12 +129,12 @@
+ //-------------------------------------------------------------------------------
+ void Projection_libproj::screen2map(int i, int j, double *x, double *y) const
+ {
+-	projUV data, res;
+-	data.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
+-	data.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
+-	res = pj_inv(data, libProj);
+-	*x = (double)(res.u*RAD_TO_DEG);
+-	*y = (double)(res.v*RAD_TO_DEG);
++	PJ_COORD data, res;
++	data.uv.u =  ((i-W/2.0)/scale+ CX)*111319.0 ;
++	data.uv.v =  ((H/2.0-j)/scale+ CY)*111319.0 ;
++	res = proj_trans(libProj, PJ_INV, data);
++	*x = (double)(res.uv.u);
++	*y = (double)(res.uv.v);
+ 	//printf("PROJ   screen2map (%3d %3d) -> (%f %f)\n", i,j, *x,*y);
+ }
+ //--------------------------------------------------------------
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,76 +0,0 @@
+-# - Find PROJ4
+-# Find the PROJ4 includes and library
+-#
+-#  PROJ4_INCLUDE_DIR - Where to find PROJ4 includes
+-#  PROJ4_LIBRARIES   - List of libraries when using PROJ4
+-#  PROJ4_FOUND       - True if PROJ4 was found
+-
+-IF(PROJ4_INCLUDE_DIR)
+-  SET(PROJ4_FIND_QUIETLY TRUE)
+-ENDIF(PROJ4_INCLUDE_DIR)
+-
+-FIND_PATH(PROJ4_INCLUDE_DIR "proj_api.h"
+-  PATHS
+-  $ENV{EXTERNLIBS}/include
+-  $ENV{EXTERNLIBS}/proj4/include
+-  ~/Library/Frameworks/include
+-  /Library/Frameworks/include
+-  /usr/local/include
+-  /usr/include
+-  /sw/include # Fink
+-  /opt/local/include # DarwinPorts
+-  /opt/csw/include # Blastwave
+-  /opt/include
+-  DOC "PROJ4 - Headers"
+-)
+-
+-SET(PROJ4_NAMES Proj4 proj proj_4_9)
+-SET(PROJ4_DBG_NAMES Proj4D projD proj_4_9_D)
+-
+-FIND_LIBRARY(PROJ4_LIBRARY NAMES ${PROJ4_NAMES}
+-  PATHS
+-  $ENV{EXTERNLIBS}
+-  $ENV{EXTERNLIBS}/proj4
+-  ~/Library/Frameworks
+-  /Library/Frameworks
+-  /usr/local
+-  /usr
+-  /sw
+-  /opt/local
+-  /opt/csw
+-  /opt
+-  PATH_SUFFIXES lib lib64
+-  DOC "PROJ4 - Library"
+-)
+-
+-INCLUDE(FindPackageHandleStandardArgs)
+-
+-IF(MSVC)
+-  # VisualStudio needs a debug version
+-  FIND_LIBRARY(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_DBG_NAMES}
+-    PATHS
+-    $ENV{EXTERNLIBS}/proj4/lib
+-    DOC "PROJ4 - Library (Debug)"
+-  )
+-  
+-  IF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-    SET(PROJ4_LIBRARIES optimized ${PROJ4_LIBRARY} debug ${PROJ4_LIBRARY_DEBUG})
+-  ENDIF(PROJ4_LIBRARY_DEBUG AND PROJ4_LIBRARY)
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_LIBRARY_DEBUG PROJ4_INCLUDE_DIR)
+-  
+-ELSE(MSVC)
+-  # rest of the world
+-  SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-
+-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-  MARK_AS_ADVANCED(PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
+-  
+-ENDIF(MSVC)
+-
+-IF(PROJ4_FOUND)
+-  SET(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-ENDIF(PROJ4_FOUND)
+--- /dev/null
++++ b/cmake/FindPROJ.cmake
+@@ -0,0 +1,96 @@
++# - Find PROJ
++# Find the PROJ includes and library
++#
++#  PROJ_INCLUDE_DIR - Where to find PROJ includes
++#  PROJ_LIBRARIES   - List of libraries when using PROJ
++#  PROJ_FOUND       - True if PROJ was found
++
++IF(PROJ_INCLUDE_DIR)
++  SET(PROJ_FIND_QUIETLY TRUE)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_PATH(PROJ_INCLUDE_DIR "proj.h"
++  PATHS
++  $ENV{EXTERNLIBS}/include
++  $ENV{EXTERNLIBS}/PROJ/include
++  ~/Library/Frameworks/include
++  /Library/Frameworks/include
++  /usr/local/include
++  /usr/include
++  /sw/include # Fink
++  /opt/local/include # DarwinPorts
++  /opt/csw/include # Blastwave
++  /opt/include
++  DOC "PROJ - Headers"
++)
++
++IF(PROJ_INCLUDE_DIR)
++    SET(PROJ_NAMES PROJ proj proj_8_0)
++    SET(PROJ_DBG_NAMES PROJD projD proj_8_0_1)
++ELSE(PROJ_INCLUDE_DIR)
++    FIND_PATH(PROJ_INCLUDE_DIR "proj_api.h"
++      PATHS
++      $ENV{EXTERNLIBS}/include
++      $ENV{EXTERNLIBS}/PROJ/include
++      ~/Library/Frameworks/include
++      /Library/Frameworks/include
++      /usr/local/include
++      /usr/include
++      /sw/include # Fink
++      /opt/local/include # DarwinPorts
++      /opt/csw/include # Blastwave
++      /opt/include
++      DOC "PROJ - Headers"
++    )
++    ADD_DEFINITIONS(-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1)
++    SET(PROJ_NAMES PROJ proj proj_4_9)
++    SET(PROJ_DBG_NAMES PROJD projD proj_4_9_D)
++ENDIF(PROJ_INCLUDE_DIR)
++
++FIND_LIBRARY(PROJ_LIBRARY NAMES ${PROJ_NAMES}
++  PATHS
++  $ENV{EXTERNLIBS}
++  $ENV{EXTERNLIBS}/PROJ
++  ~/Library/Frameworks
++  /Library/Frameworks
++  /usr/local
++  /usr
++  /sw
++  /opt/local
++  /opt/csw
++  /opt
++  PATH_SUFFIXES lib lib64
++  DOC "PROJ - Library"
++)
++
++INCLUDE(FindPackageHandleStandardArgs)
++
++IF(MSVC)
++  # VisualStudio needs a debug version
++  FIND_LIBRARY(PROJ_LIBRARY_DEBUG NAMES ${PROJ_DBG_NAMES}
++    PATHS
++    $ENV{EXTERNLIBS}/PROJ/lib
++    DOC "PROJ - Library (Debug)"
++  )
++  
++  IF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++    SET(PROJ_LIBRARIES optimized ${PROJ_LIBRARY} debug ${PROJ_LIBRARY_DEBUG})
++  ENDIF(PROJ_LIBRARY_DEBUG AND PROJ_LIBRARY)
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_LIBRARY_DEBUG PROJ_INCLUDE_DIR)
++  
++ELSE(MSVC)
++  # rest of the world
++  SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++
++  FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++  MARK_AS_ADVANCED(PROJ_LIBRARY PROJ_INCLUDE_DIR)
++  
++ENDIF(MSVC)
++
++IF(PROJ_FOUND)
++  SET(PROJ_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
++ENDIF(PROJ_FOUND)
diff --git a/srcpkgs/XyGrib/template b/srcpkgs/XyGrib/template
index e4aa3a2e0265..b2a1272d5a9f 100644
--- a/srcpkgs/XyGrib/template
+++ b/srcpkgs/XyGrib/template
@@ -1,7 +1,7 @@
 # Template file for 'XyGrib'
 pkgname=XyGrib
 version=1.2.6.1
-revision=3
+revision=4
 build_style=cmake
 hostmakedepends="qt5-devel pkg-config"
 makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
@@ -13,10 +13,6 @@ homepage="https://opengribs.org/"
 distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
 checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
 
-if [ "$CROSS_BUILD" ]; then
-	make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
-fi
-
 post_patch() {
 	vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
 		CMakeLists.txt

From 65636ead2bcf074e5158eac1bb822692aeba928b Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 20 Nov 2022 18:20:06 +0100
Subject: [PATCH 11/12] OpenOrienteering-Mapper: rebuild for proj 9.1

---
 .../accept-transformation-authorities.patch   |  35 ++
 .../patches/fix-proj-cmake.patch              | 321 ++++++++++++++++++
 srcpkgs/OpenOrienteering-Mapper/template      |   2 +-
 3 files changed, 357 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
 create mode 100644 srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch

diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
new file mode 100644
index 000000000000..f20b4843694c
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/accept-transformation-authorities.patch
@@ -0,0 +1,35 @@
+https://github.com/OpenOrienteering/mapper/pull/2024/commits/40cddb15d316ec90fe1207b737afade7b382457a
+
+From 40cddb15d316ec90fe1207b737afade7b382457a Mon Sep 17 00:00:00 2001
+From: Scott Turner <github@pkturner.org>
+Date: Sun, 9 Jan 2022 13:53:09 -0500
+Subject: [PATCH] Georeferencing: Choose transformations without restricting
+ authority
+
+When using PROJ to set up a transformation between two CRSes, use
+an AUTHORITY=any option to allow all transformations to be considered.
+In particular, an ESRI datum transformation between WGS84 and NAD83
+is not available from EPSG, and provides a more accurate result.
+---
+ src/core/georeferencing.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/core/georeferencing.cpp b/src/core/georeferencing.cpp
+index 43b28fec6..57a4d7b74 100644
+--- a/src/core/georeferencing.cpp
++++ b/src/core/georeferencing.cpp
+@@ -383,7 +383,14 @@ ProjTransform::ProjTransform(const QString& crs_spec)
+ 	// Cf. https://github.com/OSGeo/PROJ/pull/1573
+ 	crs_spec_utf8.replace("+datum=potsdam", "+ellps=bessel +nadgrids=@BETA2007.gsb");
+ #endif
++#if defined(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H) || (PROJ_VERSION_MAJOR) < 8
+ 	pj = proj_create_crs_to_crs(PJ_DEFAULT_CTX, geographic_crs_spec_utf8, crs_spec_utf8, nullptr);
++#else
++	static auto const geographic_crs = crs(Georeferencing::geographic_crs_spec);
++	auto const projected_crs = crs(crs_spec);
++	static const char* const options[] = {"AUTHORITY=any", nullptr};
++	pj = proj_create_crs_to_crs_from_pj(PJ_DEFAULT_CTX, geographic_crs.pj, projected_crs.pj, nullptr, options);
++#endif
+ 	if (pj)
+ 		operator=({proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj)});
+ }
diff --git a/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
new file mode 100644
index 000000000000..31311fc3585d
--- /dev/null
+++ b/srcpkgs/OpenOrienteering-Mapper/patches/fix-proj-cmake.patch
@@ -0,0 +1,321 @@
+From 08cc5e4c73175ebf3e9bb2295f718e914366d51b Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 15 Dec 2021 09:32:10 +0100
+Subject: [PATCH] Find PROJ via cmake config or via pkg-config
+
+Drop the custom find module for PROJ. Cmake config or pkg-config data
+is provided from PROJ's build system. This covers PROJ 4.9 to 8.2,
+dynamic and static linkage, including transitive dependencies.
+---
+ CMakeLists.txt                         |  23 ++--
+ cmake/FindPROJ4.cmake                  | 152 -------------------------
+ doc/licensing/linux-distribution.cmake |   5 +-
+ packaging/CMakeLists.txt               |  25 ++--
+ packaging/android/Mapper.pro.in        |   2 +-
+ src/CMakeLists.txt                     |   2 +-
+ test/CMakeLists.txt                    |   2 +-
+ 7 files changed, 31 insertions(+), 180 deletions(-)
+ delete mode 100644 cmake/FindPROJ4.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index da5ad1e7b..e6a6ddeaa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -203,20 +203,27 @@ endif()
+ 
+ # We must not require a minimum version of PROJ via find_package
+ # because PROJ config requires the major version to match exactly.
+-find_package(PROJ4 REQUIRED)
+-if(NOT TARGET PROJ4::proj)
+-	include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPROJ.cmake")
++find_package(PROJ CONFIG)
++if(NOT PROJ_LIBRARIES)
++	find_package(PkgConfig REQUIRED)
++	if(PKG_CONFIG_FOUND)
++		pkg_check_modules(PROJ4_PC IMPORTED_TARGET proj)
++	endif()
++	if(TARGET PkgConfig::PROJ4_PC)
++		set(PROJ_LIBRARIES PkgConfig::PROJ4_PC)
++		set(PROJ_VERSION "${PROJ4_PC_VERSION}")
++	endif()
+ endif()
+-if(NOT PROJ4_VERSION OR PROJ4_VERSION VERSION_LESS 4.9)
++if(NOT PROJ_VERSION OR PROJ_VERSION VERSION_LESS 4.9)
+ 	message(FATAL_ERROR "At least PROJ 4.9 is required")
+-elseif(PROJ4_VERSION VERSION_LESS 6.1)
++elseif(PROJ_VERSION VERSION_LESS 6.1)
+ 	# New PROJ API missing or incomplete.
+ 	# (proj_normalize_for_visualization() came in 6.1.)
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS ACCEPT_USE_OF_DEPRECATED_PROJ_API_H)
+-elseif(PROJ4_VERSION VERSION_LESS 6.2.1)
++elseif(PROJ_VERSION VERSION_LESS 6.2.1)
+ 	# Datum Potsdam issue, https://github.com/OSGeo/PROJ/pull/1573
+-	set_property(TARGET PROJ4::proj APPEND PROPERTY
++	set_property(TARGET "${PROJ_LIBRARIES}" APPEND PROPERTY
+ 	  INTERFACE_COMPILE_DEFINITIONS PROJ_ISSUE_1573)
+ endif()
+ 
+diff --git a/cmake/FindPROJ4.cmake b/cmake/FindPROJ4.cmake
+deleted file mode 100644
+index 093deaa79..000000000
+--- a/cmake/FindPROJ4.cmake
++++ /dev/null
+@@ -1,152 +0,0 @@
+-#.rst:
+-# FindPROJ4
+-# --------
+-#
+-# Find the proj includes and library.
+-#
+-# IMPORTED Targets
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
+-# if Proj.4 has been found.
+-#
+-# Result Variables
+-# ^^^^^^^^^^^^^^^^
+-#
+-# This module defines the following variables:
+-#
+-# ::
+-#
+-#   PROJ4_INCLUDE_DIRS   - where to find proj_api.h, etc.
+-#   PROJ4_LIBRARIES      - List of libraries when using libproj.
+-#   PROJ4_FOUND          - True if libproj found.
+-#
+-# ::
+-#
+-#   PROJ4_VERSION        - The version of libproj found (x.y.z)
+-#   PROJ4_VERSION_MAJOR  - The major version of libproj
+-#   PROJ4_VERSION_MINOR  - The minor version of libproj
+-#   PROJ4_VERSION_PATCH  - The patch version of libproj
+-#   PROJ4_VERSION_TWEAK  - always 0
+-#   PROJ4_VERSION_COUNT  - The number of version components, always 3
+-#
+-# Hints
+-# ^^^^^
+-#
+-# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
+-# module where to look exclusively.
+-
+-#=============================================================================
+-# Copyright 2016 Kai Pastor
+-#
+-#
+-# This file was derived from CMake 3.5's module FindZLIB.cmake
+-# which has the following terms:
+-#
+-# Copyright 2001-2011 Kitware, Inc.
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-#   this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-#   this list of conditions and the following disclaimer in the documentation
+-#   and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-#   any consortium members, or of any contributors, may not be used to
+-#   endorse or promote products derived from this software without
+-#   specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-#=============================================================================
+-
+-# Search PROJ4_ROOT exclusively if it is set.
+-if(PROJ4_ROOT)
+-  set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+-else()
+-  set(_PROJ4_SEARCH)
+-endif()
+-
+-find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
+-mark_as_advanced(PROJ4_INCLUDE_DIR)
+-
+-if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
+-    file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
+-
+-    string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR  "${PROJ4_H}")
+-    string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
+-    set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
+-    set(PROJ4_VERSION_COUNT 3)
+-endif()
+-
+-# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
+-if(NOT PROJ4_LIBRARY)
+-  set(PROJ4_NAMES proj)
+-  set(PROJ4_NAMES_DEBUG projd)
+-  if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
+-	  list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-	  list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
+-  endif()
+-  find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
+-  include(SelectLibraryConfigurations)
+-  select_library_configurations(PROJ4)
+-endif()
+-
+-# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
+-# all listed variables are TRUE
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(PROJ4
+-  REQUIRED_VARS
+-    PROJ4_LIBRARY
+-    PROJ4_INCLUDE_DIR
+-  VERSION_VAR
+-    PROJ4_VERSION
+-)
+-
+-if(PROJ4_FOUND)
+-    set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
+-
+-    if(NOT PROJ4_LIBRARIES)
+-      set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+-    endif()
+-
+-    if(NOT TARGET PROJ4::proj)
+-      add_library(PROJ4::proj UNKNOWN IMPORTED)
+-      set_target_properties(PROJ4::proj PROPERTIES
+-        INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
+-
+-      if(PROJ4_LIBRARY_RELEASE)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS RELEASE)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
+-      endif()
+-
+-      if(PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_CONFIGURATIONS DEBUG)
+-        set_target_properties(PROJ4::proj PROPERTIES
+-          IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
+-      endif()
+-
+-      if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
+-        set_property(TARGET PROJ4::proj APPEND PROPERTY
+-          IMPORTED_LOCATION "${PROJ4_LIBRARY}")
+-      endif()
+-    endif()
+-endif()
+diff --git a/doc/licensing/linux-distribution.cmake b/doc/licensing/linux-distribution.cmake
+index b2bc5d72c..7a1d39f7b 100644
+--- a/doc/licensing/linux-distribution.cmake
++++ b/doc/licensing/linux-distribution.cmake
+@@ -106,9 +106,8 @@ foreach(dependency ${easy_dependencies})
+ 		elseif(dependency STREQUAL "libpolyclipping")
+ 			find_package(Polyclipping)
+ 			list(APPEND explicit_copyright_${dependency} "${POLYCLIPPING_VERSION}")
+-		elseif(dependency STREQUAL "proj")
+-			find_package(PROJ4)
+-			list(APPEND explicit_copyright_${dependency} "${PROJ4_VERSION}")
++		elseif(dependency STREQUAL "proj" AND PROJ_VERSION)
++			list(APPEND explicit_copyright_${dependency} "${PROJ_VERSION}")
+ 		elseif(dependency STREQUAL "zlib")
+ 			find_package(ZLIB)
+ 			list(APPEND explicit_copyright_${dependency} "${ZLIB_VERSION_STRING}")
+diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt
+index 4a981c681..eabb4bb14 100644
+--- a/packaging/CMakeLists.txt
++++ b/packaging/CMakeLists.txt
+@@ -235,25 +235,22 @@ unset(MAPPER_LIBS)
+ 
+ if(Mapper_PACKAGE_PROJ)
+ 	if(NOT PROJ_DATA_DIR)
+-		unset(PROJ_DATA_DIR CACHE)
+-		if(PROJ4_ROOT)
+-			set(proj_data_paths "${PROJ4_ROOT}/share/proj")
+-		elseif(PROJ4_DIR)
++		if(PROJ_DIR)
+ 			# Cf. find_package documentation
+-			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_data_paths "${PROJ4_DIR}")                 # U
+-			string(REGEX REPLACE "/PROJ4[^/]*$|/proj4[^/]*$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			string(REGEX REPLACE "/cmake$" "" proj_data_paths "${proj_data_paths}")                   # U
+-			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_data_paths "${proj_data_paths}") # U, W
+-			set(proj_data_paths "${proj_data_paths}/share/proj")
+-		elseif(PROJ4_INCLUDE_DIRS)
+-			string(REGEX REPLACE "/include$" "/share/proj" proj_data_paths ${PROJ4_INCLUDE_DIRS}) # MSYS2 et al.
++			string(REGEX REPLACE "/CMake$|/cmake$" "" proj_prefix "${PROJ_DIR}")              # U
++			string(REGEX REPLACE "/PROJ[^/]*$|/proj[^/]*$" "" proj_prefix "${proj_prefix}")   # U, W
++			string(REGEX REPLACE "/cmake$" "" proj_prefix "${proj_prefix}")                   # U
++			string(REGEX REPLACE "/lib/[^/]*$|/lib$|/share$" "" proj_prefix "${proj_prefix}") # U, W
++		elseif(PROJ4_PC_PREFIX)
++			set(proj_prefix "${PROJ4_PC_PREFIX}")
+ 		else()
+-			set(proj_data_paths PATHS "${CMAKE_INSTALL_PREFIX}/share/proj")
++			set(proj_prefix "${CMAKE_INSTALL_PREFIX}")
+ 		endif()
+ 		find_path(PROJ_DATA_DIR
+ 		  DOC "The PROJ data files directory"
+ 		  NAMES epsg proj.db
+-		  PATHS ${proj_data_paths}
++		  PATHS ${proj_prefix}
++		  PATH_SUFFIXES "share/proj" "share"
+ 		  NO_DEFAULT_PATH
+ 		)
+ 	endif()
+@@ -266,7 +263,7 @@ if(Mapper_PACKAGE_PROJ)
+ 	install(
+ 	  DIRECTORY "${PROJ_DATA_DIR}"
+ 	  DESTINATION "${MAPPER_DATA_DESTINATION}")
+-	list(APPEND MAPPER_LIB_HINTS ${PROJ4_ROOT}/bin)
++	list(APPEND MAPPER_LIB_HINTS "${proj_prefix}/bin")
+ endif()
+ 
+ if(Mapper_PACKAGE_GDAL)
+diff --git a/packaging/android/Mapper.pro.in b/packaging/android/Mapper.pro.in
+index b3e88ca11..2017e3933 100644
+--- a/packaging/android/Mapper.pro.in
++++ b/packaging/android/Mapper.pro.in
+@@ -38,7 +38,7 @@ PROJECT_BINARY_DIR = "@PROJECT_BINARY_DIR@"
+ # in CPackConfig.cmake when a package version changes.
+ CPACK_CONFIG_CLEANUP_TRIGGER = \
+   GDAL: @GDAL_VERSION@ \
+-  PROJ: @PROJ4_VERSION@ \
++  PROJ: @PROJ_VERSION@ \
+   Qt5:  @Qt5Core_VERSION@
+ 
+ # For the generated .pro file to be used in Qt Creator,
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a4b7d1454..aff2fa8e4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -301,7 +301,7 @@ add_dependencies(Mapper_Common
+ )
+ target_link_libraries(Mapper_Common
+   Polyclipping::Polyclipping
+-  PROJ4::proj
++  ${PROJ_LIBRARIES}
+   Qt5::Widgets
+ )
+ foreach(lib
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 37d5278da..19b2567d9 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -65,7 +65,7 @@ function(add_test_helper testname autorun)
+ 	endforeach()
+ 	add_executable(${testname} ${testname}.cpp ${TEST_${testname}_SRCS})
+ 	target_link_libraries(${testname} PRIVATE
+-	  PROJ4::proj
++	  ${PROJ_LIBRARIES}
+ 	  Qt5::Test
+ 	  Qt5::Gui
+ 	  Polyclipping::Polyclipping
diff --git a/srcpkgs/OpenOrienteering-Mapper/template b/srcpkgs/OpenOrienteering-Mapper/template
index e725ac02dff9..dd2ae82385e3 100644
--- a/srcpkgs/OpenOrienteering-Mapper/template
+++ b/srcpkgs/OpenOrienteering-Mapper/template
@@ -1,7 +1,7 @@
 # Template file for 'OpenOrienteering-Mapper'
 pkgname=OpenOrienteering-Mapper
 version=0.9.5
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="doxygen qt5-host-tools qt5-plugin-sqlite qt5-qmake qt5-tools"
 makedepends="qt5-devel clipper-devel proj-devel zlib-devel libgdal-devel

From 37b5fd37fb140b2ed66dca1eb7787a5750551939 Mon Sep 17 00:00:00 2001
From: Arjan Mossel <arjanmossel@gmail.com>
Date: Sun, 4 Dec 2022 00:16:39 +0100
Subject: [PATCH 12/12] vtk: rebuild for proj 9.1

---
 srcpkgs/vtk/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template
index 6870bdcf0857..d448f31fa762 100644
--- a/srcpkgs/vtk/template
+++ b/srcpkgs/vtk/template
@@ -1,7 +1,7 @@
 # Template file for 'vtk'
 pkgname=vtk
 version=9.2.2
-revision=1
+revision=2
 build_style=cmake
 # vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
 # Build only the core modules plus python bindings for now

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (66 preceding siblings ...)
  2023-01-22 15:45 ` [PR PATCH] [Updated] " ar-jan
@ 2023-01-22 15:52 ` ar-jan
  2023-01-22 20:51 ` [PR PATCH] [Merged]: " Johnnynator
  2023-01-23  6:36 ` kruceter
  69 siblings, 0 replies; 71+ messages in thread
From: ar-jan @ 2023-01-22 15:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1399526756

Comment:
OK, agree having the grass toolbox algorithms in QGIS will be useful. I've briefly tested a new QGIS build with Grass 8.2.1 and looks good.

@kruceter I've used your patch but also updated to grass-8.2.1 which was just released, so the patches could be dropped again.

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

* Re: [PR PATCH] [Merged]: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (67 preceding siblings ...)
  2023-01-22 15:52 ` ar-jan
@ 2023-01-22 20:51 ` Johnnynator
  2023-01-23  6:36 ` kruceter
  69 siblings, 0 replies; 71+ messages in thread
From: Johnnynator @ 2023-01-22 20:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

There's a merged pull request on the void-packages repository

proj: update to 9.1.1
https://github.com/void-linux/void-packages/pull/40347

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **yes**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

Followup to #31687.

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

* Re: proj: update to 9.1.1
  2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
                   ` (68 preceding siblings ...)
  2023-01-22 20:51 ` [PR PATCH] [Merged]: " Johnnynator
@ 2023-01-23  6:36 ` kruceter
  69 siblings, 0 replies; 71+ messages in thread
From: kruceter @ 2023-01-23  6:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40347#issuecomment-1399878426

Comment:
> I've used your patch but also updated to grass-8.2.1 which was just released, so the patches could be dropped again.

No problem at all. This would be for the best.

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

end of thread, other threads:[~2023-01-23  6:36 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-05 15:37 [PR PATCH] Update proj to 7.2.1 ar-jan
2022-11-05 16:58 ` proj: update " nezos
2022-11-05 17:20 ` ar-jan
2022-11-05 18:31 ` [PR REVIEW] " classabbyamp
2022-11-05 18:43 ` ar-jan
2022-11-06 11:51 ` ar-jan
2022-11-06 19:58 ` [PR PATCH] [Updated] " ar-jan
2022-11-06 21:50 ` [PR REVIEW] " kruceter
2022-11-07 11:33 ` ar-jan
2022-11-08 13:24 ` [PR PATCH] [Updated] " ar-jan
2022-11-08 15:29 ` kruceter
2022-11-08 16:09 ` ar-jan
2022-11-08 17:00 ` [PR PATCH] [Updated] " ar-jan
2022-11-08 17:00 ` kruceter
2022-11-08 17:04 ` kruceter
2022-11-08 17:13 ` kruceter
2022-11-08 17:14 ` kruceter
2022-11-08 17:32 ` ar-jan
2022-11-08 17:39 ` kruceter
2022-11-08 17:40 ` kruceter
2022-11-08 23:15 ` nezos
2022-11-08 23:17 ` nezos
2022-11-08 23:29 ` ar-jan
2022-11-09  1:43 ` kruceter
2022-11-09  1:46 ` kruceter
2022-11-09 13:45 ` nezos
2022-11-09 15:53 ` kruceter
2022-11-09 17:26 ` ar-jan
2022-11-10  0:06 ` ar-jan
2022-11-10  0:10 ` ar-jan
2022-11-10  0:20 ` ar-jan
2022-11-15 16:57 ` [PR PATCH] [Updated] " ar-jan
2022-11-15 17:02 ` proj: update to 9.1.0 ar-jan
2022-11-15 17:12 ` [PR PATCH] [Updated] " ar-jan
2022-11-20 17:23 ` ar-jan
2022-11-20 18:41 ` ar-jan
2022-12-03 23:14 ` ar-jan
2022-12-03 23:17 ` ar-jan
2022-12-03 23:22 ` ar-jan
2022-12-03 23:22 ` ar-jan
2022-12-04 13:43 ` [PR PATCH] [Updated] " ar-jan
2022-12-04 21:38 ` [PR REVIEW] proj: update to 9.1.1 classabbyamp
2022-12-04 21:38 ` classabbyamp
2022-12-04 21:38 ` classabbyamp
2022-12-04 21:38 ` classabbyamp
2022-12-04 22:10 ` ar-jan
2022-12-04 22:15 ` classabbyamp
2022-12-04 22:18 ` ar-jan
2022-12-04 22:36 ` ar-jan
2022-12-04 22:41 ` [PR PATCH] [Updated] " ar-jan
2022-12-04 22:41 ` [PR REVIEW] " classabbyamp
2022-12-04 22:44 ` classabbyamp
2022-12-04 22:44 ` ar-jan
2022-12-04 23:02 ` [PR PATCH] [Updated] " ar-jan
2022-12-04 23:09 ` [PR REVIEW] " classabbyamp
2023-01-09  0:42 ` kruceter
2023-01-11 21:38 ` [PR PATCH] [Updated] " ar-jan
2023-01-11 21:39 ` [PR REVIEW] " ar-jan
2023-01-12 20:29 ` ar-jan
2023-01-12 23:30 ` ar-jan
2023-01-13  1:00 ` kruceter
2023-01-14  2:58 ` kruceter
2023-01-14 20:10 ` kruceter
2023-01-15 12:00 ` ar-jan
2023-01-16  9:29 ` nezos
2023-01-16  9:34 ` classabbyamp
2023-01-16  9:50 ` alexjarosch
2023-01-22 15:45 ` [PR PATCH] [Updated] " ar-jan
2023-01-22 15:52 ` ar-jan
2023-01-22 20:51 ` [PR PATCH] [Merged]: " Johnnynator
2023-01-23  6:36 ` kruceter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).