Update to 3.8.0
This commit is contained in:
parent
a9215b8d9d
commit
83b3ce5f50
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
/geos-3.7.1.tar.bz2
|
||||
/geos-3.8.0.tar.bz2
|
||||
/check_doxygen_errors.cmake
|
||||
|
||||
41
3fc652822ef3a825784919423d636c9584dbd2ba.patch
Normal file
41
3fc652822ef3a825784919423d636c9584dbd2ba.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff -rupN --no-dereference geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp geos-3.8.0-new/src/index/chain/MonotoneChainBuilder.cpp
|
||||
--- geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp 2019-10-08 18:20:35.000000000 +0200
|
||||
+++ geos-3.8.0-new/src/index/chain/MonotoneChainBuilder.cpp 2020-02-24 10:59:48.236555133 +0100
|
||||
@@ -96,29 +96,28 @@ MonotoneChainBuilder::findChainEnd(const
|
||||
// (which is the starting quadrant)
|
||||
int chainQuad = Quadrant::quadrant(pts[safeStart],
|
||||
pts[safeStart + 1]);
|
||||
- std::size_t last = start + 1;
|
||||
|
||||
- const Coordinate* prev = &pts[last-1]; // avoid repeated coordinate access by index (virtual call)
|
||||
- const Coordinate* curr = &pts[last];
|
||||
+ const Coordinate* prev; // avoid repeated coordinate access by index (virtual call)
|
||||
+ const Coordinate* curr = &pts[start];
|
||||
+
|
||||
+ for(size_t last = start + 1; last < npts; last++) {
|
||||
+ prev = curr;
|
||||
+ curr = &pts[last];
|
||||
|
||||
- while(last < npts) {
|
||||
// skip zero-length segments, but include them in the chain
|
||||
if(!prev->equals2D(*curr)) {
|
||||
// compute quadrant for next possible segment in chain
|
||||
int quad = Quadrant::quadrant(*prev, *curr);
|
||||
if(quad != chainQuad) {
|
||||
- break;
|
||||
+ return last - 1;
|
||||
}
|
||||
}
|
||||
- ++last;
|
||||
- prev = curr;
|
||||
- curr = &pts[last];
|
||||
}
|
||||
#if GEOS_DEBUG
|
||||
std::cerr << "MonotoneChainBuilder::findChainEnd() returning" << std::endl;
|
||||
#endif
|
||||
|
||||
- return last - 1;
|
||||
+ return npts - 1;
|
||||
}
|
||||
|
||||
} // namespace geos.index.chain
|
||||
@ -1,10 +0,0 @@
|
||||
--- tests/unit/geos_unit.cpp.old 2019-02-04 17:16:13.102348321 +0000
|
||||
+++ tests/unit/geos_unit.cpp 2019-02-04 17:16:29.394366926 +0000
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <tut/tut_reporter.hpp>
|
||||
// geos
|
||||
#include <geos/unload.h>
|
||||
+#include <stdlib.h>
|
||||
// std
|
||||
#include <cstdlib>
|
||||
#include <iomanip>
|
||||
107
geos.spec
107
geos.spec
@ -1,17 +1,28 @@
|
||||
Name: geos
|
||||
Version: 3.7.1
|
||||
Release: 3%{?dist}
|
||||
Summary: GEOS is a C++ port of the Java Topology Suite
|
||||
Name: geos
|
||||
Version: 3.8.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
|
||||
Patch0: geos-gcc43.patch
|
||||
License: LGPLv2
|
||||
URL: http://trac.osgeo.org/geos/
|
||||
Source0: http://download.osgeo.org/%{name}/%{name}-%{version}.tar.bz2
|
||||
# File missing in tarball
|
||||
Source1: https://git.osgeo.org/gitea/geos/geos/raw/branch/master/doc/check_doxygen_errors.cmake
|
||||
|
||||
# Backport fix for out-of-bounds array access
|
||||
# https://github.com/libgeos/geos/commit/3fc652822ef3a825784919423d636c9584dbd2ba.patch
|
||||
Patch0: 3fc652822ef3a825784919423d636c9584dbd2ba.patch
|
||||
# Honour libsuffix
|
||||
Patch1: geos_libsuffix.patch
|
||||
# Fix borken geos-config returning -lgeos instead of -lgeos_c
|
||||
Patch2: geos_geosconfig.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: libtool
|
||||
|
||||
%description
|
||||
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology
|
||||
@ -20,9 +31,10 @@ JTS in C++. This includes all the OpenGIS "Simple Features for SQL" spatial
|
||||
predicate functions and spatial operators, as well as specific JTS topology
|
||||
functions such as IsValid()
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for GEOS
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Development files for GEOS
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology
|
||||
@ -34,65 +46,56 @@ functions such as IsValid().
|
||||
This package contains the development files to build applications that
|
||||
use GEOS.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .gcc43
|
||||
%autosetup -p1
|
||||
cp -a %{SOURCE1} doc/check_doxygen_errors.cmake
|
||||
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
%ifarch armv7hl aarch64 s390x
|
||||
-DDISABLE_GEOS_INLINE=ON \
|
||||
%endif
|
||||
-DBUILD_DOCUMENTATION=ON
|
||||
%make_build
|
||||
|
||||
# fix python path on 64bit
|
||||
sed -i -e 's|\/lib\/python|$libdir\/python|g' configure
|
||||
sed -i -e 's|.get_python_lib(0|.get_python_lib(1|g' configure
|
||||
sed -i -e 's|find \$i -name libpython|find \$i\/lib*\/ -name libpython|g' configure
|
||||
|
||||
# isnan is in math.h, std::isnan is in cmath
|
||||
sed -i -e 's|= isnan(|= std::isnan(|g' configure
|
||||
sed -i -e 's|(isnan(|(std::isnan(|g' include/geos/platform.h.in
|
||||
|
||||
# disable internal libtool to avoid hardcoded r-path
|
||||
for makefile in `find . -type f -name 'Makefile.in'`; do
|
||||
sed -i 's|@LIBTOOL@|%{_bindir}/libtool|g' $makefile
|
||||
done
|
||||
|
||||
%configure --disable-static --disable-dependency-tracking --disable-python
|
||||
|
||||
# Touch the file, since we are not using ruby bindings anymore:
|
||||
# Per http://lists.osgeo.org/pipermail/geos-devel/2009-May/004149.html
|
||||
touch swig/python/geos_wrap.cxx
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
# Make doxygen documentation files
|
||||
cd doc
|
||||
make doxygen-html
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
make DESTDIR=%{buildroot} install
|
||||
%make_install
|
||||
make docs
|
||||
|
||||
|
||||
%check
|
||||
%ifarch armv7hl aarch64 s390x ppc64le
|
||||
make test || :
|
||||
%else
|
||||
make test
|
||||
%endif
|
||||
|
||||
# test module
|
||||
make %{?_smp_mflags} check || exit 0
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
|
||||
%files
|
||||
%doc AUTHORS COPYING NEWS README.md TODO
|
||||
%{_libdir}/libgeos-%{version}.so
|
||||
%doc AUTHORS NEWS README.md
|
||||
%license COPYING
|
||||
%{_libdir}/libgeos.so.%{version}
|
||||
%{_libdir}/libgeos_c.so.1*
|
||||
%exclude %{_libdir}/*.a
|
||||
|
||||
%files devel
|
||||
%doc doc/doxygen_docs
|
||||
%{_bindir}/geos-config
|
||||
%{_includedir}/*
|
||||
%{_libdir}/libgeos.so
|
||||
%{_includedir}/geos/
|
||||
%{_includedir}/geos_c.h
|
||||
%{_libdir}/libgeos_c.so
|
||||
%exclude %{_libdir}/*.la
|
||||
%exclude %{_libdir}/*.a
|
||||
%{_libdir}/cmake/GEOS/
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Feb 20 2020 Sandro Mani <manisandro@gmail.com> - 3.8.0-1
|
||||
- Update to 3.8.0
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
||||
12
geos_geosconfig.patch
Normal file
12
geos_geosconfig.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -rupN --no-dereference geos-3.8.0/tools/geos-config.cmake geos-3.8.0-new/tools/geos-config.cmake
|
||||
--- geos-3.8.0/tools/geos-config.cmake 2020-02-24 10:59:48.382554848 +0100
|
||||
+++ geos-3.8.0-new/tools/geos-config.cmake 2020-02-24 10:59:48.383554846 +0100
|
||||
@@ -59,7 +59,7 @@ case $1 in
|
||||
echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos -lm
|
||||
;;
|
||||
--ldflags)
|
||||
- echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos
|
||||
+ echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos_c
|
||||
;;
|
||||
--includes)
|
||||
echo @CMAKE_INSTALL_PREFIX@/include
|
||||
80
geos_libsuffix.patch
Normal file
80
geos_libsuffix.patch
Normal file
@ -0,0 +1,80 @@
|
||||
diff -rupN --no-dereference geos-3.8.0/CMakeLists.txt geos-3.8.0-new/CMakeLists.txt
|
||||
--- geos-3.8.0/CMakeLists.txt 2019-10-08 18:20:34.000000000 +0200
|
||||
+++ geos-3.8.0-new/CMakeLists.txt 2020-02-24 10:59:48.306554996 +0100
|
||||
@@ -281,16 +281,16 @@ configure_file(cmake/geos-config.cmake
|
||||
|
||||
install(TARGETS geos geos_cxx_flags
|
||||
EXPORT geos-targets
|
||||
- LIBRARY DESTINATION lib NAMELINK_SKIP
|
||||
- ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib${LIB_SUFFIX} NAMELINK_SKIP
|
||||
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
)
|
||||
|
||||
install(TARGETS geos_c
|
||||
EXPORT geos-targets
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
RUNTIME DESTINATION bin
|
||||
INCLUDES DESTINATION include
|
||||
)
|
||||
@@ -298,12 +298,12 @@ install(TARGETS geos_c
|
||||
install(EXPORT geos-targets
|
||||
FILE geos-targets.cmake
|
||||
NAMESPACE GEOS::
|
||||
- DESTINATION lib/cmake/GEOS)
|
||||
+ DESTINATION lib${LIB_SUFFIX}/cmake/GEOS)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/geos-config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/geos-config-version.cmake"
|
||||
- DESTINATION lib/cmake/GEOS)
|
||||
+ DESTINATION lib${LIB_SUFFIX}/cmake/GEOS)
|
||||
install(DIRECTORY
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/geos"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/include/geos"
|
||||
diff -rupN --no-dereference geos-3.8.0/tools/geos-config.cmake geos-3.8.0-new/tools/geos-config.cmake
|
||||
--- geos-3.8.0/tools/geos-config.cmake 2019-10-08 18:20:35.000000000 +0200
|
||||
+++ geos-3.8.0-new/tools/geos-config.cmake 2020-02-24 10:59:48.306554996 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
|
||||
-libdir=@CMAKE_INSTALL_PREFIX@/lib
|
||||
+libdir=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@
|
||||
|
||||
usage()
|
||||
{
|
||||
@@ -44,22 +44,22 @@ case $1 in
|
||||
echo -I@CMAKE_INSTALL_PREFIX@/include
|
||||
;;
|
||||
--libs)
|
||||
- echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos-@GEOS_VERSION_MAJOR@
|
||||
+ echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos-@GEOS_VERSION_MAJOR@
|
||||
;;
|
||||
--clibs)
|
||||
- echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos_c
|
||||
+ echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos_c
|
||||
;;
|
||||
--cclibs)
|
||||
- echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos
|
||||
+ echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos
|
||||
;;
|
||||
--static-clibs)
|
||||
- echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos_c -lgeos -lm
|
||||
+ echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos_c -lgeos -lm
|
||||
;;
|
||||
--static-cclibs)
|
||||
- echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos -lm
|
||||
+ echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos -lm
|
||||
;;
|
||||
--ldflags)
|
||||
- echo -L@CMAKE_INSTALL_PREFIX@/lib -lgeos
|
||||
+ echo -L@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -lgeos
|
||||
;;
|
||||
--includes)
|
||||
echo @CMAKE_INSTALL_PREFIX@/include
|
||||
22
geos_outofbounds.patch
Normal file
22
geos_outofbounds.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -rupN geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp geos-3.8.0-new/src/index/chain/MonotoneChainBuilder.cpp
|
||||
--- geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp 2019-10-08 18:20:35.000000000 +0200
|
||||
+++ geos-3.8.0-new/src/index/chain/MonotoneChainBuilder.cpp 2020-02-20 13:52:22.737581232 +0100
|
||||
@@ -102,6 +102,7 @@ MonotoneChainBuilder::findChainEnd(const
|
||||
const Coordinate* curr = &pts[last];
|
||||
|
||||
while(last < npts) {
|
||||
+ curr = &pts[last];
|
||||
// skip zero-length segments, but include them in the chain
|
||||
if(!prev->equals2D(*curr)) {
|
||||
// compute quadrant for next possible segment in chain
|
||||
@@ -110,9 +111,8 @@ MonotoneChainBuilder::findChainEnd(const
|
||||
break;
|
||||
}
|
||||
}
|
||||
- ++last;
|
||||
prev = curr;
|
||||
- curr = &pts[last];
|
||||
+ ++last;
|
||||
}
|
||||
#if GEOS_DEBUG
|
||||
std::cerr << "MonotoneChainBuilder::findChainEnd() returning" << std::endl;
|
||||
3
sources
3
sources
@ -1 +1,2 @@
|
||||
SHA512 (geos-3.7.1.tar.bz2) = 01e8087bcd3cb8f873adb7b56910e1575ccb3336badfdd3f13bc6792095b7010e5ab109ea0d0cd3d1459e2e526e83bcf64d6ee3f7eb47be75639becdaacd2a87
|
||||
SHA512 (geos-3.8.0.tar.bz2) = c89b25b42092152ef261090f25ff64b229f30f67d42fdf44c2871e78b66bb2c42e23b9ae21f9aea0e48823bdb0267d609ab2ee77d310abcb76fa672c6614d8f1
|
||||
SHA512 (check_doxygen_errors.cmake) = 4764415b279cd7583f8ec2e0150ab2e87f12f7b9c6249ee03bf3a368c12f698c586a6b116ae892395b7d46d620f96d2a1ac6aa16ce4bbf4dc2cdedca9f12e07f
|
||||
|
||||
Loading…
Reference in New Issue
Block a user