source: trunk/dports/science/afni/Portfile

Last change on this file was 141589, checked in by devans@…, 21 months ago

afni: apparent stealth update.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.1 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 141589 2015-10-22 09:55:52Z ryandesign@macports.org $
3
4PortSystem    1.0
5
6name                afni
7version             2010_10_19_1028
8revision            3
9distname            AFNI_${version}
10categories          science
11maintainers         nomaintainer
12description         Analysis of Functional Neuro Images
13long_description    This is a port of AFNI, Advanced Functional Neuro \
14                    Imaging.  AFNI is a tool for analyzing 3 dimensional \
15                    images, especially functional MRI images used in \
16                    brain mapping research.
17homepage            http://afni.nimh.nih.gov/
18
19platforms           darwin
20depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
21                    port:glib1 \
22                    port:openmotif
23depends_run         port:netpbm \
24                    port:jpeg \
25                    port:whirlgif \
26                    port:endian
27
28master_sites        http://afni.nimh.nih.gov/pub/dist/tgz/AFNI_ARCHIVE/
29dist_subdir         ${name}/${version}_${revision}
30extract.suffix      .tgz
31
32checksums           rmd160  5909dd8f8decbe81069756d60a89cacd8219a760 \
33                    sha256  5ba89007c19cca665aab4fa0186c4f971f9e1d5adbb21e6b5d12ee08f64f2202
34
35pre-patch {
36    # use the right makefile
37    file copy ${worksrcpath}/Makefile.${combination} ${worksrcpath}/Makefile
38    # replace Fink path with ours
39    reinplace s|\/sw|${prefix}|g ${worksrcpath}/Makefile
40    # use the right compiler
41    reinplace s|cc|${configure.cc}|g ${worksrcpath}/Makefile
42    # add -ljpeg to llibs
43    reinplace {s|LLIBS  = |LLIBS  = -ljpeg |} ${worksrcpath}/Makefile
44    # separate bin/lib/share for manual destroot
45    reinplace "s|INSTALLDIR = ${combination}|INSTALLDIR = ${destroot}${prefix}/bin|" ${worksrcpath}/Makefile
46    reinplace "s|LIBDIR = \$(INSTALLDIR)|LIBDIR = ${destroot}${prefix}/lib|" ${worksrcpath}/Makefile
47    reinplace "s|shared_objs: \$(INSTALLDIR) libmri.so libmrix.so|shared_objs: \$(LIBDIR) libmri.so libmrix.so|" ${worksrcpath}/Makefile
48    reinplace "s|MAKE = make|MAKE = make\\\nSHAREDIR = ${destroot}${prefix}/share/${name}|" ${worksrcpath}/Makefile
49}
50patchfiles          patch-Makefile.INCLUDE.diff
51
52use_configure       no
53
54if {${os.major} == 10} {
55    set combination macosx_10.6_Intel_64
56}
57
58if {${os.major} == 9} {
59    if {${configure.build_arch} eq "x86_64"} {
60        set combination macosx_10.5_Intel_64
61    }
62    if {${configure.build_arch} eq "i386"}  {
63        set combination macosx_10.5_Intel
64    }
65    if {${configure.build_arch} eq "ppc64"} {
66        set combination macosx_10.5_G5
67    }
68    if {${configure.build_arch} eq "ppc"} {
69        set combination macosx_10.5_G4
70    }
71}
72
73if {${os.major} == 8} {
74    if {${configure.build_arch} eq "i386"}  {
75        set combination macosx_10.4_Intel
76    }
77    if {${configure.build_arch} eq "ppc64"} {
78        set combination macosx_10.4_G5
79    }
80    if {${configure.build_arch} eq "ppc"} {
81        set combination macosx_10.4
82    }
83}
84
85pre-build    {
86        # this appears to be Tiger-only, but i'm uncertain (predates me)
87        if { ! [file exists "/usr/X11R6/lib/libGLw.a"] } {
88            file copy ${distpath}/libGLw.a.tiger /usr/X11R6/lib/libGLw.a
89        }
90        #file copy -force ${distpath}/afni.1 ${workpath}
91        #reinplace "s|%%PREFIX%%|${prefix}|g" ${workpath}/afni.1
92}
93build.target        all plugins
94
95destroot.target     vastness
96post-destroot {
97        # Deal with files that conflict with other ports
98        eval file delete ${destroot}${prefix}/bin/cjpeg ${destroot}${prefix}/bin/djpeg \
99            ${destroot}${prefix}/bin/whirlgif
100        file rename ${destroot}${prefix}/bin/abut ${destroot}${prefix}/bin/afni_abut
101
102#        xinstall -d -m 755 ${destroot}${prefix}/lib/${name}
103#        xinstall -d -m 755 ${destroot}${prefix}/include/${name}
104#        xinstall -d -m 755 ${destroot}${prefix}/share/${name}
105#        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
106
107#       eval file rename [glob ${destroot}${prefix}/bin/*.a] ${destroot}${prefix}/lib/${name}
108#       eval file rename [glob ${destroot}${prefix}/bin/*.so] ${destroot}${prefix}/lib/${name}
109#       eval file rename [glob ${destroot}${prefix}/bin/*.h] ${destroot}${prefix}/include/${name}
110#       eval file rename [glob ${destroot}${prefix}/bin/*.jpg] ${destroot}${prefix}/share/${name}
111#       eval file rename [glob ${destroot}${prefix}/bin/README.*] ${destroot}${prefix}/share/doc/${name}
112#       eval file rename [glob ${destroot}${prefix}/bin/*.txt] ${destroot}${prefix}/share/${name}
113
114# Install binaries and scripts
115#        xinstall -d -m 755 ${destroot}${prefix}/bin
116#        eval xinstall -m 755 [glob ${worksrcpath}/macosx_bin/*] ${destroot}${prefix}/bin
117}
118
119notes "
120abut has been renamed to afni_abut to resolve a collision with the unixstat port.
121
122AFNI_PLUGIN_PATH should be set to ${prefix}/lib/afni:${prefix}/share/afni.
123AFNI_GLOBAL_SESSION should be set to ${prefix}/share/afni.
124"
125livecheck.url       http://afni.nimh.nih.gov/pub/dist/tgz
126livecheck.version   [string map {_ .} ${version}]
127livecheck.regex     (\\d+(\\.\\d+)+)\.*afni_src${extract.suffix}
Note: See TracBrowser for help on using the repository browser.