# -*- 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 # $Id$ PortSystem 1.0 PortGroup compilers 1.0 name cdf epoch 1 version 3.6.1.0 set my_branch [join [lrange [split ${version} .] 0 1] ""] set my_version ${my_branch}_[join [lrange [split [regsub -- {\.0$} ${version} {}] .] 2 end] "_"] set my_short_version ${my_branch}_[lindex [split ${version} .] 2] maintainers ryandesign openmaintainer platforms darwin categories science license Noncommercial description CDF: Common Data Format long_description The Common Data Format (CDF) is a self-describing \ data format for the storage and manipulation of \ scalar and multidimensional data in a platform and \ discipline independent fashion. homepage http://cdf.gsfc.nasa.gov/ master_sites http://cdaweb.gsfc.nasa.gov/pub/software/cdf/dist/${name}${my_version}/unix/ distname ${name}${my_version}-dist extract.suffix -all${extract.suffix} checksums rmd160 2ea69b2183963aa42b699f34fdf87d1692e4453e \ sha256 77ace02e90f4ead42eb133cb5894804da648ec85be5f9e929fb2929b4e05890b depends_lib port:ncurses worksrcdir ${name}${my_short_version}-dist post-patch { reinplace "s|\\\$(INSTALLDIR)/bin/definitions\\.\\(\[BCK\]\\)|${prefix}/bin/definitions.\\1|" ${worksrcpath}/Makefile } use_configure no compilers.choose cc fc compilers.setup pre-build { set cdf_os macosx #set cdf_env ${configure.build_arch} set cdf_env gnu build.args-append ENV=${cdf_env} \ OS=${cdf_os} \ COPTIONSld_${cdf_os}_${cdf_env}= \ CURSESLIB_${cdf_os}_${cdf_env}=${prefix}/lib/libncurses.dylib \ LDOPTIONS_${cdf_os}_${cdf_env}="-dynamiclib -install_name ${prefix}/lib/libcdf.dylib" \ MACOSxFopt= \ MACOSxlink="-lc -lm" \ MACOSxmin= if {${os.endian} eq "little"} { set endian_flag i386 } else { set endian_flag __ppc__ } # When upgrading, verify COPTIONS still approximately reflects what’s in the Makefile. # Using ${configure.cc_archflags} in LD because ${configure.ld_archflags} doesn’t use -m32 / -m64 flags when they’re needed. build.args-append COPTIONS_${cdf_os}_${cdf_env}="-D${endian_flag} -D__APPLE__ -D__MACH__ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE ${configure.optflags}" \ CC="${configure.cc} ${configure.cc_archflags}" \ LD="${configure.cc} ${configure.cc_archflags}" if {![fortran_variant_isset]} { build.args-append \ FORTRAN=no } else { build.args-append \ FC="${configure.fc} ${configure.fc_archflags}" \ FORTRAN=yes } } use_parallel_build no destroot.destdir INSTALLDIR=${destroot}${prefix} post-destroot { reinplace "s|${destroot}||g" {*}[glob ${destroot}${prefix}/bin/definitions.*] set docdir ${destroot}${prefix}/share/doc/${name} xinstall -d ${docdir} xinstall -W ${worksrcpath} CDF_copyright.txt CHANGES.txt \ README_cdf_tools.txt Release.notes Welcome.txt ${docdir} move ${destroot}${prefix}/CDFLeapSeconds.txt ${docdir} } livecheck.type regex livecheck.url http://cdf.gsfc.nasa.gov/html/sw_and_docs.html livecheck.regex {latest official released version V([0-9.]+)}