[68259] trunk/dports/science/afni

snc at macports.org snc at macports.org
Sat May 29 20:34:41 PDT 2010


Revision: 68259
          http://trac.macports.org/changeset/68259
Author:   snc at macports.org
Date:     2010-05-29 20:34:36 -0700 (Sat, 29 May 2010)
Log Message:
-----------
use the right compiler, #24669. build failure, #23397.

Modified Paths:
--------------
    trunk/dports/science/afni/Portfile

Added Paths:
-----------
    trunk/dports/science/afni/files/patch-Makefile.INCLUDE.diff

Modified: trunk/dports/science/afni/Portfile
===================================================================
--- trunk/dports/science/afni/Portfile	2010-05-30 03:01:47 UTC (rev 68258)
+++ trunk/dports/science/afni/Portfile	2010-05-30 03:34:36 UTC (rev 68259)
@@ -4,18 +4,15 @@
 PortSystem	1.0
 
 name		afni
-version		2009.07.16.1049
-revision    2
-distfiles	afni_src.tgz afni.1 3dClustBust.c \
-                TTatlas+tlrc.BRIK.gz TTatlas+tlrc.HEAD CA_EZ_v1.5-July3107.tgz \
-		libGLw.a.tiger
+version		2009_12_31_1431
+distname	AFNI_${version}
+extract.suffix .tgz
 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
+master_sites	http://afni.nimh.nih.gov/pub/dist/tgz/AFNI_ARCHIVE/
 use_configure	no
 platforms           darwin
 depends_lib	path:lib/pkgconfig/glib-2.0.pc:glib2 \
@@ -25,93 +22,99 @@
 		port:jpeg \
 		port:whirlgif \
 		port:endian
-#build.dir	${workpath}/afni_src
-worksrcdir	afni_src
-build.target	vastness
+checksums           md5     00959234f2e512cf1b16335d3ab80f1d \
+                    sha1    cfde2df4edd33ae78bcd41ae9226c44f0174c005 \
+                    rmd160  fbe9f7afc5a28fe4fa3bcba1bdc87494ca47ce85
 
-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
+build.target	    all plugins
 
-#patchfiles	patch-Makefile.INCLUDE
+if {${os.major} == 10} {
+    set combination macosx_10.6_Intel_64
+}
 
-platform powerpc {
-	post-extract {
-                file copy ${filespath}/Makefile.ppc \
-			${worksrcpath}/Makefile
-	}
+if {${os.major} == 9} {
+    if {${configure.build_arch} == "x86_64"} {
+        set combination macosx_10.5_Intel_64
+    }
+    if {${configure.build_arch} == "i386"}  {
+        set combination macosx_10.5_Intel
+    }
+    if {${configure.build_arch} == "ppc64"} {
+        set combination macosx_10.5_G5
+    }
+    if {${configure.build_arch} == "ppc"} {
+        set combination macosx_10.5_G4
+    }
 }
 
-platform i386 {
-	post-extract {
-                file copy ${filespath}/Makefile.i386 \
-			${worksrcpath}/Makefile
-	}
+if {${os.major} == 8} {
+    if {${configure.build_arch} == "i386"}  {
+        set combination macosx_10.4_Intel
+    }
+    if {${configure.build_arch} == "ppc64"} {
+        set combination macosx_10.4_G5
+    }
+    if {${configure.build_arch} == "ppc"} {
+        set combination macosx_10.4
+    }
 }
 
-post-patch {
-		file copy ${distpath}/3dClustBust.c ${worksrcpath}/
-		reinplace -E "s|AFNI_\[0-9_\]+|${version}|g" ${worksrcpath}/AFNI_label.h
+
+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
+    set mkinc [open ${worksrcpath}/Makefile.INCLUDE a]
+    puts $mkinc "\$(LIBDIR):"
+    puts $mkinc "	if \[ \! -d \$(LIBDIR) \]; then \$(MKDIR) -p \$(LIBDIR); echo Made directory \$(LIBDIR); fi"
+    puts $mkinc "\$(SHAREDIR):"
+    puts $mkinc "	if \[ \! -d \$(SHAREDIR) \]; then \$(MKDIR) -p \$(SHAREDIR); echo Made directory \$(SHAREDIR); fi"
+    close $mkinc
 }
+patchfiles          patch-Makefile.INCLUDE.diff
 
 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}
-#		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
-		}
+		#file copy -force ${distpath}/afni.1 ${workpath}
+		#reinplace "s|%%PREFIX%%|${prefix}|g" ${workpath}/afni.1
+}
 
-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
+destroot.target vastness
 
-# 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
+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
 
-# 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
+#        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}
 
-# 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
+#       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 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
+# 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

Added: trunk/dports/science/afni/files/patch-Makefile.INCLUDE.diff
===================================================================
--- trunk/dports/science/afni/files/patch-Makefile.INCLUDE.diff	                        (rev 0)
+++ trunk/dports/science/afni/files/patch-Makefile.INCLUDE.diff	2010-05-30 03:34:36 UTC (rev 68259)
@@ -0,0 +1,59 @@
+--- Makefile.INCLUDE.orig	2010-05-29 16:04:42.000000000 -0400
++++ Makefile.INCLUDE	2010-05-29 16:12:19.000000000 -0400
+@@ -1,4 +1,4 @@
+-##
++
+ ## Include for MCW AFNI make
+ ##   -- goes at end of each platform specific Makefile.
+ ##
+@@ -1497,13 +1497,13 @@
+ 
+ ### Put things in their places
+ 
+-install: $(INSTALLDIR) $(INSTALL_PREREQ)
++install: $(SHAREDIR) $(INSTALLDIR) $(INSTALL_PREREQ)
+ 	$(MV) $(PROGRAMS) $(INSTALLDIR)
+ 	$(CP) $(SCRIPTS)  $(INSTALLDIR)
+ 	$(CP) $(PY_DIR)/*.py  $(R_DIR)/*.R $(INSTALLDIR)
+-	if [ -f README.environment ]; then $(CP) README.*    $(INSTALLDIR); fi;
+-	if [ -f AFNI.afnirc        ]; then $(CP) AFNI.afnirc $(INSTALLDIR); fi;
+-	if [ -f AFNI.sumarc        ]; then $(CP) AFNI.sumarc $(INSTALLDIR); fi;
++	if [ -f README.environment ]; then $(CP) README.*    $(SHAREDIR); fi;
++	if [ -f AFNI.afnirc        ]; then $(CP) AFNI.afnirc $(SHAREDIR); fi;
++	if [ -f AFNI.sumarc        ]; then $(CP) AFNI.sumarc $(SHAREDIR); fi;
+ 
+ install_noplug: $(INSTALLDIR)
+ 	$(MV) $(PROGRAMS_NOPLUG) $(INSTALLDIR)
+@@ -1888,8 +1888,8 @@
+ 	$(AR) q libmrix.a $(IMOBJS)
+ 	$(RANLIB) libmrix.a
+ 
+-shared_objs: $(INSTALLDIR) libmri.so libmrix.so
+-	$(MV) libmri.so libmrix.so $(INSTALLDIR)
++shared_objs: $(LIBDIR) libmri.so libmrix.so
++	$(MV) libmri.so libmrix.so $(LIBDIR)
+ 
+ ###################################################################
+ # Plugin stuff
+@@ -1950,9 +1950,9 @@
+ laconte_plugins: plug_3dsvm.$(SO)
+ 
+ install_plugins: $(INSTALLDIR)
+-	$(MV) *.$(PLUGIN_SUFFIX) $(INSTALLDIR)
+-	$(CP) faces/face_*.jpg faces/splash_*.jpg poems/poem_*.txt $(INSTALLDIR)
+-	echo Plugins put in directory $(INSTALLDIR):
++	$(MV) *.$(PLUGIN_SUFFIX) $(SHAREDIR)
++	$(CP) faces/face_*.jpg faces/splash_*.jpg poems/poem_*.txt $(SHAREDIR)
++	echo Plugins put in directory $(SHAREDIR):
+ 	echo Do not forget to setenv AFNI_PLUGINPATH appropriately
+ 
+ .c.$(SO):afni_plugin.h afni.h 3ddata.h
+@@ -2623,7 +2623,7 @@
+ libSUMA.a: libmri.a libmrix.a libcoxplot.a libf2c.a
+ 	( cd SUMA ;	\
+ 	rm -f libSUMA.a	;\
+-	$(MAKE) -f $(SUMA_MAKEFILE_NAME) clean MarchingCubes.o libSUMA.a 'INSTALLDIR=$(INSTALLDIR)' \
++	$(MAKE) -f $(SUMA_MAKEFILE_NAME) clean MarchingCubes.o libSUMA.a 'INSTALLDIR=$INSTALLDIR)' \
+ 	'SUMA_INCLUDE_PATH=$(SUMA_INCLUDE_PATH)' \
+ 	'SUMA_BIN_ARCHIVE=$(SUMA_BIN_ARCHIVE)' \
+ 	'RANLIB=$(RANLIB)' \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100529/5ca4dfdd/attachment.html>


More information about the macports-changes mailing list