aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-08-28 13:15:26 +0800
committerGitHub <noreply@github.com>2020-08-27 22:15:26 -0700
commit1f1a6806728133f51501a73e218b401ba127a35b (patch)
tree0967890b6b6d6e8bc86b638015f7092d6a7ff21c /ports
parent0a506f7c5e7ecc85893855fcd6bf3ace96d590ae (diff)
downloadvcpkg-1f1a6806728133f51501a73e218b401ba127a35b.tar.gz
vcpkg-1f1a6806728133f51501a73e218b401ba127a35b.zip
[cspice] Add 64bit packages (#12903)
Diffstat (limited to 'ports')
-rw-r--r--ports/cspice/CMakeLists.txt8
-rw-r--r--ports/cspice/CONTROL5
-rw-r--r--ports/cspice/portfile.cmake70
3 files changed, 54 insertions, 29 deletions
diff --git a/ports/cspice/CMakeLists.txt b/ports/cspice/CMakeLists.txt
index e82b3a280..af5c3e22b 100644
--- a/ports/cspice/CMakeLists.txt
+++ b/ports/cspice/CMakeLists.txt
@@ -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)
diff --git a/ports/cspice/CONTROL b/ports/cspice/CONTROL
index 670f75a3a..bb83e586d 100644
--- a/ports/cspice/CONTROL
+++ b/ports/cspice/CONTROL
@@ -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 \ No newline at end of file
diff --git a/ports/cspice/portfile.cmake b/ports/cspice/portfile.cmake
index 7c52772f3..865325a7a 100644
--- a/ports/cspice/portfile.cmake
+++ b/ports/cspice/portfile.cmake
@@ -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()
@@ -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
-)
+) \ No newline at end of file