Afni version 2009.07.16.1049 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    version 2009.07.16.1049

      View the most recent changes for the afni port at: afni.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for afni.
      The raw portfile for afni 2009.07.16.1049 is located here:
      http://afni.darwinports.com/dports/science/afni/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/afni


      # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
      The afni Portfile 59664 2009-10-19 13:09:53Z snc macports.org $

      PortSystem 1.0

      Name: afni
      Version: 2009.07.16.1049
      distfiles afni_src.tgz afni.1 3dClustBust.c TTatlas+tlrc.BRIK.gz TTatlas+tlrc.HEAD CA_EZ_v1.5-July3107.tgz libGLw.a.tiger
      Category: science
      Maintainers: snc openmaintainer
      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/
      Master Sites: http://www.neuro.mcw.edu/~bacon/Ports/distfiles/AFNI/${version}/
      extract.only afni_src.tgz CA_EZ_v1.5-July3107.tgz
      use_configure no
      Platform: darwin
      depends_lib port:glib2 port:glib1 port:openmotif
      depends_run port:netpbm port:jpeg port:whirlgif port:endian
      #build.dir ${workpath}/afni_src
      worksrcdir afni_src
      build.target vastness

      Checksums: afni_src.tgz md5 15786ad285b26bbd110e7892face6844 afni.1 md5 02708ca46c60d6774af4796535e263ed TTatlas+tlrc.BRIK.gz md5 f5a107b049bc426af5342565f4e5beee TTatlas+tlrc.HEAD md5 a0ca787a2996d7e66548176808503ac5 CA_EZ_v1.5-July3107.tgz md5 66341b819e9889ff60a9c3554123db68 3dClustBust.c md5 e5f890f4e0894d6e16e3579d3ff89f49 libGLw.a.tiger md5 c6c30011f603f7c055ba36156ca64d38

      #patchfiles patch-Makefile.INCLUDE

      platform powerpc {
      post-patch {
      file copy ${filespath}/Makefile.ppc ${worksrcpath}/Makefile
      file copy ${distpath}/3dClustBust.c ${worksrcpath}/
      reinplace -E "s|AFNI_\[0-9_\]+|${version}|g" ${worksrcpath}/AFNI_label.h
      }
      }

      platform i386 {
      post-patch {
      file copy ${filespath}/Makefile.i386 ${worksrcpath}/Makefile
      file copy ${distpath}/3dClustBust.c ${worksrcpath}/
      reinplace -E "s|AFNI_\[0-9_\]+|${version}|g" ${worksrcpath}/AFNI_label.h
      }
      }

      pre-build {
      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}
      # file copy -force ${filespath}/afni.cshrc ${workpath}
      # file copy -force ${filespath}/afni.profile ${workpath}
      reinplace "s|%%PREFIX%%|${prefix}|g" ${workpath}/afni.1
      # reinplace "s|%%PREFIX%%|${prefix}|g" ${workpath}/afni.cshrc
      # reinplace "s|%%PREFIX%%|${prefix}|g" ${workpath}/afni.profile
      # reinplace "s|%%DATADIR%%|${prefix}/share/afni|g" ${workpath}/afni.cshrc
      # reinplace "s|%%DATADIR%%|${prefix}/share/afni|g" ${workpath}/afni.profile
      }

      destroot {
      # First, separate files that were all dumped into macosx_bin by the Makefile
      file mkdir ${worksrcpath}/macosx_lib
      eval file rename [glob ${worksrcpath}/macosx_bin/*.a] ${worksrcpath}/macosx_lib
      eval file rename [glob ${worksrcpath}macosx_bin/*.so] ${worksrcpath}/macosx_lib
      file mkdir ${worksrcpath}/macosx_include
      eval file rename [glob macosx_bin/*.h] macosx_include
      file mkdir ${worksrcpath}/macosx_share
      eval file rename [glob ${worksrcpath}/macosx_bin/*.jpg] ${worksrcpath}/macosx_share
      eval file rename [glob ${worksrcpath}/macosx_bin/*.txt] ${worksrcpath}/macosx_share

      # Delete files that conflict with other ports
      eval file delete ${worksrcpath}/macosx_bin/cjpeg ${worksrcpath}/macosx_bin/djpeg ${worksrcpath}/macosx_bin/whirlgif
      file rename ${worksrcpath}/macosx_bin/abut ${worksrcpath}/macosx_bin/afni_abut

      # Install binaries and scripts
      xinstall -d -m 755 ${destroot}${prefix}/bin
      eval xinstall -m 755 [glob ${worksrcpath}/macosx_bin/*] ${destroot}${prefix}/bin
      # Install libraries and plugins
      xinstall -d -m 755 ${destroot}${prefix}/lib/afni
      eval xinstall -m 644 [glob ${worksrcpath}/macosx_lib/*] ${destroot}${prefix}/lib/afni
      # Install headers
      xinstall -d -m 755 ${destroot}${prefix}/include/afni
      eval xinstall -m 644 [glob ${worksrcpath}/macosx_include/*] ${destroot}${prefix}/include/afni

      # Install miscellaneous files
      xinstall -d -m 755 ${destroot}${prefix}/share/afni
      eval xinstall -m 644 [glob ${worksrcpath}/macosx_share/*] ${destroot}${prefix}/share/afni
      eval xinstall -m 644 [glob ${distpath}/TTatlas*] ${destroot}${prefix}/share/afni
      eval xinstall -m 644 [glob ${workpath}/CA_EZ_v1.5-July3107/*] ${destroot}${prefix}/share/afni

      # Install docs
      xinstall -d -m 755 ${destroot}${prefix}/share/doc/afni
      eval xinstall -m 644 [glob ${worksrcpath}/README.*] ${destroot}${prefix}/share/doc/afni
      xinstall -d -m 755 ${destroot}${prefix}/share/man/man1
      eval xinstall -m 644 ${workpath}/afni.1 ${destroot}${prefix}/share/man/man1
      xinstall -d -m 755 ${destroot}${prefix}/etc/mri
      xinstall -m 0555 ${workpath}/afni.cshrc ${destroot}${prefix}/etc/mri
      xinstall -m 0555 ${workpath}/afni.profile ${destroot}${prefix}/etc/mri
      }
      post-destroot {
      ui_msg "\n
      ===========================================================================

      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.

      ===========================================================================\n"
      }

      livecheck.url http://www.neuro.mcw.edu/~bacon/Ports/distfiles/AFNI/
      livecheck.regex (\\d+\\.\\d+\\.\\d+\\.\\d+)

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/afni
      % sudo port install afni
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching afni
      ---> Verifying checksum for afni
      ---> Extracting afni
      ---> Configuring afni
      ---> Building afni with target all
      ---> Staging afni into destroot
      ---> Installing afni
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using afni with these commands:
      %  man afni
      % apropos afni
      % which afni
      % locate afni

     Where to find more information:

    Darwin Ports



    Lightbox this page.