Skip to content

Commit

Permalink
[cspice] Add 64bit packages (#12903)
Browse files Browse the repository at this point in the history
  • Loading branch information
NancyLi1013 committed Aug 28, 2020
1 parent 0a506f7 commit 1f1a680
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 31 deletions.
8 changes: 6 additions & 2 deletions ports/cspice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ if (WIN32)
target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO")
set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
elseif (UNIX)
target_compile_definitions(cspice PUBLIC "NON_ANSI_STDIO")
target_compile_options(cspice PUBLIC -m64 -ansi -fPIC)
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()
endif ()

if (NOT _SKIP_HEADERS)
Expand Down
5 changes: 4 additions & 1 deletion ports/cspice/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Source: cspice
Version: 66-1
Version: 66
Port-Version: 2
Homepage: https://naif.jpl.nasa.gov/naif/toolkit_C.html
Description: NASA C SPICE toolkit
Supports: !uwp
70 changes: 44 additions & 26 deletions ports/cspice/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,31 +1,49 @@
include(vcpkg_common_functions)
vcpkg_fail_port_install(ON_TARGET "uwp")

if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()

if (WIN32)
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Windows_VisualC_32bit/packages/cspice.zip"
FILENAME "cspice.zip"
SHA512 4f6129b26543729f4eb4f8240b43ca87530db9c6d9a5c0e3f43faf30561eaad95dcf507e3fecfd1c3d4388ccaa4e22a76df7bf7945b6ce9a68eb3b4893885992
)
elseif (APPLE)
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_32bit/packages/cspice.tar.Z"
FILENAME "cspice.tar.Z"
SHA512 bd5cc20206e48b3712c5077a2beb05c98cd58a25ce374ed363699a04998eb8ba93e42b5f7c2104c5296db95b3bccdc7cc9b6a2ba45875454d0c3914834aa4c42
)
else ()
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_32bit/packages/cspice.tar.Z"
FILENAME "cspice.tar.Z"
SHA512 b387bc2cfca4deccc451d198af49564ea0b19cf665ba143d39196ed532639cbc11aad7e1d63f71f1bb88d72c0e6ac30757b6e1babca9e0ee3b92f9c205c1b908
)
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Windows_VisualC_32bit/packages/cspice.zip"
FILENAME "cspice_32bit.zip"
SHA512 4f6129b26543729f4eb4f8240b43ca87530db9c6d9a5c0e3f43faf30561eaad95dcf507e3fecfd1c3d4388ccaa4e22a76df7bf7945b6ce9a68eb3b4893885992
)
elseif (VCPKG_TARGET_IS_OSX)
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_32bit/packages/cspice.tar.Z"
FILENAME "cspice_32bit.tar.Z"
SHA512 bd5cc20206e48b3712c5077a2beb05c98cd58a25ce374ed363699a04998eb8ba93e42b5f7c2104c5296db95b3bccdc7cc9b6a2ba45875454d0c3914834aa4c42
)
else ()
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_32bit/packages/cspice.tar.Z"
FILENAME "cspice_32bit.tar.Z"
SHA512 b387bc2cfca4deccc451d198af49564ea0b19cf665ba143d39196ed532639cbc11aad7e1d63f71f1bb88d72c0e6ac30757b6e1babca9e0ee3b92f9c205c1b908
)
endif()
else()
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Windows_VisualC_64bit/packages/cspice.zip"
FILENAME "cspice_64bit.zip"
SHA512 7b5353c638fdba67ed2e9fd21c4f78ac56c0afba408caa70f910f23bb025f6dc822fbaa7d6d7fa277d1038f835e6a962563f4b11a6adf63150d48354959e3c62
)
elseif (VCPKG_TARGET_IS_OSX)
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z"
FILENAME "cspice_64bit.tar.Z"
SHA512 0d4ef95dfa65d127c1d6f9cf1f637d41ca6680660ee3003f357652f12ed9d04a21888ef796f347ba90354a445b5aea9ffca7dedc6c1617f253b0002683d54a0f
)
else ()
vcpkg_download_distfile(ARCHIVE
URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_64bit/packages/cspice.tar.Z"
FILENAME "cspice_64bit.tar.Z"
SHA512 7d090e9196596436740b53180a7c6ca885c12e301771a83fc62d625a63691129c69012cb0385a6c8f246cc5edf1c1af57ffac8a9d766061e1bde8584c57c6ca4
)
endif()
endif()

set(PATCHES isatty.patch)
if (NOT WIN32)
if (NOT VCPKG_TARGET_IS_WINDOWS)
set(PATCHES ${PATCHES} mktemp.patch)
endif()

Expand Down Expand Up @@ -55,6 +73,6 @@ vcpkg_copy_pdbs()

file(
INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt
DESTINATION ${CURRENT_PACKAGES_DIR}/share/cspice
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
RENAME copyright
)
)
2 changes: 0 additions & 2 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@ crashpad:x86-windows=fail
crfsuite:arm-uwp=fail
crfsuite:x64-uwp=fail
crossguid:x64-osx=fail
cspice:arm-uwp=fail
cspice:x64-uwp=fail
ctemplate:arm64-windows=fail
ctemplate:arm-uwp=fail
ctemplate:x64-linux=fail
Expand Down

0 comments on commit 1f1a680

Please sign in to comment.