From 22aeab39b08075fba28568f3c9a7905d10fbcb7e Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sun, 3 Jul 2022 12:59:45 +0200 Subject: [PATCH] Update to 3.11.0 --- .gitignore | 1 + geos.spec | 47 ++++++++++++++++++++----- geos_docs.patch | 73 ++++++++++++++++++++++++++++----------- geos_version-suffix.patch | 27 --------------- sources | 2 +- 5 files changed, 93 insertions(+), 57 deletions(-) delete mode 100644 geos_version-suffix.patch diff --git a/.gitignore b/.gitignore index 2a086e3..115d7a6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /geos-3.10.1.tar.bz2 /geos-3.10.2.tar.bz2 /geos-3.10.3.tar.bz2 +/geos-3.11.0.tar.bz2 diff --git a/geos.spec b/geos.spec index 0b5068d..8606d22 100644 --- a/geos.spec +++ b/geos.spec @@ -1,13 +1,22 @@ +# mingw is x86_64 only on EL9 +%if 0%{?rhel} >= 9 +%ifarch x86_64 +%bcond_without mingw +%else +%bcond_with mingw +%endif +%else +%bcond_without mingw +%endif + Name: geos -Version: 3.10.3 +Version: 3.11.0 Release: 1%{?dist} Summary: GEOS is a C++ port of the Java Topology Suite License: LGPLv2 URL: http://trac.osgeo.org/geos/ Source0: http://download.osgeo.org/%{name}/%{name}-%{version}.tar.bz2 -# Add library version suffix also when building with cmake for mingw -Patch0: geos_version-suffix.patch # Fix test failure due to # warning: found documented return type for XXX that does not return anything Patch1: geos_docs.patch @@ -16,11 +25,13 @@ BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ +%if %{with mingw} BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc-c++ BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-gcc-c++ +%endif %description @@ -46,6 +57,7 @@ This package contains the development files to build applications that use GEOS. +%if %{with mingw} %package -n mingw32-%{name} Summary: MinGW Windows GEOS library BuildArch: noarch @@ -63,6 +75,7 @@ MinGW Windows GEOS library. %{?mingw_debug_package} +%endif %prep @@ -74,53 +87,64 @@ MinGW Windows GEOS library. %cmake -DDISABLE_GEOS_INLINE=ON -DBUILD_DOCUMENTATION=ON %cmake_build +%if %{with mingw} # MinGW build -%mingw_cmake -DDISABLE_GEOS_INLINE=ON +%mingw_cmake -DDISABLE_GEOS_INLINE=ON -DVERSION_MINGW_SHARED_LIBS=ON %mingw_make_build +%endif %install %cmake_install make docs -C %{__cmake_builddir} +%if %{with mingw} %mingw_make_install +%endif # Drop cross-compiled geos-config which is not useful rm -f %{buildroot}%{mingw32_bindir}/geos-config rm -f %{buildroot}%{mingw64_bindir}/geos-config +%if %{with mingw} %mingw_debug_install_post +%endif %check +%ifnarch s390x %ctest +%endif %files -%doc AUTHORS NEWS README.md +%doc AUTHORS NEWS.md README.md %license COPYING %{_bindir}/geosop -%{_libdir}/libgeos.so.3.10.3 +%{_libdir}/libgeos.so.3.11.0 %{_libdir}/libgeos_c.so.1* %files devel -%doc %{__cmake_builddir}/doc/doxygen_docs +%doc %{__cmake_builddir}/doxygen/doxygen_docs %{_bindir}/geos-config %{_includedir}/geos/ %{_includedir}/geos_c.h +%{_includedir}/geos.h %{_libdir}/libgeos_c.so %{_libdir}/libgeos.so %{_libdir}/cmake/GEOS/ %{_libdir}/pkgconfig/%{name}.pc +%if %{with mingw} %files -n mingw32-%{name} %license COPYING %{mingw32_bindir}/geosop.exe -%{mingw32_bindir}/libgeos-3.10.3.dll +%{mingw32_bindir}/libgeos-3.11.0.dll %{mingw32_bindir}/libgeos_c-1.dll %{mingw32_includedir}/geos/ %{mingw32_includedir}/geos_c.h +%{mingw32_includedir}/geos.h %{mingw32_libdir}/libgeos.dll.a %{mingw32_libdir}/libgeos_c.dll.a %{mingw32_libdir}/cmake/GEOS/ @@ -129,17 +153,22 @@ rm -f %{buildroot}%{mingw64_bindir}/geos-config %files -n mingw64-%{name} %license COPYING %{mingw64_bindir}/geosop.exe -%{mingw64_bindir}/libgeos-3.10.3.dll +%{mingw64_bindir}/libgeos-3.11.0.dll %{mingw64_bindir}/libgeos_c-1.dll %{mingw64_includedir}/geos/ %{mingw64_includedir}/geos_c.h +%{mingw64_includedir}/geos.h %{mingw64_libdir}/libgeos.dll.a %{mingw64_libdir}/libgeos_c.dll.a %{mingw64_libdir}/cmake/GEOS/ %{mingw64_libdir}/pkgconfig/%{name}.pc +%endif %changelog +* Fri Jul 01 2022 Sandro Mani - 3.11.0-1 +- Update to 3.11.0 + * Mon Jun 06 2022 Sandro Mani - 3.10.3-1 - Update to 3.10.3 diff --git a/geos_docs.patch b/geos_docs.patch index 392a6b3..fe942d3 100644 --- a/geos_docs.patch +++ b/geos_docs.patch @@ -1,7 +1,29 @@ -diff -rupN geos-3.10.3/include/geos/noding/SegmentNodeList.h geos-3.10.3-new/include/geos/noding/SegmentNodeList.h ---- geos-3.10.3/include/geos/noding/SegmentNodeList.h 2022-06-03 18:04:49.000000000 +0200 -+++ geos-3.10.3-new/include/geos/noding/SegmentNodeList.h 2022-06-06 12:01:08.148151403 +0200 -@@ -157,9 +157,6 @@ public: +diff -rupN geos-3.11.0/include/geos/index/SpatialIndex.h geos-3.11.0-new/include/geos/index/SpatialIndex.h +--- geos-3.11.0/include/geos/index/SpatialIndex.h 2022-07-01 18:42:19.000000000 +0200 ++++ geos-3.11.0-new/include/geos/index/SpatialIndex.h 2022-07-02 11:07:09.740083703 +0200 +@@ -70,7 +70,6 @@ public: + * intersect the query envelope. + * + * @param searchEnv the envelope to query for +- * @return a list of the items found by the query in a newly allocated vector + */ + //virtual std::vector* query(const geom::Envelope *searchEnv)=0; + virtual void query(const geom::Envelope* searchEnv, std::vector&) = 0; +diff -rupN geos-3.11.0/include/geos/index/VertexSequencePackedRtree.h geos-3.11.0-new/include/geos/index/VertexSequencePackedRtree.h +--- geos-3.11.0/include/geos/index/VertexSequencePackedRtree.h 2022-07-01 18:42:19.000000000 +0200 ++++ geos-3.11.0-new/include/geos/index/VertexSequencePackedRtree.h 2022-07-02 11:07:44.759084486 +0200 +@@ -136,7 +136,6 @@ public: + * + * @param queryEnv the query extent + * @param result vector to fill with results +- * @return + */ + void query(const Envelope& queryEnv, std::vector& result) const; + +diff -rupN geos-3.11.0/include/geos/noding/SegmentNodeList.h geos-3.11.0-new/include/geos/noding/SegmentNodeList.h +--- geos-3.11.0/include/geos/noding/SegmentNodeList.h 2022-07-02 11:06:21.869082632 +0200 ++++ geos-3.11.0-new/include/geos/noding/SegmentNodeList.h 2022-07-02 00:22:57.506176063 +0200 +@@ -155,9 +155,6 @@ public: * Adds an intersection into the list, if it isn't already there. * The input segmentIndex is expected to be normalized. * @@ -11,25 +33,36 @@ diff -rupN geos-3.10.3/include/geos/noding/SegmentNodeList.h geos-3.10.3-new/inc * @param intPt the intersection Coordinate, will be copied * @param segmentIndex */ -diff -rupN geos-3.10.3/include/geos/triangulate/polygon/PolygonEarClipper.h geos-3.10.3-new/include/geos/triangulate/polygon/PolygonEarClipper.h ---- geos-3.10.3/include/geos/triangulate/polygon/PolygonEarClipper.h 2022-06-03 18:04:49.000000000 +0200 -+++ geos-3.10.3-new/include/geos/triangulate/polygon/PolygonEarClipper.h 2022-06-06 12:01:52.576152397 +0200 -@@ -186,7 +186,6 @@ public: +diff -rupN geos-3.11.0/include/geos/operation/buffer/OffsetCurve.h geos-3.11.0-new/include/geos/operation/buffer/OffsetCurve.h +--- geos-3.11.0/include/geos/operation/buffer/OffsetCurve.h 2022-07-01 18:42:19.000000000 +0200 ++++ geos-3.11.0-new/include/geos/operation/buffer/OffsetCurve.h 2022-07-02 11:09:25.767086746 +0200 +@@ -252,7 +252,6 @@ public: + * @param dist the offset distance + * @param bufParams the buffer parameters to use + * @param lineList the vector to populate with the return value +- * @return the raw offset line + */ + static void rawOffset(const LineString& geom, double dist, BufferParameters& bufParams, std::vector& lineList); + static void rawOffset(const LineString& geom, double dist, std::vector& lineList); +diff -rupN geos-3.11.0/include/geos/precision/CommonBitsRemover.h geos-3.11.0-new/include/geos/precision/CommonBitsRemover.h +--- geos-3.11.0/include/geos/precision/CommonBitsRemover.h 2022-07-01 18:42:19.000000000 +0200 ++++ geos-3.11.0-new/include/geos/precision/CommonBitsRemover.h 2022-07-02 11:59:35.455154073 +0200 +@@ -74,7 +74,6 @@ public: + * + * @param geom the Geometry from which to remove the common + * coordinate bits +- * @return the shifted Geometry + */ + void removeCommonBits(geom::Geometry* geom); + +diff -rupN geos-3.11.0/include/geos/triangulate/polygon/PolygonEarClipper.h geos-3.11.0-new/include/geos/triangulate/polygon/PolygonEarClipper.h +--- geos-3.11.0/include/geos/triangulate/polygon/PolygonEarClipper.h 2022-07-02 11:06:21.870082632 +0200 ++++ geos-3.11.0-new/include/geos/triangulate/polygon/PolygonEarClipper.h 2022-07-02 00:22:57.507176063 +0200 +@@ -184,7 +184,6 @@ public: * * @param polyShell the vertices of the polygon * @param triListResult vector to fill in with the resultant Tri s - * @return a list of the Tris */ - static void triangulate(std::vector& polyShell, TriList& triListResult); - -diff -rupN geos-3.10.3/include/geos/triangulate/polygon/VertexSequencePackedRtree.h geos-3.10.3-new/include/geos/triangulate/polygon/VertexSequencePackedRtree.h ---- geos-3.10.3/include/geos/triangulate/polygon/VertexSequencePackedRtree.h 2022-06-03 18:04:49.000000000 +0200 -+++ geos-3.10.3-new/include/geos/triangulate/polygon/VertexSequencePackedRtree.h 2022-06-06 12:02:19.176152992 +0200 -@@ -137,7 +137,6 @@ public: - * - * @param queryEnv the query extent - * @param result vector to fill with results -- * @return - */ - void query(const Envelope& queryEnv, std::vector& result) const; + static void triangulate(std::vector& polyShell, TriList& triListResult); diff --git a/geos_version-suffix.patch b/geos_version-suffix.patch deleted file mode 100644 index 7747e63..0000000 --- a/geos_version-suffix.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -rupN --no-dereference geos-3.10.3/CMakeLists.txt geos-3.10.3-new/CMakeLists.txt ---- geos-3.10.3/CMakeLists.txt 2022-06-03 18:04:49.000000000 +0200 -+++ geos-3.10.3-new/CMakeLists.txt 2022-06-06 11:34:32.396115706 +0200 -@@ -280,6 +280,9 @@ if(BUILD_SHARED_LIBS) - - set_target_properties(geos PROPERTIES VERSION ${GEOS_VERSION_NOPATCH}) - set_target_properties(geos PROPERTIES SOVERSION ${GEOS_VERSION_NOPATCH}) -+ if(MINGW) -+ set_target_properties(geos PROPERTIES SUFFIX "-${GEOS_VERSION_NOPATCH}${CMAKE_SHARED_LIBRARY_SUFFIX}") -+ endif(MINGW) - endif() - - #----------------------------------------------------------------------------- -@@ -293,9 +296,12 @@ if(BUILD_SHARED_LIBS) - PRIVATE $,GEOS_DLL_EXPORT,DLL_EXPORT>) - - set_target_properties(geos_c PROPERTIES VERSION ${CAPI_VERSION}) -- if(NOT WIN32) -+ if(NOT WIN32 OR MINGW) - set_target_properties(geos_c PROPERTIES SOVERSION ${CAPI_VERSION_MAJOR}) - endif() -+ if(MINGW) -+ set_target_properties(geos_c PROPERTIES SUFFIX "-${CAPI_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}") -+ endif(MINGW) - endif() - - add_subdirectory(capi) diff --git a/sources b/sources index 338bc7d..78a052b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (geos-3.10.3.tar.bz2) = d6df49193ab006e8d0ddc86c58cfd3d3ee8f42c0a1b325fbe3f77e4d98abce8e7cce283343b81355aa96a5212b740fe04f7cbaca0106b02a9688e9fa78818e34 +SHA512 (geos-3.11.0.tar.bz2) = 40c7553bbb93673c231ddd0131b73bf43b3f50524bc5bd9e6934c068d2c09632f388b7429254ae15d9641da2d15e3a626b430438854e98d9e7419ad04e535189