mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
NASA JPL Observation Geometry System for Planetary Science Missions C version
93 lines
3.1 KiB
Tcl
93 lines
3.1 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
|
|
name cspice
|
|
version N0066
|
|
categories science
|
|
platforms darwin
|
|
maintainers nomaintainer
|
|
|
|
# https://naif.jpl.nasa.gov/naif/rules.html
|
|
# this looks to be the appropriate license however IANAL
|
|
license public-domain
|
|
|
|
universal_variant no
|
|
supported_archs x86_64
|
|
|
|
description SPICE: An Observation Geometry System for Planetary Science Missions
|
|
|
|
long_description NASA's Navigation and Ancillary Information Facility (NAIF) provides \
|
|
this toolkit in order to allow (planetary) scientists access\
|
|
to all kinds of space exploration related positioning information.
|
|
|
|
homepage https://naif.jpl.nasa.gov/naif/
|
|
master_sites https://naif.jpl.nasa.gov/pub/naif/toolkit/C/MacIntel_OSX_AppleC_64bit/packages/
|
|
distname cspice
|
|
extract.suffix .tar.Z
|
|
|
|
checksums rmd160 567ea2e00477ed4d00bc127188b07ff668f3f08a \
|
|
sha256 f5d48c4b0d558c5d71e8bf6fcdf135b0943210c1ff91f8191dfc447419a6b12e \
|
|
size 38611927
|
|
|
|
post-extract {
|
|
xinstall -m 0644 -W "${filespath}" example.c naif0011.tls "${worksrcpath}/doc/"
|
|
}
|
|
|
|
use_configure no
|
|
|
|
build.env-append TKCOMPILER=${configure.cc} \
|
|
TKLINKOPTIONS=-m64\ ${configure.ldflags}\ -lm
|
|
|
|
build.cmd "sh makeall.csh"
|
|
|
|
set canonicalversion 66.0.0
|
|
|
|
post-build {
|
|
set major [join [lrange [split ${canonicalversion} .] 0 0] .]
|
|
|
|
system -W ${worksrcpath}/lib "\
|
|
${configure.cc} -Wall ${configure.cflags} \
|
|
[get_canonical_archflags cc] \
|
|
-dynamiclib -Wl,-all_load \
|
|
-o libcspice.${canonicalversion}.dylib \
|
|
-compatibility_version ${major} -current_version ${canonicalversion} \
|
|
-install_name ${prefix}/lib/libcspice.${canonicalversion}.dylib \
|
|
-lm \
|
|
cspice.a csupport.a"
|
|
}
|
|
|
|
|
|
destroot {
|
|
|
|
if {[variant_isset doc]} {
|
|
copy ${worksrcpath}/doc/ ${destroot}${prefix}/share/doc/CSPICE/
|
|
}
|
|
|
|
copy ${worksrcpath}/include/ ${destroot}${prefix}/include/CSPICE/
|
|
|
|
set binary_prefix ""
|
|
if {[variant_isset prefix_binaries]} {
|
|
set binary_prefix "CS"
|
|
}
|
|
|
|
# binaries statically linked, don't need shared lib
|
|
foreach l { brief chronos ckbrief commnt frmdiff inspekt mkspk msopck simple spacit \
|
|
spkdiff spkmerge states subpt tictoc tobin toxfr version} {
|
|
copy ${worksrcpath}/exe/${l} ${destroot}${prefix}/bin/${binary_prefix}${l}
|
|
}
|
|
}
|
|
|
|
post-destroot {
|
|
copy ${worksrcpath}/lib/libcspice.${canonicalversion}.dylib \
|
|
${destroot}${prefix}/lib/libcspice.${canonicalversion}.dylib
|
|
|
|
system -W ${destroot}${prefix}/lib "\
|
|
ln -s libcspice.${canonicalversion}.dylib libcspice.dylib"
|
|
}
|
|
|
|
default_variants +doc +prefix_binaries
|
|
|
|
variant doc description {Install documentation} {}
|
|
variant prefix_binaries description {Prepend "CS" to installed binaries' names} {}
|