[geos-commits] [SCM] GEOS branch master updated. f08662b39dc93398d709988ac7e2541fc3ab0218

git at osgeo.org git at osgeo.org
Fri May 24 15:08:52 PDT 2019


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, master has been updated
       via  f08662b39dc93398d709988ac7e2541fc3ab0218 (commit)
       via  22170773e4bb00feff5beef6f6f7b59595128874 (commit)
       via  35c50c002213204c82988d64861cb647e5e74b68 (commit)
       via  7699310f0bc7b3f2a6f300e72164d3fab3e76646 (commit)
       via  5e6fed50b7b50efc6180bc014725ec083ceea2f0 (commit)
       via  a14fd7b17f7b3c5b706e27299540603177248df2 (commit)
       via  b6478ab15a7211889273f533b35ac458a6e4d668 (commit)
       via  62c52993b245e0cb597212e91f42f7f0c2e3d418 (commit)
      from  a67be9b65839913fc2514f6ef77ff8e5e6b180cf (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 f08662b39dc93398d709988ac7e2541fc3ab0218
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri May 24 15:08:16 2019 -0700

    Quiet warning

diff --git a/include/geos/operation/predicate/RectangleContains.h b/include/geos/operation/predicate/RectangleContains.h
index 60f39fd..af6aa25 100644
--- a/include/geos/operation/predicate/RectangleContains.h
+++ b/include/geos/operation/predicate/RectangleContains.h
@@ -52,7 +52,6 @@ class GEOS_DLL RectangleContains {
 
 private:
 
-    const geom::Polygon& rectangle;
     const geom::Envelope& rectEnv;
 
     bool isContainedInBoundary(const geom::Geometry& geom);
@@ -104,7 +103,6 @@ public:
      */
     RectangleContains(const geom::Polygon& rect)
         :
-        rectangle(rect),
         rectEnv(*(rect.getEnvelopeInternal()))
     {}
 

commit 22170773e4bb00feff5beef6f6f7b59595128874
Merge: 35c50c0 a67be9b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri May 24 14:57:21 2019 -0700

    Merge branch 'master' into rm-geos-commit-hash

diff --cc Makefile.am
index 1e2dfce,08598c6..14ab777
--- a/Makefile.am
+++ b/Makefile.am
@@@ -20,9 -20,10 +20,10 @@@ SUBDIRS = 
  	macros  \
  	swig    \
  	tests   \
+ 	benchmarks \
  	tools
  
 -BUILT_SOURCES = geos_revision.h
 +BUILT_SOURCES =
  
  EXTRA_DIST = acsite.m4 .editorconfig \
  	Version.txt CMakeLists.txt \

commit 35c50c002213204c82988d64861cb647e5e74b68
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu May 23 14:44:21 2019 -0700

    Try to get clean appveyor build

diff --git a/appveyor.yml b/appveyor.yml
index d1d637e..8d61646 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -60,7 +60,7 @@ init:
 
 before_build:
   - ps: 'Write-Host "Running $env:BUILDER with $env:GENERATOR" -ForegroundColor Magenta'
-  - if "%BUILDER%"=="CMake" cmake.exe -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%CONFIGURATION% %APPVEYOR_BUILD_FOLDER%
+  - if "%BUILDER%"=="CMake" cmake.exe -G "%GENERATOR%" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=%CONFIGURATION% %APPVEYOR_BUILD_FOLDER%
   - if "%BUILDER%"=="NMake" .\autogen.bat
 
 build_script:

commit 7699310f0bc7b3f2a6f300e72164d3fab3e76646
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu May 23 13:47:38 2019 -0700

    Remove GIT_COMMIT_HASH entirely

diff --git a/Makefile.am b/Makefile.am
index 2546676..1e2dfce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,6 @@ BUILT_SOURCES =
 
 EXTRA_DIST = acsite.m4 .editorconfig \
 	Version.txt CMakeLists.txt \
-	cmake/GetGitRevision.cmake \
 	cmake/cmake_uninstall.cmake.in \
 	cmake/geos-config.cmake \
 	README.md
diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt
index cddf182..d4bbb00 100644
--- a/capi/CMakeLists.txt
+++ b/capi/CMakeLists.txt
@@ -9,21 +9,6 @@
 # See the COPYING file for more information.
 ################################################################################
 
-include(GetGitRevision)
-
-get_git_revision(
-  HASH_LENGTH 7
-  HASH  GIT_COMMIT_HASH
-  DIRTY GEOS_GIT_IS_DIRTY)
-
-if (${GEOS_GIT_IS_DIRTY})
-  set(GIT_COMMIT_HASH "${GIT_COMMIT_HASH} (dirty)")
-endif()
-
-message(STATUS "GEOS: GEOS_REVISION=${GIT_COMMIT_HASH}")
-
-################################################################################
-
 file(GLOB_RECURSE _headers ${CMAKE_CURRENT_LIST_DIR}/*.cpp  CONFIGURE_DEPEND)
 target_sources(geos_c PRIVATE ${_headers})
 unset(_headers)
diff --git a/capi/geos_c.h.in b/capi/geos_c.h.in
index bb9a472..2bbc943 100644
--- a/capi/geos_c.h.in
+++ b/capi/geos_c.h.in
@@ -67,10 +67,6 @@ extern "C" {
 #define GEOS_JTS_PORT "@JTS_PORT@"
 #endif
 
-#ifndef GEOS_REVISION
-#define GEOS_REVISION "@GIT_COMMIT_HASH@"
-#endif
-
 #define GEOS_CAPI_VERSION_MAJOR @CAPI_VERSION_MAJOR@
 #define GEOS_CAPI_VERSION_MINOR @CAPI_VERSION_MINOR@
 #define GEOS_CAPI_VERSION_PATCH @CAPI_VERSION_PATCH@
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 92ce7ca..ca2515c 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -3546,7 +3546,7 @@ extern "C" {
     const char* GEOSversion()
     {
         static char version[256];
-        sprintf(version, "%s " GEOS_REVISION, GEOS_CAPI_VERSION);
+        sprintf(version, "%s ", GEOS_CAPI_VERSION);
         return version;
     }
 
diff --git a/cmake/GetGitRevision.cmake b/cmake/GetGitRevision.cmake
deleted file mode 100644
index 65b3fb2..0000000
--- a/cmake/GetGitRevision.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-# Adapted from https://gitlab.kitware.com/cmake/cmake/blob/aec06dd4922187ce5346d20a9f0d53f01b6ce9fc/Source/CMakeVersionSource.cmake
-
-# Try to identify the current development source version.
-function(get_git_revision)
-  cmake_parse_arguments("ARG" "" "HASH;HASH_LENGTH;DIRTY" "" "${ARGN}")
-
-  if(EXISTS ${CMAKE_SOURCE_DIR}/.git/HEAD)
-    find_program(GIT_EXECUTABLE NAMES git git.cmd)
-    mark_as_advanced(GIT_EXECUTABLE)
-
-    if(GIT_EXECUTABLE)
-      execute_process(
-        COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=${ARG_HASH_LENGTH} HEAD
-        OUTPUT_VARIABLE head
-        OUTPUT_STRIP_TRAILING_WHITESPACE
-        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-        )
-      if(head)
-        execute_process(
-          COMMAND ${GIT_EXECUTABLE} update-index -q --refresh
-          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-          )
-        execute_process(
-          COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD -- --ignore-space-at-eol
-          OUTPUT_VARIABLE dirty
-          OUTPUT_STRIP_TRAILING_WHITESPACE
-          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-          )
-      endif()
-    endif()
-  endif()
-
-  set(${ARG_HASH} "${head}" PARENT_SCOPE)
-
-  if(dirty)
-    set(${ARG_DIRTY} 1 PARENT_SCOPE)
-  else()
-    set("${ARG_DIRTY}" 0 PARENT_SCOPE)
-  endif()
-endfunction()
diff --git a/configure.ac b/configure.ac
index f513e54..e690548 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,13 +52,6 @@ dnl -- JTS_PORT: the version of JTS this release is bound to
 dnl JTS_PORT=1.13.0
 JTS_PORT=`cat $VERTXT | awk -F= '/^JTS_PORT/ {print $2}'`
 
-AC_MSG_CHECKING([git revision hash])
-if [ test -d $srcdir/.git ]; then
-	GIT_COMMIT_HASH=`git -C "$srcdir" log -1 --format=%h`
-else
-	GIT_COMMIT_HASH=
-fi
-AC_MSG_RESULT([$GIT_COMMIT_HASH])
 
 dnl Hush warnings
 AC_DEFINE(USE_UNSTABLE_GEOS_CPP_API, [1], [We know])
@@ -394,7 +387,6 @@ AC_SUBST(VERSION_MINOR)
 AC_SUBST(VERSION_PATCH)
 AC_SUBST(VERSION_RELEASE)
 AC_SUBST(JTS_PORT)
-AC_SUBST(GIT_COMMIT_HASH)
 AC_SUBST(CAPI_VERSION)
 AC_SUBST(CAPI_VERSION_MAJOR)
 AC_SUBST(CAPI_VERSION_MINOR)

commit 5e6fed50b7b50efc6180bc014725ec083ceea2f0
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed May 22 15:36:39 2019 -0700

    Remove reference to repo_revision.sh

diff --git a/tools/Makefile.am b/tools/Makefile.am
index 2b63b78..f0dff5b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -2,6 +2,6 @@
 # This file is part of project GEOS (http://trac.osgeo.org/geos/)
 bin_SCRIPTS = geos-config
 
-EXTRA_DIST = CMakeLists.txt repo_revision.sh
+EXTRA_DIST = CMakeLists.txt
 
 SUBDIRS = astyle

commit a14fd7b17f7b3c5b706e27299540603177248df2
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed May 22 15:03:21 2019 -0700

    Don't need GenerateRevisionHeader in distribution list anymore

diff --git a/Makefile.am b/Makefile.am
index 9e09b24..2546676 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,6 @@ BUILT_SOURCES =
 
 EXTRA_DIST = acsite.m4 .editorconfig \
 	Version.txt CMakeLists.txt \
-	cmake/GenerateRevisionHeader.cmake \
 	cmake/GetGitRevision.cmake \
 	cmake/cmake_uninstall.cmake.in \
 	cmake/geos-config.cmake \

commit b6478ab15a7211889273f533b35ac458a6e4d668
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed May 22 14:52:46 2019 -0700

    Hash should be a string

diff --git a/capi/geos_c.h.in b/capi/geos_c.h.in
index b10bbf0..bb9a472 100644
--- a/capi/geos_c.h.in
+++ b/capi/geos_c.h.in
@@ -68,7 +68,7 @@ extern "C" {
 #endif
 
 #ifndef GEOS_REVISION
-#define GEOS_REVISION @GIT_COMMIT_HASH@
+#define GEOS_REVISION "@GIT_COMMIT_HASH@"
 #endif
 
 #define GEOS_CAPI_VERSION_MAJOR @CAPI_VERSION_MAJOR@

commit 62c52993b245e0cb597212e91f42f7f0c2e3d418
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed May 22 14:03:49 2019 -0700

    Generate git revision hash into geos_c.h
    instead of a separate .h file

diff --git a/.gitignore b/.gitignore
index 85214c8..be50881 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,6 @@
 aclocal.m4
 Makefile.in
 Makefile
-geos_revision.h
 .libs
 .deps
 .vimrc
diff --git a/Makefile.am b/Makefile.am
index 9f8991e..9e09b24 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ SUBDIRS = \
 	tests   \
 	tools
 
-BUILT_SOURCES = geos_revision.h
+BUILT_SOURCES =
 
 EXTRA_DIST = acsite.m4 .editorconfig \
 	Version.txt CMakeLists.txt \
@@ -30,7 +30,6 @@ EXTRA_DIST = acsite.m4 .editorconfig \
 	cmake/GetGitRevision.cmake \
 	cmake/cmake_uninstall.cmake.in \
 	cmake/geos-config.cmake \
-	geos_revision.h \
 	README.md
 
 ACLOCAL_AMFLAGS = -I macros
@@ -57,16 +56,11 @@ authors.git: authors.svn
 svnrebase: authors.git
 	cd $(srcdir) && git svn rebase --authors-file authors.git
 
-geos_revision.h:
-	top_srcdir=$(srcdir) sh $(srcdir)/tools/repo_revision.sh
-
 VALGRIND = $(LIBTOOL) --mode=execute valgrind --leak-check=full --error-exitcode=1
 
 valgrindcheck:
 	$(VALGRIND) tests/unit/geos_unit
 
-.PHONY: geos_revision.h
-
 check-local:
 	! find $(srcdir) -name '*.cpp' -o -name '*.h' | \
 		grep -v tests/xmltester/tinyxml | \
diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt
index 066b149..cddf182 100644
--- a/capi/CMakeLists.txt
+++ b/capi/CMakeLists.txt
@@ -9,18 +9,20 @@
 # See the COPYING file for more information.
 ################################################################################
 
-if(GEOS_BUILD_FROM_GIT)
-  add_custom_target(geos_revision_header
-    COMMAND ${CMAKE_COMMAND}
-    -D DST=${CMAKE_BINARY_DIR}/geos_revision.h
-    -D CMAKE_MODULE_PATH="${PROJECT_SOURCE_DIR}/cmake"
-    -P ${CMAKE_SOURCE_DIR}/cmake/GenerateRevisionHeader.cmake
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-else()
-  add_library(geos_revision_header INTERFACE)
+include(GetGitRevision)
+
+get_git_revision(
+  HASH_LENGTH 7
+  HASH  GIT_COMMIT_HASH
+  DIRTY GEOS_GIT_IS_DIRTY)
+
+if (${GEOS_GIT_IS_DIRTY})
+  set(GIT_COMMIT_HASH "${GIT_COMMIT_HASH} (dirty)")
 endif()
 
-add_dependencies(geos_c geos_revision_header)
+message(STATUS "GEOS: GEOS_REVISION=${GIT_COMMIT_HASH}")
+
+################################################################################
 
 file(GLOB_RECURSE _headers ${CMAKE_CURRENT_LIST_DIR}/*.cpp  CONFIGURE_DEPEND)
 target_sources(geos_c PRIVATE ${_headers})
diff --git a/capi/geos_c.h.in b/capi/geos_c.h.in
index 0cd0ef1..b10bbf0 100644
--- a/capi/geos_c.h.in
+++ b/capi/geos_c.h.in
@@ -67,6 +67,10 @@ extern "C" {
 #define GEOS_JTS_PORT "@JTS_PORT@"
 #endif
 
+#ifndef GEOS_REVISION
+#define GEOS_REVISION @GIT_COMMIT_HASH@
+#endif
+
 #define GEOS_CAPI_VERSION_MAJOR @CAPI_VERSION_MAJOR@
 #define GEOS_CAPI_VERSION_MINOR @CAPI_VERSION_MINOR@
 #define GEOS_CAPI_VERSION_PATCH @CAPI_VERSION_PATCH@
@@ -75,6 +79,7 @@ extern "C" {
 #define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR
 #define GEOS_CAPI_LAST_INTERFACE (GEOS_CAPI_VERSION_MAJOR+GEOS_CAPI_VERSION_MINOR)
 
+
 /************************************************************************
  *
  * (Abstract) type definitions
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 5744252..92ce7ca 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -109,7 +109,6 @@
 #define GEOSWKBWriter_t geos::io::WKBWriter
 
 #include "geos_c.h"
-#include "../geos_revision.h"
 
 // Intentional, to allow non-standard C elements like C99 functions to be
 // imported through C++ headers of C library, like <cmath>.
diff --git a/cmake/GenerateRevisionHeader.cmake b/cmake/GenerateRevisionHeader.cmake
deleted file mode 100644
index 26072f9..0000000
--- a/cmake/GenerateRevisionHeader.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-# Part of CMake configuration for GEOS
-#
-# Copyright (C) 2018 Daniel Baston <dbaston at gmail.com>
-#
-# This is free software; you can redistribute and/or modify it under
-# the terms of the GNU Lesser General Public Licence as published
-# by the Free Software Foundation.
-# See the COPYING file for more information.
-################################################################################
-include(GetGitRevision)
-
-get_git_revision(
-  HASH_LENGTH 7
-  HASH  GEOS_GIT_HASH
-  DIRTY GEOS_GIT_IS_DIRTY)
-
-set(REV ${GEOS_GIT_HASH})
-if (${GEOS_GIT_IS_DIRTY})
-  set(REV "${REV} (dirty)")
-endif()
-
-message(STATUS "GEOS: GEOS_REVISION=${REV}")
-
-file(WRITE ${DST} "#define GEOS_REVISION \"${REV}\"
-")
diff --git a/configure.ac b/configure.ac
index e690548..f513e54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,6 +52,13 @@ dnl -- JTS_PORT: the version of JTS this release is bound to
 dnl JTS_PORT=1.13.0
 JTS_PORT=`cat $VERTXT | awk -F= '/^JTS_PORT/ {print $2}'`
 
+AC_MSG_CHECKING([git revision hash])
+if [ test -d $srcdir/.git ]; then
+	GIT_COMMIT_HASH=`git -C "$srcdir" log -1 --format=%h`
+else
+	GIT_COMMIT_HASH=
+fi
+AC_MSG_RESULT([$GIT_COMMIT_HASH])
 
 dnl Hush warnings
 AC_DEFINE(USE_UNSTABLE_GEOS_CPP_API, [1], [We know])
@@ -387,6 +394,7 @@ AC_SUBST(VERSION_MINOR)
 AC_SUBST(VERSION_PATCH)
 AC_SUBST(VERSION_RELEASE)
 AC_SUBST(JTS_PORT)
+AC_SUBST(GIT_COMMIT_HASH)
 AC_SUBST(CAPI_VERSION)
 AC_SUBST(CAPI_VERSION_MAJOR)
 AC_SUBST(CAPI_VERSION_MINOR)
diff --git a/tools/repo_revision.sh b/tools/repo_revision.sh
deleted file mode 100755
index 09b6d4e..0000000
--- a/tools/repo_revision.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-
-LC_ALL="C" # what for ?
-
-[ -z "$top_srcdir" ] && top_srcdir="."
-rev_file=$top_srcdir'/geos_revision.h'
-
-read_rev() {
-
-    if test -d $top_srcdir"/.svn"; then
-      read_rev_svn
-    elif test -d $top_srcdir"/.git"; then
-      read_rev_git
-    else
-      echo "Can't fetch local revision (neither .svn nor .git found)" >&2
-      echo 0
-    fi
-}
-
-read_rev_git() {
-
-  # TODO: test on old systems, I think I saw some `which`
-  #       implementations returning "nothing found" or something
-  #       like that, making the later if ( ! $svn_exe ) always false
-  #
-  git_exe=`which git`;
-  if test -z "$git_exe"; then
-    echo "Can't fetch SVN revision: no git executable found" >&2
-    echo 0;
-  fi
-
-  last_commit=`cd ${top_srcdir} && ${git_exe} log -1`
-
-  if test -z "$last_commit"; then
-    echo "Can't fetch last commit info from git log" >&2
-    echo 0
-    return
-  fi
-
-  svnrev=`echo "$last_commit" | grep git-svn | cut -d@ -f2 | cut -d' ' -f1`
-  if test -n "$svnrev"; then
-    # Last commit has SVN metadata, we'll use that
-    echo r$svnrev
-    return
-  fi
-
-  # Last commit has no SVN metadata, we'll use sha
-  sha=`cd ${top_srcdir} && ${git_exe} describe --always`
-  echo $sha
-}
-
-read_rev_svn() {
-
-  # TODO: test on old systems, I think I saw some `which`
-  #       implementations returning "nothing found" or something
-  #       like that, making the later if ( ! $svn_exe ) always false
-  #
-  svn_exe=`which svn`
-  if test -z "$svn_exe"; then
-    echo "Can't fetch SVN revision: no svn executable found" >&2
-    echo 0;
-  fi
-
-  svn_info=`"${svn_exe}" info | grep 'Last Changed Rev:' | cut -d: -f2`
-
-  if test -z "$svn_info"; then
-    echo "Can't fetch SVN revision with `svn info`" >&2
-    echo 0
-  else
-    echo r${svn_info}
-  fi
-}
-
-write_defn() {
-  rev=$1
-  oldrev=0
-
-  # Do not override the file if new detected
-  # revision isn't zero nor different from the existing one
-  if test -f $rev_file; then
-    oldrev=`grep GEOS_REVISION ${rev_file} | awk '{print $3}' | tr -d '"'`
-    if test "$rev" = 0 -o "$rev" = "$oldrev"; then
-      echo "Not updating existing rev file at $oldrev" >&2
-      return;
-    fi
-  fi
-
-  echo "#define GEOS_REVISION \"$rev\"" | tee $rev_file
-  echo "Wrote rev '$rev' in file '$rev_file'" >&2
-}
-
-# Read the svn revision number
-svn_rev=`read_rev`
-
-# Write it
-write_defn $svn_rev

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

Summary of changes:
 .gitignore                                         |  1 -
 Makefile.am                                        | 10 +--
 appveyor.yml                                       |  2 +-
 capi/CMakeLists.txt                                | 13 ---
 capi/geos_c.h.in                                   |  1 +
 capi/geos_ts_c.cpp                                 |  3 +-
 cmake/GenerateRevisionHeader.cmake                 | 26 ------
 cmake/GetGitRevision.cmake                         | 40 ---------
 .../geos/operation/predicate/RectangleContains.h   |  2 -
 tools/Makefile.am                                  |  2 +-
 tools/repo_revision.sh                             | 96 ----------------------
 11 files changed, 5 insertions(+), 191 deletions(-)
 delete mode 100644 cmake/GenerateRevisionHeader.cmake
 delete mode 100644 cmake/GetGitRevision.cmake
 delete mode 100755 tools/repo_revision.sh


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list