# -*- 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 # $Id: 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 categories 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 platforms 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+)