# -*- 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 name afni version 2010_10_19_1028 revision 3 distname AFNI_${version} categories science maintainers nomaintainer description Analysis of Functional Neuro Images long_description This is a port of AFNI, Advanced Functional Neuro \ Imaging. AFNI is a tool for analyzing 3 dimensional \ images, especially functional MRI images used in \ brain mapping research. homepage http://afni.nimh.nih.gov/ platforms darwin depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \ port:glib1 \ port:openmotif depends_run port:netpbm \ port:jpeg \ port:whirlgif \ port:endian master_sites http://afni.nimh.nih.gov/pub/dist/tgz/AFNI_ARCHIVE/ dist_subdir ${name}/${version}_${revision} extract.suffix .tgz checksums rmd160 5909dd8f8decbe81069756d60a89cacd8219a760 \ sha256 5ba89007c19cca665aab4fa0186c4f971f9e1d5adbb21e6b5d12ee08f64f2202 pre-patch { # use the right makefile file copy ${worksrcpath}/Makefile.${combination} ${worksrcpath}/Makefile # replace Fink path with ours reinplace s|\/sw|${prefix}|g ${worksrcpath}/Makefile # use the right compiler reinplace s|cc|${configure.cc}|g ${worksrcpath}/Makefile # add -ljpeg to llibs reinplace {s|LLIBS = |LLIBS = -ljpeg |} ${worksrcpath}/Makefile # separate bin/lib/share for manual destroot reinplace "s|INSTALLDIR = ${combination}|INSTALLDIR = ${destroot}${prefix}/bin|" ${worksrcpath}/Makefile reinplace "s|LIBDIR = \$(INSTALLDIR)|LIBDIR = ${destroot}${prefix}/lib|" ${worksrcpath}/Makefile reinplace "s|shared_objs: \$(INSTALLDIR) libmri.so libmrix.so|shared_objs: \$(LIBDIR) libmri.so libmrix.so|" ${worksrcpath}/Makefile reinplace "s|MAKE = make|MAKE = make\\\nSHAREDIR = ${destroot}${prefix}/share/${name}|" ${worksrcpath}/Makefile } patchfiles patch-Makefile.INCLUDE.diff use_configure no if {${os.major} == 10} { set combination macosx_10.6_Intel_64 } if {${os.major} == 9} { if {${configure.build_arch} eq "x86_64"} { set combination macosx_10.5_Intel_64 } if {${configure.build_arch} eq "i386"} { set combination macosx_10.5_Intel } if {${configure.build_arch} eq "ppc64"} { set combination macosx_10.5_G5 } if {${configure.build_arch} eq "ppc"} { set combination macosx_10.5_G4 } } if {${os.major} == 8} { if {${configure.build_arch} eq "i386"} { set combination macosx_10.4_Intel } if {${configure.build_arch} eq "ppc64"} { set combination macosx_10.4_G5 } if {${configure.build_arch} eq "ppc"} { set combination macosx_10.4 } } pre-build { # this appears to be Tiger-only, but i'm uncertain (predates me) if { ! [file exists "/usr/X11R6/lib/libGLw.a"] } { file copy ${distpath}/libGLw.a.tiger /usr/X11R6/lib/libGLw.a } #file copy -force ${distpath}/afni.1 ${workpath} #reinplace "s|%%PREFIX%%|${prefix}|g" ${workpath}/afni.1 } build.target all plugins destroot.target vastness post-destroot { # Deal with files that conflict with other ports eval file delete ${destroot}${prefix}/bin/cjpeg ${destroot}${prefix}/bin/djpeg \ ${destroot}${prefix}/bin/whirlgif file rename ${destroot}${prefix}/bin/abut ${destroot}${prefix}/bin/afni_abut # xinstall -d -m 755 ${destroot}${prefix}/lib/${name} # xinstall -d -m 755 ${destroot}${prefix}/include/${name} # xinstall -d -m 755 ${destroot}${prefix}/share/${name} # xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} # eval file rename [glob ${destroot}${prefix}/bin/*.a] ${destroot}${prefix}/lib/${name} # eval file rename [glob ${destroot}${prefix}/bin/*.so] ${destroot}${prefix}/lib/${name} # eval file rename [glob ${destroot}${prefix}/bin/*.h] ${destroot}${prefix}/include/${name} # eval file rename [glob ${destroot}${prefix}/bin/*.jpg] ${destroot}${prefix}/share/${name} # eval file rename [glob ${destroot}${prefix}/bin/README.*] ${destroot}${prefix}/share/doc/${name} # eval file rename [glob ${destroot}${prefix}/bin/*.txt] ${destroot}${prefix}/share/${name} # Install binaries and scripts # xinstall -d -m 755 ${destroot}${prefix}/bin # eval xinstall -m 755 [glob ${worksrcpath}/macosx_bin/*] ${destroot}${prefix}/bin } notes " abut has been renamed to afni_abut to resolve a collision with the unixstat port. AFNI_PLUGIN_PATH should be set to ${prefix}/lib/afni:${prefix}/share/afni. AFNI_GLOBAL_SESSION should be set to ${prefix}/share/afni. " livecheck.url http://afni.nimh.nih.gov/pub/dist/tgz livecheck.version [string map {_ .} ${version}] livecheck.regex (\\d+(\\.\\d+)+)\.*afni_src${extract.suffix}