aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-02-28 03:23:20 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-02-28 03:23:20 -0800
commita92230f9c8bc1eae1fdf24b49aa49d02ac2c9ad6 (patch)
tree6658366c26072d7de3004d98006b2d7067969b72
parente1e0b7a6a9a0dac912b7857dea879a69bb782911 (diff)
downloadvcpkg-a92230f9c8bc1eae1fdf24b49aa49d02ac2c9ad6.tar.gz
vcpkg-a92230f9c8bc1eae1fdf24b49aa49d02ac2c9ad6.zip
[netcdf-cxx4] Initial commit of version 4.3.0
-rw-r--r--ports/netcdf-cxx4/CONTROL4
-rw-r--r--ports/netcdf-cxx4/install-destination.patch33
-rw-r--r--ports/netcdf-cxx4/portfile.cmake44
3 files changed, 81 insertions, 0 deletions
diff --git a/ports/netcdf-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL
new file mode 100644
index 000000000..9fcda5468
--- /dev/null
+++ b/ports/netcdf-cxx4/CONTROL
@@ -0,0 +1,4 @@
+Source: netcdf-cxx4
+Version: 4.3.0
+Build-Depends: netcdf-c
+Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.
diff --git a/ports/netcdf-cxx4/install-destination.patch b/ports/netcdf-cxx4/install-destination.patch
new file mode 100644
index 000000000..7ff4e08c7
--- /dev/null
+++ b/ports/netcdf-cxx4/install-destination.patch
@@ -0,0 +1,33 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6673282..d6c7a78 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -522,10 +522,14 @@ write_basic_package_version_file(
+ COMPATIBILITY SameMajorVersion
+ )
+
++if(NOT DEFINED CMAKE_INSTALL_CMAKECONFIGDIR)
++ set(CMAKE_INSTALL_CMAKECONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx)
++endif()
++
+ install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFCxxConfigVersion.cmake"
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/netCDFCxx
++ DESTINATION ${CMAKE_INSTALL_CMAKECONFIGDIR}
+ COMPONENT headers
+ )
+
+diff --git a/cxx4/CMakeLists.txt b/cxx4/CMakeLists.txt
+index 431eb45..0423594 100644
+--- a/cxx4/CMakeLists.txt
++++ b/cxx4/CMakeLists.txt
+@@ -43,5 +43,7 @@ INSTALL(
+ )
+ INSTALL(
+ TARGETS netcdf-cxx4
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ )
diff --git a/ports/netcdf-cxx4/portfile.cmake b/ports/netcdf-cxx4/portfile.cmake
new file mode 100644
index 000000000..92ae59675
--- /dev/null
+++ b/ports/netcdf-cxx4/portfile.cmake
@@ -0,0 +1,44 @@
+# 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}
+#
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ message(STATUS "Warning: DLLs not supported yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/netcdf-cxx4-4.3.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/Unidata/netcdf-cxx4/archive/v4.3.0.zip"
+ FILENAME "netcdf-cxx4-4.3.0.zip"
+ SHA512 c0ae933446c5bb019ab90c097787cefe15a0161b6b768e0251e9e0b21c92ca8d42d98babcbe07b81b8db08cd1e9fba7befb853611a76debfdfba0aee4fb4b0bc
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-destination.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DNCXX_ENABLE_TESTS=OFF
+ -DCMAKE_INSTALL_CMAKECONFIGDIR=share/netCDFCxx
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/netcdf-cxx4)