FSL version bump ahead of Gentoo Science
This commit is contained in:
parent
57ca0f1106
commit
b63ff30989
1
sci-biology/fsl/Manifest
Normal file
1
sci-biology/fsl/Manifest
Normal file
@ -0,0 +1 @@
|
||||
DIST fsl-5.0.11.tar.gz 1507525689 SHA256 8a76d36ff280ab3bfa79c46838a1baf7ea8ffe21d0b84bc7546cb8a1cef46c57 SHA512 6f859723f8e4bd7e381761983f6423364180f5d3300cb165a3e57f3535d5301624ecb30c1796dae9579da5dd16e80a8a62d9994fec1caebf0835c2f6795ca055 WHIRLPOOL 00075ce453db0e65fd513d66cea8519193f5aee3bc0c971df0e4c637a453e3dfead464fcf615d15b743110633a05d0216a2867092ad68ef90593d32dadd0d247
|
5
sci-biology/fsl/files/99fsl
Normal file
5
sci-biology/fsl/files/99fsl
Normal file
@ -0,0 +1,5 @@
|
||||
FSLOUTPUTTYPE=NIFTI_GZ
|
||||
FSLMULTIFILEQUIT=TRUE
|
||||
FSLTCLSH=tclsh
|
||||
FSLWISH=wish
|
||||
FSLDIR=/usr/share/fsl
|
121
sci-biology/fsl/files/fsl-5.0.10-setup.patch
Normal file
121
sci-biology/fsl/files/fsl-5.0.10-setup.patch
Normal file
@ -0,0 +1,121 @@
|
||||
diff -Naur fsl.orig/build fsl/build
|
||||
--- fsl.orig/build 2015-03-29 00:10:39.845936000 +1300
|
||||
+++ fsl/build 2015-03-29 00:12:37.160487000 +1300
|
||||
@@ -26,5 +26,5 @@
|
||||
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=$?
|
||||
diff -Naur fsl.orig/config/common/buildproj fsl/config/common/buildproj
|
||||
--- fsl.orig/config/common/buildproj 2015-03-29 00:11:47.130998000 +1300
|
||||
+++ fsl/config/common/buildproj 2015-03-29 00:12:37.164319000 +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 ;
|
||||
@@ -66,7 +66,7 @@
|
||||
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
|
||||
diff -Naur fsl.orig/config/common/vars.mk fsl/config/common/vars.mk
|
||||
--- fsl.orig/config/common/vars.mk 2015-03-29 00:11:47.183520000 +1300
|
||||
+++ fsl/config/common/vars.mk 2015-03-29 00:18:53.151222000 +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 = -I${INC_BOOST} ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
|
||||
+AccumulatedIncFlags = -I${INC_BOOST} ${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}
|
||||
+ ${AccumulatedIncFlags} ${USERCXXFLAGS}
|
||||
|
||||
HFILES = *.h
|
||||
AFILES = *.a
|
||||
diff -Naur fsl.orig/config/generic/systemvars.mk fsl/config/generic/systemvars.mk
|
||||
--- fsl.orig/config/generic/systemvars.mk 2015-03-29 00:11:47.534246000 +1300
|
||||
+++ fsl/config/generic/systemvars.mk 2015-03-29 00:12:37.162129000 +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
|
||||
diff -Naur fsl.orig/extras/build fsl/extras/build
|
||||
--- fsl.orig/extras/build 2015-03-29 00:11:15.080236000 +1300
|
||||
+++ fsl/extras/build 2015-03-29 00:15:53.170496000 +1300
|
||||
@@ -104,7 +104,7 @@
|
||||
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} boost libsqlite libnlopt ../include/armawrap/dummy_newmat"
|
||||
for projname in $PROJECTS; do
|
||||
if [ -d $FSLESRCDIR/$projname ] ; then
|
||||
diff -Naur fsl.orig/src/mist-clean/Makefile fsl/src/mist-clean/Makefile
|
||||
--- fsl.orig/src/mist-clean/Makefile 2006-03-27 10:48:16.000000000 +0200
|
||||
+++ fsl/src/mist-clean/Makefile 2018-10-08 16:16:01.180310611 +0200
|
||||
@@ -52,6 +52,6 @@
|
||||
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
|
456
sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch
Normal file
456
sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch
Normal file
@ -0,0 +1,456 @@
|
||||
# Adapt hard-coded paths to the directory structure of Gentoo (including Prefix)
|
||||
# From: Francois Bissey <frp.bissey@gmail.com>
|
||||
# Signed-off-by: Horea Christian <horea.christ@gmail.com>
|
||||
|
||||
diff -Naur fsl.orig/src/fast4/fast_two.cc fsl/src/fast4/fast_two.cc
|
||||
--- fsl.orig/src/fast4/fast_two.cc 2015-03-30 11:54:10.522550233 +1300
|
||||
+++ fsl/src/fast4/fast_two.cc 2015-03-30 11:54:18.412569892 +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<<reg<<endl;
|
||||
system(reg);
|
||||
- sprintf(reg, "%s/bin/flirt -ref %s -in %s -out %s -applyxfm -init %s", getenv("FSLDIR"), inname.c_str(), grayPriorName.c_str(), (main_prior_vol+"_gm_stdspace").c_str(), bapriori.value().c_str());
|
||||
+ sprintf(reg, "flirt -ref %s -in %s -out %s -applyxfm -init %s", inname.c_str(), grayPriorName.c_str(), (main_prior_vol+"_gm_stdspace").c_str(), bapriori.value().c_str());
|
||||
if(verbose.value())
|
||||
cout<<reg<<endl;
|
||||
system(reg);
|
||||
- sprintf(reg, "%s/bin/flirt -ref %s -in %s -out %s -applyxfm -init %s", getenv("FSLDIR"), inname.c_str(), whitePriorName.c_str(), (main_prior_vol+"_wm_stdspace").c_str(), bapriori.value().c_str());
|
||||
+ sprintf(reg, "flirt -ref %s -in %s -out %s -applyxfm -init %s", inname.c_str(), whitePriorName.c_str(), (main_prior_vol+"_wm_stdspace").c_str(), bapriori.value().c_str());
|
||||
if(verbose.value())
|
||||
cout << reg << endl;
|
||||
system(reg);
|
||||
diff -Naur fsl.orig/src/feat5/feat_model.cc fsl/src/feat5/feat_model.cc
|
||||
--- fsl.orig/src/feat5/feat_model.cc 2015-03-30 11:54:10.502550183 +1300
|
||||
+++ fsl/src/feat5/feat_model.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -741,7 +741,7 @@
|
||||
vector<int> G;
|
||||
vector<string> titles;
|
||||
float tr, mult, trmult, nltffwhm=0, maxconvwin=0;
|
||||
- char fl[10000], *FSLDIR;
|
||||
+ char fl[10000];
|
||||
string fn, filename;
|
||||
FONT_DATA *font_data = new FONT_DATA[1];
|
||||
|
||||
@@ -760,8 +760,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));
|
||||
@@ -1491,7 +1489,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);
|
||||
@@ -2134,6 +2132,6 @@
|
||||
|
||||
fclose(outputfile);
|
||||
|
||||
- filename=string(getenv("FSLDIR")) + "/bin/wpng -q -overwrite " + filename;
|
||||
+ filename="wpng -q -overwrite " + filename;
|
||||
system(filename.c_str());
|
||||
}
|
||||
diff -Naur fsl.orig/src/feat5/tsplot.cc fsl/src/feat5/tsplot.cc
|
||||
--- fsl.orig/src/feat5/tsplot.cc 2015-03-30 11:54:10.502550183 +1300
|
||||
+++ fsl/src/feat5/tsplot.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -293,7 +293,7 @@
|
||||
ofstream outputFile;
|
||||
int numEVs, npts, numContrasts=1, nftests=0, GRPHSIZE(600), PSSIZE(600);
|
||||
vector<double> 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 << "<HTML>\n<TITLE>"<< statType << num2str(i) <<"</TITLE>\n<BODY BACKGROUND=\"file:"<< fslPath <<"/doc/images/fsl-bg.jpg\">\n<hr><CENTER>\n<H1>FEAT Time Series Report - "<< statType << num2str(i) <<"</H1>\n</CENTER>\n<hr><b>Full plots</b><p>\n"<< graphText;
|
||||
+ outputFile << "<HTML>\n<TITLE>"<< statType << num2str(i) <<"</TITLE>\n<BODY BACKGROUND=\"file:"<< "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">\n<hr><CENTER>\n<H1>FEAT Time Series Report - "<< statType << num2str(i) <<"</H1>\n</CENTER>\n<hr><b>Full plots</b><p>\n"<< graphText;
|
||||
if (useTriggers) outputFile << "\n<hr><b>Peristimulus plots</b><p>\n"<< peristimulusText <<"\n<HR></BODY></HTML>\n\n";
|
||||
else outputFile << "\n</BODY></HTML>\n\n";
|
||||
outputFile.close();
|
||||
@@ -740,7 +739,7 @@
|
||||
cerr << "Can't open output report file " << outputName << endl;
|
||||
exit(1);
|
||||
}
|
||||
- outputFile << "<HTML>\n<TITLE>FEAT Time Series Report</TITLE>\n<BODY BACKGROUND=\"file:" << fslPath << "/doc/images/fsl-bg.jpg\">\n<hr><CENTER>\n<H1>FEAT Time Series Report</H1>\n</CENTER>\n<hr>" << indexText << "<HR></BODY></HTML>" << endl << endl;
|
||||
+ outputFile << "<HTML>\n<TITLE>FEAT Time Series Report</TITLE>\n<BODY BACKGROUND=\"file:" << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">\n<hr><CENTER>\n<H1>FEAT Time Series Report</H1>\n</CENTER>\n<hr>" << indexText << "<HR></BODY></HTML>" << endl << endl;
|
||||
outputFile.close();
|
||||
|
||||
/* now output same thing without start and end, for inclusion in feat report */
|
||||
diff -Naur fsl.orig/src/first/first_utils.cc fsl/src/first/first_utils.cc
|
||||
--- fsl.orig/src/first/first_utils.cc 2015-03-30 11:54:10.482550135 +1300
|
||||
+++ fsl/src/first/first_utils.cc 2015-03-30 11:54:18.412569892 +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<float> 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<float> maskvol(refim);
|
||||
maskvol=0.0f;
|
||||
volume4D<float> volnormals;
|
||||
diff -Naur fsl.orig/src/fnirt/fnirtfns.cpp fsl/src/fnirt/fnirtfns.cpp
|
||||
--- fsl.orig/src/fnirt/fnirtfns.cpp 2015-03-30 11:54:10.522550233 +1300
|
||||
+++ fsl/src/fnirt/fnirtfns.cpp 2015-03-30 11:54:18.412569892 +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");
|
||||
diff -Naur fsl.orig/src/fslsurface/fslsurface_first.cc fsl/src/fslsurface/fslsurface_first.cc
|
||||
--- fsl.orig/src/fslsurface/fslsurface_first.cc 2015-03-30 11:54:10.522550233 +1300
|
||||
+++ fsl/src/fslsurface/fslsurface_first.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -500,8 +500,7 @@
|
||||
|
||||
volume<float>* immni = new volume<float>();
|
||||
|
||||
- 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<float>* immni = new volume<float>();
|
||||
|
||||
- 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);
|
||||
|
||||
diff -Naur fsl.orig/src/fslsurface/fslsurfacemaths.cpp fsl/src/fslsurface/fslsurfacemaths.cpp
|
||||
--- fsl.orig/src/fslsurface/fslsurfacemaths.cpp 2015-03-30 11:54:10.522550233 +1300
|
||||
+++ fsl/src/fslsurface/fslsurfacemaths.cpp 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -598,12 +598,6 @@
|
||||
|
||||
}else if (command == "-reconFromBvars"){
|
||||
cout<<"do recon "<<endl;
|
||||
- char* fsldir = getenv("FSLDIR");
|
||||
- if (fsldir == NULL)
|
||||
- {
|
||||
- cerr<<"FSLDIR has not been set. "<<endl;
|
||||
- exit(EXIT_FAILURE);
|
||||
- }
|
||||
//file.bvars,mni_template.nii.gz
|
||||
// string mni = string(fsldir)+"/data/standard/MNI152_T1_1mm";
|
||||
reconSurface_from_bvars( surf, string(argv[i_arg+1]));
|
||||
@@ -612,12 +606,6 @@
|
||||
|
||||
}else if (command == "-reconAllFromBvarsAndSave"){
|
||||
cout<<"do recon+save "<<argc<<" "<<i_arg<<endl;
|
||||
- char* fsldir = getenv("FSLDIR");
|
||||
- if (fsldir == NULL)
|
||||
- {
|
||||
- cerr<<"FSLDIR has not been set. "<<endl;
|
||||
- exit(EXIT_FAILURE);
|
||||
- }
|
||||
//file.bvars,mni_template.nii.gz
|
||||
// string mni = string(fsldir)+"/data/standard/MNI152_T1_1mm";
|
||||
cout<<"recon "<< string(argv[i_arg+1])<<endl;
|
||||
diff -Naur fsl.orig/src/libvis/miscpic.h fsl/src/libvis/miscpic.h
|
||||
--- fsl.orig/src/libvis/miscpic.h 2015-03-30 11:54:10.482550135 +1300
|
||||
+++ fsl/src/libvis/miscpic.h 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -89,12 +89,7 @@
|
||||
LR_label_flag = true;
|
||||
trans= -10;
|
||||
edgethresh = 0.0;
|
||||
- if(getenv("FSLDIR")!=0){
|
||||
- lutbase = string(getenv("FSLDIR")) + "/etc/luts/";
|
||||
- }
|
||||
- else{
|
||||
- lutbase = string("/");
|
||||
- }
|
||||
+ lutbase = "@GENTOO_PORTAGE_EPREFIX@/etc/luts/";
|
||||
title = string("");
|
||||
cbartype = string("");
|
||||
cbarptr = NULL;
|
||||
diff -Naur fsl.orig/src/melodic/meldata.cc fsl/src/melodic/meldata.cc
|
||||
--- fsl.orig/src/melodic/meldata.cc 2015-03-30 11:54:10.502550183 +1300
|
||||
+++ fsl/src/melodic/meldata.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -971,7 +971,7 @@
|
||||
void MelodicData::est_smoothness()
|
||||
{
|
||||
if(Resels == 0){
|
||||
- string SM_path = opts.binpath + "smoothest";
|
||||
+ string SM_path = "smoothest";
|
||||
string Mask_fname = logger.appendDir("mask");
|
||||
|
||||
if(opts.segment.value().length()>0){
|
||||
@@ -1136,7 +1136,7 @@
|
||||
// set up all strings
|
||||
string BET_outputfname = string(Mean_fname)+"_brain";
|
||||
|
||||
- string BET_path = opts.binpath + "bet";
|
||||
+ string BET_path = "bet";
|
||||
string BET_optarg = "-m -f 0.4"; // see man bet
|
||||
string Mask_fname = BET_outputfname+"_mask";
|
||||
|
||||
diff -Naur fsl.orig/src/melodic/meloptions.cc fsl/src/melodic/meloptions.cc
|
||||
--- fsl.orig/src/melodic/meloptions.cc 2015-03-30 11:54:10.502550183 +1300
|
||||
+++ fsl/src/melodic/meloptions.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -93,14 +93,6 @@
|
||||
explicitnums = false;
|
||||
logfname = string("log.txt");
|
||||
|
||||
- // work out the path to the $FSLDIR/bin directory
|
||||
- if(getenv("FSLDIR")!=0){
|
||||
- binpath = (string) getenv("FSLDIR") + "/bin/";
|
||||
- } else{
|
||||
- binpath = argv[0];
|
||||
- binpath = binpath.substr(0,binpath.length()-7);
|
||||
- }
|
||||
-
|
||||
// parse once to establish log directory name
|
||||
for(int a = options.parse_command_line(argc, argv); a < argc; a++);
|
||||
|
||||
diff -Naur fsl.orig/src/melodic/meloptions.h fsl/src/melodic/meloptions.h
|
||||
--- fsl.orig/src/melodic/meloptions.h 2015-03-30 11:54:10.502550183 +1300
|
||||
+++ fsl/src/melodic/meloptions.h 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -93,7 +93,6 @@
|
||||
~MelodicOptions() { delete gopt; }
|
||||
|
||||
string version;
|
||||
- string binpath;
|
||||
string logfname;
|
||||
bool filtermode;
|
||||
bool explicitnums;
|
||||
diff -Naur fsl.orig/src/melodic/melreport.cc fsl/src/melodic/melreport.cc
|
||||
--- fsl.orig/src/melodic/melreport.cc 2015-03-30 11:54:10.502550183 +1300
|
||||
+++ fsl/src/melodic/melreport.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -84,8 +84,8 @@
|
||||
IChtml.setDir(report.getDir(),mmodel.get_prefix()+".html");
|
||||
|
||||
{//start IC page
|
||||
- IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
|
||||
- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
|
||||
+ IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
|
||||
<< "<style type=\"text/css\">OBJECT { width: 100% }</style>"
|
||||
<< "<TITLE>FSL</TITLE></HEAD>" << endl
|
||||
<< "<IFRAME height=" << int(melodat.get_numfiles()/30 + 1)*50
|
||||
@@ -487,8 +487,8 @@
|
||||
|
||||
{//start IC2 page
|
||||
IChtml2.setDir(report.getDir(),mmodel.get_prefix()+"_MM.html");
|
||||
- IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
|
||||
- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
|
||||
+ IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
|
||||
<< "<style type=\"text/css\">OBJECT { width: 100% }</style>"
|
||||
<< "<TITLE>FSL</TITLE></HEAD>" << endl
|
||||
<< "<IFRAME height="<< int(melodat.get_numfiles()/30 + 1)*50
|
||||
@@ -666,8 +666,8 @@
|
||||
IChtml << "<HTML> " << endl
|
||||
<< "<TITLE>MELODIC Component " << num2str(cnum)
|
||||
<< "</TITLE>" << endl
|
||||
- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
|
||||
- << "/doc/images/fsl-bg.jpg\">" << endl
|
||||
+ << "<BODY BACKGROUND=\"file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
|
||||
<< "<hr><CENTER><H1>MELODIC Component " << num2str(cnum)
|
||||
<< "</H1>"<< endl;
|
||||
|
||||
diff -Naur fsl.orig/src/melodic/melreport.h fsl/src/melodic/melreport.h
|
||||
--- fsl.orig/src/melodic/melreport.h 2015-03-30 11:54:10.502550183 +1300
|
||||
+++ fsl/src/melodic/melreport.h 2015-03-30 12:11:17.995116883 +1300
|
||||
@@ -104,21 +104,21 @@
|
||||
const time_t tmptime = time(NULL);
|
||||
system(("mkdir "+ logger.appendDir("report") + " 2>/dev/null").c_str());
|
||||
report.setDir(logger.appendDir("report"),"00index.html",true,false,ios::out);
|
||||
- report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
|
||||
- (string) getenv("FSLDIR") +"/doc/fsl.css>"
|
||||
+ report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
|
||||
<< "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
|
||||
<< endl <<endl;
|
||||
loghtml.setDir(report.getDir(),"log.html");
|
||||
- loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
|
||||
- (string) getenv("FSLDIR") +"/doc/fsl.css>"
|
||||
+ loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
|
||||
<< "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
|
||||
<< endl <<endl;
|
||||
navigator.setDir(report.getDir(),"nav.html");
|
||||
head.setDir(report.getDir(),"head.html");
|
||||
- navigator << "<link REL=stylesheet TYPE=text/css href=file:"+
|
||||
- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
|
||||
- head << "<link REL=stylesheet TYPE=text/css href=file:"+
|
||||
- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
|
||||
+ navigator << "<link REL=stylesheet TYPE=text/css href=file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
|
||||
+ head << "<link REL=stylesheet TYPE=text/css href=file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
|
||||
head <<"<TABLE BORDER=0><TR>" << endl
|
||||
<<" <TD ALIGN=CENTER WIDTH=100%>"<< endl
|
||||
<<"<TABLE BORDER=0>"<< endl
|
||||
@@ -130,8 +130,8 @@
|
||||
<< "</tr></table>" << endl
|
||||
<< "<TD ALIGN=RIGHT>" << endl
|
||||
<< "<a href=http://www.fmrib.ox.ac.uk/fsl target=_top>" << endl
|
||||
- << "<IMG BORDER=0 SRC=file:"<< getenv("FSLDIR")
|
||||
- << "/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
|
||||
+ << "<IMG BORDER=0 SRC=file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
|
||||
<< "</TD>"<<endl<<"</TR></TABLE> <hr>"<<endl;
|
||||
if(opts.guireport.value()==""){
|
||||
report <<"<OBJECT data=head.html></OBJECT>" << endl;
|
||||
diff -Naur fsl.orig/src/mm/mixture_model.cc fsl/src/mm/mixture_model.cc
|
||||
--- fsl.orig/src/mm/mixture_model.cc 2015-03-30 11:54:10.522550233 +1300
|
||||
+++ fsl/src/mm/mixture_model.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -2224,8 +2224,8 @@
|
||||
|
||||
htmllog << "<HTML> " << endl
|
||||
<< "<TITLE>Mixture Model fit for" << data_name << "</TITLE>" << endl
|
||||
- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
|
||||
- << "/doc/images/fsl-bg.jpg\">" << endl
|
||||
+ << "<BODY BACKGROUND=\"file:"
|
||||
+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
|
||||
<< "<hr><CENTER><H1>Mixture Model fit for<br>" << data_name << " </H1>"<< endl;
|
||||
|
||||
htmllog << "<hr><p>" << endl;
|
||||
diff -Naur fsl.orig/src/siena/siena_diff.cc fsl/src/siena/siena_diff.cc
|
||||
--- fsl.orig/src/siena/siena_diff.cc 2015-03-30 11:54:10.482550135 +1300
|
||||
+++ fsl/src/siena/siena_diff.cc 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -107,7 +107,7 @@
|
||||
{
|
||||
// {{{ vars
|
||||
|
||||
-char thestring[10000], segoptions[10000], fsldir[10000];
|
||||
+char thestring[10000], segoptions[10000];
|
||||
int x_size, y_size, z_size, size, x, y, z, i, count,
|
||||
seg2=0, ignore_z=0, ignore_top_slices=0, //erode_mask=0,
|
||||
ignore_bottom_slices=0, debug=0, flow_output=1, edge_masking=0;
|
||||
@@ -124,8 +124,6 @@
|
||||
|
||||
string argv1(argv[1]), argv2(argv[2]);
|
||||
|
||||
-sprintf(fsldir,"%s",getenv("FSLDIR"));
|
||||
-
|
||||
for (i = 3; i < argc; i++) {
|
||||
if (!strcmp(argv[i], "-i"))
|
||||
ignore_z=1;
|
||||
@@ -209,26 +207,26 @@
|
||||
// }}}
|
||||
// {{{ transform images and masks
|
||||
|
||||
-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
|
||||
- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
|
||||
+sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
|
||||
+ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
|
||||
printf("%s\n",thestring); system(thestring);
|
||||
|
||||
-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
|
||||
- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
|
||||
+sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
|
||||
+ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
|
||||
printf("%s\n",thestring); system(thestring);
|
||||
|
||||
-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
|
||||
- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
|
||||
+sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
|
||||
+ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
|
||||
printf("%s\n",thestring); system(thestring);
|
||||
|
||||
-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
|
||||
- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
|
||||
+sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
|
||||
+ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
|
||||
printf("%s\n",thestring); system(thestring);
|
||||
|
||||
if (edge_masking)
|
||||
{
|
||||
- sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_valid_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_valid_mask_with_%s",
|
||||
- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
|
||||
+ sprintf(thestring,"flirt -o %s_halfwayto_%s_valid_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_valid_mask_with_%s",
|
||||
+ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
|
||||
printf("%s\n",thestring); system(thestring);
|
||||
}
|
||||
|
||||
@@ -287,8 +285,8 @@
|
||||
cout << "saving image 1 to disk prior to segmentation" << endl;
|
||||
save_volume(in1,argv1+"_halfwayto_"+argv2+"_brain");
|
||||
in1.destroy();
|
||||
- sprintf(thestring,"%s/bin/fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
|
||||
- fsldir,segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
|
||||
+ sprintf(thestring,"fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
|
||||
+ segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
|
||||
cout << thestring << endl;
|
||||
system(thestring);
|
||||
}
|
||||
diff -Naur fsl.orig/src/topup/topupfns.cpp fsl/src/topup/topupfns.cpp
|
||||
--- fsl.orig/src/topup/topupfns.cpp 2015-03-30 11:54:10.522550233 +1300
|
||||
+++ fsl/src/topup/topupfns.cpp 2015-03-30 11:54:18.412569892 +1300
|
||||
@@ -463,8 +463,7 @@
|
||||
if (TOPUP::check_exist(ecfname)) return(ecfname);
|
||||
}
|
||||
if (!TOPUP::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 (TOPUP::check_exist(ecfname)) return(ecfname);
|
||||
else if (!TOPUP::extension(ecfname).length()) { // If no path _and_ no extension given
|
||||
ecfname += string(".cnf");
|
||||
|
15
sci-biology/fsl/files/fsl-5.0.9-headers.patch
Normal file
15
sci-biology/fsl/files/fsl-5.0.9-headers.patch
Normal file
@ -0,0 +1,15 @@
|
||||
# Include zlib header directly.
|
||||
# From: Francois Bissey <frp.bissey@gmail.com>
|
||||
# Signed-off-by: Horea Christian <horea.christ@gmail.com>
|
||||
# Submitted upstream: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1709&L=FSL&F=&S=&X=95C10F0B7D62EAAE7A&P=169254
|
||||
|
||||
--- fsl/src/miscvis/writepng.c.orig 2013-10-19 00:18:32.415203592 +1300
|
||||
+++ fsl/src/miscvis/writepng.c 2013-10-19 00:19:05.414255132 +1300
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <stdlib.h> /* 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 */
|
||||
|
115
sci-biology/fsl/files/fsl-5.0.9-setup.patch
Normal file
115
sci-biology/fsl/files/fsl-5.0.9-setup.patch
Normal file
@ -0,0 +1,115 @@
|
||||
diff -Naur fsl.orig/build fsl/build
|
||||
--- fsl.orig/build 2015-03-29 00:10:39.845936000 +1300
|
||||
+++ fsl/build 2015-03-29 00:12:37.160487000 +1300
|
||||
@@ -11,9 +11,8 @@
|
||||
ifit load_varian load_dicom misc_scripts fdt first possum sgeutils \
|
||||
flameo oxford_asl relax qboot topup ptx2 lesions eddy dwssfp verbena";
|
||||
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"
|
||||
|
||||
diff -Naur fsl.orig/config/common/buildproj fsl/config/common/buildproj
|
||||
--- fsl.orig/config/common/buildproj 2015-03-29 00:11:47.130998000 +1300
|
||||
+++ fsl/config/common/buildproj 2015-03-29 00:12:37.164319000 +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 ;
|
||||
@@ -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 -Naur fsl.orig/config/common/vars.mk fsl/config/common/vars.mk
|
||||
--- fsl.orig/config/common/vars.mk 2015-03-29 00:11:47.183520000 +1300
|
||||
+++ fsl/config/common/vars.mk 2015-03-29 00:18:53.151222000 +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} ${ANSI_CFLAGS} ${DBGFLAGS} ${USEDCSTATICFLAGS} ${USRCFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \
|
||||
- ${AccumulatedIncFlags}
|
||||
+ ${AccumulatedIncFlags} ${USERCFLAGS}
|
||||
|
||||
CXXFLAGS = ${ANSI_FLAGS} ${ANSI_CXXFLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \
|
||||
- ${AccumulatedIncFlags}
|
||||
+ ${AccumulatedIncFlags} ${USERCXXFLAGS}
|
||||
|
||||
HFILES = *.h
|
||||
AFILES = *.a
|
||||
diff -Naur fsl.orig/config/generic/systemvars.mk fsl/config/generic/systemvars.mk
|
||||
--- fsl.orig/config/generic/systemvars.mk 2015-03-29 00:11:47.534246000 +1300
|
||||
+++ fsl/config/generic/systemvars.mk 2015-03-29 00:12:37.162129000 +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
|
||||
diff -Naur fsl.orig/extras/build fsl/extras/build
|
||||
--- fsl.orig/extras/build 2015-03-29 00:11:15.080236000 +1300
|
||||
+++ fsl/extras/build 2015-03-29 00:15:53.170496000 +1300
|
||||
@@ -104,8 +104,8 @@
|
||||
if [ ${BUILDICONV} -eq 1 ]; then
|
||||
PROJECTS="${PROJECTS} libiconv"
|
||||
fi
|
||||
-PROJECTS="${PROJECTS} libgd libgdc libprob libcprob newmat cprob newran fftw"
|
||||
+PROJECTS="libgdc libprob libcprob newmat cprob newran"
|
||||
PROJECTS="${PROJECTS} boost libxml2-2.9.2 libxml++-2.34.0"
|
||||
for projname in $PROJECTS; do
|
||||
|
||||
if [ -d $FSLESRCDIR/$projname ] ; then
|
147
sci-biology/fsl/fsl-5.0.11.ebuild
Normal file
147
sci-biology/fsl/fsl-5.0.11.ebuild
Normal file
@ -0,0 +1,147 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic toolchain-funcs prefix
|
||||
|
||||
DESCRIPTION="Analysis of functional, structural, and diffusion MRI brain imaging data"
|
||||
HOMEPAGE="http://www.fmrib.ox.ac.uk/fsl"
|
||||
SRC_URI="https://fsl.fmrib.ox.ac.uk/fsldownloads/${P}-sources.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="FSL BSD-2 newmat"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
COMMON_DEPEND="
|
||||
dev-cpp/libxmlpp:2.6
|
||||
dev-libs/libxml2
|
||||
dev-libs/boost
|
||||
media-gfx/graphviz
|
||||
media-libs/gd
|
||||
media-libs/glu
|
||||
media-libs/libpng:0=
|
||||
sci-libs/ciftilib
|
||||
sys-libs/zlib
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
dev-lang/tcl:0=
|
||||
dev-lang/tk:0=
|
||||
dev-python/fslpy
|
||||
"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
UPSTREAM_FSLDIR="/usr/share/fsl"
|
||||
MAKEOPTS+=" -j1"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}"-5.0.10-setup.patch
|
||||
"${FILESDIR}/${PN}"-5.0.9-headers.patch
|
||||
"${FILESDIR}/${PN}"-5.0.9-fsldir_redux.patch
|
||||
)
|
||||
|
||||
src_prepare(){
|
||||
default
|
||||
sed -i \
|
||||
-e "s:@@GENTOO_RANLIB@@:$(tc-getRANLIB):" \
|
||||
-e "s:@@GENTOO_CC@@:$(tc-getCC):" \
|
||||
-e "s:@@GENTOO_CXX@@:$(tc-getCXX):" \
|
||||
config/generic/systemvars.mk || die
|
||||
|
||||
eprefixify $(grep -rl GENTOO_PORTAGE_EPREFIX src/*) \
|
||||
etc/js/label-div.html
|
||||
|
||||
makefilelist=$(find src/ -name Makefile)
|
||||
|
||||
sed -i \
|
||||
-e "s:-I\${INC_BOOST}::" \
|
||||
-e "s:-I\${INC_ZLIB}::" \
|
||||
-e "s:-I\${INC_GD}::" \
|
||||
-e "s:-I\${INC_PNG}::" \
|
||||
-e "s:-L\${LIB_GD}::" \
|
||||
-e "s:-L\${LIB_PNG}::" \
|
||||
-e "s:-L\${LIB_ZLIB}::" \
|
||||
${makefilelist} || die
|
||||
|
||||
sed -e "s:\${FSLDIR}/bin/::g" \
|
||||
-e "s:\$FSLDIR/bin/::g" \
|
||||
-i $(grep -rl "\${FSLDIR}/bin" src/*) \
|
||||
$(grep -rl "\${FSLDIR}/bin" etc/matlab/*) || die
|
||||
|
||||
sed -e "s:\$FSLDIR/data:${EPREFIX}/usr/share/fsl/data:g" \
|
||||
-e "s:\${FSLDIR}/data:${EPREFIX}/usr/share/fsl/data:g" \
|
||||
-i $(grep -rl "\$FSLDIR/data" src/*) \
|
||||
$(grep -rl "\${FSLDIR}/data" src/*) || die
|
||||
|
||||
sed -e "s:\$FSLDIR/doc:${EPREFIX}/usr/share/fsl/doc:g" \
|
||||
-e "s:\${FSLDIR}/doc:${EPREFIX}/usr/share/fsl/doc:g" \
|
||||
-i $(grep -rl "\$FSLDIR/doc" src/*) \
|
||||
$(grep -rl "\${FSLDIR}/doc" src/*) || die
|
||||
|
||||
sed -e "s:/usr/share/fsl/doc:${EPREFIX}/usr/share/fsl/doc:g" \
|
||||
$(grep -rl "/usr/share/fsl/doc" src/*) || die
|
||||
|
||||
sed -e "s:\$FSLDIR/etc:${EPREFIX}/etc:g" \
|
||||
-e "s:\${FSLDIR}/etc:${EPREFIX}/etc:g" \
|
||||
-i $(grep -rlI "\$FSLDIR/etc" *) \
|
||||
-i $(grep -rlI "\${FSLDIR}/etc" *) || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export FSLDIR=${WORKDIR}/${PN}
|
||||
export FSLCONDIR=${WORKDIR}/${PN}/config
|
||||
export FSLMACHTYPE=generic
|
||||
|
||||
export USERLDFLAGS="${LDFLAGS}"
|
||||
export USERCFLAGS="${CFLAGS}"
|
||||
export USERCXXFLAGS="${CXXFLAGS}"
|
||||
|
||||
./build || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
sed -i "s:\${FSLDIR}/tcl:/usr/libexec/fsl:g" \
|
||||
$(grep -lI "\${FSLDIR}/tcl" bin/*) \
|
||||
$(grep -l "\${FSLDIR}/tcl" tcl/*) || die
|
||||
sed -i "s:\$FSLDIR/tcl:/usr/libexec/fsl:g" \
|
||||
$(grep -l "\$FSLDIR/tcl" tcl/*) || die
|
||||
|
||||
dobin bin/*
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r data
|
||||
dodoc -r doc/. refdoc
|
||||
|
||||
insinto /usr/libexec/fsl
|
||||
doins -r tcl/*
|
||||
|
||||
insinto /etc/fslconf
|
||||
doins etc/fslconf/fsl.sh
|
||||
|
||||
insinto /etc
|
||||
doins etc/fslversion
|
||||
doins -r etc/default_flobs.flobs etc/flirtsch etc/js etc/luts
|
||||
#if use matlab; then
|
||||
# doins etc/matlab
|
||||
#fi
|
||||
|
||||
#the following is needed for FSL and depending programs to be able
|
||||
#to find its files, since FSL uses an uncommon installation path:
|
||||
#https://github.com/gentoo-science/sci/pull/612#r60289295
|
||||
dosym ../../../etc ${UPSTREAM_FSLDIR}/etc
|
||||
dosym ../doc/${PF} ${UPSTREAM_FSLDIR}/doc
|
||||
dosym ../../bin ${UPSTREAM_FSLDIR}/bin
|
||||
|
||||
doenvd "$(prefixify_ro "${FILESDIR}"/99fsl)"
|
||||
mv "${ED}"/usr/bin/{,fsl_}cluster || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
einfo "Please run the following commands if you"
|
||||
einfo "intend to use fsl from an existing shell:"
|
||||
einfo "env-update && source /etc/profile"
|
||||
echo
|
||||
}
|
11
sci-biology/fsl/metadata.xml
Normal file
11
sci-biology/fsl/metadata.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>sci-biology@gentoo.org</email>
|
||||
<name>Gentoo Biology Project</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user