diff --git a/sci-biology/fsl/ChangeLog b/sci-biology/fsl/ChangeLog new file mode 100644 index 0000000..f72ef4b --- /dev/null +++ b/sci-biology/fsl/ChangeLog @@ -0,0 +1,13 @@ +*fsl-6.0.2 (06 Nov 2019) + + 06 Nov 2019; +files/99fsl, + +files/fsl-5.0.11-fslsurface_parallel_make.patch, + +files/fsl-5.0.11-ifstream_use.patch, +files/fsl-5.0.11-niftiio_var_fix.patch, + +files/fsl-5.0.11-no_xmlpp.patch, +files/fsl-5.0.11-qstring_compat.patch, + +files/fsl-5.0.11-setup.patch, +files/fsl-5.0.4-headers.patch, + +files/fsl-5.0.4-setup.patch, +files/fsl-5.0.6-fsldir_redux.patch, + +files/fsl-5.0.8-fsldir_redux.patch, +files/fsl-5.0.8-headers.patch, + +files/fsl-5.0.8-setup.patch, +files/fsl-5.0.9-fsldir_redux.patch, + +files/fsl-5.0.9-headers.patch, +files/fsl-5.0.9-setup.patch, + +fsl-6.0.2.ebuild, +metadata.xml: + sci-biology/fsl: attempt at version bump 6.0.2 diff --git a/sci-biology/fsl/Manifest b/sci-biology/fsl/Manifest new file mode 100644 index 0000000..6fb2c02 --- /dev/null +++ b/sci-biology/fsl/Manifest @@ -0,0 +1 @@ +DIST fsl-6.0.2.tar.gz 2505331864 SHA256 c118b351c6cedb441af7e1b9d194cf344505ff53b417063f697b86305a908afd SHA512 fe308393076c51c50b086f9bf7ff5ddebcf8b1284128e734b9d9e501019917ceba7c0ee5cd5aa1ed44452bcd042ad72653c1a8693f94eab9b83a80fe508a56ca WHIRLPOOL ecb62e9d09cc34ac926353e4a9a131be875428b729bcf2d6f1433d9ea1a7e2b9382d1a1b305651705449a48eb3c576899f09f82ae4254b149a6219096eb45d3d diff --git a/sci-biology/fsl/files/99fsl b/sci-biology/fsl/files/99fsl new file mode 100644 index 0000000..41db5c5 --- /dev/null +++ b/sci-biology/fsl/files/99fsl @@ -0,0 +1,5 @@ +FSLOUTPUTTYPE=NIFTI_GZ +FSLMULTIFILEQUIT=TRUE +FSLTCLSH=tclsh +FSLWISH=wish +FSLDIR=/usr/share/fsl diff --git a/sci-biology/fsl/files/fsl-5.0.11-fslsurface_parallel_make.patch b/sci-biology/fsl/files/fsl-5.0.11-fslsurface_parallel_make.patch new file mode 100644 index 0000000..026543d --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.11-fslsurface_parallel_make.patch @@ -0,0 +1,14 @@ +diff --git a/src/fslsurface/Makefile b/src/fslsurface/Makefile +index 37f459c..008f443 100644 +--- a/src/fslsurface/Makefile ++++ b/src/fslsurface/Makefile +@@ -57,7 +57,7 @@ fslsurfacegl.a: fslsurfacegl.o fslsurface.a + ${AR} -r libfslsurfacegl.a fslsurfacegl.o + fslsurface_backcompat.a: fslsurface_first.o fslsurface_dataconv.o fslsurface.a + ${AR} -r libfslsurface_backcompat.a fslsurface_first.o fslsurface_dataconv.o +-fslsurfacemaths: fslsurface.a fslsurfacemaths.o ++fslsurfacemaths: fslsurface.a fslsurfacemaths.o fslsurfaceio.o fslsurfacefns.o fslsurface_first.o fslsurface.o + ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ fslsurfacemaths.o fslsurfaceio.o fslsurfacefns.o fslsurface_first.o fslsurface.o ${LIBS} ${FMLIBS} +-marching_cubes: fslsurface.a marching_cubes.o ++marching_cubes: fslsurface.a marching_cubes.o fslsurfaceio.o fslsurfacefns.o + ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ marching_cubes.o fslsurfaceio.o fslsurfacefns.o ${LIBS} ${FMLIBS} diff --git a/sci-biology/fsl/files/fsl-5.0.11-ifstream_use.patch b/sci-biology/fsl/files/fsl-5.0.11-ifstream_use.patch new file mode 100644 index 0000000..c4ba003 --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.11-ifstream_use.patch @@ -0,0 +1,13 @@ +diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc +index f310dc7..03fe8bb 100644 +--- a/src/melodic/meldata.cc ++++ b/src/melodic/meldata.cc +@@ -1015,7 +1015,7 @@ namespace Melodic{ + Resels = 1.0; + + in.open(logger.appendDir("smoothest").c_str(), ios::in); +- if(in>0){ ++ if(in.is_open()){ + for(int ctr=1; ctr<7; ctr++) + in >> str; + in.close(); diff --git a/sci-biology/fsl/files/fsl-5.0.11-niftiio_var_fix.patch b/sci-biology/fsl/files/fsl-5.0.11-niftiio_var_fix.patch new file mode 100644 index 0000000..f1a833b --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.11-niftiio_var_fix.patch @@ -0,0 +1,24 @@ +diff --git a/src/fslio/dbh.h b/src/fslio/dbh.h +index eff0a50a..fbce1770 100644 +--- a/src/fslio/dbh.h ++++ b/src/fslio/dbh.h +@@ -79,19 +79,6 @@ struct dsr /* dsr */ + struct data_history hist; /* 148 + 200 */ + }; /* total=348 */ + +-/* Acceptable values for hdr.dime.datatype */ +- +-#define DT_NONE 0 +-#define DT_UNKNOWN 0 +-#define DT_BINARY 1 +-#define DT_UNSIGNED_CHAR 2 +-#define DT_SIGNED_SHORT 4 +-#define DT_SIGNED_INT 8 +-#define DT_FLOAT 16 +-#define DT_COMPLEX 32 +-#define DT_DOUBLE 64 +-#define DT_RGB 128 +-#define DT_ALL 255 + + typedef struct + { diff --git a/sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch b/sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch new file mode 100644 index 0000000..bccf0e2 --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch @@ -0,0 +1,44 @@ +diff --git a/src/flameo/Makefile b/src/flameo/Makefile +index 5389e2f..52785c3 100644 +--- a/src/flameo/Makefile ++++ b/src/flameo/Makefile +@@ -2,7 +2,7 @@ include ${FSLCONFDIR}/default.mk + + PROJNAME = flame + +-USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} -I${INC_ZLIB} -DCIFTILIB_USE_XMLPP -I${FSLEXTINC} -I${INC_XML2} -I${INC_XML++} -I${INC_XML++CONF} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio ++USRINCFLAGS = -fPIC -I${INC_NEWMAT} -I${INC_PROB} -I${INC_ZLIB} -I${FSLEXTINC} ${CIFTICFLAGS} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio + USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_ZLIB} + + UNAME := $(shell uname) +@@ -10,7 +10,7 @@ ifeq (${UNAME},Darwin) + LIBS = -liconv + endif + +-LIBS += -lutils -lnewimage -lmiscmaths -lm -lnewmat -lfslio -lniftiio -lcifti -lxml++-2.6 -lxml2 -lboost_filesystem -lboost_system -lznz -lprob -lz ++LIBS += -lutils -lnewimage -lmiscmaths -lm -lnewmat -lfslio -lniftiio ${CIFTILIBS} -lboost_filesystem -lboost_system -lznz -lprob -lz + + XFILES = flameo + +diff --git a/src/melodic/Makefile b/src/melodic/Makefile +index 53b951a..803c39e 100644 +--- a/src/melodic/Makefile ++++ b/src/melodic/Makefile +@@ -7,7 +7,7 @@ OPTFLAGS_alphaev6-dec-osf5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui + + PROJNAME = melodic + +-USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_ZLIB} -DCIFTILIB_USE_XMLPP -I${FSLEXTINC} -I${INC_XML2} -I${INC_XML++} -I${INC_XML++CONF} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio ++USRINCFLAGS = -fPIC -I${INC_NEWMAT} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_ZLIB} -I${FSLEXTINC} ${CIFTICFLAGS} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio + USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_GD} -L${LIB_GDC} -L${LIB_PNG} -L${LIB_ZLIB} + + UNAME := $(shell uname) +@@ -15,7 +15,7 @@ ifeq (${UNAME},Darwin) + LIBS = -liconv + endif + +-LIBS += -lutils -lnewimage -lmiscplot -lmiscpic -lmiscmaths -lfslio -lniftiio -lcifti -lxml++-2.6 -lxml2 -lboost_filesystem -lboost_system -lznz -lnewmat -lprob -lm -lgdc -lgd -lpng -lz ++LIBS += -lutils -lnewimage -lmiscplot -lmiscpic -lmiscmaths -lfslio -lniftiio ${CIFTILIBS} -lboost_filesystem -lboost_system -lznz -lnewmat -lprob -lm -lgdc -lgd -lpng -lz + + TEST_OBJS = test.o + diff --git a/sci-biology/fsl/files/fsl-5.0.11-qstring_compat.patch b/sci-biology/fsl/files/fsl-5.0.11-qstring_compat.patch new file mode 100644 index 0000000..78aa020 --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.11-qstring_compat.patch @@ -0,0 +1,63 @@ +From bbd60f634cdcdfbbb3eb8f3b6d00f366d9f34bf9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= +Date: Thu, 18 Oct 2018 11:21:05 +1300 +Subject: [PATCH] Basic compatibility between for AString built with either + glib ustring or QString + +--- + src/flameo/gsa.cc | 4 ++-- + src/melodic/meldata.cc | 2 +- + src/melodic/meldata.h | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/flameo/gsa.cc b/src/flameo/gsa.cc +index 6a477f9..0860d46 100644 +--- a/src/flameo/gsa.cc ++++ b/src/flameo/gsa.cc +@@ -74,7 +74,7 @@ namespace GSA { + sourceType=mode; + if ( sourceType.compare("CIFTI") == 0 ) { + cifti::CiftiFile inputCifti; +- inputCifti.openFile(fslbasename(filename)+".nii"); ++ inputCifti.openFile((fslbasename(filename)+".nii").c_str()); + ciftiExemplar=inputCifti.getCiftiXML(); + cerr << "ndim " << ciftiExemplar.getNumberOfDimensions() << endl; + cerr << "type1 " << ciftiExemplar.getMappingType(0) << endl; +@@ -194,7 +194,7 @@ namespace GSA { + scalarsMap.setLength(data.Nrows()); + ciftiExemplar.setMap(0, scalarsMap); + CiftiFile outputFile; +- outputFile.setWritingFile(fslbasename(filename)+extension+".nii");//sets up on-disk writing with default writing version ++ outputFile.setWritingFile((fslbasename(filename)+extension+".nii").c_str());//sets up on-disk writing with default writing version + outputFile.setCiftiXML(ciftiExemplar,false); + vector scratchRow(data.Nrows());//read/write a row at a time + for (int64_t row=0;row& dims = inputCifti.getDimensions(); + tmpData.ReSize(dims[0],dims[1]); //swapped compared to cifti + vector scratchRow(dims[0]);//read/write a row at a time +diff --git a/src/melodic/meldata.h b/src/melodic/meldata.h +index 1e1adfc..d898152 100644 +--- a/src/melodic/meldata.h ++++ b/src/melodic/meldata.h +@@ -109,7 +109,7 @@ namespace Melodic{ + message(" " << logger.appendDir(fname) << endl); + } else { //Process CIFTI save ICs as float + cifti::CiftiFile outputFile; +- outputFile.setWritingFile(logger.appendDir(fname)+".nii");//sets up on-disk writing with default writing version ++ outputFile.setWritingFile((logger.appendDir(fname)+".nii").c_str());//sets up on-disk writing with default writing version + cifti::CiftiXML xml(inputCifti.getCiftiXML()); + cifti::CiftiScalarsMap scalarsMap; + std::vector foo = xml.writeXMLToVector(); +-- +2.18.1 + diff --git a/sci-biology/fsl/files/fsl-5.0.11-setup.patch b/sci-biology/fsl/files/fsl-5.0.11-setup.patch new file mode 100644 index 0000000..cf9cb78 --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.11-setup.patch @@ -0,0 +1,158 @@ +diff --git a/build b/build +index 6827443..19b2002 100755 +--- a/build ++++ b/build +@@ -3,7 +3,7 @@ + if [ $# -ge 1 ] ; then + PROJECTS="$@"; + else +- MASTERPROJECTS="CiftiLib-master utils znzlib NewNifti niftiio fslio giftiio miscmaths newimage libhfunc libvis first_lib \ ++ MASTERPROJECTS="utils znzlib NewNifti niftiio fslio giftiio miscmaths newimage libhfunc libvis first_lib \ + meshclass fslvtkio misc_tcl basisfield warpfns bint shapeModel MVdisc fslvtkconv fslsurface libmeshutils newmesh \ + DiscreteOpt FastPDlib MSMRegLib \ + misc_c avwutils basil bet2 cluster dpm copain tissue fast4 feat5 film filmbabe flirt fabber baycest \ +@@ -25,8 +25,8 @@ flameo oxford_asl relax qboot topup ptx2 lesions eddy dwssfp verbena MSM bianca + done + fi + +-echo "Building projects - see build.log file for progress..." +-./config/common/buildproj $PROJECTS > ./build.log 2>&1 ++echo "Building projects" ++./config/common/buildproj $PROJECTS + finalStatus=$? + if [ $finalStatus -eq 0 ]; then + echo "Build completed successfully."; +diff --git a/config/common/buildproj b/config/common/buildproj +index 3450bda..ec3edc1 100755 +--- a/config/common/buildproj ++++ b/config/common/buildproj +@@ -11,10 +11,10 @@ if [ X$1 = X-strict ] ; then + fi + PROJECTS="$@" ; export PROJECTS ; + +-FSLDIR=`pwd` ++#FSLDIR=`pwd` + FSLDEVDIR=${FSLDIR} + FSLCONFDIR=${FSLDIR}/config +-FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh` ++#FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh` + export FSLDIR FSLDEVDIR FSLCONFDIR FSLMACHTYPE + + buildmessages="" ; export buildmessages ; +@@ -66,7 +66,7 @@ for projname in $PROJECTS; do + if [ -x ./fslconfig ] ; then + . ./fslconfig ; + fi +- if ${MAKE} -k ${MAKEOPTIONS} ; then ++ if ${MAKE} ${MAKEOPTIONS} ${MAKEOPTS} ; then + if ${MAKE} ${MAKEOPTIONS} install ; then + installok=true; + # Clean up after ourselves +@@ -81,6 +81,7 @@ for projname in $PROJECTS; do + if [ $installok = false ] ; then + echo " " + echo "ERROR::Could not install $projname successfully" ; ++ exit 1 + fi + else + echo " " +@@ -89,6 +90,7 @@ for projname in $PROJECTS; do + echo " " + echo " " + errorprojs="$errorprojs $projname" ; export errorprojs ; ++ exit 1 + fi + fi + done +diff --git a/config/common/vars.mk b/config/common/vars.mk +index 53754be..ff7a117 100755 +--- a/config/common/vars.mk ++++ b/config/common/vars.mk +@@ -24,15 +24,15 @@ USRINCFLAGS = + USRCFLAGS = + USRCXXFLAGS = + +-LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR} ++LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR} ${USERLDFLAGS} + +-AccumulatedIncFlags = -I${INC_BOOST} ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} ++AccumulatedIncFlags = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} ${CPPFLAGS} + + CFLAGS = ${ANSI_FLAGS} ${ANSI_CFLAGS} ${DBGFLAGS} ${USEDCSTATICFLAGS} ${USRCFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ +- ${AccumulatedIncFlags} ++ ${AccumulatedIncFlags} ${USERCFLAGS} + +-CXXFLAGS = ${ANSI_FLAGS} ${ANSI_CXXFLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ +- ${AccumulatedIncFlags} ++CXXFLAGS = ${ANSI_CXXFLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ ++ ${AccumulatedIncFlags} ${USERCXXFLAGS} + + HFILES = *.h + AFILES = *.a +diff --git a/config/generic/systemvars.mk b/config/generic/systemvars.mk +index e40e3d6..ddb5bfe 100755 +--- a/config/generic/systemvars.mk ++++ b/config/generic/systemvars.mk +@@ -4,20 +4,20 @@ SHELL = /bin/sh + + # System dependent commands (NB: the first two are the most platform dependent) + +-INSTALL = ginstall -p +-RANLIB = ranlib ++INSTALL = install -p ++RANLIB = @@GENTOO_RANLIB@@ + + RM = /bin/rm + CP = /bin/cp + MV = /bin/mv + CHMOD = /bin/chmod + MKDIR = /bin/mkdir +-TCLSH = ${FSLDIR}/bin/fsltclsh ++TCLSH = tclsh + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC = @@GENTOO_CC@@ ++CXX = @@GENTOO_CXX@@ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +@@ -25,7 +25,7 @@ ARCHFLAGS = + + DEPENDFLAGS = -MM + +-OPTFLAGS = -O3 -fexpensive-optimizations ${ARCHFLAGS} ++OPTFLAGS = + MACHDBGFLAGS = + GNU_ANSI_FLAGS = -Wall -ansi -pedantic + SGI_ANSI_FLAGS = -ansi -fullwarn +diff --git a/extras/build b/extras/build +index 6133a1b..caeae2d 100755 +--- a/extras/build ++++ b/extras/build +@@ -104,8 +104,8 @@ PROJECTS="${PROJECTS} libpng" + if [ ${BUILDICONV} -eq 1 ]; then + PROJECTS="${PROJECTS} libiconv" + fi +-PROJECTS="${PROJECTS} libgd libgdc libprob libcprob newmat cprob newran fftw" +-PROJECTS="${PROJECTS} boost libxml2-2.9.2 libxml++-2.34.0 libsqlite libnlopt ../include/armawrap/dummy_newmat" ++PROJECTS="libgdc libprob libcprob newmat cprob newran" ++PROJECTS="${PROJECTS} ../include/armawrap/dummy_newmat" + for projname in $PROJECTS; do + if [ -d $FSLESRCDIR/$projname ] ; then + buildIt $FSLESRCDIR $projname 1 +diff --git a/src/mist-clean/Makefile b/src/mist-clean/Makefile +index b3a32fc..e949ba1 100755 +--- a/src/mist-clean/Makefile ++++ b/src/mist-clean/Makefile +@@ -52,7 +52,7 @@ installpython: + cp -r python/* ${DESTDIR}/python/mist + + clean: +- rm ${OBJS} mist/mist.o mist/mist ++ rm -f ${OBJS} mist/mist.o mist/mist || echo "CLEAN could not locate some files scheduled for deletion." + + .PHONY: all clean installdata + diff --git a/sci-biology/fsl/files/fsl-5.0.4-headers.patch b/sci-biology/fsl/files/fsl-5.0.4-headers.patch new file mode 100644 index 0000000..803151b --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.4-headers.patch @@ -0,0 +1,32 @@ +--- src/avwutils/fslmaths.cc.orig 2013-10-19 00:17:44.765129309 +1300 ++++ src/avwutils/fslmaths.cc 2013-10-19 00:18:02.975157728 +1300 +@@ -71,7 +71,7 @@ + #include "newimage/newimageall.h" + #include "miscmaths/miscmaths.h" + #include "utils/fsl_isfinite.h" +-#include "libprob/libprob.h" ++#include "libprob.h" + + using namespace MISCMATHS; + using namespace NEWIMAGE; +--- src/miscvis/writepng.c.orig 2013-10-19 00:18:32.415203592 +1300 ++++ src/miscvis/writepng.c 2013-10-19 00:19:05.414255132 +1300 +@@ -32,6 +32,7 @@ + + #include /* for exit() prototype */ + ++#include "zlib.h" + #include "png.h" /* libpng header; includes zlib.h and setjmp.h */ + #include "writepng.h" /* typedefs, common macros, public prototypes */ + +--- src/ptx2/surfmaths.cc.orig 2013-10-19 00:19:51.595327317 +1300 ++++ src/ptx2/surfmaths.cc 2013-10-19 00:20:09.284354805 +1300 +@@ -72,7 +72,7 @@ + #include "csv_mesh.h" + #include "miscmaths/miscmaths.h" + #include "utils/fsl_isfinite.h" +-#include "libprob/libprob.h" ++#include "libprob.h" + + using namespace MISCMATHS; + diff --git a/sci-biology/fsl/files/fsl-5.0.4-setup.patch b/sci-biology/fsl/files/fsl-5.0.4-setup.patch new file mode 100644 index 0000000..0b96149 --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.4-setup.patch @@ -0,0 +1,110 @@ +--- extras/build.orig 2013-10-18 21:37:53.533939550 +1300 ++++ extras/build 2013-10-18 21:40:42.283158471 +1300 +@@ -41,7 +41,7 @@ + + errorprojs="" ; export errorprojs ; + +-PROJECTS="tcl tk zlib libpng libiconv libgd libgdc libprob libcprob newmat cprob newran cephes fftw" ++PROJECTS="libgdc libprob libcprob newmat cprob newran cephes" + + for projname in $PROJECTS; do + +--- build.orig 2013-10-18 22:24:22.312777248 +1300 ++++ build 2013-10-18 22:24:59.161835107 +1300 +@@ -11,8 +11,7 @@ + ifit load_varian load_dicom misc_scripts fdt first possum sgeutils flameo oxford_asl relax qboot topup ptx2 lesions eddy dwssfp"; + fi + +-echo "Building projects - see build.log file for progress..." +-./config/common/buildproj $PROJECTS > ./build.log 2>&1 +-echo "Finished build : end of log file shows ..." +-tail -10 build.log ++echo "Building projects" ++./config/common/buildproj $PROJECTS ++echo "Finished build" + +--- config/common/buildproj.orig 2013-10-18 22:28:40.683182435 +1300 ++++ config/common/buildproj 2013-10-18 22:29:09.612227825 +1300 +@@ -11,10 +11,10 @@ + fi + PROJECTS="$@" ; export PROJECTS ; + +-FSLDIR=`pwd` ++#FSLDIR=`pwd` + FSLDEVDIR=${FSLDIR} + FSLCONFDIR=${FSLDIR}/config +-FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh` ++#FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh` + export FSLDIR FSLDEVDIR FSLCONFDIR FSLMACHTYPE + + buildmessages="" ; export buildmessages ; +--- config/generic/systemvars.mk.orig 2007-07-13 23:00:20.000000000 +1200 ++++ config/generic/systemvars.mk 2013-10-18 23:13:06.472693414 +1300 +@@ -4,20 +4,20 @@ + + # System dependent commands (NB: the first two are the most platform dependent) + +-INSTALL = ginstall -p +-RANLIB = ranlib ++INSTALL = install -p ++RANLIB = @@GENTOO_RANLIB@@ + + RM = /bin/rm + CP = /bin/cp + MV = /bin/mv + CHMOD = /bin/chmod + MKDIR = /bin/mkdir +-TCLSH = ${FSLDIR}/bin/fsltclsh ++TCLSH = tclsh + + # Compiler dependent variables + +-CC = gcc +-CXX = c++ ++CC = @@GENTOO_CC@@ ++CXX = @@GENTOO_CXX@@ + CSTATICFLAGS = -static + CXXSTATICFLAGS = -static + +@@ -25,7 +25,7 @@ + + DEPENDFLAGS = -MM + +-OPTFLAGS = -O3 -fexpensive-optimizations ${ARCHFLAGS} ++OPTFLAGS = + MACHDBGFLAGS = + GNU_ANSI_FLAGS = -Wall -ansi -pedantic + SGI_ANSI_FLAGS = -ansi -fullwarn +--- config/common/vars.mk.orig 2013-10-18 23:39:26.384029157 +1300 ++++ config/common/vars.mk 2013-10-18 23:40:49.489145387 +1300 +@@ -24,15 +24,15 @@ + USRCFLAGS = + USRCXXFLAGS = + +-LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR} ++LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR} ${USERLDFLAGS} + +-AccumulatedIncFlags = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} ++AccumulatedIncFlags = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} ${CPPFLAGS} + + CFLAGS = ${ANSI_FLAGS} ${DBGFLAGS} ${USEDCSTATICFLAGS} ${USRCFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ +- ${AccumulatedIncFlags} ++ ${AccumulatedIncFlags} ${USERCFLAGS} + + CXXFLAGS = ${ANSI_FLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ +- ${AccumulatedIncFlags} ++ ${AccumulatedIncFlags} ${USERCXXFLAGS} + + HFILES = *.h + AFILES = *.a +--- config/common/buildproj.orig 2013-10-19 23:27:10.477238469 +1300 ++++ config/common/buildproj 2013-10-19 23:28:32.207370622 +1300 +@@ -66,7 +66,7 @@ + if [ -x fslconfig ] ; then + ./fslconfig ; + fi +- if ${MAKE} -k ${MAKEOPTIONS} ; then ++ if ${MAKE} ${MAKEOPTIONS} ${MAKEOPTS} ; then + if ${MAKE} install ; then + installok=true; + # Clean up after ourselves diff --git a/sci-biology/fsl/files/fsl-5.0.6-fsldir_redux.patch b/sci-biology/fsl/files/fsl-5.0.6-fsldir_redux.patch new file mode 100644 index 0000000..a4fff26 --- /dev/null +++ b/sci-biology/fsl/files/fsl-5.0.6-fsldir_redux.patch @@ -0,0 +1,456 @@ +--- src/fast4/fast_two.cc.orig 2013-10-19 23:45:02.636971888 +1300 ++++ src/fast4/fast_two.cc 2013-10-19 23:46:45.436138299 +1300 +@@ -166,7 +166,7 @@ + string csfPriorName, grayPriorName, whitePriorName; + if(alternatePriors.unset()) + { +- string priorRootName=string(getenv("FSLDIR")) + "/data/standard/tissuepriors/avg152T1_"; ++ string priorRootName="@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/tissuepriors/avg152T1_"; + csfPriorName = priorRootName+"csf"; + grayPriorName = priorRootName+"gray"; + whitePriorName = priorRootName+"white"; +@@ -215,15 +215,15 @@ + if(bapused>0) + { + char reg[1024]; +- sprintf(reg, "%s/bin/flirt -ref %s -in %s -out %s -applyxfm -init %s", getenv("FSLDIR"), inname.c_str(), csfPriorName.c_str(), (main_prior_vol+"_csf_stdspace").c_str(), bapriori.value().c_str()); ++ sprintf(reg, "flirt -ref %s -in %s -out %s -applyxfm -init %s", inname.c_str(), csfPriorName.c_str(), (main_prior_vol+"_csf_stdspace").c_str(), bapriori.value().c_str()); + if(verbose.value()) + cout< normalisedContrasts, model, triggers; +- string fmriFileName, fslPath, featdir, vType, indexText; ++ string fmriFileName, featdir, vType, indexText; + ColumnVector NewimageVoxCoord(4),NiftiVoxCoord(4); + bool outputText(true), useCoordinate(false), prewhiten(false), useTriggers(false), customMask(false), modelFree(false), isHigherLevel(false), outputDataOnly(false); + bool zWeightClusters(true); +@@ -307,7 +307,6 @@ + if (argc<2) usage(""); + featdir=string(argv[1]); + fmriFileName=featdir+"/filtered_func_data"; +- fslPath=string(getenv("FSLDIR")); + + string outputName(featdir); + +@@ -725,7 +724,7 @@ + cerr << "Can't open output report file " << outputName << endl; + exit(1); + } +- outputFile << "\n"<< statType << num2str(i) <<"\n\n
\n

FEAT Time Series Report - "<< statType << num2str(i) <<"

\n
\n
Full plots

\n"<< graphText; ++ outputFile << "\n"<< statType << num2str(i) <<"\n\n


\n

FEAT Time Series Report - "<< statType << num2str(i) <<"

\n
\n
Full plots

\n"<< graphText; + if (useTriggers) outputFile << "\n


Peristimulus plots

\n"<< peristimulusText <<"\n


\n\n"; + else outputFile << "\n\n\n"; + outputFile.close(); +@@ -740,7 +739,7 @@ + cerr << "Can't open output report file " << outputName << endl; + exit(1); + } +- outputFile << "\nFEAT Time Series Report\n\n
\n

FEAT Time Series Report

\n
\n
" << indexText << "
" << endl << endl; ++ outputFile << "\nFEAT Time Series Report\n\n
\n

FEAT Time Series Report

\n
\n
" << indexText << "
" << endl << endl; + outputFile.close(); + + /* now output same thing without start and end, for inclusion in feat report */ +--- src/feat5/feat_model.cc.orig 2013-10-19 23:52:13.456668655 +1300 ++++ src/feat5/feat_model.cc 2013-10-19 23:53:31.655795065 +1300 +@@ -734,7 +734,6 @@ + vector G; + vector titles; + float tr, mult, trmult, nltffwhm=0, maxconvwin=0; +- char fl[10000], *FSLDIR; + string fn, filename; + FONT_DATA *font_data = new FONT_DATA[1]; + +@@ -753,8 +752,6 @@ + if (argc==3) + motionparams=remmean(read_ascii_matrix(argv[2])); + +- FSLDIR=getenv("FSLDIR"); +- + fn = string(argv[1])+".fsf"; + + level = atoi(find_line(fn, "fmri(level)", fl)); +@@ -1479,7 +1476,7 @@ + writeCovarianceImage(string(argv[1])+"_cov.ppm", contrasts, F, nftests, realDesign, level, evs.eigenvals, font_data, contrasts.RE); + writeImagePreview(string(argv[1])+".ppm", contrasts, F, nftests, realDesign, level, evs, font_data, titles, tr, nltffwhm, nTimepoints, G); + +- filename=string(getenv("FSLDIR"))+"/bin/wpng -q -overwrite "+string(argv[1])+".ppm "; ++ filename="wpng -q -overwrite "+string(argv[1])+".ppm "; + system(filename.c_str()); + + return(0); +@@ -2122,6 +2119,6 @@ + + fclose(outputfile); + +- filename=string(getenv("FSLDIR")) + "/bin/wpng -q -overwrite " + filename; ++ filename="wpng -q -overwrite " + filename; + system(filename.c_str()); + } +--- src/first/first_utils.cc.orig 2013-10-19 23:54:30.375890034 +1300 ++++ src/first/first_utils.cc 2013-10-19 23:59:11.706344887 +1300 +@@ -1954,8 +1954,8 @@ + if (!surfaceVAout.value()) { + // do not output on the surface, instead do the new default of outputting a volume with the scalar normal dot product values (for use with randomise) + volume refim; +- if (useReconMNI.value()) { read_volume(refim,string(getenv("FSLDIR")) + "/data/standard/MNI152_T1_1mm"); } +- else { read_volume(refim,string(getenv("FSLDIR")) + "/data/standard/MNI152_T1_1mm"); } ++ if (useReconMNI.value()) { read_volume(refim,"@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm"); } ++ else { read_volume(refim,"@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm"); } + volume maskvol(refim); + maskvol=0.0f; + volume4D volnormals; +--- src/fnirt/fnirtfns.cpp.orig 2013-10-20 00:00:18.106452166 +1300 ++++ src/fnirt/fnirtfns.cpp 2013-10-20 00:04:56.005901533 +1300 +@@ -1203,8 +1203,7 @@ + return(string(ref_fname)); + } + else { +- const char *fsldir_ptr = getenv("FSLDIR"); +- string eref_fname = string(fsldir_ptr) + string("/data/standard/") + ref_fname; ++ string eref_fname = string("@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/") + ref_fname; + if (NEWIMAGE::fsl_imageexists(eref_fname)) return(eref_fname); + else return(string("")); + } +@@ -1230,9 +1229,8 @@ + NEWIMAGE::read_volume_hdr_only(vref,ref_fname); // Throws if file dont exist + eref_fname = ref_fname; + } +- catch(...) { // Didn't exist in current directory, try in ${FSLDIR}/data/standard +- const char *fsldir_ptr = getenv("FSLDIR"); +- eref_fname = string(fsldir_ptr) + string("/data/standard/") + ref_fname; ++ catch(...) { // Didn't exist in current directory, try in .../data/standard ++ eref_fname = string("@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/") + ref_fname; + try { + cout << "Could not find " << ref_fname << ", now checking " << eref_fname << endl; + NEWIMAGE::read_volume_hdr_only(vref,eref_fname); // Throws if file dont exist +@@ -1267,8 +1265,7 @@ + if (check_exist(ecfname)) return(ecfname); + } + if (!FNIRT::path(cfname).length()) { // If no path explicitly given +- const char *fsldir_ptr = getenv("FSLDIR"); +- ecfname = string(fsldir_ptr) + string("/etc/flirtsch/") + cfname; ++ ecfname = string("@GENTOO_PORTAGE_EPREFIX@/etc/flirtsch/") + cfname; + if (check_exist(ecfname)) return(ecfname); + else if (!FNIRT::extension(ecfname).length()) { // If no path _and_ no extension given + ecfname += string(".cnf"); +--- src/fslsurface/fslsurface_first.cc.orig 2013-10-20 00:05:35.495965454 +1300 ++++ src/fslsurface/fslsurface_first.cc 2013-10-20 00:06:54.346092913 +1300 +@@ -500,8 +500,7 @@ + + volume* immni = new volume(); + +- char* fsldir = getenv("FSLDIR"); +- read_volume_hdr_only(*immni, string(fsldir) + "/data/standard/MNI152_T1_1mm"); ++ read_volume_hdr_only(*immni, "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm"); + + //read_volume_hdr_only(*immni, template_name); + +@@ -699,8 +698,7 @@ + + volume* immni = new volume(); + +- char* fsldir = getenv("FSLDIR"); +- read_volume_hdr_only(*immni, string(fsldir) + "/data/standard/MNI152_T1_1mm"); ++ read_volume_hdr_only(*immni, "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm"); + + //read_volume_hdr_only(*immni, template_name); + +--- src/fslsurface/fslsurfacemaths.cpp.orig 2013-10-20 00:07:39.457165850 +1300 ++++ src/fslsurface/fslsurfacemaths.cpp 2013-10-20 00:09:28.396341998 +1300 +@@ -598,12 +598,6 @@ + + }else if (command == "-reconFromBvars"){ + cout<<"do recon "<" << endl ++ "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl + << "" + << "FSL" << endl + << "