Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[geographiclib] Update to 1.50.1 #11687

Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ports/geographiclib/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: geographiclib
Version: 1.47-patch1-11
Version: 1.50.1
Homepage: https://sourceforge.net/projects/geographiclib/
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.
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.
28 changes: 12 additions & 16 deletions ports/geographiclib/fix-usage.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
diff --git a/cmake/project-config-version.cmake.in b/cmake/project-config-version.cmake.in
index 1f207b8..d469658 100644
--- a/cmake/project-config-version.cmake.in
+++ b/cmake/project-config-version.cmake.in
@@ -22,9 +22,9 @@ elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
# Reject if there's a mismatch in MSVC compiler versions
# set (REASON "_MSC_VER = @MSVC_VERSION@")
# set (PACKAGE_VERSION_UNSUITABLE TRUE)
-elseif (NOT CMAKE_CROSSCOMPILING STREQUAL "@CMAKE_CROSSCOMPILING@")
+elseif (NOT CMAKE_CROSSCOMPILING STREQUAL FALSE)
# Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}
- set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
+ set (REASON "cross-compiling = FALSE")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (CMAKE_CROSSCOMPILING AND
NOT (CMAKE_SYSTEM_NAME STREQUAL "@CMAKE_SYSTEM_NAME@" AND
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a9ec4e..57bf448 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,7 @@ set (LIBVERSION_API 19)
set (LIBVERSION_BUILD 19.0.1)
string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
+set(PROJECT_NAME_LOWER ${PROJECT_NAME})

cmake_minimum_required (VERSION 3.1.0) # This version was released 2014-12-15

39 changes: 17 additions & 22 deletions ports/geographiclib/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
set(GEOGRAPHICLIB_VERSION 1.50.1)

vcpkg_download_distfile(ARCHIVE
URLS "https://jaist.dl.sourceforge.net/project/geographiclib/distrib/archive/GeographicLib-1.47-patch1.zip"
FILENAME "geographiclib-1.47-patch1.zip"
SHA512 d8fdfd7ae093057ec1a4ab922457fe71a3fb9975df5b673c276d62a0e9c4f212dc63652830b9d89e3890bc96aafd335992943cf6a1bce8260acf932d1eb7abfd
URLS "https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-${GEOGRAPHICLIB_VERSION}.tar.gz"
FILENAME "geographiclib-${GEOGRAPHICLIB_VERSION}.tar.gz"
SHA512 1db874f30957a0edb8a1df3eee6db73cc993629e3005fe912e317a4ba908e7d7580ce483bb0054c4b46370b8edaec989609fb7e4eb6ba00c80182db43db436f1
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
remove-tools-and-fix-version.patch
fix-usage.patch
remove-tools-and-fix-version.patch
fix-usage.patch
)

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
)
set(GEOGRAPHICLIB_LIB_TYPE SHARED)
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
)
set(GEOGRAPHICLIB_LIB_TYPE STATIC)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DGEOGRAPHICLIB_LIB_TYPE=${GEOGRAPHICLIB_LIB_TYPE}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
)

vcpkg_install_cmake()

if (VCPKG_TARGET_IS_WINDOWS)
Expand All @@ -45,4 +40,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
126 changes: 66 additions & 60 deletions ports/geographiclib/remove-tools-and-fix-version.patch
Original file line number Diff line number Diff line change
@@ -1,60 +1,66 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e79923b..3448362 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -437,13 +437,13 @@ set_property (GLOBAL PROPERTY USE_FOLDERS ON)
# The list of subdirectories to process
add_subdirectory (src)
add_subdirectory (include/GeographicLib)
-add_subdirectory (tools)
-add_subdirectory (man)
-add_subdirectory (doc)
-add_subdirectory (js)
-add_subdirectory (matlab)
-add_subdirectory (python/geographiclib)
-add_subdirectory (examples)
+# add_subdirectory (tools)
+# add_subdirectory (man)
+# add_subdirectory (doc)
+# add_subdirectory (js)
+# add_subdirectory (matlab)
+# add_subdirectory (python/geographiclib)
+# add_subdirectory (examples)
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 0c8ad64..7dc4096 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -14,10 +14,10 @@ configure_file (project-config.cmake.in
configure_file (project-config-version.cmake.in
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake" @ONLY)
export (TARGETS
- ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
+ ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES}
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-targets.cmake")
export (TARGETS
- ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
+ ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES}
NAMESPACE ${PROJECT_NAME}::
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-namespace-targets.cmake")

diff --git a/cmake/project-config-version.cmake.in b/cmake/project-config-version.cmake.in
index 3b3b9e8..bc2ce19 100644
--- a/cmake/project-config-version.cmake.in
+++ b/cmake/project-config-version.cmake.in
@@ -18,10 +18,10 @@ elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
# since a multi-architecture library is built for that platform).
set (REASON "sizeof(*void) = @CMAKE_SIZEOF_VOID_P@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
-elseif (MSVC AND NOT MSVC_VERSION STREQUAL "@MSVC_VERSION@")
+#elseif (MSVC AND NOT MSVC_VERSION STREQUAL "@MSVC_VERSION@")
# Reject if there's a mismatch in MSVC compiler versions
- set (REASON "_MSC_VER = @MSVC_VERSION@")
- set (PACKAGE_VERSION_UNSUITABLE TRUE)
+# set (REASON "_MSC_VER = @MSVC_VERSION@")
+# set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (NOT CMAKE_CROSSCOMPILING STREQUAL "@CMAKE_CROSSCOMPILING@")
# Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}
set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30875dd..4a9ec4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -508,13 +508,13 @@ set_property (GLOBAL PROPERTY USE_FOLDERS ON)
# The list of subdirectories to process
add_subdirectory (src)
add_subdirectory (include/GeographicLib)
-add_subdirectory (tools)
-add_subdirectory (man)
-add_subdirectory (doc)
-add_subdirectory (js)
-add_subdirectory (matlab)
-add_subdirectory (python/geographiclib)
-add_subdirectory (examples)
+#add_subdirectory (tools)
+#add_subdirectory (man)
+#add_subdirectory (doc)
+#add_subdirectory (js)
+#add_subdirectory (matlab)
+#add_subdirectory (python/geographiclib)
+#add_subdirectory (examples)
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 90e773b..1f4e061 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -33,10 +33,10 @@ configure_file (project-config.cmake.in
configure_file (project-config-version.cmake.in
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake" @ONLY)
export (TARGETS
- ${PROJECT_ALL_LIBRARIES} ${TOOLS}
+ ${PROJECT_ALL_LIBRARIES}
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-targets.cmake")
export (TARGETS
- ${PROJECT_ALL_LIBRARIES} ${TOOLS}
+ ${PROJECT_ALL_LIBRARIES}
NAMESPACE ${PROJECT_NAME}::
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-namespace-targets.cmake")

diff --git a/cmake/project-config-version.cmake.in b/cmake/project-config-version.cmake.in
index f15702f..089fa17 100644
--- a/cmake/project-config-version.cmake.in
+++ b/cmake/project-config-version.cmake.in
@@ -35,14 +35,14 @@ elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
# since a multi-architecture library is built for that platform).
set (REASON "sizeof(*void) = @CMAKE_SIZEOF_VOID_P@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
-elseif (MSVC AND NOT (
+#elseif (MSVC AND NOT (
# toolset version must be at least as great as @PROJECT_NAME@'s
- MSVC_TOOLSET_VERSION GREATER_EQUAL @MSVC_TOOLSET_VERSION@
+# MSVC_TOOLSET_VERSION GREATER_EQUAL @MSVC_TOOLSET_VERSION@
# and major versions must match
- AND MSVC_TOOLSET_MAJOR EQUAL @MSVC_TOOLSET_MAJOR@ ))
+# AND MSVC_TOOLSET_MAJOR EQUAL @MSVC_TOOLSET_MAJOR@ ))
# Reject if there's a mismatch in MSVC compiler versions
- set (REASON "MSVC_TOOLSET_VERSION = @MSVC_TOOLSET_VERSION@")
- set (PACKAGE_VERSION_UNSUITABLE TRUE)
+# set (REASON "MSVC_TOOLSET_VERSION = @MSVC_TOOLSET_VERSION@")
+# set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (NOT CMAKE_CROSSCOMPILING_STR STREQUAL "@CMAKE_CROSSCOMPILING_STR@")
# Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}
set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
5 changes: 2 additions & 3 deletions ports/geographiclib/usage
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ The package geographiclib:x64-linux provides CMake targets:

find_package(GeographicLib CONFIG REQUIRED)
#dynamic
target_link_libraries(main PRIVATE GeographicLib GeographicLib::GeographicLib)
target_link_libraries(main PRIVATE GeographicLib GeographicLib_SHARED GeographicLib::GeographicLib GeographicLib::GeographicLib_SHARED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add vcpkg-cmake-wrapper to solve this?

#static
target_link_libraries(main PRIVATE GeographicLib_STATIC GeographicLib::GeographicLib_STATIC)

target_link_libraries(main PRIVATE GeographicLib GeographicLib_STATIC GeographicLib::GeographicLib GeographicLib::GeographicLib_STATIC)