mirror of https://github.com/microsoft/vcpkg.git
[supernovas] Update port to upstream v1.7.2 (#53216)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
c4d9956c0c
commit
6619482a70
|
|
@ -1,24 +0,0 @@
|
|||
diff --git a/src/c99/iers.c b/src/c99/iers.c
|
||||
index dbbae395..b27da1a6 100644
|
||||
--- a/src/c99/iers.c
|
||||
+++ b/src/c99/iers.c
|
||||
@@ -64,7 +64,6 @@
|
||||
# define NTP_UNIX_EPOCH 2208988800LL ///< [s] NTP timestamp of UNIX epoch (1970 Jan 1)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
-# define gmtime_r gmtime_s ///< MSC equivalent
|
||||
# define strtok_r strtok_s ///< MSVC equivalent
|
||||
#endif
|
||||
|
||||
@@ -823,7 +822,11 @@ int novas_lookup_leap(time_t t) {
|
||||
struct tm tm = {};
|
||||
char str[40] = {'\0'};
|
||||
unlock_leap();
|
||||
+#ifdef _MSC_VER
|
||||
+ gmtime_s(&tm, &t);
|
||||
+#else
|
||||
gmtime_r(&t, &tm);
|
||||
+#endif
|
||||
strftime(str, sizeof(str), "%c", &tm);
|
||||
return novas_error(NOVAS_INVALID_LEAP, ERANGE, fn, "Time %s is beyond the leap seconds coverage range", str);
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 57ee0c23..e886352c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -111,7 +111,8 @@ if(HAS_MATHLIB)
|
||||
endif()
|
||||
|
||||
if(NOT WITHOUT_CURL)
|
||||
- find_package(CURL)
|
||||
+ find_package(CURL REQUIRED)
|
||||
+
|
||||
set(LIBCURL CURL::libcurl)
|
||||
|
||||
# [.pc] Link applications against curl lib...
|
||||
diff --git a/cmake/supernovasConfig.cmake.in b/cmake/supernovasConfig.cmake.in
|
||||
index 99a0f18d..7c33ad0b 100644
|
||||
--- a/cmake/supernovasConfig.cmake.in
|
||||
+++ b/cmake/supernovasConfig.cmake.in
|
||||
@@ -10,6 +10,10 @@ include("${CMAKE_CURRENT_LIST_DIR}/supernovasTargets.cmake")
|
||||
# Get include directories from target properties
|
||||
get_target_property(supernovas_INCLUDE_DIRS supernovas::core INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
+if(NOT @WITHOUT_CURL@)
|
||||
+ find_dependency(CURL)
|
||||
+endif()
|
||||
+
|
||||
# Check if optional components are available
|
||||
if(TARGET supernovas::cpp)
|
||||
set(supernovas_cpp_FOUND TRUE)
|
||||
|
|
@ -1,33 +1,48 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Smithsonian/SuperNOVAS
|
||||
REF "v${VERSION}"
|
||||
SHA512 ae74ec6969c2902c53e5f1cc9bf66f41e97a838c7c0c0e6167a3f24050676a22f9ebd67f0b90a11105790b45166e3d1e79a4e9e264ccf68d4fb330785090f409
|
||||
HEAD_REF main
|
||||
PATCHES pkgconfig.patch gmtime_s.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
cpp ENABLE_CPP
|
||||
solsys-calceph ENABLE_CALCEPH
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Smithsonian/SuperNOVAS
|
||||
REF "v${VERSION}"
|
||||
SHA512 3dc924e17c8af452de111a748c162471e022b6d892cfc3d2c0e45286c67bf05623fdf95a867d0a17d4f9d863d8dc7e5290c8a15885315742ffff3b1b3a749c94
|
||||
HEAD_REF main
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
cpp ENABLE_CPP
|
||||
solsys-calceph ENABLE_CALCEPH
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
-DENABLE_CSPICE=OFF
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
||||
|
||||
set(debug_pc "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/supernovas.pc")
|
||||
if(EXISTS "${debug_pc}")
|
||||
vcpkg_replace_string("${debug_pc}" "-lsupernovas " "-lsupernovasd ")
|
||||
if("cpp" IN_LIST FEATURES)
|
||||
vcpkg_replace_string("${debug_pc}" "-lsupernovas++ " "-lsupernovas++d ")
|
||||
endif()
|
||||
if("solsys-calceph" IN_LIST FEATURES)
|
||||
vcpkg_replace_string("${debug_pc}" "-lsolsys-calceph " "-lsolsys-calcephd ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# SOFA is intentionally not cited: SuperNOVAS describes this as a modified implementation
|
||||
# that is neither provided nor endorsed by SOFA.
|
||||
# https://github.com/Sigmyne/SuperNOVAS/blob/eafc3120cf257d643bd0676573420141ce8e53a6/src/c99/refract.c#L411-L423
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"name": "supernovas",
|
||||
"version": "1.7.1",
|
||||
"port-version": 1,
|
||||
"version": "1.7.2",
|
||||
"description": "SuperNOVAS C/C++ high-precision astrometry library",
|
||||
"homepage": "https://sigmyne.github.io/SuperNOVAS/",
|
||||
"documentation": "https://sigmyne.github.io/SuperNOVAS/doc/html/",
|
||||
|
|
|
|||
|
|
@ -9969,8 +9969,8 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"supernovas": {
|
||||
"baseline": "1.7.1",
|
||||
"port-version": 1
|
||||
"baseline": "1.7.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"sushant-wayal-stringhash": {
|
||||
"baseline": "1.1.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "dabcda13322218ea3fb3fd26ac6d379d4c7c47a6",
|
||||
"version": "1.7.2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "1871128734a57b5da9f3684eeba0895656715872",
|
||||
"version": "1.7.1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue