[Git][debian-gis-team/geos][upstream] New upstream version 3.10.0~rc3

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Wed Oct 20 06:09:56 BST 2021



Bas Couwenberg pushed to branch upstream at Debian GIS Project / geos


Commits:
cf34ae27 by Bas Couwenberg at 2021-10-20T06:20:17+02:00
New upstream version 3.10.0~rc3
- - - - -


8 changed files:

- CMakeLists.txt
- Version.txt
- + bisect_script.sh
- configure
- src/geomgraph/EdgeRing.cpp
- tools/CMakeLists.txt
- tools/geos.pc.in
- util/geosop/GeosOp.cpp


Changes:

=====================================
CMakeLists.txt
=====================================
@@ -258,6 +258,12 @@ target_compile_options(geos_developer_cxx_flags
 #-----------------------------------------------------------------------------
 set(CMAKE_CXX_FLAGS_COVERAGE "-fprofile-arcs -ftest-coverage")
 
+#-----------------------------------------------------------------------------
+# Extra libraries
+#-----------------------------------------------------------------------------
+include(CheckLibraryExists)
+check_library_exists(m pow "" HAVE_LIBM)
+
 #-----------------------------------------------------------------------------
 # Target geos: C++ API library
 #-----------------------------------------------------------------------------


=====================================
Version.txt
=====================================
@@ -5,7 +5,7 @@ GEOS_VERSION_MINOR=10
 GEOS_VERSION_PATCH=0
 
 # OPTIONS: "", "dev", "rc1" etc.
-GEOS_PATCH_WORD=rc2
+GEOS_PATCH_WORD=rc3
 
 # GEOS CAPI Versions
 #


=====================================
bisect_script.sh
=====================================
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# git bisect start
+# git bisect good 6b153d67e24c36477faee2eb47e6f486b768cdc2
+# git bisect bad df1fd770c96c1919f63e675f997157c1914d480e
+# git bisect run ./bisect_script.sh
+# 
+#
+# 3.8 release 6b153d67e24c36477faee2eb47e6f486b768cdc2
+# 3.9 release df1fd770c96c1919f63e675f997157c1914d480e
+#
+
+ROOT=`pwd`
+BLD=$ROOT/../geos-git-build
+LIB=$BLD/lib
+TST=$ROOT/../geos-performance/_build
+PERF=$TST/geos_perf
+NM="Australia buffer"
+CUTOFF=200
+
+echo "--------"
+echo "Running in $ROOT"
+
+echo "Building in $BLD"
+pushd $BLD
+cmake -DCMAKE_BUILD_TYPE=Release ../geos-git
+make
+popd
+
+echo "Running $PERF"
+export DYLD_LIBRARY_PATH=$LIB
+pushd $TST
+TIME=`$PERF | grep "$NM" | cut -f5 -d,`
+echo "Run time = $TIME"
+popd
+
+#if [ $TIME -lt $CUTOFF ]; then
+if [ $(echo "$TIME < $CUTOFF" | bc -l) -eq 1 ]; then
+   # good
+   exit 0
+else
+   # bad
+   exit 1
+fi


=====================================
configure
=====================================
@@ -8,12 +8,12 @@ which cmake > /dev/null 2>&1 || {
 srcdir=$(dirname $0)
 
 usage() {
-  echo "$0 [--prefix=<prefix>] [--help]"
+  echo "$0 [--prefix=<prefix>] [--enable-debug] [--help]"
 }
 
 cmd=cmake
 
-options=$(getopt -l "help,prefix:" "" "$@")
+options=$(getopt -l "help,enable-debug,prefix:" "" "$@")
 #echo XXXX ${options}
 eval set -- "$options"
 
@@ -23,6 +23,9 @@ while true; do
       shift
       cmd="${cmd} -DCMAKE_INSTALL_PREFIX:PATH=$1"
       ;;
+    --enable-debug)
+      cmd="${cmd} -DCMAKE_BUILD_TYPE=Debug"
+      ;;
     --help)
       usage
       exit


=====================================
src/geomgraph/EdgeRing.cpp
=====================================
@@ -316,7 +316,6 @@ EdgeRing::addPoints(Edge* edge, bool isForward, bool isFirstEdge)
     assert(edgePts);
     std::size_t numEdgePts = edgePts->getSize();
 
-    pts.reserve(pts.size() + numEdgePts);
     if(isForward) {
         if(isFirstEdge) {
             edgePts->toVector(pts);


=====================================
tools/CMakeLists.txt
=====================================
@@ -45,6 +45,11 @@ function(configure_install_geos_pc)
   set(includedir "$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
   set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
   set(VERSION ${GEOS_VERSION})
+  set(EXTRA_LIBS "-lstdc++")
+  if(HAVE_LIBM)
+    list(APPEND EXTRA_LIBS "-lm")
+  endif()
+  list(JOIN EXTRA_LIBS " " EXTRA_LIBS)
 
   configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.in


=====================================
tools/geos.pc.in
=====================================
@@ -9,3 +9,4 @@ Requires:
 Version: @VERSION@
 Cflags: -I${includedir}
 Libs: -L${libdir} -lgeos_c
+Libs.private: -lgeos @EXTRA_LIBS@


=====================================
util/geosop/GeosOp.cpp
=====================================
@@ -125,6 +125,10 @@ int main(int argc, char** argv) {
     {
         auto& v = result["opArgs"].as<std::vector<std::string>>();
         if (v.size() >= 1) {
+            if ( v.size() > 1 )
+            {
+                std::cerr << "positional arguments after the second one are discarded" << std::endl;
+            }
             auto val = v[0];
             /**
              * To get around cmdline parset limitation for parsing neg numbers,
@@ -133,7 +137,15 @@ int main(int argc, char** argv) {
             if (startsWith(val, "N")) {
                 val = val.substr(1, val.size()-1);
             }
-            cmdArgs.opArg1 = std::stod(val);
+            try {
+                cmdArgs.opArg1 = std::stod(val);
+            } catch (const std::invalid_argument&) {
+                std::cerr << "Invalid positional argument '" << val << "' (expected number)" << std::endl;
+                exit(1);
+            } catch (const std::out_of_range&) {
+                std::cerr << "Out of range positional argument '" << val << "' (expected double)" << std::endl;
+                exit(1);
+            }
         }
     }
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/-/commit/cf34ae27b37e51e053f3ce000fdbadb59e9187c2

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/geos/-/commit/cf34ae27b37e51e053f3ce000fdbadb59e9187c2
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20211020/5308590e/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list