diff --git a/CMake/External_PostgreSQL.cmake b/CMake/External_PostgreSQL.cmake index e08505d4..005640e3 100644 --- a/CMake/External_PostgreSQL.cmake +++ b/CMake/External_PostgreSQL.cmake @@ -37,21 +37,21 @@ else() endif() #Always try the patch, it contains the WIN32 logic -set(_PostgreSQL_PATCH_ARG PATCH_COMMAND - ${CMAKE_COMMAND} - -DPostgreSQL_patch:PATH=${fletch_SOURCE_DIR}/Patches/PostgreSQL +set (PostgreSQL_PATCH_DIR ${fletch_SOURCE_DIR}/Patches/PostgreSQL/${PostgreSQL_SELECT_VERSION}) +if(EXISTS ${PostgreSQL_PATCH_DIR}) +set(PostgreSQL_PATCH_COMMAND ${CMAKE_COMMAND} + -DPostgreSQL_patch:PATH=${PostgreSQL_PATCH_DIR} -DPostgreSQL_source:PATH=${fletch_BUILD_PREFIX}/src/PostgreSQL - -DPostgreSQL_SELECT_VERSION:STRING=${PostgreSQL_SELECT_VERSION} - -DBUILD_POSTGRESQL_CONTRIB:BOOL=${BUILD_POSTGRESQL_CONTRIB} - -P ${fletch_SOURCE_DIR}/Patches/PostgreSQL/Patch.cmake + -P ${PostgreSQL_PATCH_DIR}/Patch.cmake ) +endif() ExternalProject_Add(PostgreSQL URL ${PostgreSQL_url} URL_MD5 ${PostgreSQL_md5} ${COMMON_EP_ARGS} ${_PostgreSQL_BUILD_IN_SOURCE_ARG} - ${_PostgreSQL_PATCH_ARG} + PATCH_COMMAND ${PostgreSQL_PATCH_COMMAND} ${_PostgreSQL_CONFIGURE_ARG} ${_PostgreSQL_BUILD_INSTALL_ARG} ${ARG} diff --git a/CMake/fletch-tarballs.cmake b/CMake/fletch-tarballs.cmake index 53b761d9..23347131 100644 --- a/CMake/fletch-tarballs.cmake +++ b/CMake/fletch-tarballs.cmake @@ -341,9 +341,22 @@ endif() list(APPEND fletch_external_sources OpenCV) # PROJ.4 -set(PROJ4_version "4.9.3" ) -set(PROJ4_url "http://download.osgeo.org/proj/proj-${PROJ4_version}.tar.gz" ) -set(PROJ4_md5 "d598336ca834742735137c5674b214a1" ) +if (fletch_ENABLE_PROJ4 OR fletch_ENABLE_ALL_PACKAGES) + set(PROJ4_SELECT_VERSION 4.9.3 CACHE STRING "Select the major version of PROJ4 to build.") + set_property(CACHE PROJ4_SELECT_VERSION PROPERTY STRINGS "4.9.3" "6.2.1") + message(STATUS "PROJ4 Select version: ${PROJ4_SELECT_VERSION}") + if (PROJ4_SELECT_VERSION VERSION_EQUAL 4.9.3) + set(PROJ4_version "4.9.3" ) + set(PROJ4_url "http://download.osgeo.org/proj/proj-${PROJ4_version}.tar.gz" ) + set(PROJ4_md5 "d598336ca834742735137c5674b214a1" ) + elseif(PROJ4_SELECT_VERSION VERSION_EQUAL 6.2.1) + set(PROJ4_version "6.1.1" ) + set(PROJ4_url "http://download.osgeo.org/proj/proj-${PROJ4_version}.tar.gz" ) + set(PROJ4_md5 "9a82a3174cacf319d94360a759fbcc8a" ) + else() + message(STATUS "PROJ4_SELECT_VERSION ${PROJ4_SELECT_VERSION}: Not supported") + endif() +endif() list(APPEND fletch_external_sources PROJ4 ) # libgeotiff @@ -372,9 +385,9 @@ endif() list(APPEND fletch_external_sources GDAL) # GEOS -set(GEOS_version "3.6.2" ) +set(GEOS_version "3.8.1" ) set(GEOS_url "http://download.osgeo.org/geos/geos-${GEOS_version}.tar.bz2" ) -set(GEOS_md5 "a32142343c93d3bf151f73db3baa651f" ) +set(GEOS_md5 "9d25df02a2c4fcc5a59ac2fb3f0bd977" ) list(APPEND fletch_external_sources GEOS ) # PDAL @@ -391,32 +404,31 @@ list(APPEND fletch_external_sources GeographicLib ) # PostgreSQL if (fletch_ENABLE_PostgreSQL OR fletch_ENABLE_ALL_PACKAGES) - set(PostgreSQL_SELECT_VERSION 9.5.1 CACHE STRING "Select the major version of PostgreSQL to build.") - set_property(CACHE PostgreSQL_SELECT_VERSION PROPERTY STRINGS "9.5.1" "10.2") + set(PostgreSQL_SELECT_VERSION 12.3 CACHE STRING "Select the major version of PostgreSQL to build.") + set_property(CACHE PostgreSQL_SELECT_VERSION PROPERTY STRINGS "9.5.1" "12.3") message(STATUS "PostgreSQL Select version: ${PostgreSQL_SELECT_VERSION}") if (PostgreSQL_SELECT_VERSION VERSION_EQUAL 9.5.1) # PostgreSQL 9.5 set(PostgreSQL_version ${PostgreSQL_SELECT_VERSION}) - set(PostgreSQL_url "http://ftp.PostgreSQL.org/pub/source/v${PostgreSQL_version}/postgresql-${PostgreSQL_version}.tar.bz2") set(PostgreSQL_md5 "11e037afaa4bd0c90bb3c3d955e2b401") - elseif(PostgreSQL_SELECT_VERSION VERSION_EQUAL 10.2) - # PostgreSQL 9.4 + elseif(PostgreSQL_SELECT_VERSION VERSION_EQUAL 12.3) + # PostgreSQL 12.3 set(PostgreSQL_version ${PostgreSQL_SELECT_VERSION}) - set(PostgreSQL_url "http://ftp.PostgreSQL.org/pub/source/v${PostgreSQL_version}/postgresql-${PostgreSQL_version}.tar.bz2") - set(PostgreSQL_md5 "e97c3cc72bdf661441f29069299b260a") + set(PostgreSQL_md5 "a30c023dd7088e44d73be71af2ef404a") else() message(STATUS "PostgreSQL_SELECT_VERSION: Not supported") endif() + set(PostgreSQL_url "http://ftp.PostgreSQL.org/pub/source/v${PostgreSQL_version}/postgresql-${PostgreSQL_version}.tar.bz2") endif() list(APPEND fletch_external_sources PostgreSQL) # PostGIS # Currently it seems the this version of PostGIS will work with all provided PostgreSQL versions if(NOT WIN32) - set(PostGIS_version "2.5.3" ) - set(PostGIS_url "http://download.osgeo.org/postgis/source/postgis-${PostGIS_version}.tar.gz" ) - set(PostGIS_md5 "475bca6249ee11f675b899de14fd3f42" ) + set(PostGIS_version "3.0.1" ) + set(PostGIS_url "https://download.osgeo.org/postgis/source/postgis-${PostGIS_version}.tar.gz" ) + set(PostGIS_md5 "93f26f162a3961d08caf3b37a3d5fe5d" ) list(APPEND fletch_external_sources PostGIS ) endif() diff --git a/Patches/GEOS/BufferOp.cpp b/Patches/GEOS/BufferOp.cpp deleted file mode 100644 index f2bf5c74..00000000 --- a/Patches/GEOS/BufferOp.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/********************************************************************** - * $Id: BufferOp.cpp 3537 2011-12-09 10:12:04Z strk $ - * - * GEOS - Geometry Engine Open Source - * http://geos.refractions.net - * - * Copyright (C) 2009-2011 Sandro Santilli - * Copyright (C) 2005-2007 Refractions Research Inc. - * Copyright (C) 2001-2002 Vivid Solutions Inc. - * - * 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. - * - ********************************************************************** - * - * Last port: operation/buffer/BufferOp.java r378 (JTS-1.12) - * - **********************************************************************/ - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -//FIXME: for temporary use, see other FIXME in file -#include -#include -#include - - - - -#ifndef GEOS_DEBUG -#define GEOS_DEBUG 0 -#endif - -//#define PROFILE 1 - -using namespace geos::noding; -using namespace geos::geom; - -namespace geos { -namespace operation { // geos.operation -namespace buffer { // geos.operation.buffer - -#if PROFILE -static Profiler *profiler = Profiler::instance(); -#endif - -namespace { - -double OLDprecisionScaleFactor(const Geometry *g, - double distance, int maxPrecisionDigits) -{ - const Envelope *env=g->getEnvelopeInternal(); - double envSize=(std::max)(env->getHeight(), env->getWidth()); - double expandByDistance=distance > 0.0 ? distance : 0.0; - double bufEnvSize=envSize + 2 * expandByDistance; - // the smallest power of 10 greater than the buffer envelope - int bufEnvLog10=(int) (std::log(bufEnvSize) / std::log(10.0) + 1.0); - int minUnitLog10=bufEnvLog10 - maxPrecisionDigits; - // scale factor is inverse of min Unit size, so flip sign of exponent - double scaleFactor=std::pow(10.0,-minUnitLog10); - return scaleFactor; -} - -} // anonymous namespace - -/*private*/ -double -BufferOp::precisionScaleFactor(const Geometry *g, - double distance, - int maxPrecisionDigits) -{ - using namespace std; - const Envelope *env=g->getEnvelopeInternal(); - double envMax = max( - max(fabs(env->getMaxX()), fabs(env->getMinX())), - max(fabs(env->getMaxY()), fabs(env->getMinY())) - ); - - double expandByDistance = distance > 0.0 ? distance : 0.0; - double bufEnvMax = envMax + 2 * expandByDistance; - - // the smallest power of 10 greater than the buffer envelope - int bufEnvPrecisionDigits = (int) (std::log(bufEnvMax) / std::log(10.0) + 1.0); - int minUnitLog10 = maxPrecisionDigits - bufEnvPrecisionDigits; - - double scaleFactor = std::pow(10.0, minUnitLog10); - - return scaleFactor; -} - -/*public static*/ -Geometry* -BufferOp::bufferOp(const Geometry *g, double distance, - int quadrantSegments, - int nEndCapStyle) -{ - BufferOp bufOp(g); - bufOp.setQuadrantSegments(quadrantSegments); - bufOp.setEndCapStyle(nEndCapStyle); - return bufOp.getResultGeometry(distance); -} - -/*public*/ -Geometry* -BufferOp::getResultGeometry(double nDistance) -{ - distance=nDistance; - computeGeometry(); - return resultGeometry; -} - -/*private*/ -void -BufferOp::computeGeometry() -{ -#if GEOS_DEBUG - std::cerr<<"BufferOp::computeGeometry: trying with original precision"<getFactory()->getPrecisionModel()); - if ( argPM.getType() == PrecisionModel::FIXED ) - bufferFixedPrecision(argPM); - else - bufferReducedPrecision(); -} - -/*private*/ -void -BufferOp::bufferReducedPrecision() -{ - - // try and compute with decreasing precision - for (int precDigits=MAX_PRECISION_DIGITS; precDigits >= 0; precDigits--) - { -#if GEOS_DEBUG - std::cerr<<"BufferOp::computeGeometry: trying with precDigits "<toString()<toString()<) +endif() -################################################################################ -# Setup include directories -################################################################################ +target_compile_definitions(geos_cxx_flags + INTERFACE + USE_UNSTABLE_GEOS_CPP_API) + +target_compile_definitions(geos_developer_cxx_flags + INTERFACE + $<$:_CRT_NONSTDC_NO_DEPRECATE> + $<$:_SCL_SECURE_NO_DEPRECATE> + $<$:_CRT_SECURE_NO_WARNINGS> + $<$:NOMINMAX>) + +target_compile_options(geos_developer_cxx_flags + INTERFACE + $<$:-W4> + $<$,$>:-pedantic -Wall -Wextra -Wno-long-long -Wcast-align -Wconversion -Wchar-subscripts -Wdouble-promotion -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wuninitialized -Wunused-parameter -fno-common> + $<$:-fno-implicit-inline-templates>) + +# Disable TTMath ASM support on Windows due to build issues +if(WIN32) + target_compile_definitions(geos_cxx_flags + INTERFACE TTMATH_NOASM) +endif() -# for including GEOS C++ API headers -include_directories(${geos_SOURCE_DIR}/include) +#----------------------------------------------------------------------------- +# Define a coverage build +#----------------------------------------------------------------------------- +set(CMAKE_CXX_FLAGS_COVERAGE "-fprofile-arcs -ftest-coverage") -# for including build-specific GEOS C API headers -include_directories(${geos_BINARY_DIR}/capi) +#----------------------------------------------------------------------------- +# Target geos: C++ API library +#----------------------------------------------------------------------------- +add_library(geos "") +target_link_libraries(geos PUBLIC geos_cxx_flags) +add_subdirectory(include) +add_subdirectory(src) -# for including build-specific version.h, platform.h and geos_c.h -include_directories(${geos_BINARY_DIR}/include) +if(BUILD_SHARED_LIBS) + target_compile_definitions(geos + PRIVATE $<$:GEOS_DLL_EXPORT>) -################################################################################ -# Setup checks and generate config headers -################################################################################ + set_target_properties(geos PROPERTIES VERSION ${GEOS_VERSION}) + set_target_properties(geos PROPERTIES SOVERSION ${GEOS_VERSION}) +endif() -# TODO: output to CMAKE_CURRENT_BINARY_DIR instead of CMAKE_SOURCE_DIR +#----------------------------------------------------------------------------- +# Target geos_c: C API library +#----------------------------------------------------------------------------- +add_library(geos_c "") +target_link_libraries(geos_c PRIVATE geos) -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h) - message(STATUS "Disabling existing ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h") +if(BUILD_SHARED_LIBS) + target_compile_definitions(geos_c + PRIVATE $<$:GEOS_DLL_EXPORT>) - if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6) - file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h) - set(PH_RESULT "removed") - else() - file(RENAME - ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h.disabled) - set(PH_RESULT "renamed") + set_target_properties(geos_c PROPERTIES VERSION ${CAPI_VERSION}) + if(NOT WIN32) + set_target_properties(geos_c PROPERTIES SOVERSION ${CAPI_VERSION_MAJOR}) endif() - - message(STATUS "Disabling existing ${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h - ${PH_RESULT}") endif() -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/geos/platform.h.cmake - ${CMAKE_CURRENT_BINARY_DIR}/include/geos/platform.h) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/geos/version.h.in - ${CMAKE_CURRENT_BINARY_DIR}/include/geos/version.h @ONLY) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/capi/geos_c.h.in - ${CMAKE_CURRENT_BINARY_DIR}/capi/geos_c.h @ONLY) - -################################################################################ -# Configure tests -################################################################################ - -if(GEOS_ENABLE_TESTS) - - # Include CTest support - include(CTest) - enable_testing() - - # Define "make check" as alias for "make test" - add_custom_target(check COMMAND ctest) +add_subdirectory(capi) +#----------------------------------------------------------------------------- +# Tests +#----------------------------------------------------------------------------- +include(CTest) +if(BUILD_TESTING) + add_subdirectory(tests) endif() -################################################################################ -# Configure subdirectories -################################################################################ +#----------------------------------------------------------------------------- +# Benchmarks +#----------------------------------------------------------------------------- +add_subdirectory(benchmarks) + +#----------------------------------------------------------------------------- +# Documentation/Examples +#----------------------------------------------------------------------------- +#add_subdirectory(doc) + +#----------------------------------------------------------------------------- +# Install and export targets - support 'make install' or equivalent +#----------------------------------------------------------------------------- +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/geos-config-version.cmake" + VERSION ${GEOS_VERSION} + COMPATIBILITY AnyNewerVersion) + +configure_file(cmake/geos-config.cmake + "${CMAKE_CURRENT_BINARY_DIR}/geos-config.cmake" + COPYONLY) + +install(TARGETS geos geos_cxx_flags + EXPORT geos-targets + LIBRARY DESTINATION lib NAMELINK_SKIP + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include + ) + +install(TARGETS geos_c + EXPORT geos-targets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include + ) + +install(EXPORT geos-targets + FILE geos-targets.cmake + NAMESPACE GEOS:: + DESTINATION lib/cmake/GEOS) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/geos-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/geos-config-version.cmake" + DESTINATION lib/cmake/GEOS) +install(DIRECTORY + "${CMAKE_CURRENT_LIST_DIR}/include/geos" + "${CMAKE_CURRENT_BINARY_DIR}/include/geos" + DESTINATION include + FILES_MATCHING PATTERN "*.h") +if(NOT DISABLE_GEOS_INLINE) + install(DIRECTORY + "${CMAKE_CURRENT_LIST_DIR}/include/geos" + "${CMAKE_CURRENT_BINARY_DIR}/include/geos" + DESTINATION include + FILES_MATCHING PATTERN "*.inl") +endif() +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/capi/geos_c.h" + DESTINATION include) -add_subdirectory(include) -add_subdirectory(src) -add_subdirectory(capi) -add_subdirectory(tests) add_subdirectory(tools) -################################################################################ -# Install/Uninstall -################################################################################ +#----------------------------------------------------------------------------- +# Uninstall +#----------------------------------------------------------------------------- -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake" +configure_file("${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" + "${PROJECT_BINARY_DIR}/cmake/cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall - "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake") + "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake/cmake_uninstall.cmake") + +#----------------------------------------------------------------------------- +# "make dist" workalike +#----------------------------------------------------------------------------- +get_property(_is_multi_config_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(NOT _is_multi_config_generator) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GEOS Computational Geometry Library") + set(CPACK_PACKAGE_VENDOR "OSGeo") + set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README.md) + set(CPACK_SOURCE_GENERATOR "TBZ2") + set(CPACK_PACKAGE_VERSION_MAJOR ${GEOS_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${GEOS_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${GEOS_VERSION_PATCH}) + set(CPACK_SOURCE_PACKAGE_FILE_NAME "geos-${GEOS_VERSION_FULL}") + + set(CPACK_SOURCE_IGNORE_FILES + "/\\\\.git" + "/autogen\\\\.sh" + "/tools/ci" + "/HOWTO_RELEASE" + "/autom4te\\\\.cache" + "\\\\.yml\$" + "\\\\.deps" + "/debian/" + "/php/" + "/.*build-.*/" + ${PROJECT_BINARY_DIR} + ) + + # message(STATUS "GEOS: CPACK_SOURCE_PACKAGE_FILE_NAME: ${CPACK_SOURCE_PACKAGE_FILE_NAME}") + # message(STATUS "GEOS: CPACK_SOURCE_IGNORE_FILES: ${CPACK_SOURCE_IGNORE_FILES}") + # message(STATUS "GEOS: CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") + include(CPack) + add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) + + message(STATUS "GEOS: Configured 'dist' target") +endif() -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/geos-config.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake/geos-config" - @ONLY -) -install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/cmake/geos-config" - DESTINATION bin -) +#----------------------------------------------------------------------------- +# "make check" workalike +#----------------------------------------------------------------------------- -################################################################################ -# DEBUG settings - TODO: make a summary +add_custom_target(check COMMAND ${CMAKE_BUILD_TOOL} test) -message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator") +#----------------------------------------------------------------------------- +# "make distcheck" workalike +#----------------------------------------------------------------------------- +if(NOT _is_multi_config_generator) + find_package(MakeDistCheck) + AddMakeDistCheck() + message(STATUS "GEOS: Configured 'distcheck' target") +endif() -#message(STATUS "XXX: CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}") -#message(STATUS "XXX: CMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}") -#message(STATUS "XXX: CMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}") +unset(_is_multi_config_generator) diff --git a/Patches/GEOS/GenerateSourceGroups.cmake b/Patches/GEOS/GenerateSourceGroups.cmake deleted file mode 100644 index 025e07bc..00000000 --- a/Patches/GEOS/GenerateSourceGroups.cmake +++ /dev/null @@ -1,13 +0,0 @@ -macro(GenerateSourceGroups curdir) - file(GLOB children RELATIVE ${PROJECT_SOURCE_DIR}/${curdir} ${PROJECT_SOURCE_DIR}/${curdir}/*) - foreach(child ${children}) - if(IS_DIRECTORY ${PROJECT_SOURCE_DIR}/${curdir}/${child}) - GenerateSourceGroups(${curdir}/${child}) - else() - string(REPLACE "/" "\\" groupname ${curdir}) - # I would like to call the src root folder in a different name, only in visual studio (not mandatory requirement) - string(REPLACE "src" "Source Files" groupname ${groupname}) - source_group(${groupname} FILES ${PROJECT_SOURCE_DIR}/${curdir}/${child}) - endif() - endforeach() -endmacro() diff --git a/Patches/GEOS/Info.plist.in b/Patches/GEOS/Info.plist.in deleted file mode 100644 index 3e8cda8f..00000000 --- a/Patches/GEOS/Info.plist.in +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${MACOSX_FRAMEWORK_NAME} - CFBundleGetInfoString - GEOS ${VERSION} - CFBundleIdentifier - ${MACOSX_FRAMEWORK_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - GEOS - CFBundlePackageType - FMWK - CFBundleShortVersionString - ${MACOSX_FRAMEWORK_SHORT_VERSION_STRING} - CFBundleSignature - ???? - CFBundleVersion - ${MACOSX_FRAMEWORK_BUNDLE_VERSION} - - diff --git a/Patches/GEOS/LineIntersector.cpp b/Patches/GEOS/LineIntersector.cpp deleted file mode 100644 index 63d078e8..00000000 --- a/Patches/GEOS/LineIntersector.cpp +++ /dev/null @@ -1,883 +0,0 @@ -/********************************************************************** - * $Id: LineIntersector.cpp 3340 2011-05-10 09:51:31Z strk $ - * - * GEOS - Geometry Engine Open Source - * http://geos.refractions.net - * - * Copyright (C) 2005-2006 Refractions Research Inc. - * Copyright (C) 2001-2002 Vivid Solutions Inc. - * - * 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. - * - ********************************************************************** - * - * Last port: algorithm/RobustLineIntersector.java rev. 1.38 (JTS-1.10) - * - **********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -//#include // changed to TopologyException -//#include // we don't throw anymore - -#include -#include // for fabs() -#include -#include - -#ifndef GEOS_DEBUG -#define GEOS_DEBUG 0 -#endif - -#ifdef GEOS_DEBUG -#include -#endif - -#ifndef COMPUTE_Z -#define COMPUTE_Z 1 -#endif // COMPUTE_Z - -using namespace std; - -using namespace geos::geom; - -namespace geos { -namespace algorithm { // geos.algorithm - -/*public static*/ -double -LineIntersector::computeEdgeDistance(const Coordinate& p,const Coordinate& p0,const Coordinate& p1) -{ - double dx=fabs(p1.x-p0.x); - double dy=fabs(p1.y-p0.y); - double dist=-1.0; // sentinel value - if (p==p0) { - dist=0.0; - } else if (p==p1) { - if (dx>dy) - dist=dx; - else - dist=dy; - } else { - double pdx=fabs(p.x - p0.x); - double pdy=fabs(p.y - p0.y); - if (dx > dy) - dist = pdx; - else - dist = pdy; - // - // hack to ensure that non-endpoints always have a non-zero distance - if (dist == 0.0 && !(p==p0)) { - dist=max(pdx,pdy); - } - } - assert(!(dist == 0.0 && !(p==p0))); // Bad distance calculation - return dist; -} - -/*public*/ -void -LineIntersector::computeIntersection(const Coordinate& p1,const Coordinate& p2,const Coordinate& p3,const Coordinate& p4) -{ - inputLines[0][0]=&p1; - inputLines[0][1]=&p2; - inputLines[1][0]=&p3; - inputLines[1][1]=&p4; - result=computeIntersect(p1,p2,p3,p4); - //numIntersects++; -} - -/*public*/ -string -LineIntersector::toString() const -{ - string str=inputLines[0][0]->toString()+"_" - +inputLines[0][1]->toString()+" " - +inputLines[1][0]->toString()+"_" - +inputLines[1][1]->toString()+" : "; - if (isEndPoint()) { - str+=" endpoint"; - } - if (isProperVar) { - str+=" proper"; - } - if (isCollinear()) { - str+=" collinear"; - } - return str; -} - -/*public static*/ -bool -LineIntersector::isSameSignAndNonZero(double a,double b) -{ - if (a==0 || b==0) { - return false; - } - return (a<0 && b<0) || (a>0 && b>0); -} - -/*private*/ -void -LineIntersector::computeIntLineIndex() { - computeIntLineIndex(0); - computeIntLineIndex(1); -} - -/*public*/ -bool -LineIntersector::isIntersection(const Coordinate& pt) const -{ - for (int i=0;idist1) { - intLineIndex[segmentIndex][0]=0; - intLineIndex[segmentIndex][1]=1; - } else { - intLineIndex[segmentIndex][0]=1; - intLineIndex[segmentIndex][1]=0; - } -} - -/*public*/ -double -LineIntersector::getEdgeDistance(int segmentIndex,int intIndex) const -{ - double dist=computeEdgeDistance(intPt[intIndex], - *inputLines[segmentIndex][0], - *inputLines[segmentIndex][1]); - return dist; -} - -/*public*/ -bool -LineIntersector::isInteriorIntersection() -{ - if (isInteriorIntersection(0)) return true; - if (isInteriorIntersection(1)) return true; - return false; -} - -/*public*/ -bool -LineIntersector::isInteriorIntersection(int inputLineIndex) -{ - for (int i=0; i0 && Pq2>0) || (Pq1<0 && Pq2<0)) - { -#if GEOS_DEBUG - cerr<<" NO_INTERSECTION"<0 && Qp2>0)||(Qp1<0 && Qp2<0)) { -#if GEOS_DEBUG - cerr<<" NO_INTERSECTION"<makePrecise(intPt); - } - - -#if COMPUTE_Z - double ztot = 0; - double zvals = 0; - double zp = interpolateZ(intPt, p1, p2); - double zq = interpolateZ(intPt, q1, q2); - if ( !ISNAN(zp)) { ztot += zp; zvals++; } - if ( !ISNAN(zq)) { ztot += zq; zvals++; } - if ( zvals ) intPt.z = ztot/zvals; -#endif // COMPUTE_Z - -} - -/*private*/ -void -LineIntersector::intersectionWithNormalization(const Coordinate& p1, - const Coordinate& p2, const Coordinate& q1, const Coordinate& q2, - Coordinate &intPt) const -{ - Coordinate n1=p1; - Coordinate n2=p2; - Coordinate n3=q1; - Coordinate n4=q2; - Coordinate normPt; - normalizeToEnvCentre(n1, n2, n3, n4, normPt); - - safeHCoordinateIntersection(n1, n2, n3, n4, intPt); - - intPt.x += normPt.x; - intPt.y += normPt.y; -} - - -/*private*/ -double -LineIntersector::smallestInAbsValue(double x1,double x2,double x3,double x4) const -{ - double x=x1; - double xabs=fabs(x); - if(fabs(x2) n01.x ? n00.x : n01.x; - double maxY0 = n00.y > n01.y ? n00.y : n01.y; - - double minX1 = n10.x < n11.x ? n10.x : n11.x; - double minY1 = n10.y < n11.y ? n10.y : n11.y; - double maxX1 = n10.x > n11.x ? n10.x : n11.x; - double maxY1 = n10.y > n11.y ? n10.y : n11.y; - - double intMinX = minX0 > minX1 ? minX0 : minX1; - double intMaxX = maxX0 < maxX1 ? maxX0 : maxX1; - double intMinY = minY0 > minY1 ? minY0 : minY1; - double intMaxY = maxY0 < maxY1 ? maxY0 : maxY1; - - double intMidX = (intMinX + intMaxX) / 2.0; - double intMidY = (intMinY + intMaxY) / 2.0; - - normPt.x = intMidX; - normPt.y = intMidY; - - n00.x -= normPt.x; n00.y -= normPt.y; - n01.x -= normPt.x; n01.y -= normPt.y; - n10.x -= normPt.x; n10.y -= normPt.y; - n11.x -= normPt.x; n11.y -= normPt.y; - -#if COMPUTE_Z - double minZ0 = n00.z < n01.z ? n00.z : n01.z; - double minZ1 = n10.z < n11.z ? n10.z : n11.z; - double maxZ0 = n00.z > n01.z ? n00.z : n01.z; - double maxZ1 = n10.z > n11.z ? n10.z : n11.z; - double intMinZ = minZ0 > minZ1 ? minZ0 : minZ1; - double intMaxZ = maxZ0 < maxZ1 ? maxZ0 : maxZ1; - double intMidZ = (intMinZ + intMaxZ) / 2.0; - normPt.z = intMidZ; - n00.z -= normPt.z; - n01.z -= normPt.z; - n10.z -= normPt.z; - n11.z -= normPt.z; -#endif -} - -/*private*/ -void -LineIntersector::safeHCoordinateIntersection(const Coordinate& p1, - const Coordinate& p2, const Coordinate& q1, - const Coordinate& q2, Coordinate& intPt) const -{ - try { - HCoordinate::intersection(p1, p2, q1, q2, intPt); -#if GEOS_DEBUG - cerr<<" HCoordinate found intersection h:"< - * Copyright (C) 2005 Refractions Research Inc. - * Copyright (C) 2001-2002 Vivid Solutions Inc. - * - * 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. - * - ********************************************************************** - * - * Last port: operation/buffer/OffsetCurveSetBuilder.java r378 (JTS-1.12) - * - **********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#ifndef GEOS_DEBUG -#define GEOS_DEBUG 0 -#endif - -//using namespace geos::operation::overlay; -using namespace geos::geom; -using namespace geos::noding; // SegmentString -using namespace geos::geomgraph; // Label, Position -using namespace geos::algorithm; // CGAlgorithms - -namespace geos { -namespace operation { // geos.operation -namespace buffer { // geos.operation.buffer - -OffsetCurveSetBuilder::OffsetCurveSetBuilder(const Geometry& newInputGeom, - double newDistance, OffsetCurveBuilder& newCurveBuilder): - inputGeom(newInputGeom), - distance(newDistance), - curveBuilder(newCurveBuilder), - curveList() -{ -} - -OffsetCurveSetBuilder::~OffsetCurveSetBuilder() -{ - for (size_t i=0, n=curveList.size(); igetCoordinates(); - delete ss; - } - for (size_t i=0, n=newLabels.size(); i& -OffsetCurveSetBuilder::getCurves() -{ - add(inputGeom); - return curveList; -} - -/*public*/ -void -OffsetCurveSetBuilder::addCurves(const std::vector& lineList, - int leftLoc, int rightLoc) -{ - for (size_t i=0, n=lineList.size(); i(&g); - if ( poly ) { - addPolygon(poly); - return; - } - - const LineString *line = dynamic_cast(&g); - if ( line ) { - addLineString(line); - return; - } - - const Point *point = dynamic_cast(&g); - if ( point ) { - addPoint(point); - return; - } - - const GeometryCollection *collection = dynamic_cast(&g); - if ( collection ) { - addCollection(collection); - return; - } - - std::string out=typeid(g).name(); - throw util::UnsupportedOperationException("GeometryGraph::add(Geometry &): unknown geometry type: "+out); -} - -/*private*/ -void -OffsetCurveSetBuilder::addCollection(const GeometryCollection *gc) -{ - for (int i=0, n=gc->getNumGeometries(); igetGeometryN(i); - add(*g); - } -} - -/*private*/ -void -OffsetCurveSetBuilder::addPoint(const Point *p) -{ - if (distance <= 0.0) return; - const CoordinateSequence *coord=p->getCoordinatesRO(); - std::vector lineList; - curveBuilder.getLineCurve(coord, distance, lineList); - - addCurves(lineList, Location::EXTERIOR, Location::INTERIOR); - //delete lineList; -} - -/*private*/ -void -OffsetCurveSetBuilder::addLineString(const LineString *line) -{ - if (distance <= 0.0 && ! curveBuilder.getBufferParameters().isSingleSided()) - { - return; - } - -#if GEOS_DEBUG - std::cerr<<__FUNCTION__<<": "<toString()< coord(CoordinateSequence::removeRepeatedPoints(line->getCoordinatesRO())); -#if GEOS_DEBUG - std::cerr<<" After coordinate removal: "<toString()< lineList; - curveBuilder.getLineCurve(coord.get(), distance, lineList); - addCurves(lineList, Location::EXTERIOR, Location::INTERIOR); -} - -/*private*/ -void -OffsetCurveSetBuilder::addPolygon(const Polygon *p) -{ - double offsetDistance=distance; - - int offsetSide=Position::LEFT; - if (distance < 0.0) - { - offsetDistance = -distance; - offsetSide = Position::RIGHT; - } - - // FIXME: avoid the C-style cast - const LinearRing *shell=(const LinearRing *)p->getExteriorRing(); - - // optimization - don't bother computing buffer - // if the polygon would be completely eroded - if (distance < 0.0 && isErodedCompletely(shell, distance)) - { -#if GEOS_DEBUG - std::cerr<<__FUNCTION__<<": polygon is eroded completely "<getCoordinatesRO()); - if (distance <= 0.0 && shellCoord->size() < 3) - { - delete shellCoord; - return; - } - - addPolygonRing( - shellCoord, - offsetDistance, - offsetSide, - Location::EXTERIOR, - Location::INTERIOR); - - delete shellCoord; - - for (size_t i=0, n=p->getNumInteriorRing(); igetInteriorRingN(i); - assert(dynamic_cast(hls)); - const LinearRing *hole=static_cast(hls); - - // optimization - don't bother computing buffer for this hole - // if the hole would be completely covered - if (distance > 0.0 && isErodedCompletely(hole, -distance)) - { - continue; - } - - CoordinateSequence *holeCoord = - CoordinateSequence::removeRepeatedPoints(hole->getCoordinatesRO()); - - // Holes are topologically labelled opposite to the shell, - // since the interior of the polygon lies on their opposite - // side (on the left, if the hole is oriented CCW) - addPolygonRing( - holeCoord, - offsetDistance, - Position::opposite(offsetSide), - Location::INTERIOR, - Location::EXTERIOR); - - delete holeCoord; - } -} - -/* private */ -void -OffsetCurveSetBuilder::addPolygonRing(const CoordinateSequence *coord, - double offsetDistance, int side, int cwLeftLoc, int cwRightLoc) -{ - - // don't bother adding ring if it is "flat" and - // will disappear in the output - if (offsetDistance == 0.0 && coord->size() < LinearRing::MINIMUM_VALID_SIZE) - return; - - int leftLoc=cwLeftLoc; - int rightLoc=cwRightLoc; -#if GEOS_DEBUG - std::cerr<<"OffsetCurveSetBuilder::addPolygonRing: CCW: "<size() >= LinearRing::MINIMUM_VALID_SIZE - && CGAlgorithms::isCCW(coord)) - { - leftLoc=cwRightLoc; - rightLoc=cwLeftLoc; -#if GEOS_DEBUG - std::cerr<<" side "< lineList; - curveBuilder.getRingCurve(coord, side, offsetDistance, lineList); - addCurves(lineList, leftLoc, rightLoc); -} - -/*private*/ -bool -OffsetCurveSetBuilder::isErodedCompletely(const LinearRing *ring, - double bufferDistance) -{ - const CoordinateSequence *ringCoord = ring->getCoordinatesRO(); - - // degenerate ring has no area - if (ringCoord->getSize() < 4) - return bufferDistance < 0; - - // important test to eliminate inverted triangle bug - // also optimizes erosion test for triangles - if (ringCoord->getSize() == 4) - return isTriangleErodedCompletely(ringCoord, bufferDistance); - - const Envelope* env = ring->getEnvelopeInternal(); - double envMinDimension = std::min(env->getHeight(), env->getWidth()); - if (bufferDistance < 0.0 && 2 * std::abs(bufferDistance) > envMinDimension) - return true; - - /** - * The following is a heuristic test to determine whether an - * inside buffer will be eroded completely-> - * It is based on the fact that the minimum diameter of the ring - * pointset - * provides an upper bound on the buffer distance which would erode the - * ring-> - * If the buffer distance is less than the minimum diameter, the ring - * may still be eroded, but this will be determined by - * a full topological computation-> - * - */ - -/* MD 7 Feb 2005 - there's an unknown bug in the MD code, - so disable this for now */ -#if 0 - MinimumDiameter md(ring); //=new MinimumDiameter(ring); - double minDiam = md.getLength(); - return minDiam < (2 * std::fabs(bufferDistance)); -#endif - - return false; -} - -/*private*/ -bool -OffsetCurveSetBuilder::isTriangleErodedCompletely( - const CoordinateSequence *triangleCoord, double bufferDistance) -{ - Triangle tri(triangleCoord->getAt(0), triangleCoord->getAt(1), triangleCoord->getAt(2)); - - Coordinate inCentre; - tri.inCentre(inCentre); - double distToCentre=CGAlgorithms::distancePointLine(inCentre, tri.p0, tri.p1); - bool ret = distToCentre < std::fabs(bufferDistance); - return ret; -} - - -} // namespace geos.operation.buffer -} // namespace geos.operation -} // namespace geos - -/********************************************************************** - * $Log$ - * Revision 1.36 2006/06/12 11:29:23 strk - * unsigned int => size_t - * - * Revision 1.35 2006/06/09 07:42:13 strk - * * source/geomgraph/GeometryGraph.cpp, source/operation/buffer/OffsetCurveSetBuilder.cpp, source/operation/overlay/OverlayOp.cpp, source/operation/valid/RepeatedPointTester.cpp: Fixed warning after Polygon ring accessor methods changed to work with size_t. Small optimizations in loops. - * - * Revision 1.34 2006/05/03 09:14:22 strk - * * source/operation/buffer/OffsetCurveSetBuilder.cpp: used auto_ptr to protect leaks of CoordinateSequence - * * source/noding/ScaledNoder.cpp, source/headers/geos/noding/ScaledNoder.h: ported JTS bugfix in scale method. - * - * Revision 1.33 2006/03/27 17:04:18 strk - * Cleanups and explicit initializations - * - * Revision 1.32 2006/03/22 11:18:39 strk - * Changed back 'unable to find edge to compute depths' from assertion to TopologyException - * - **********************************************************************/ diff --git a/Patches/GEOS/Patch.cmake b/Patches/GEOS/Patch.cmake old mode 100755 new mode 100644 index d892aa0e..ea8f146a --- a/Patches/GEOS/Patch.cmake +++ b/Patches/GEOS/Patch.cmake @@ -6,27 +6,6 @@ #- message("Patching geos") -# Fix the version number to not contain "dev" and add a SOVERSION -# for the public C API -#file(COPY ${GEOS_patch}/CMakeLists.txt DESTINATION ${GEOS_source}) - -# Fix ambiguous call to std::log(int) for VS2010 -#file(COPY ${GEOS_patch}/BufferOp.cpp DESTINATION ${GEOS_source}/src/operation/buffer) - -# Create a geos-config for installation to support pkgconfig builds -#file(COPY ${GEOS_patch}/geos-config.in DESTINATION ${GEOS_source}/cmake) - -#file(COPY ${GEOS_patch}/Info.plist.in DESTINATION ${GEOS_source}/src) -# Fix the horribly broken capi/CMakeLists.txt in GEOG 3.3.2 by using the one -# from GEOS 3.4.2. -file(COPY ${GEOS_patch}/capi/CMakeLists.txt DESTINATION ${GEOS_source}/capi) - -#file(COPY ${GEOS_patch}/LineIntersector.cpp DESTINATION ${GEOS_source}/src/algorithm) -#file(COPY ${GEOS_patch}/WKTWriter.cpp DESTINATION ${GEOS_source}/src/io) -#file(COPY ${GEOS_patch}/OffsetCurveSetBuilder.cpp DESTINATION ${GEOS_source}/src/operation/buffer) - -file(COPY - ${GEOS_patch}/GenerateSourceGroups.cmake - DESTINATION - ${GEOS_source}/cmake/modules/ - ) +# This patch removes the GEOS doc directory +# since it references tests which are disabled +file(COPY ${GEOS_patch}/CMakeLists.txt DESTINATION ${GEOS_source}/) diff --git a/Patches/GEOS/WKTWriter.cpp b/Patches/GEOS/WKTWriter.cpp deleted file mode 100644 index 0052c5a7..00000000 --- a/Patches/GEOS/WKTWriter.cpp +++ /dev/null @@ -1,492 +0,0 @@ -/********************************************************************** - * $Id: WKTWriter.cpp 3766 2013-02-21 10:25:43Z strk $ - * - * GEOS - Geometry Engine Open Source - * http://geos.refractions.net - * - * Copyright (C) 2011 Sandro Santilli - * Copyright (C) 2005-2006 Refractions Research Inc. - * Copyright (C) 2001-2002 Vivid Solutions Inc. - * - * 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. - * - ********************************************************************** - * - * Last port: io/WKTWriter.java rev. 1.34 (JTS-1.7) - * - **********************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include // should avoid this -#include -#include -#include -#include -#include -#include - -using namespace std; -using namespace geos::geom; - -namespace geos { -namespace io { // geos.io - -WKTWriter::WKTWriter(): - decimalPlaces(6), - isFormatted(false), - roundingPrecision(-1), - trim(false), - level(0), - defaultOutputDimension(2), - old3D(false) -{ -} - -/* public */ -void -WKTWriter::setOutputDimension(int dims) -{ - if ( dims < 2 || dims > 3 ) - throw util::IllegalArgumentException("WKT output dimension must be 2 or 3"); - defaultOutputDimension = dims; -} - -WKTWriter::~WKTWriter() {} - -/*static*/ -string -WKTWriter::toLineString(const CoordinateSequence& seq) -{ - stringstream buf(ios_base::in|ios_base::out); - buf << "LINESTRING "; - unsigned int npts = seq.getSize(); - if ( npts == 0 ) - { - buf << "EMPTY"; - } - else - { - buf << "("; - for (unsigned int i=0; iisFormatted=isFormatted; - decimalPlaces = roundingPrecision == -1 ? geometry->getPrecisionModel()->getMaximumSignificantDigits() : roundingPrecision; - appendGeometryTaggedText(geometry, 0, writer); -} - -void -WKTWriter::appendGeometryTaggedText(const Geometry *geometry, int level, - Writer *writer) -{ - outputDimension = min( defaultOutputDimension, - geometry->getCoordinateDimension() ); - - indent(level, writer); - if ( const Point* point = dynamic_cast(geometry) ) - { - appendPointTaggedText(point->getCoordinate(),level,writer); - } - else if ( const LinearRing* lr = - dynamic_cast(geometry) ) - { - appendLinearRingTaggedText(lr, level, writer); - } - else if ( const LineString* ls = - dynamic_cast(geometry) ) - { - appendLineStringTaggedText(ls, level, writer); - } - else if ( const Polygon* x = - dynamic_cast(geometry) ) - { - appendPolygonTaggedText(x, level, writer); - } - else if ( const MultiPoint* x = - dynamic_cast(geometry) ) - { - appendMultiPointTaggedText(x, level, writer); - } - else if ( const MultiLineString* x = - dynamic_cast(geometry) ) - { - appendMultiLineStringTaggedText(x, level, writer); - } - else if ( const MultiPolygon* x = - dynamic_cast(geometry) ) - { - appendMultiPolygonTaggedText(x, level, writer); - } - else if ( const GeometryCollection* x = - dynamic_cast(geometry) ) - { - appendGeometryCollectionTaggedText(x, level, writer); - } - else - { - assert(0); // Unsupported Geometry implementation - } -} - -/*protected*/ -void -WKTWriter::appendPointTaggedText(const Coordinate* coordinate, int level, - Writer *writer) -{ - writer->write("POINT "); - if( outputDimension == 3 && !old3D && coordinate != NULL ) - writer->write( "Z " ); - - appendPointText(coordinate, level, writer); -} - -void -WKTWriter::appendLineStringTaggedText(const LineString *lineString, int level, - Writer *writer) -{ - writer->write("LINESTRING "); - if( outputDimension == 3 && !old3D && !lineString->isEmpty() ) - writer->write( "Z " ); - - appendLineStringText(lineString, level, false, writer); -} - -/* - * Converts a LinearRing to <LinearRing Tagged Text> - * format, then appends it to the writer. - * - * @param linearRing the LinearRing to process - * @param writer the output writer to append to - */ -void WKTWriter::appendLinearRingTaggedText(const LinearRing* linearRing, int level, Writer *writer) { - writer->write("LINEARRING "); - if( outputDimension == 3 && !old3D && !linearRing->isEmpty() ) - writer->write( "Z " ); - appendLineStringText((LineString*)linearRing, level, false, writer); -} - -void WKTWriter::appendPolygonTaggedText(const Polygon *polygon, int level, Writer *writer) { - writer->write("POLYGON "); - if( outputDimension == 3 && !old3D && !polygon->isEmpty()) - writer->write( "Z " ); - appendPolygonText(polygon, level, false, writer); -} - -void WKTWriter::appendMultiPointTaggedText(const MultiPoint *multipoint, int level, Writer *writer) { - writer->write("MULTIPOINT "); - if( outputDimension == 3 && !old3D && !multipoint->isEmpty() ) - writer->write( "Z " ); - appendMultiPointText(multipoint, level, writer); -} - -void WKTWriter::appendMultiLineStringTaggedText(const MultiLineString *multiLineString, int level,Writer *writer) { - writer->write("MULTILINESTRING "); - if( outputDimension == 3 && !old3D && !multiLineString->isEmpty() ) - writer->write( "Z " ); - appendMultiLineStringText(multiLineString, level, false, writer); -} - -void WKTWriter::appendMultiPolygonTaggedText(const MultiPolygon *multiPolygon, int level, Writer *writer) { - writer->write("MULTIPOLYGON "); - if( outputDimension == 3 && !old3D && !multiPolygon->isEmpty() ) - writer->write( "Z " ); - appendMultiPolygonText(multiPolygon, level, writer); -} - -void WKTWriter::appendGeometryCollectionTaggedText(const GeometryCollection *geometryCollection, int level,Writer *writer) { - writer->write("GEOMETRYCOLLECTION "); - if( outputDimension == 3 && !old3D && !geometryCollection->isEmpty() ) - writer->write( "Z " ); - appendGeometryCollectionText(geometryCollection, level, writer); -} - -void -WKTWriter::appendPointText(const Coordinate* coordinate, int /*level*/, - Writer *writer) -{ - if (coordinate==NULL) { - writer->write("EMPTY"); - } else { - writer->write("("); - appendCoordinate(coordinate, writer); - writer->write(")"); - } -} - -/* protected */ -void -WKTWriter::appendCoordinate(const Coordinate* coordinate, - Writer *writer) -{ - writer->write(writeNumber(coordinate->x)); - writer->write(" "); - writer->write(writeNumber(coordinate->y)); - if( outputDimension == 3 ) - { - writer->write(" "); - if( ISNAN(coordinate->z) ) - writer->write(writeNumber(0.0)); - else - writer->write(writeNumber(coordinate->z)); - } -} - -/* protected */ -string -WKTWriter::writeNumber(double d) { - - std::stringstream ss; - - if ( ! trim ) ss << std::fixed; - ss << std::setprecision(decimalPlaces >= 0 ? decimalPlaces : 0) << d; - - return ss.str(); -} - -void -WKTWriter::appendLineStringText(const LineString *lineString, int level, - bool doIndent, Writer *writer) -{ - if (lineString->isEmpty()) { - writer->write("EMPTY"); - } else { - if (doIndent) indent(level, writer); - writer->write("("); - for(size_t i=0, n=lineString->getNumPoints(); i0) { - writer->write(", "); - if (i%10==0) indent(level + 2, writer); - } - appendCoordinate(&(lineString->getCoordinateN(i)), writer); - } - writer->write(")"); - } -} - -void -WKTWriter::appendPolygonText(const Polygon *polygon, int /*level*/, - bool indentFirst, Writer *writer) -{ - if (polygon->isEmpty()) { - writer->write("EMPTY"); - } else { - if (indentFirst) indent(level, writer); - writer->write("("); - appendLineStringText(polygon->getExteriorRing(), level, false, writer); - for (size_t i=0, n=polygon->getNumInteriorRing(); iwrite(", "); - const LineString *ls=polygon->getInteriorRingN(i); - appendLineStringText(ls, level + 1, true, writer); - } - writer->write(")"); - } -} - -void -WKTWriter::appendMultiPointText(const MultiPoint *multiPoint, - int /*level*/, Writer *writer) -{ - if (multiPoint->isEmpty()) { - writer->write("EMPTY"); - } else { - writer->write("("); - for (unsigned int i=0, n=multiPoint->getNumGeometries(); - i 0) - { - writer->write(", "); - } - appendCoordinate( - dynamic_cast(multiPoint->getGeometryN(i))->getCoordinate(), - writer); - } - writer->write(")"); - } -} - -void WKTWriter::appendMultiLineStringText(const MultiLineString *multiLineString, int level, bool indentFirst, - Writer *writer) { - if (multiLineString->isEmpty()) { - writer->write("EMPTY"); - } else { - int level2=level; - bool doIndent=indentFirst; - writer->write("("); - for (unsigned int i=0, n=multiLineString->getNumGeometries(); - i0) { - writer->write(", "); - level2=level+1; - doIndent=true; - } - const LineString* ls = dynamic_cast( - multiLineString->getGeometryN(i) - ); - appendLineStringText(ls, level2, doIndent, writer); - } - writer->write(")"); - } -} - -void WKTWriter::appendMultiPolygonText(const MultiPolygon *multiPolygon, int level, Writer *writer) { - if (multiPolygon->isEmpty()) { - writer->write("EMPTY"); - } else { - int level2=level; - bool doIndent=false; - writer->write("("); - for (unsigned int i=0, n=multiPolygon->getNumGeometries(); - i < n; i++) - { - if (i>0) { - writer->write(", "); - level2=level+1; - doIndent=true; - } - const Polygon *p = dynamic_cast( - multiPolygon->getGeometryN(i) - ); - appendPolygonText(p, level2, doIndent, writer); - } - writer->write(")"); - } -} - -void -WKTWriter::appendGeometryCollectionText( - const GeometryCollection *geometryCollection, - int level, - Writer *writer) -{ - if (geometryCollection->isEmpty()) { - writer->write("EMPTY"); - } else { - int level2=level; - writer->write("("); - for (unsigned int i=0, n=geometryCollection->getNumGeometries(); - i < n ; ++i) - { - if (i>0) { - writer->write(", "); - level2=level+1; - } - appendGeometryTaggedText(geometryCollection->getGeometryN(i),level2,writer); - } - writer->write(")"); - } -} - -void WKTWriter::indent(int level, Writer *writer) { - if (!isFormatted || level<=0) return; - writer->write("\n"); - writer->write(string(INDENT * level, ' ')); -} - -} // namespace geos.io -} // namespace geos diff --git a/Patches/GEOS/capi/CMakeLists.txt b/Patches/GEOS/capi/CMakeLists.txt deleted file mode 100644 index a6e1869b..00000000 --- a/Patches/GEOS/capi/CMakeLists.txt +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################# -# -# GEOS C library build configuration for CMake build system -# -# Copyright (C) 2009 Mateusz Loskot -# -# 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. -# -################################################################################# - -if(WIN32) - add_definitions("-DGEOS_DLL_EXPORT=1") -endif() - -set(geos_c_SOURCES - geos_c.cpp - geos_ts_c.cpp) - -file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group issue - -if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK) - # if building OS X framework, CAPI built into C++ library - add_library(geos_c SHARED ${geos_c_SOURCES}) - - target_link_libraries(geos_c geos-static) - - if (WIN32) - set_target_properties(geos_c - PROPERTIES - VERSION ${CAPI_VERSION} - CLEAN_DIRECT_OUTPUT 1) - else() - set_target_properties(geos_c - PROPERTIES - VERSION ${CAPI_VERSION} - SOVERSION ${CAPI_SOVERSION} - CLEAN_DIRECT_OUTPUT 1) - endif() - -endif() - -################################################################################# -# Installation -################################################################################# - -if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos_c.h - DESTINATION GEOS.framework/Versions/${VERSION_MAJOR}/Headers) - install(CODE "execute_process(COMMAND sed -E -i \"\" \"s,# *include[[:space:]]+ header file. */ +/* #undef HAVE_CRYPT_H */ + +/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you + don't. */ +#define HAVE_DECL_FDATASYNC 0 + +/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you + don't. */ +#define HAVE_DECL_F_FULLFSYNC 0 + +/* Define to 1 if you have the declaration of + `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */ +#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER + +/* Define to 1 if you have the declaration of + `LLVMCreatePerfJITEventListener', and to 0 if you don't. */ +#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER + +/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0 + if you don't. */ +#define HAVE_DECL_LLVMGETHOSTCPUNAME 0 + +/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to 0 + if you don't. */ +#define HAVE_DECL_LLVMGETHOSTCPUFEATURES 0 + +/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and + to 0 if you don't. */ +#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN 0 + +/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you + don't. */ +#define HAVE_DECL_RTLD_GLOBAL 0 + +/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you + don't. */ +#define HAVE_DECL_RTLD_NOW 0 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the `strtof' function. */ +#define HAVE_STRTOF 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOLL 1 + +/* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOULL 1 + +/* Define to 1 if you have the `dlopen' function. */ +/* #undef HAVE_DLOPEN */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_EDITLINE_HISTORY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_EDITLINE_READLINE_H */ + +/* Define to 1 if you have the `fcvt' function. */ +#define HAVE_FCVT 1 + +/* Define to 1 if you have the `fdatasync' function. */ +/* #undef HAVE_FDATASYNC */ + +/* Define to 1 if you have finite(). */ +#define HAVE_FINITE 1 + +/* Define to 1 if you have the `fpclass' function. */ +/* #undef HAVE_FPCLASS */ + +/* Define to 1 if you have the `fp_class' function. */ +/* #undef HAVE_FP_CLASS */ + +/* Define to 1 if you have the `fp_class_d' function. */ +/* #undef HAVE_FP_CLASS_D */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FP_CLASS_H */ + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#define HAVE_FSEEKO 1 + +/* Define to 1 if your compiler understands __func__. */ +//#define HAVE_FUNCNAME__FUNC 1 + +/* Define to 1 if your compiler understands __FUNCTION__. */ +#define HAVE_FUNCNAME__FUNCTION 1 + +/* Define to 1 if you have getaddrinfo(). */ +/* #undef HAVE_GETADDRINFO */ + +/* Define to 1 if you have the `gethostbyname_r' function. */ +/* #undef HAVE_GETHOSTBYNAME_R */ + +/* Define to 1 if you have the `getopt' function. */ +//#define HAVE_GETOPT 1 + +/* Define to 1 if you have the header file. */ +//#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ +//#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `getpeereid' function. */ +/* #undef HAVE_GETPEEREID */ + +/* Define to 1 if you have the `getpwuid_r' function. */ +/* #undef HAVE_GETPWUID_R */ + +/* Define to 1 if you have the `getrusage' function. */ +/* #undef HAVE_GETRUSAGE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_HISTORY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IEEEFP_H */ + +/* Define to 1 if you have the `inet_aton' function. */ +/* #undef HAVE_INET_ATON */ + +/* Define to 1 if the system has the type `int64'. */ +/* #undef HAVE_INT64 */ + +/* Define to 1 if the system has the type `int8'. */ +/* #undef HAVE_INT8 */ + +/* Define to 1 if you have the header file. */ +//#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the global variable 'int timezone'. */ +#define HAVE_INT_TIMEZONE 1 + +/* Define to 1 if you have support for IPv6. */ +#define HAVE_IPV6 1 + +/* Define to 1 if you have isinf(). */ +#define HAVE_ISINF 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LANGINFO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LDAP_H */ + +/* Define to 1 if you have the `ldap_initialize' function. */ +/* #undef HAVE_LDAP_INITIALIZE */ + +/* Define to 1 if you have the `crypto' library (-lcrypto). */ +/* #undef HAVE_LIBCRYPTO */ + +/* Define to 1 if you have the `ldap' library (-lldap). */ +/* #undef HAVE_LIBLDAP */ + +/* Define to 1 if you have the `pam' library (-lpam). */ +/* #undef HAVE_LIBPAM */ + +/* Define if you have a function readline library */ +/* #undef HAVE_LIBREADLINE */ + +/* Define to 1 if you have the `ssl' library (-lssl). */ +/* #undef HAVE_LIBSSL */ + +/* Define to 1 if you have the `wldap32' library (-lwldap32). */ +/* #undef HAVE_LIBWLDAP32 */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #undef HAVE_LIBZ */ + +/* Define to 1 if the system has the type `locale_t'. */ +#define HAVE_LOCALE_T 1 + +/* Define to 1 if `long int' works and is 64 bits. */ +/* #undef HAVE_LONG_INT_64 */ + +/* Define to 1 if the system has the type `long long int'. */ +#if (_MSC_VER > 1200) +#define HAVE_LONG_LONG_INT 1 +#endif + +/* Define to 1 if `long long int' works and is 64 bits. */ +#if (_MSC_VER > 1200) +#define HAVE_LONG_LONG_INT_64 1 +#endif + +/* Define to 1 if you have the `mbstowcs_l' function. */ +#define HAVE_MBSTOWCS_L 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */ +#define HAVE_MINIDUMP_TYPE 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +/* #undef HAVE_MKDTEMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_TCP_H */ + +/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ +/* #undef HAVE_OPENSSL_INIT_SSL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PAM_PAM_APPL_H */ + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `poll' function. */ +/* #undef HAVE_POLL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_POLL_H */ + +/* Define to 1 if you have the `posix_fallocate' function. */ +/* #undef HAVE_POSIX_FALLOCATE */ + +/* Define to 1 if you have the `ppoll' function. */ +/* #undef HAVE_PPOLL */ + +/* Define to 1 if you have the `pread' function. */ +/* #undef HAVE_PREAD */ + +/* Define to 1 if you have the `pstat' function. */ +/* #undef HAVE_PSTAT */ + +/* Define to 1 if the PS_STRINGS thing exists. */ +/* #undef HAVE_PS_STRINGS */ + +/* Define to 1 if you have the `pwrite' function. */ +/* #undef HAVE_PWRITE */ + +/* Define to 1 if you have the `random' function. */ +/* #undef HAVE_RANDOM */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_HISTORY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_READLINE_H */ + +/* Define to 1 if you have the `readlink' function. */ +/* #undef HAVE_READLINK */ + +/* Define to 1 if you have the `rint' function. */ +#if (_MSC_VER >= 1800) +#define HAVE_RINT 1 +#endif + + +/* Define to 1 if you have the global variable + 'rl_completion_append_character'. */ +/* #undef HAVE_RL_COMPLETION_APPEND_CHARACTER */ + +/* Define to 1 if you have the `rl_completion_matches' function. */ +/* #undef HAVE_RL_COMPLETION_MATCHES */ + +/* Define to 1 if you have the `rl_filename_completion_function' function. */ +/* #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SECURITY_PAM_APPL_H */ + +/* Define to 1 if you have the `setproctitle' function. */ +/* #undef HAVE_SETPROCTITLE */ + +/* Define to 1 if you have the `setsid' function. */ +/* #undef HAVE_SETSID */ + +/* Define to 1 if you have spinlocks. */ +#define HAVE_SPINLOCKS 1 + +/* Define to 1 if you have atomics. */ +#define HAVE_ATOMICS 1 + +/* Define to 1 if you have the `srandom' function. */ +/* #undef HAVE_SRANDOM */ + +/* Define to 1 if you have the `SSL_clear_options' function. */ +#define HAVE_SSL_CLEAR_OPTIONS 1 + +/* Define to 1 if you have the `SSL_get_current_compression' function. */ +#define HAVE_SSL_GET_CURRENT_COMPRESSION 1 + +/* Define to 1 if stdbool.h conforms to C99. */ +#if (_MSC_VER >= 1800) +#define HAVE_STDBOOL_H 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDINT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchrnul' function. */ +/* #undef HAVE_STRCHRNUL */ + +/* Define to 1 if you have the `strerror_r' function. */ +/* #undef HAVE_STRERROR_R */ + +/* Define to 1 if you have the header file. */ +/*#define HAVE_STRINGS_H 1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strsignal' function. */ +/* #undef HAVE_STRSIGNAL */ + +/* Define to 1 if you have the `strtoll' function. */ +#ifdef HAVE_LONG_LONG_INT_64 +#define HAVE_STRTOLL 1 +/* Before VS2013, use Microsoft's nonstandard equivalent function */ +#if (_MSC_VER < 1800) +#define strtoll _strtoi64 +#endif +#endif + +/* Define to 1 if you have the `strtoull' function. */ +#ifdef HAVE_LONG_LONG_INT_64 +#define HAVE_STRTOULL 1 +/* Before VS2013, use Microsoft's nonstandard equivalent function */ +#if (_MSC_VER < 1800) +#define strtoull _strtoui64 +#endif +#endif + +/* Define to 1 if the system has the type `struct addrinfo'. */ +#if (_MSC_VER > 1200) +#define HAVE_STRUCT_ADDRINFO 1 +#endif + +/* Define to 1 if the system has the type `struct cmsgcred'. */ +/* #undef HAVE_STRUCT_CMSGCRED */ + +/* Define to 1 if the system has the type `struct option'. */ +//#define HAVE_STRUCT_OPTION 1 + +/* Define to 1 if `sa_len' is member of `struct sockaddr'. */ +/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#if (_MSC_VER > 1200) +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#endif + +/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ +#if (_MSC_VER > 1200) +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +#endif + +/* Define to 1 if `ss_len' is member of `struct sockaddr_storage'. */ +/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */ + +/* Define to 1 if `__ss_family' is member of `struct sockaddr_storage'. */ +/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ + +/* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */ +/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */ + +/* Define to 1 if the system has the type `struct sockaddr_un'. */ +/* #undef HAVE_STRUCT_SOCKADDR_UN */ + +/* Define to 1 if `tm_zone' is member of `struct tm'. */ +/* #undef HAVE_STRUCT_TM_TM_ZONE */ + +/* Define to 1 if you have the `symlink' function. */ +#define HAVE_SYMLINK 1 + +/* Define to 1 if you have the `sync_file_range' function. */ +/* #undef HAVE_SYNC_FILE_RANGE */ + +/* Define to 1 if you have the `sysconf' function. */ +/* #undef HAVE_SYSCONF */ + +/* Define to 1 if you have the syslog interface. */ +/* #undef HAVE_SYSLOG */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_IPC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PRCTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PSTAT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SELECT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SEM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SHM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_UCRED_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_UN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_TERMIOS_H */ + +/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ +/* #undef HAVE_TM_ZONE */ + +/* Define to 1 if your compiler understands `typeof' or something similar. */ +/* #undef HAVE_TYPEOF */ + +/* Define to 1 if you have the external array `tzname'. */ +/* #undef HAVE_TZNAME */ + +/* Define to 1 if the system has the type `uint64'. */ +/* #undef HAVE_UINT64 */ + +/* Define to 1 if the system has the type `uint8'. */ +/* #undef HAVE_UINT8 */ + +/* Define to 1 if the system has the type `union semun'. */ +/* #undef HAVE_UNION_SEMUN */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have unix sockets. */ +/* #undef HAVE_UNIX_SOCKETS */ + +/* Define to 1 if you have the `unsetenv' function. */ +/* #undef HAVE_UNSETENV */ + +/* Define to 1 if you have the `uselocale' function. */ +/* #undef HAVE_USELOCALE */ + +/* Define to 1 if you have the `utime' function. */ +#define HAVE_UTIME 1 + +/* Define to 1 if you have the `utimes' function. */ +/* #undef HAVE_UTIMES */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the `wcstombs_l' function. */ +#define HAVE_WCSTOMBS_L 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINLDAP_H */ + +/* Define to 1 if you have the `X509_get_signature_nid' function. */ +#define HAVE_X509_GET_SIGNATURE_NID 1 + +/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */ +/* #undef HAVE_X86_64_POPCNTQ */ + +/* Define to 1 if the system has the type `_Bool'. */ +/* #undef HAVE__BOOL */ + +/* Define to 1 if your compiler understands __builtin_bswap16. */ +/* #undef HAVE__BUILTIN_BSWAP16 */ + +/* Define to 1 if your compiler understands __builtin_bswap32. */ +/* #undef HAVE__BUILTIN_BSWAP32 */ + +/* Define to 1 if your compiler understands __builtin_bswap64. */ +/* #undef HAVE__BUILTIN_BSWAP64 */ + +/* Define to 1 if your compiler understands __builtin_clz. */ +/* #undef HAVE__BUILTIN_CLZ */ + +/* Define to 1 if your compiler understands __builtin_constant_p. */ +/* #undef HAVE__BUILTIN_CONSTANT_P */ + +/* Define to 1 if your compiler understands __builtin_ctz. */ +/* #undef HAVE__BUILTIN_CTZ */ + +/* Define to 1 if your compiler understands __builtin_$op_overflow. */ +/* #undef HAVE__BUILTIN_OP_OVERFLOW */ + +/* Define to 1 if your compiler understands __builtin_popcount. */ +/* #undef HAVE__BUILTIN_POPCOUNT */ + +/* Define to 1 if your compiler understands __builtin_types_compatible_p. */ +/* #undef HAVE__BUILTIN_TYPES_COMPATIBLE_P */ + +/* Define to 1 if your compiler understands __builtin_unreachable. */ +/* #undef HAVE__BUILTIN_UNREACHABLE */ + +/* Define to 1 if you have the `_configthreadlocale' function. */ +#define HAVE__CONFIGTHREADLOCALE 1 + +/* Define to 1 if you have __cpuid. */ +#define HAVE__CPUID 1 + +/* Define to 1 if you have __get_cpuid. */ +#undef HAVE__GET_CPUID + +/* Define to 1 if your compiler understands _Static_assert. */ +/* #undef HAVE__STATIC_ASSERT */ + +/* Define to the appropriate printf length modifier for 64-bit ints. */ +#define INT64_MODIFIER "ll" + +/* Define to 1 if `locale_t' requires . */ +/* #undef LOCALE_T_IN_XLOCALE */ + +/* Define to the location of locale files. */ +/* #undef LOCALEDIR */ + +/* Define as the maximum alignment requirement of any C data type. */ +#define MAXIMUM_ALIGNOF 8 + +/* Define bytes to use libc memset(). */ +#define MEMSET_LOOP_LIMIT 1024 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "PostgreSQL" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "PostgreSQL 12.3" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "12.3" + +/* Define to the name of a signed 128-bit integer type. */ +#undef PG_INT128_TYPE + +/* Define to the name of a signed 64-bit integer type. */ +#define PG_INT64_TYPE long long int + +/* PostgreSQL version as a string */ +#define PG_VERSION "12.3" + +/* PostgreSQL version as a number */ +#define PG_VERSION_NUM 120003 + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "postgresql" + +/* Define to the name of the default PostgreSQL service principal in Kerberos. + (--with-krb-srvnam=NAME) */ +#define PG_KRB_SRVNAM "postgres" + +/* A string containing the version number, platform, and C compiler */ +#define PG_VERSION_STR "Uninitialized version string (win32)" + +/* The size of `bool', as computed by sizeof. */ +#define SIZEOF_BOOL 1 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `size_t', as computed by sizeof. */ +#ifndef _WIN64 +#define SIZEOF_SIZE_T 4 +#else +#define SIZEOF_SIZE_T 8 +#endif + +/* The size of `void *', as computed by sizeof. */ +#ifndef _WIN64 +#define SIZEOF_VOID_P 4 +#else +#define SIZEOF_VOID_P 8 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r() returns int. */ +/* #undef STRERROR_R_INT */ + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Define to 1 to build with assertion checks. (--enable-cassert) */ +/* #undef USE_ASSERT_CHECKING */ + +/* Define to 1 to build with Bonjour support. (--with-bonjour) */ +/* #undef USE_BONJOUR */ + +/* Define to 1 to build with BSD Authentication support. (--with-bsd-auth) */ +/* #undef USE_BSD_AUTH */ + +/* Define to use /dev/urandom for random number generation */ +/* #undef USE_DEV_URANDOM */ + +/* Define to 1 to build with LDAP support. (--with-ldap) */ +/* #undef USE_LDAP */ + +/* Define to 1 to build with LLVM based JIT support. (--with-llvm) */ +/* #undef USE_LLVM */ + +/* Define to select named POSIX semaphores. */ +/* #undef USE_NAMED_POSIX_SEMAPHORES */ + +/* Define to build with OpenSSL support. (--with-openssl) */ +/* #undef USE_OPENSSL */ + +/* Define to use OpenSSL for random number generation */ +/* #undef USE_OPENSSL_RANDOM */ + +/* Define to 1 to build with PAM support. (--with-pam) */ +/* #undef USE_PAM */ + +/* Define to 1 to use software CRC-32C implementation (slicing-by-8). */ +#if (_MSC_VER < 1500) +#define USE_SLICING_BY_8_CRC32C 1 +#endif + +/* Define to 1 use Intel SSE 4.2 CRC instructions. */ +/* #undef USE_SSE42_CRC32C */ + +/* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */ +#if (_MSC_VER >= 1500) +#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK +#endif + +/* Define to select SysV-style semaphores. */ +/* #undef USE_SYSV_SEMAPHORES */ + +/* Define to select SysV-style shared memory. */ +#define USE_SYSV_SHARED_MEMORY 1 + +/* Define to select unnamed POSIX semaphores. */ +/* #undef USE_UNNAMED_POSIX_SEMAPHORES */ + +/* Define to use native Windows API for random number generation */ +#define USE_WIN32_RANDOM 1 + +/* Define to select Win32-style semaphores. */ +#define USE_WIN32_SEMAPHORES 1 + +/* Define to 1 if `wcstombs_l' requires . */ +/* #undef WCSTOMBS_L_IN_XLOCALE */ + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* #undef _LARGEFILE_SOURCE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#define inline __inline +#endif + +/* Define to keyword to use for C99 restrict support, or to nothing if this is + not supported */ +/* Works for C and C++ in Visual Studio 2008 and upwards */ +#if (_MSC_VER >= 1500) +#define pg_restrict __restrict +#else +#define pg_restrict +#endif + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +/* not defined, because it'd conflict with __declspec(restrict) */ + +/* Define to empty if the C compiler does not understand signed types. */ +/* #undef signed */ + +/* Define to how the compiler spells `typeof'. */ +/* #undef typeof */ diff --git a/Patches/PostgreSQL/CMakeLists.txt b/Patches/PostgreSQL/9.5.1/CMakeLists.txt similarity index 100% rename from Patches/PostgreSQL/CMakeLists.txt rename to Patches/PostgreSQL/9.5.1/CMakeLists.txt diff --git a/Patches/PostgreSQL/Patch.cmake b/Patches/PostgreSQL/9.5.1/Patch.cmake similarity index 100% rename from Patches/PostgreSQL/Patch.cmake rename to Patches/PostgreSQL/9.5.1/Patch.cmake diff --git a/Patches/PostgreSQL/chklocale.c b/Patches/PostgreSQL/9.5.1/chklocale.c similarity index 100% rename from Patches/PostgreSQL/chklocale.c rename to Patches/PostgreSQL/9.5.1/chklocale.c diff --git a/Patches/PostgreSQL/cube/.gitignore b/Patches/PostgreSQL/9.5.1/cube/.gitignore similarity index 100% rename from Patches/PostgreSQL/cube/.gitignore rename to Patches/PostgreSQL/9.5.1/cube/.gitignore diff --git a/Patches/PostgreSQL/cube/CHANGES b/Patches/PostgreSQL/9.5.1/cube/CHANGES similarity index 100% rename from Patches/PostgreSQL/cube/CHANGES rename to Patches/PostgreSQL/9.5.1/cube/CHANGES diff --git a/Patches/PostgreSQL/cube/Makefile b/Patches/PostgreSQL/9.5.1/cube/Makefile similarity index 100% rename from Patches/PostgreSQL/cube/Makefile rename to Patches/PostgreSQL/9.5.1/cube/Makefile diff --git a/Patches/PostgreSQL/cube/cube--1.0--1.1.sql b/Patches/PostgreSQL/9.5.1/cube/cube--1.0--1.1.sql similarity index 100% rename from Patches/PostgreSQL/cube/cube--1.0--1.1.sql rename to Patches/PostgreSQL/9.5.1/cube/cube--1.0--1.1.sql diff --git a/Patches/PostgreSQL/cube/cube--1.1.sql b/Patches/PostgreSQL/9.5.1/cube/cube--1.1.sql similarity index 100% rename from Patches/PostgreSQL/cube/cube--1.1.sql rename to Patches/PostgreSQL/9.5.1/cube/cube--1.1.sql diff --git a/Patches/PostgreSQL/cube/cube--unpackaged--1.0.sql b/Patches/PostgreSQL/9.5.1/cube/cube--unpackaged--1.0.sql similarity index 100% rename from Patches/PostgreSQL/cube/cube--unpackaged--1.0.sql rename to Patches/PostgreSQL/9.5.1/cube/cube--unpackaged--1.0.sql diff --git a/Patches/PostgreSQL/cube/cube.c b/Patches/PostgreSQL/9.5.1/cube/cube.c similarity index 100% rename from Patches/PostgreSQL/cube/cube.c rename to Patches/PostgreSQL/9.5.1/cube/cube.c diff --git a/Patches/PostgreSQL/cube/cube.control b/Patches/PostgreSQL/9.5.1/cube/cube.control similarity index 100% rename from Patches/PostgreSQL/cube/cube.control rename to Patches/PostgreSQL/9.5.1/cube/cube.control diff --git a/Patches/PostgreSQL/cube/cubedata.h b/Patches/PostgreSQL/9.5.1/cube/cubedata.h similarity index 100% rename from Patches/PostgreSQL/cube/cubedata.h rename to Patches/PostgreSQL/9.5.1/cube/cubedata.h diff --git a/Patches/PostgreSQL/cube/cubeparse.y b/Patches/PostgreSQL/9.5.1/cube/cubeparse.y similarity index 100% rename from Patches/PostgreSQL/cube/cubeparse.y rename to Patches/PostgreSQL/9.5.1/cube/cubeparse.y diff --git a/Patches/PostgreSQL/cube/cubescan.l b/Patches/PostgreSQL/9.5.1/cube/cubescan.l similarity index 100% rename from Patches/PostgreSQL/cube/cubescan.l rename to Patches/PostgreSQL/9.5.1/cube/cubescan.l diff --git a/Patches/PostgreSQL/cube/data/test_cube.data b/Patches/PostgreSQL/9.5.1/cube/data/test_cube.data similarity index 100% rename from Patches/PostgreSQL/cube/data/test_cube.data rename to Patches/PostgreSQL/9.5.1/cube/data/test_cube.data diff --git a/Patches/PostgreSQL/cube/expected/cube.out b/Patches/PostgreSQL/9.5.1/cube/expected/cube.out similarity index 100% rename from Patches/PostgreSQL/cube/expected/cube.out rename to Patches/PostgreSQL/9.5.1/cube/expected/cube.out diff --git a/Patches/PostgreSQL/cube/expected/cube_1.out b/Patches/PostgreSQL/9.5.1/cube/expected/cube_1.out similarity index 100% rename from Patches/PostgreSQL/cube/expected/cube_1.out rename to Patches/PostgreSQL/9.5.1/cube/expected/cube_1.out diff --git a/Patches/PostgreSQL/cube/expected/cube_2.out b/Patches/PostgreSQL/9.5.1/cube/expected/cube_2.out similarity index 100% rename from Patches/PostgreSQL/cube/expected/cube_2.out rename to Patches/PostgreSQL/9.5.1/cube/expected/cube_2.out diff --git a/Patches/PostgreSQL/cube/expected/cube_3.out b/Patches/PostgreSQL/9.5.1/cube/expected/cube_3.out similarity index 100% rename from Patches/PostgreSQL/cube/expected/cube_3.out rename to Patches/PostgreSQL/9.5.1/cube/expected/cube_3.out diff --git a/Patches/PostgreSQL/cube/sql/cube.sql b/Patches/PostgreSQL/9.5.1/cube/sql/cube.sql similarity index 100% rename from Patches/PostgreSQL/cube/sql/cube.sql rename to Patches/PostgreSQL/9.5.1/cube/sql/cube.sql diff --git a/Patches/PostgreSQL/src/bin/pg_rewind/copy_fetch.c b/Patches/PostgreSQL/9.5.1/src/bin/pg_rewind/copy_fetch.c similarity index 100% rename from Patches/PostgreSQL/src/bin/pg_rewind/copy_fetch.c rename to Patches/PostgreSQL/9.5.1/src/bin/pg_rewind/copy_fetch.c