[geos-commits] [SCM] GEOS branch main updated. 97c55f5a82b63cdeaa5ca149ed81190ae35c9434

git at osgeo.org git at osgeo.org
Thu Sep 30 13:40:09 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, main has been updated
       via  97c55f5a82b63cdeaa5ca149ed81190ae35c9434 (commit)
       via  7edd5cb3471e8f07fcbfa55a826f2dc67670f26d (commit)
       via  f200199f441ca55f73cd9829b4c9ed88ccbdb854 (commit)
      from  7c00a972517362d29c57396bcbc3afed0beb3846 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 97c55f5a82b63cdeaa5ca149ed81190ae35c9434
Merge: 7c00a97 7edd5cb
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Sep 30 13:14:04 2021 -0700

    Merge branch 'mwtoews-gnudirs' into main


commit 7edd5cb3471e8f07fcbfa55a826f2dc67670f26d
Merge: 7c00a97 f200199
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Sep 30 13:13:37 2021 -0700

    Merge branch 'gnudirs' of https://github.com/mwtoews/geos into mwtoews-gnudirs

diff --cc tools/CMakeLists.txt
index 69e54d9,03bcf4a..a6976c4
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@@ -37,15 -54,14 +54,19 @@@ function(configure_install_geos_pc
    install(FILES
      ${CMAKE_CURRENT_BINARY_DIR}/geos.pc
      DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endfunction()
  
+ if(NOT MSVC)
+   configure_install_geos_config()
+   configure_install_geos_pc()
  endif()
  
 -add_subdirectory(astyle)
 +option(BUILD_ASTYLE "Build astyle (Artistic Style) tool" ON)
 +
 +message(STATUS "GEOS: Build astyle ${BUILD_ASTYLE}")
 +if(BUILD_ASTYLE)
 +  add_subdirectory(astyle)
 +endif()
  
  # if(UNIX OR MINGW)
  

commit f200199f441ca55f73cd9829b4c9ed88ccbdb854
Author: Mike Taves <mwtoews at gmail.com>
Date:   Thu May 6 10:16:50 2021 +1200

    CMake: Configure geos-config and geos.pc using functions
    
    * Use GNUInstallDir variables for correct LIBDIR (e.g. lib or lib64)
    * Use existing *.in files; remove redundant/misleading *.cmake files

diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 5cfa885..03bcf4a 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -11,12 +11,19 @@
 #
 #################################################################################
 
+#
+# Configure geos-config
+#
+function(configure_install_geos_config)
+  string(REPLACE " " "\\ " prefix ${CMAKE_INSTALL_PREFIX})
+  set(exec_prefix "$\{prefix\}")
+  set(includedir "$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
+  set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
+  set(VERSION_RELEASE ${GEOS_VERSION_MAJOR})
+  set(VERSION ${GEOS_VERSION})
 
-if(NOT MSVC)
-  # Consider CMAKE_INSTALL_PREFIX with spaces
-  string(REPLACE " " "\\ " ESCAPED_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
   configure_file(
-    ${CMAKE_CURRENT_SOURCE_DIR}/geos-config.cmake
+    ${CMAKE_CURRENT_SOURCE_DIR}/geos-config.in
     ${CMAKE_CURRENT_BINARY_DIR}/geos-config
     @ONLY NEWLINE_STYLE UNIX)
 
@@ -27,17 +34,31 @@ if(NOT MSVC)
       OWNER_READ OWNER_EXECUTE
       GROUP_READ GROUP_EXECUTE
       WORLD_READ WORLD_EXECUTE)
+endfunction()
+
+#
+# Configure pkg-config file geos.pc
+#
+function(configure_install_geos_pc)
+  string(REPLACE " " "\\ " prefix ${CMAKE_INSTALL_PREFIX})
+  set(exec_prefix "$\{prefix\}")
+  set(includedir "$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
+  set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
+  set(VERSION ${GEOS_VERSION})
 
-  # pkg-config support
   configure_file(
-    ${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.cmake
+    ${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.in
     ${CMAKE_CURRENT_BINARY_DIR}/geos.pc
     @ONLY)
 
   install(FILES
     ${CMAKE_CURRENT_BINARY_DIR}/geos.pc
     DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+endfunction()
 
+if(NOT MSVC)
+  configure_install_geos_config()
+  configure_install_geos_pc()
 endif()
 
 add_subdirectory(astyle)
diff --git a/tools/geos-config.cmake b/tools/geos-config.cmake
deleted file mode 100644
index 6730e21..0000000
--- a/tools/geos-config.cmake
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-prefix=@ESCAPED_INSTALL_PREFIX@
-libdir=${prefix}/lib
-
-usage()
-{
-  cat <<EOF
-Usage: geos-config [OPTIONS]
-Options:
-     [--prefix]
-     [--version]
-     [--libs]
-     [--clibs]
-     [--cclibs]
-     [--static-clibs]
-     [--static-cclibs]
-     [--cflags]
-     [--ldflags]
-     [--includes]
-     [--jtsport]
-EOF
-  exit $1
-}
-
-if test $# -eq 0; then
-  usage 1 1>&2
-fi
-
-while test $# -gt 0; do
-  case "$1" in
-    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-    *) optarg= ;;
-  esac
-  case $1 in
-    --prefix)
-      echo ${prefix}
-      ;;
-    --version)
-      echo @GEOS_VERSION@
-      ;;
-    --libs)
-      # TODO: make an alias for --clibs
-      # see http://trac.osgeo.org/geos/ticket/497
-      echo -L${libdir} -lgeos- at GEOS_VERSION_MAJOR@
-      ;;
-    --clibs)
-      echo -L${libdir} -lgeos_c
-      ;;
-    --cclibs)
-      echo -L${libdir} -lgeos
-      ;;
-    --static-clibs)
-      echo -L${libdir} -lgeos_c -lgeos -lm
-      ;;
-    --static-cclibs)
-      echo -L${libdir} -lgeos -lm
-      ;;
-    --cflags)
-      echo -I${prefix}/include
-      ;;
-    --ldflags)
-      echo -L${libdir}
-      ;;
-    --includes)
-      echo ${prefix}/include
-      ;;
-    --jtsport)
-      echo @JTS_PORT@
-      ;;
-    *)
-      usage 1 1>&2
-      ;;
-  esac
-  shift
-done
-
diff --git a/tools/geos-config.in b/tools/geos-config.in
index 89de835..6eff1eb 100644
--- a/tools/geos-config.in
+++ b/tools/geos-config.in
@@ -1,14 +1,9 @@
 #!/bin/sh
 
-# escape paths
-escape() {
-  echo "$1" | sed 's/ /\\ /g'
-}
-
-prefix=`escape "@prefix@"`
-# exec_prefix is interpolated in @libdir@
-exec_prefix=`escape "@exec_prefix@"`
-libdir=`escape "@libdir@"`
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
 
 usage()
 {
@@ -64,13 +59,13 @@ while test $# -gt 0; do
       echo -L${libdir} -lgeos -lm
       ;;
     --cflags)
-      echo -I${prefix}/include
+      echo -I${includedir}
       ;;
     --ldflags)
       echo -L${libdir}
       ;;
     --includes)
-      echo ${prefix}/include
+      echo ${includedir}
       ;;
     --jtsport)
       echo @JTS_PORT@
diff --git a/tools/geos.pc.cmake b/tools/geos.pc.cmake
deleted file mode 100644
index 0a9df7f..0000000
--- a/tools/geos.pc.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@ESCAPED_INSTALL_PREFIX@
-exec_prefix=${prefix}
-includedir=${prefix}/include
-libdir=${prefix}/lib
-
-Name: GEOS
-Description: Geometry Engine, Open Source - C API
-Requires:
-Version: @GEOS_VERSION@
-Cflags: -I${includedir}
-Libs: -L${libdir} -lgeos_c

-----------------------------------------------------------------------

Summary of changes:
 tools/CMakeLists.txt    | 33 +++++++++++++++++----
 tools/geos-config.cmake | 77 -------------------------------------------------
 tools/geos-config.in    | 17 ++++-------
 tools/geos.pc.cmake     | 11 -------
 4 files changed, 33 insertions(+), 105 deletions(-)
 delete mode 100644 tools/geos-config.cmake
 delete mode 100644 tools/geos.pc.cmake


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list