diff --git a/ports/geographiclib/cxx-library-only.patch b/ports/geographiclib/cxx-library-only.patch deleted file mode 100644 index d1201794b5..0000000000 --- a/ports/geographiclib/cxx-library-only.patch +++ /dev/null @@ -1,139 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index eb08bd48..88552153 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -196,6 +196,11 @@ else () - set (DEVELOPER OFF) - endif () - -+set (INSTALL_TOOL_DIR "tools/geographiclib") -+file (RELATIVE_PATH PROJECT_LIB_DIR -+ "${CMAKE_INSTALL_PREFIX}/${INSTALL_TOOL_DIR}" -+ "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") -+ - if (NOT MSVC) - # Set the run time path for shared libraries for non-Windows machines. - # (1) include link path for external packages (not needed with -@@ -207,7 +212,7 @@ if (NOT MSVC) - # (2) include installed path for GeographicLib. - if (NOT APPLE) - # Use relative path so that package is relocatable -- set (CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LIB_SUFFIX}") -+ set (CMAKE_INSTALL_RPATH "\$ORIGIN/${PROJECT_LIB_DIR}") - else () - # cmake 2.8.12 introduced a way to make the package relocatable. - # See also INSTALL_RPATH property on the tools. -@@ -434,12 +439,12 @@ endif () - # documentation files into the source tree. Skip Apple here because - # man/makeusage.sh uses "head --lines -4" to drop the last 4 lines of a - # file and there's no simple equivalent for MacOSX --if (NOT WIN32 AND NOT APPLE) -+if (NOT WIN32 AND NOT APPLE AND FALSE) - find_program (HAVE_POD2MAN pod2man) - find_program (HAVE_POD2HTML pod2html) - find_program (HAVE_COL col) - endif () --if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL) -+if (HAVE_POD2MAN AND HAVE_POD2HTML AND HAVE_COL AND FALSE) - set (MAINTAINER ON) - else () - set (MAINTAINER OFF) -@@ -466,25 +471,34 @@ if (WIN32) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") - endif () - -+if (SKIP_TOOLS) -+ set (TOOLS) -+ set (SCRIPTS) -+else () - # The list of tools (to be installed into, e.g., /usr/local/bin) - set (TOOLS CartConvert ConicProj GeodesicProj GeoConvert GeodSolve - GeoidEval Gravity MagneticField Planimeter RhumbSolve TransverseMercatorProj) - # The list of scripts (to be installed into, e.g., /usr/local/sbin) - set (SCRIPTS geographiclib-get-geoids geographiclib-get-gravity - geographiclib-get-magnetic) -+endif () - - set_property (GLOBAL PROPERTY USE_FOLDERS ON) - - # The list of subdirectories to process - add_subdirectory (src) - add_subdirectory (include/GeographicLib) -+if (NOT SKIP_TOOLS) - add_subdirectory (tools) -+endif () -+if (FALSE) - add_subdirectory (man) - add_subdirectory (doc) - add_subdirectory (js) - add_subdirectory (matlab) - add_subdirectory (python/geographiclib) - add_subdirectory (examples) -+endif () - if (MSVC AND BUILD_NETGEOGRAPHICLIB) - if (GEOGRAPHICLIB_PRECISION EQUAL 2) - set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib) -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index fd0669f2..4744e08d 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -56,13 +56,7 @@ export (TARGETS - # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative - # path to the root from there. (Note that the whole install tree can - # be relocated.) --if (COMMON_INSTALL_PATH) -- # Install under lib${LIB_SUFFIX} so that 32-bit and 64-bit packages -- # can be installed on a single machine. -- set (INSTALL_CMAKE_DIR "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}") --else () -- set (INSTALL_CMAKE_DIR "cmake") --endif () -+set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME_LOWER}") - # Find root of install tree relative to INSTALL_CMAKE_DIR - file (RELATIVE_PATH PROJECT_ROOT_DIR - "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}") -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 3fa8ec6a..92c73946 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -1,7 +1,7 @@ - # Build the tools... - - # Where to find the *.usage files for the --help option. --include_directories (${PROJECT_BINARY_DIR}/man) -+include_directories (${PROJECT_SOURCE_DIR}/man) - # Only needed if target_compile_definitions is not supported - add_definitions (${PROJECT_DEFINITIONS}) - -@@ -16,7 +16,7 @@ foreach (TOOL ${TOOLS}) - add_dependencies (tools ${TOOL}) - - set_source_files_properties (${TOOL}.cpp PROPERTIES -- OBJECT_DEPENDS ${PROJECT_BINARY_DIR}/man/${TOOL}.usage) -+ OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/man/${TOOL}.usage) - - target_link_libraries (${TOOL} ${PROJECT_LIBRARIES} ${HIGHPREC_LIBRARIES}) - -@@ -31,11 +31,11 @@ endif () - if (APPLE) - # Ensure that the package is relocatable - set_target_properties (${TOOLS} PROPERTIES -- INSTALL_RPATH "@loader_path/../lib${LIB_SUFFIX}") -+ INSTALL_RPATH "@loader_path/${PROJECT_LIB_DIR}") - endif () - - # Specify where the tools are installed, adding them to the export targets --install (TARGETS ${TOOLS} EXPORT targets DESTINATION bin) -+install (TARGETS ${TOOLS} DESTINATION "${INSTALL_TOOL_DIR}") - - if (MSVC AND PACKAGE_DEBUG_LIBS) - # Possibly don't EXPORT the debug versions of the tools and then this -@@ -55,7 +55,7 @@ set_property (TARGET tools ${TOOLS} PROPERTY FOLDER tools) - # systems. This needs to substitute ${GEOGRAPHICLIB_DATA} as the - # default data directory. These are installed under sbin, because it is - # expected to be run with write access to /usr/local. --if (NOT WIN32) -+if (NOT WIN32 AND FALSE) - foreach (SCRIPT ${SCRIPTS}) - configure_file (${SCRIPT}.sh scripts/${SCRIPT} @ONLY) - add_custom_command (OUTPUT ${SCRIPT} diff --git a/ports/geographiclib/portfile.cmake b/ports/geographiclib/portfile.cmake index 592d0dc633..f8dbff068c 100644 --- a/ports/geographiclib/portfile.cmake +++ b/ports/geographiclib/portfile.cmake @@ -1,49 +1,55 @@ -vcpkg_from_sourceforge ( +vcpkg_from_sourceforge( OUT_SOURCE_PATH SOURCE_PATH REPO geographiclib - REF distrib - FILENAME "GeographicLib-1.52.tar.gz" - SHA512 98a4d33764db4a4755851a7db639fd9e055dcf4f1f949258e112fce2e198076b5896fcae2c1ea36b37fe1000d28eec326636a730e70f25bc19a1610423ba6859 - PATCHES cxx-library-only.patch + REF distrib-C++ + FILENAME "GeographicLib-2.0.tar.gz" + SHA512 7cf67174a64082372cdd249a64460e9f61c582aaf3d2a31e4e69d811f265e078ba62f945e9f1f44be6c58de4c20d0359dd46e0fd262ffac229df0ba2c6adc848 + ) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "tools" TOOLS ) -vcpkg_check_features ( - OUT_FEATURE_OPTIONS FEATURE_OPTIONS - INVERTED_FEATURES - "tools" SKIP_TOOLS +# GeographicLib's CMakeLists.txt allows the installation directories for +# all the components to be set independently. A "false" value, e.g., an +# empty string or OFF (-DBINDIR=OFF), indicates that the corresponding +# component should not be installed. +if(TOOLS) + set(TOOL_OPTION "-DBINDIR=tools/${PORT}") +else() + set(TOOL_OPTION -DBINDIR=OFF) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${TOOL_OPTION} + "-DCMAKEDIR=share/${PORT}" + -DDOCDIR=OFF + -DEXAMPLEDIR=OFF + -DMANDIR=OFF + -DSBINDIR=OFF ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set (LIB_TYPE "SHARED") -else () - set (LIB_TYPE "STATIC") -endif () - -vcpkg_configure_cmake ( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - "-DGEOGRAPHICLIB_LIB_TYPE=${LIB_TYPE}" - ${FEATURE_OPTIONS} - PREFER_NINJA # Disable this option if project cannot be built with Ninja -) - -vcpkg_install_cmake () -vcpkg_fixup_cmake_targets (CONFIG_PATH share/geographiclib) -vcpkg_copy_pdbs () - -if (tools IN_LIST FEATURES) - vcpkg_copy_tool_dependencies (${CURRENT_PACKAGES_DIR}/tools/${PORT}) -endif () - -file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) -file (INSTALL ${SOURCE_PATH}/LICENSE.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} - RENAME copyright) - -# Install usage -configure_file (${CMAKE_CURRENT_LIST_DIR}/usage - ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup() +vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig() + +if(tools IN_LIST FEATURES) + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools") + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) + +# Install usage +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY) diff --git a/ports/geographiclib/vcpkg.json b/ports/geographiclib/vcpkg.json index 321cd04ec5..5e3b6a62a2 100644 --- a/ports/geographiclib/vcpkg.json +++ b/ports/geographiclib/vcpkg.json @@ -1,9 +1,19 @@ { "name": "geographiclib", - "version": "1.52", - "port-version": 2, + "version": "2.0", "description": "GeographicLib, a C++ library for performing geographic conversions", "homepage": "https://geographiclib.sourceforge.io", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], "features": { "tools": { "description": "The GeographicLib tools", diff --git a/versions/baseline.json b/versions/baseline.json index 31923abfb9..81d7460370 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2461,8 +2461,8 @@ "port-version": 2 }, "geographiclib": { - "baseline": "1.52", - "port-version": 2 + "baseline": "2.0", + "port-version": 0 }, "geos": { "baseline": "3.10.2", diff --git a/versions/g-/geographiclib.json b/versions/g-/geographiclib.json index 75c6083df8..d94a4f9ae2 100644 --- a/versions/g-/geographiclib.json +++ b/versions/g-/geographiclib.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "440bbb70d0e2bd4df26e6c4c8e80a9f1942f743e", + "version": "2.0", + "port-version": 0 + }, { "git-tree": "907cce8f399c32730fa20954780e16187bb28bd0", "version": "1.52",