early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

46
externals/vcpkg/ports/cspice/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.1)
project(cspice LANGUAGES C)
set(SOVERSION 67)
# Include all *.c files from the library
file(GLOB CSPICE_SOURCE ${PROJECT_SOURCE_DIR}/cspice/src/cspice/*.c)
set(INCLUDE_PATH "${PROJECT_SOURCE_DIR}/cspice/include")
if (_STATIC_BUILD)
add_library(cspice STATIC ${CSPICE_SOURCE})
else()
add_library(cspice SHARED ${CSPICE_SOURCE})
endif()
target_include_directories(cspice PUBLIC "${INCLUDE_PATH}")
if (WIN32)
target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO;_CRT_SECURE_NO_WARNINGS")
set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
elseif (UNIX)
target_compile_definitions(cspice PUBLIC "NON_UNIX_STDIO")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
target_compile_options(cspice PUBLIC -m64 -ansi -fPIC)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
target_compile_options(cspice PUBLIC -m32 -ansi -fPIC)
endif()
target_compile_options(cspice PRIVATE -Wno-error=implicit-function-declaration)
endif ()
if (NOT _SKIP_HEADERS)
file(GLOB SPICE_HEADERS ${INCLUDE_PATH}/*.h)
install(FILES ${SPICE_HEADERS} DESTINATION include/cspice)
endif()
set_target_properties(
cspice
PROPERTIES SOVERSION ${SOVERSION}
)
install(
TARGETS cspice
EXPORT cspice
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

16
externals/vcpkg/ports/cspice/License.txt vendored Executable file
View File

@@ -0,0 +1,16 @@
This software and any related materials were created by the California
Institute of Technology (Caltech) under U.S. government contract with the
National Aeronautics and Space Administration (NASA). The software is
Technology and Software Publicly Available under U.S. export laws and is
provided "as-is" to the recipient without warranty of any kind, including any
warranties of performance or merchantability or fitness for particular use or
purpose (as set forth in United States UCC§2312-§2313) or for any purpose
whatsoever, for the software and related materials, however used. In no event
shall Caltech, its Jet Propulsion Laboratory, or NASA be liable for any damages
and/or costs, including, but not limited to, incidental or consequential
damages of any kind, including economic damage or injury to property and lost
profits, regardless of whether Caltech, JPL, or NASA be advised, have reason to
know, or, in fact, shall know of the possibility. Recipient bears all risk
relating to quality and performance of the software and any related materials,
and agrees to indemnify Caltech and NASA for all third-party claims resulting
from the actions of recipient in the use of the software.

19
externals/vcpkg/ports/cspice/isatty.patch vendored Executable file
View File

@@ -0,0 +1,19 @@
--- a/cspice/src/cspice/fio.h 2019-11-01 20:51:53.198400000 +0300
+++ b/cspice/src/cspice/fio.h 2019-11-01 21:19:58.123200000 +0300
@@ -1,3 +1,6 @@
+#ifdef _WIN32
+#include <io.h> /* for isatty() */
+#endif
#include "stdio.h"
#include "errno.h"
#ifndef NULL
@@ -75,7 +76,9 @@
extern int (*f__donewrec)(void), t_putc(int), x_wSL(void);
extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*);
extern int c_sfe(cilist*), z_rnew(void);
+#ifndef _WIN32
extern int isatty(int);
+#endif
extern int err__fl(int,int,char*);
extern int xrd_SL(void);
extern int f__putbuf(int);

11
externals/vcpkg/ports/cspice/mktemp.patch vendored Executable file
View File

@@ -0,0 +1,11 @@
--- a/cspice/src/cspice/open.c 2019-11-02 10:57:10.073886963 +0300
+++ b/cspice/src/cspice/open.c 2019-11-02 10:57:49.230398941 +0300
@@ -324,7 +324,7 @@
#ifdef NON_ANSI_STDIO
(void) strcpy(buf,"tmp.FXXXXXX");
- (void) mktemp(buf);
+ fclose(mktemp(buf));
goto replace;
#else

70
externals/vcpkg/ports/cspice/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,70 @@
if (VCPKG_TARGET_IS_WINDOWS)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(SUBPATH "PC_Windows_VisualC_32bit/packages/cspice.zip")
set(SHA512 1949fd12b30ca0e42f53311a97d8571e68737f6a667a56946d3415ee715dda0a1adca9bfc985b9b9447084189c50d261f2c00960cbe2ddf6a1d1d92cf8fa17ab)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(SUBPATH "PC_Windows_VisualC_64bit/packages/cspice.zip")
set(SHA512 5457f24279fb485b0ac92713dab026d1c1ed766a358fcf7d9ce3f70693e75da85a656e72b1ada4dc334e9e68d6c0eb42b2a31f3ad0c83b491dd3afc79e5cda98)
endif()
elseif(VCPKG_TARGET_IS_OSX)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(SUBPATH "MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z")
set(SHA512 ea9a32c763cd54303de180b4895a195cd5ef6774051f18a1812f2fff39adc0ca9d5dd7878853af40e766882e79a0f542a45139656fb79fb4b436c4bc5bdecddc)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(SUBPATH "MacM1_OSX_clang_64bit/packages/cspice.tar.Z")
set(SHA512 a64f028ec1935dbc7f8d03c903fbfa40cfff097ec4aa0ca4aa1d2ee08561833000e7caf99d6550b06d2a0874cbaf1767382e7a9aea6a39228f3eaa89c6c31a6d)
endif()
else()
if ((VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") OR (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm"))
set(SUBPATH "PC_Linux_GCC_32bit/packages/cspice.tar.Z")
set(SHA512 22a6250376e9f98d75ecc8682c5432a07a89addc9812010ad97059491e2c19cab418d7aa3f591bded9df132fcfb6865686f0ecfe70821ad31061ae2f7b165f2b)
elseif((VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") OR (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64"))
set(SUBPATH "PC_Linux_GCC_64bit/packages/cspice.tar.Z")
set(SHA512 59946f628284cd31c75a23c152d725ae7e01b179f97c52b98518eceeda54bc38875b1dd93dc17574c0bf00e706e0ee35d06ecb5d7871d49633baa8f16eb6c7c8)
endif()
endif()
set(VERSION 67)
set(URL "https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N00${VERSION}/C/${SUBPATH}")
get_filename_component(ext "${SUBPATH}" EXT)
string(SUBSTRING "${SHA512}" 0 6 subsha)
vcpkg_download_distfile(ARCHIVE URLS "${URL}" FILENAME "cspice-${subsha}${ext}" SHA512 "${SHA512}")
set(PATCHES isatty.patch)
if (NOT VCPKG_TARGET_IS_WINDOWS)
set(PATCHES ${PATCHES} mktemp.patch)
endif()
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
NO_REMOVE_ONE_LEVEL
PATCHES ${PATCHES}
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(_STATIC_BUILD ON)
endif()
if (VCPKG_TARGET_IS_UWP)
set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}")
set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}")
endif()
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -D_STATIC_BUILD=${_STATIC_BUILD}
OPTIONS_DEBUG -D_SKIP_HEADERS=ON
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
file(
INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
RENAME copyright
)

19
externals/vcpkg/ports/cspice/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,19 @@
{
"name": "cspice",
"version": "67",
"port-version": 2,
"description": "NASA C SPICE toolkit",
"homepage": "https://naif.jpl.nasa.gov/naif/toolkit_C.html",
"license": null,
"supports": "!((arm | arm64) & windows)",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}