source: trunk/dports/science/cgnslib/Portfile

Last change on this file was 129129, checked in by petr@…, 3 years ago

cgnslib: modeline, reformating

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1# -*- 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
2# $Id: Portfile 129129 2014-12-07 16:44:35Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                cgnslib
7version             2.5.5
8set branch          [join [lrange [split ${version} .] 0 1] .]
9set minor           [lindex [split ${version} .] end]
10
11categories          science
12platforms           darwin
13maintainers         nomaintainer
14license             zlib
15
16description         Computational fluid dynamics data container.
17long_description    \
18    The CFD General Notation System (CGNS) provides a general, portable, \
19    and extensible standard for the storage and retrieval of computational \
20    fluid dynamics (CFD) analysis data. It consists of a collection of \
21    conventions, and free and open software implementing those conventions. \
22    It is self-descriptive, machine-independent, well-documented, and \
23    administered by an international steering committee.
24
25homepage            http://cgns.sourceforge.net/
26master_sites        sourceforge:cgns
27distname            ${name}_${branch}-${minor}
28worksrcdir          ${name}_${branch}
29
30checksums           sha1    38f934cae9d0cac1137e51640116f9a750c8d420 \
31                    rmd160  1c7452605afb664f4661cd057ccbb4e0c9230ed7
32
33configure.args-append --enable-lfs
34
35# cgns tools
36post-build {
37    system "cd ${worksrcpath}/tools && make"
38}
39
40destroot.destdir    INCLUDEDIR=${destroot}${prefix}/include \
41                    LIBDIR=${destroot}${prefix}/lib
42
43post-destroot {
44    xinstall -m 755 -W ${worksrcpath}/tools \
45        cgnsversion \
46        cgnspack \
47        cgnsdiff \
48        cgnscheck \
49        cgnslist \
50        ${destroot}${prefix}/bin
51    set docdir ${destroot}${prefix}/share/doc/${name}
52    xinstall -d ${docdir}
53    xinstall -m 644 -W ${worksrcpath} \
54        LICENSE \
55        README \
56        ${docdir}
57}
58
59# cgnslib 2.5.4_0 installed items directly in ${prefix}; remove them if found
60# Note: check if this is the appropriate solution
61post-install {
62    foreach file {include/cgnslib.h include/cgnslib_f.h include/cgnswin_f.h lib/libcgns.a} {
63        set filepath ${prefix}/${file}
64        if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
65            if {[catch {delete ${filepath}}]} {
66                ui_warn "Cannot delete ${filepath}; please remove it manually"
67            }
68        }
69    }
70}
Note: See TracBrowser for help on using the repository browser.