From dae29cba409564c5c655495c37c76e41ffee9815 Mon Sep 17 00:00:00 2001 From: Han Hu Date: Sat, 8 Apr 2017 01:02:59 +0800 Subject: add geographiclib port --- ports/geographiclib/CONTROL | 3 +++ ports/geographiclib/portfile.cmake | 53 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 ports/geographiclib/CONTROL create mode 100644 ports/geographiclib/portfile.cmake diff --git a/ports/geographiclib/CONTROL b/ports/geographiclib/CONTROL new file mode 100644 index 000000000..83f801537 --- /dev/null +++ b/ports/geographiclib/CONTROL @@ -0,0 +1,3 @@ +Source: geographiclib +Version: 1.47-patch1 +Description: geographiclib diff --git a/ports/geographiclib/portfile.cmake b/ports/geographiclib/portfile.cmake new file mode 100644 index 000000000..90c99261c --- /dev/null +++ b/ports/geographiclib/portfile.cmake @@ -0,0 +1,53 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geographiclib-1.47) +vcpkg_download_distfile(ARCHIVE + URLS "https://jaist.dl.sourceforge.net/project/geographiclib/distrib/GeographicLib-1.47-patch1.zip" + FILENAME "geographiclib-1.47-latch1.zip" + SHA512 d8fdfd7ae093057ec1a4ab922457fe71a3fb9975df5b673c276d62a0e9c4f212dc63652830b9d89e3890bc96aafd335992943cf6a1bce8260acf932d1eb7abfd +) +vcpkg_extract_source_archive(${ARCHIVE}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DGEOGRAPHICLIB_LIB_TYPE=SHARED + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DGEOGRAPHICLIB_LIB_TYPE=STATIC + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 + ) +endif() + +vcpkg_install_cmake() +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/geographiclib) + +file(COPY ${CURRENT_BUILDTREES_DIR}/src/GeographicLib-1.47/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/geographiclib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/geographiclib/copyright) + +file(GLOB EXE_FILES "${CURRENT_PACKAGES_DIR}/bin/*.exe" "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${EXE_FILES}) -- cgit v1.2.3 From 97c85bc512c7b574985d3adda369b8f4cc7f68a1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Apr 2017 16:10:46 -0700 Subject: [geographiclib] Improve description, remove cmake files until they can be properly merged between configs. --- ports/geographiclib/CONTROL | 4 ++-- ports/geographiclib/portfile.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/geographiclib/CONTROL b/ports/geographiclib/CONTROL index 83f801537..a5ee9b9ad 100644 --- a/ports/geographiclib/CONTROL +++ b/ports/geographiclib/CONTROL @@ -1,3 +1,3 @@ Source: geographiclib -Version: 1.47-patch1 -Description: geographiclib +Version: 1.47-patch1-1 +Description: a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems. diff --git a/ports/geographiclib/portfile.cmake b/ports/geographiclib/portfile.cmake index 90c99261c..b445728f0 100644 --- a/ports/geographiclib/portfile.cmake +++ b/ports/geographiclib/portfile.cmake @@ -14,7 +14,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geographiclib-1.47) vcpkg_download_distfile(ARCHIVE URLS "https://jaist.dl.sourceforge.net/project/geographiclib/distrib/GeographicLib-1.47-patch1.zip" - FILENAME "geographiclib-1.47-latch1.zip" + FILENAME "geographiclib-1.47-patch1.zip" SHA512 d8fdfd7ae093057ec1a4ab922457fe71a3fb9975df5b673c276d62a0e9c4f212dc63652830b9d89e3890bc96aafd335992943cf6a1bce8260acf932d1eb7abfd ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -40,7 +40,7 @@ else() endif() vcpkg_install_cmake() -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/geographiclib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/cmake) file(COPY ${CURRENT_BUILDTREES_DIR}/src/GeographicLib-1.47/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/geographiclib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/geographiclib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/geographiclib/copyright) -- cgit v1.2.3