vcpkg/ports/geos/make-geos-config-relocatable.patch
Kai Pastor f0b32c558a
[geos] Relocatable geos-config; dynamic builds on Unix (#17616)
* Provide geos-config, and fix dynamic builds on Unix

* x-add-version

* Fix debug suffix handling

* Update git-tree

* Don't build benchmarks

* Revise pc file and geos-config handling

Fixup pc files.
Add -lgeos to Libs.private to satisfy common usage requirement
(already present in geos-config).
Install executable geos-config into tools.
Rewrite geos-config relocatability as patch.

* Port to non-deprecated cmake functions

* Add usage

* Update git-tree
2021-05-26 13:29:02 -07:00

17 lines
403 B
Diff

diff --git a/tools/geos-config.cmake b/tools/geos-config.cmake
index 6730e215..4c546b5c 100644
--- a/tools/geos-config.cmake
+++ b/tools/geos-config.cmake
@@ -1,7 +1,9 @@
#!/bin/sh
-prefix=@ESCAPED_INSTALL_PREFIX@
-libdir=${prefix}/lib
+DIRNAME=$(dirname $0)
+TOOLS=$(dirname $DIRNAME)
+prefix=$(CDPATH= cd -- "${DIRNAME%/tools/geos/*}" && pwd -P)
+libdir=${prefix}${TOOLS##*/geos}/lib
usage()
{