geos: Update to 3.7.0
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 52b4463..8051ecb 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -111,7 +111,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long")
|
||||
|
||||
# Turn on Position Independent Code generation for GEOS C shared library
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
|
||||
# Enable glibc ISO C99 features (macros isfinite, isnan)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_ISOC99_SOURCE=1")
|
||||
@@ -183,7 +182,10 @@ endif()
|
||||
include(CheckPrototypeExists)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
-check_prototype_exists(isnan cmath HAVE_STD_ISNAN)
|
||||
+check_cxx_source_compiles(
|
||||
+ "#include <cmath>
|
||||
+ int main() { double x=0.1; return std::isnan(x)?1:0; }"
|
||||
+ HAVE_STD_ISNAN)
|
||||
if(NOT HAVE_STD_ISNAN)
|
||||
if(MSVC)
|
||||
check_prototype_exists(_isnan float.h HAVE_ISNAN)
|
||||
@@ -197,7 +199,10 @@ if(NOT HAVE_STD_ISNAN)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-check_prototype_exists(isfinite cmath HAVE_STD_ISFINITE)
|
||||
+check_cxx_source_compiles(
|
||||
+ "#include <cmath>
|
||||
+ int main() { double x=0.1; return std::isfinite(x)?1:0; }"
|
||||
+ HAVE_STD_ISFINITE)
|
||||
|
||||
if(NOT HAVE_STD_ISFINITE)
|
||||
if(MSVC)
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index ee5b2d4..32fea3d 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
#################################################################################
|
||||
|
||||
-if(UNIX)
|
||||
+if(UNIX OR MINGW)
|
||||
|
||||
if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_ENABLE_MACOSX_FRAMEWORK_UNIXCOMPAT)
|
||||
set(installdest GEOS.framework/Versions/${VERSION_MAJOR}/unix/bin)
|
||||
@@ -4,7 +4,7 @@
|
||||
_realname=geos
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=3.6.3
|
||||
pkgver=3.7.0
|
||||
pkgrel=1
|
||||
pkgdesc="C++ port of the Java Topology Suite (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -14,8 +14,8 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
options=('strip' '!emptydirs')
|
||||
source=("http://download.osgeo.org/geos/geos-${pkgver}.tar.bz2"
|
||||
"geos-3.5.0.patch")
|
||||
sha256sums=('ab9eaa0a67f7068866ac1e4dbf717b0c49f96254d65e9ce23ed7af1cccbe3e4b'
|
||||
'778ea9e73e343396c761e66a67c87b2054a33be629fa94a6243f7bdd7ab68346')
|
||||
sha256sums=('4fbf41a792fd74293ab59e0a980e8654cd411a9d45416d66eaa12d53d1393fd7'
|
||||
'206f8780b8da547d3fd1bbc3ffb827abc71ec0e5d90a217db2032fe481807992')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
@@ -5,11 +5,11 @@ diff -Naur geos-3.6.2.orig/CMakeLists.txt geos-3.6.2/CMakeLists.txt
|
||||
"Forcing IEEE 754 using flag -ffloat-store - ${GEOS_ENABLE_FLOATSTORE}")
|
||||
|
||||
# Warnings specification
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long")
|
||||
+ #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long")
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -fno-implicit-inline-templates -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
|
||||
+ #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -fno-implicit-inline-templates -Wconversion -pedantic -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
|
||||
|
||||
# Turn on Position Independent Code generation for GEOS C shared library
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -Wconversion -pedantic -Wmissing-prototypes -W -Wunused -Wuninitialized -Wextra -Wdouble-promotion")
|
||||
@@ -191,7 +191,10 @@
|
||||
include(CheckPrototypeExists)
|
||||
include(CheckSymbolExists)
|
||||
@@ -35,14 +35,14 @@ diff -Naur geos-3.6.2.orig/CMakeLists.txt geos-3.6.2/CMakeLists.txt
|
||||
if(NOT HAVE_STD_ISFINITE)
|
||||
if(MSVC)
|
||||
@@ -347,7 +353,7 @@
|
||||
#################################################################################
|
||||
# Configure subdirectories
|
||||
#################################################################################
|
||||
DESTINATION "${PROJECT_BINARY_DIR}")
|
||||
endif()
|
||||
|
||||
-include(GenerateSourceGroups)
|
||||
+#include(GenerateSourceGroups)
|
||||
|
||||
add_subdirectory(include)
|
||||
add_subdirectory(src)
|
||||
# Enable target debugging for CMake Tools in Visual Studio Code
|
||||
# https://github.com/vector-of-bool/vscode-cmake-tools
|
||||
diff -Naur geos-3.6.2.orig/include/CMakeLists.txt geos-3.6.2/include/CMakeLists.txt
|
||||
--- geos-3.6.2.orig/include/CMakeLists.txt 2018-05-23 19:46:15.521315800 -0400
|
||||
+++ geos-3.6.2/include/CMakeLists.txt 2018-05-23 20:37:32.614369700 -0400
|
||||
@@ -69,6 +69,33 @@ diff -Naur geos-3.6.2.orig/tests/unit/CMakeLists.txt geos-3.6.2/tests/unit/CMake
|
||||
# Group source files for IDE source explorers (e.g. Visual Studio)
|
||||
#################################################################################
|
||||
-GenerateSourceGroups(tests/unit)
|
||||
\ No newline at end of file
|
||||
+#GenerateSourceGroups(tests/unit)
|
||||
\ No newline at end of file
|
||||
--- geos-3.7.0/include/geos/platform.h.cmake.orig 2018-11-03 11:54:44.643131100 +0300
|
||||
+++ geos-3.7.0/include/geos/platform.h.cmake 2018-11-03 11:57:49.714716600 +0300
|
||||
@@ -31,6 +31,9 @@
|
||||
|
||||
/* Set to 1 if you have ieeefp.h */
|
||||
#cmakedefine HAVE_IEEEFP_H 1
|
||||
+
|
||||
+#cmakedefine HAVE_STD_ISFINITE 1
|
||||
+#cmakedefine HAVE_STD_ISNAN 1
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define _USE_MATH_DEFINES
|
||||
@@ -66,10 +66,14 @@
|
||||
# endif
|
||||
#else
|
||||
# include <ieeefp.h>
|
||||
-# ifndef FINITE
|
||||
+# if defined(HAVE_STD_ISFINITE)
|
||||
+# define FINITE(x) std::isfinite(x)
|
||||
+# elif !defined(FINITE)
|
||||
# define FINITE(x) finite(x)
|
||||
# endif
|
||||
-# ifndef ISNAN
|
||||
+# if defined(HAVE_STD_ISNAN)
|
||||
+# define ISNAN(x) std::isnan(x)
|
||||
+# elif !defined(ISNAN)
|
||||
# define ISNAN(x) isnan(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user