aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/calceph
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/calceph
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/calceph')
-rw-r--r--vcpkg/ports/calceph/disable-gnu-source.diff15
-rwxr-xr-xvcpkg/ports/calceph/portfile.cmake39
-rwxr-xr-xvcpkg/ports/calceph/vcpkg.json20
3 files changed, 74 insertions, 0 deletions
diff --git a/vcpkg/ports/calceph/disable-gnu-source.diff b/vcpkg/ports/calceph/disable-gnu-source.diff
new file mode 100644
index 0000000..185490b
--- /dev/null
+++ b/vcpkg/ports/calceph/disable-gnu-source.diff
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a1cb297..9448623 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -147,8 +147,10 @@ IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
+ MESSAGE(STATUS "Add the option '-fp-model precise' for the Intel compilers")
+ string(APPEND CMAKE_C_FLAGS " -fp-model precise ")
+ ENDIF ()
++if(NOT ANDROID)
+ # Define for the function strod_l
+ string(APPEND CMAKE_C_FLAGS " -D_GNU_SOURCE=1 ")
++endif()
+ # Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).
+ string(APPEND CMAKE_C_FLAGS " -D_LARGEFILE_SOURCE=1 ")
+ string(APPEND CMAKE_C_FLAGS " -D_LARGE_FILES=1 ")
diff --git a/vcpkg/ports/calceph/portfile.cmake b/vcpkg/ports/calceph/portfile.cmake
new file mode 100755
index 0000000..0080e2c
--- /dev/null
+++ b/vcpkg/ports/calceph/portfile.cmake
@@ -0,0 +1,39 @@
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-${VERSION}.tar.gz"
+ FILENAME "calceph-${VERSION}.tar.gz"
+ SHA512 d3f17a302dafee243a3c7698dd5b7e67550ba070cd3217c399e2cee5f90486d2be394ddcfe6dcc1b72f980e212d19bda50c4057fca05b032f6558794f191935a
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ PATCHES
+ disable-gnu-source.diff
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DENABLE_FORTRAN=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_copy_tools(TOOL_NAMES calceph_inspector calceph_queryposition calceph_queryorientation AUTO_CLEAN)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(INSTALL "${SOURCE_PATH}/README.rst" DESTINATION "${CURRENT_PACKAGES_DIR}/share/calceph" RENAME readme.rst)
+vcpkg_install_copyright(
+ COMMENT "The CALCEPH library is triple-licensed (CECILL-2.1 OR CECILL-B OR CECILL-C)."
+ FILE_LIST
+ "${SOURCE_PATH}/COPYING_CECILL_V2.1.LIB"
+ "${SOURCE_PATH}/COPYING_CECILL_B.LIB"
+ "${SOURCE_PATH}/COPYING_CECILL_C.LIB"
+)
diff --git a/vcpkg/ports/calceph/vcpkg.json b/vcpkg/ports/calceph/vcpkg.json
new file mode 100755
index 0000000..f149243
--- /dev/null
+++ b/vcpkg/ports/calceph/vcpkg.json
@@ -0,0 +1,20 @@
+{
+ "name": "calceph",
+ "version": "4.0.5",
+ "port-version": 1,
+ "description": "C library to access the binary planetary ephemeris files.",
+ "homepage": "https://www.imcce.fr/inpop/calceph/",
+ "documentation": "https://calceph.imcce.fr/docs/latest/html/c/index.html",
+ "license": "CECILL-2.1 OR CECILL-B OR CECILL-C",
+ "supports": "!uwp",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}