aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex85k <alex85k@github.com>2017-09-23 12:08:38 +0500
committeralex85k <alex85k@github.com>2017-09-23 12:08:38 +0500
commitb7ebfdd20f5435632155b7df4e8f2a8a343f08ea (patch)
treedf4485dfbcc5e36f5cfafb8e49d5bc421d9970f5
parent67e876c76555c466e4faf49d6cd80a88b835f972 (diff)
downloadvcpkg-b7ebfdd20f5435632155b7df4e8f2a8a343f08ea.tar.gz
vcpkg-b7ebfdd20f5435632155b7df4e8f2a8a343f08ea.zip
[shapelib] initial port
-rw-r--r--ports/shapelib/CONTROL3
-rw-r--r--ports/shapelib/portfile.cmake41
2 files changed, 44 insertions, 0 deletions
diff --git a/ports/shapelib/CONTROL b/ports/shapelib/CONTROL
new file mode 100644
index 000000000..7d37eb8aa
--- /dev/null
+++ b/ports/shapelib/CONTROL
@@ -0,0 +1,3 @@
+Source: shapelib
+Version: 1.4.1
+Description: Shapefile C Library is simple C API for reading and writing ESRI Shapefiles
diff --git a/ports/shapelib/portfile.cmake b/ports/shapelib/portfile.cmake
new file mode 100644
index 000000000..0f2787689
--- /dev/null
+++ b/ports/shapelib/portfile.cmake
@@ -0,0 +1,41 @@
+include(vcpkg_common_functions)
+
+set(SHAPELIB_VERSION 1.4.1)
+set(SHAPELIB_HASH e3e02dde8006773fed25d630896e79fd79d2008a029cc86b157fe0d92c143a9fab930fdb93d9700d4e1397c3b23ae4b86e91db1dbaca1c5388d4e3aea0309341)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/shapelib-${SHAPELIB_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://download.osgeo.org/shapelib/shapelib-${SHAPELIB_VERSION}.zip"
+ FILENAME "shapelib-${SHAPELIB_VERSION}.zip"
+ SHA512 ${SHAPELIB_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -DBUILD_TEST=OFF)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
+file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib)
+file(REMOVE ${EXES})
+
+file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
+file(REMOVE ${DEBUG_EXES})
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shapelib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/shapelib/COPYING ${CURRENT_PACKAGES_DIR}/share/shapelib/copyright)
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/shapelib)
+
+vcpkg_copy_pdbs()