aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-10-17 12:44:03 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-10-17 12:44:03 -0700
commit1ad4bcd13f1a2ba3d366830481a080e68fa2be53 (patch)
tree4aac7ea190f3a600d24e86156925baf4f162695c /ports
parent3ead5123f79761eecfc028c16e50e621a83f4151 (diff)
parent28ac02f8bd09e1b10e7e2725faa18867e02ad53d (diff)
downloadvcpkg-1ad4bcd13f1a2ba3d366830481a080e68fa2be53.tar.gz
vcpkg-1ad4bcd13f1a2ba3d366830481a080e68fa2be53.zip
Merge branch 'barcharcraz-geos'
Diffstat (limited to 'ports')
-rw-r--r--ports/geos/CONTROL3
-rw-r--r--ports/geos/portfile.cmake45
2 files changed, 48 insertions, 0 deletions
diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL
new file mode 100644
index 000000000..c0ec7b134
--- /dev/null
+++ b/ports/geos/CONTROL
@@ -0,0 +1,3 @@
+Source: geos
+Version: 3.5.0
+Description: Geometry Engine Open Source
diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake
new file mode 100644
index 000000000..554015937
--- /dev/null
+++ b/ports/geos/portfile.cmake
@@ -0,0 +1,45 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+
+include(${CMAKE_TRIPLET_FILE})
+include(vcpkg_common_functions)
+#downloading 3.5 from their SVN repo and not the release tarball
+#because the 3.5 release did not build on windows, and fixes were backported
+#without generating a new release tarball (I don't think very many GIS people use win)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://trac.osgeo.org/geos/browser/branches/3.5?rev=4261&format=zip"
+ FILENAME "geos-3.5.0.zip"
+ SHA512 3b91e8992f60b99a3f01069d955b71bce425ae5e5c599252fa26a337494e1a5a8ea796be124766d054710d6c03806f56dc1c63539b4660e2bb894d7ef779d4b9
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+#we need to do this because GOES deploy process is totally broken for cmake
+#file(DOWNLOAD http://svn.osgeo.org/geos/tags/3.5.0/cmake/modules/GenerateSourceGroups.cmake
+# ${CURRENT_BUILDTREES_DIR}/src/geos-3.5.0/cmake/modules/GenerateSourceGroups.cmake)
+file(WRITE ${CURRENT_BUILDTREES_DIR}/src/3.5/geos_svn_revision.h "#define GEOS_SVN_REVISION 4261")
+vcpkg_configure_cmake(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/3.5
+ OPTIONS -DGEOS_ENABLE_TESTS=False
+ -DBUILD_TESTING=False
+)
+
+vcpkg_build_cmake()
+vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+# Handle copyright
+file(COPY ${CURRENT_BUILDTREES_DIR}/src/3.5/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/geos/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeos.lib)
+ vcpkg_copy_pdbs()
+else()
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos_c.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos_c.lib)
+
+endif() \ No newline at end of file