This reverts commit 25b20757e8 and adds an upstream patch. There are API changes https://proj.org/development/migration.html and I couldn't make some of the other packages build, so I decided to just patch the test instead (for now).
25b20757e8