* Add CSPICE

* Update xmake.lua

* Delete xmake.lua

---------

Co-authored-by: ruki <waruqi@gmail.com>
pull/2181/head
0x2Adr1 1 year ago committed by GitHub
parent 69123acec7
commit 53eaabe24a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      packages/c/cspice/xmake.lua

@ -0,0 +1,30 @@
package("cspice")
set_homepage("https://naif.jpl.nasa.gov/naif/toolkit.html")
set_description("An Observation Geometry System for Space Science Missions")
if is_plat("linux") then
set_urls("https://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Linux_GCC_64bit/packages/cspice.tar.Z")
add_versions("v67", "60a95b51a6472f1afe7e40d77ebdee43c12bb5b8823676ccc74692ddfede06ce")
elseif is_plat("macosx") then
set_urls("https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacM1_OSX_clang_64bit/packages/cspice.tar.Z")
add_versions("v67", "0deae048443e11ca4d093cac651d9785d4f2594631a183d85a3d58949f4d0aa9")
end
on_install("linux", "macosx", function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
target("cspice")
set_kind("$(kind)")
add_headerfiles("include/*.h")
add_files("src/cspice/*.c")
]])
local configs = {}
if package:config("shared") then
configs.kind = "shared"
end
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("j2000_c", {includes = {"SpiceUsr.h"}}))
end)
Loading…
Cancel
Save