* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2015-04-20 1:11 Francois Bissey
0 siblings, 0 replies; 9+ messages in thread
From: Francois Bissey @ 2015-04-20 1:11 UTC (permalink / raw
To: gentoo-commits
commit: bc9caf8627d0ae109d4d294f9b20ca1affd15c45
Author: Horea Christian <h.chr <AT> mail <DOT> ru>
AuthorDate: Sun Mar 29 23:52:57 2015 +0000
Commit: Francois Bissey <f.r.bissey <AT> massey <DOT> ac <DOT> nz>
CommitDate: Sun Mar 29 23:52:57 2015 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=bc9caf86
reimplmented pathc fsl-5.0.4-headers
Package-Manager: portage-2.2.18
sci-biology/fsl/ChangeLog | 4 ++++
| 11 +++++++++++
| 0
3 files changed, 15 insertions(+)
diff --git a/sci-biology/fsl/ChangeLog b/sci-biology/fsl/ChangeLog
index e6857b2..fdcd6b1 100644
--- a/sci-biology/fsl/ChangeLog
+++ b/sci-biology/fsl/ChangeLog
@@ -2,6 +2,10 @@
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 29 Mar 2015; <chymera@gentoo.org> +files/fsl-5.0.8-headers.patch,
+ files/fsl-5.0.4-headers.patch:
+ reimplmented pathc fsl-5.0.4-headers
+
28 Mar 2015; <chymera@gentoo.org> fsl-5.0.8.ebuild:
ported changes from 5.0.6 regarding FSLDIR
--git a/sci-biology/fsl/files/fsl-5.0.4-headers.patch b/sci-biology/fsl/files/fsl-5.0.4-headers.patch
index ab2ab3d..803151b 100644
--- a/sci-biology/fsl/files/fsl-5.0.4-headers.patch
+++ b/sci-biology/fsl/files/fsl-5.0.4-headers.patch
@@ -1,3 +1,14 @@
+--- 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 @@
diff --git a/sci-biology/fsl/files/fsl-5.0.4-headers.patch b/sci-biology/fsl/files/fsl-5.0.8-headers.patch
similarity index 100%
copy from sci-biology/fsl/files/fsl-5.0.4-headers.patch
copy to sci-biology/fsl/files/fsl-5.0.8-headers.patch
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2015-04-20 1:11 Francois Bissey
0 siblings, 0 replies; 9+ messages in thread
From: Francois Bissey @ 2015-04-20 1:11 UTC (permalink / raw
To: gentoo-commits
commit: 76a864a1f60bcf110e205e279086ab0c4ddd32c1
Author: Horea Christian <h.chr <AT> mail <DOT> ru>
AuthorDate: Mon Mar 30 16:16:51 2015 +0000
Commit: Francois Bissey <f.r.bissey <AT> massey <DOT> ac <DOT> nz>
CommitDate: Mon Mar 30 16:16:51 2015 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=76a864a1
implemented 5.0.8 fsldir redux patch
Package-Manager: portage-2.2.18
sci-biology/fsl/ChangeLog | 4 ++++
.../fsl/files/{fsl-5.0.8-redux.patch => fsl-5.0.8-fsldir_redux.patch} | 0
sci-biology/fsl/fsl-5.0.8.ebuild | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/sci-biology/fsl/ChangeLog b/sci-biology/fsl/ChangeLog
index 9157f64..822c9b9 100644
--- a/sci-biology/fsl/ChangeLog
+++ b/sci-biology/fsl/ChangeLog
@@ -2,6 +2,10 @@
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 30 Mar 2015; <chymera@gentoo.org> +files/fsl-5.0.8-fsldir_redux.patch,
+ -files/fsl-5.0.8-redux.patch, fsl-5.0.8.ebuild:
+ implemented 5.0.8 fsldir redux patch
+
30 Mar 2015; <chymera@gentoo.org> +files/fsl-5.0.8-redux.patch:
5.0.8 redux patch by François Bissey
diff --git a/sci-biology/fsl/files/fsl-5.0.8-redux.patch b/sci-biology/fsl/files/fsl-5.0.8-fsldir_redux.patch
similarity index 100%
rename from sci-biology/fsl/files/fsl-5.0.8-redux.patch
rename to sci-biology/fsl/files/fsl-5.0.8-fsldir_redux.patch
diff --git a/sci-biology/fsl/fsl-5.0.8.ebuild b/sci-biology/fsl/fsl-5.0.8.ebuild
index 8583a3e..af486a9 100644
--- a/sci-biology/fsl/fsl-5.0.8.ebuild
+++ b/sci-biology/fsl/fsl-5.0.8.ebuild
@@ -33,7 +33,7 @@ S=${WORKDIR}/${PN}
src_prepare(){
epatch "${FILESDIR}/${PN}"-5.0.8-setup.patch
epatch "${FILESDIR}/${PN}"-5.0.8-headers.patch
- epatch "${FILESDIR}/${PN}"-5.0.6-fsldir_redux.patch
+ epatch "${FILESDIR}/${PN}"-5.0.8-fsldir_redux.patch
sed -i \
-e "s:@@GENTOO_RANLIB@@:$(tc-getRANLIB):" \
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2015-04-20 1:11 Francois Bissey
0 siblings, 0 replies; 9+ messages in thread
From: Francois Bissey @ 2015-04-20 1:11 UTC (permalink / raw
To: gentoo-commits
commit: 5d5c08d1c7bca1b5ae4278cac0b9d5536b345ccb
Author: Horea Christian <h.chr <AT> mail <DOT> ru>
AuthorDate: Mon Mar 30 16:14:41 2015 +0000
Commit: Francois Bissey <f.r.bissey <AT> massey <DOT> ac <DOT> nz>
CommitDate: Mon Mar 30 16:14:41 2015 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5d5c08d1
5.0.8 redux patch by François Bissey
Package-Manager: portage-2.2.18
sci-biology/fsl/ChangeLog | 3 +
sci-biology/fsl/files/fsl-5.0.8-redux.patch | 452 ++++++++++++++++++++++++++++
2 files changed, 455 insertions(+)
diff --git a/sci-biology/fsl/ChangeLog b/sci-biology/fsl/ChangeLog
index a8447db..9157f64 100644
--- a/sci-biology/fsl/ChangeLog
+++ b/sci-biology/fsl/ChangeLog
@@ -2,6 +2,9 @@
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 30 Mar 2015; <chymera@gentoo.org> +files/fsl-5.0.8-redux.patch:
+ 5.0.8 redux patch by François Bissey
+
29 Mar 2015; <chymera@gentoo.org> fsl-5.0.8.ebuild:
using the 5.0.8 headers patch
diff --git a/sci-biology/fsl/files/fsl-5.0.8-redux.patch b/sci-biology/fsl/files/fsl-5.0.8-redux.patch
new file mode 100644
index 0000000..593c1c8
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-5.0.8-redux.patch
@@ -0,0 +1,452 @@
+diff -Naur src.orig/fast4/fast_two.cc src/fast4/fast_two.cc
+--- src.orig/fast4/fast_two.cc 2015-03-30 11:54:10.522550233 +1300
++++ 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 src.orig/feat5/feat_model.cc src/feat5/feat_model.cc
+--- src.orig/feat5/feat_model.cc 2015-03-30 11:54:10.502550183 +1300
++++ 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 src.orig/feat5/tsplot.cc src/feat5/tsplot.cc
+--- src.orig/feat5/tsplot.cc 2015-03-30 11:54:10.502550183 +1300
++++ 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 src.orig/first/first_utils.cc src/first/first_utils.cc
+--- src.orig/first/first_utils.cc 2015-03-30 11:54:10.482550135 +1300
++++ 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 src.orig/fnirt/fnirtfns.cpp src/fnirt/fnirtfns.cpp
+--- src.orig/fnirt/fnirtfns.cpp 2015-03-30 11:54:10.522550233 +1300
++++ 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 src.orig/fslsurface/fslsurface_first.cc src/fslsurface/fslsurface_first.cc
+--- src.orig/fslsurface/fslsurface_first.cc 2015-03-30 11:54:10.522550233 +1300
++++ 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 src.orig/fslsurface/fslsurfacemaths.cpp src/fslsurface/fslsurfacemaths.cpp
+--- src.orig/fslsurface/fslsurfacemaths.cpp 2015-03-30 11:54:10.522550233 +1300
++++ 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 src.orig/libvis/miscpic.h src/libvis/miscpic.h
+--- src.orig/libvis/miscpic.h 2015-03-30 11:54:10.482550135 +1300
++++ 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 src.orig/melodic/meldata.cc src/melodic/meldata.cc
+--- src.orig/melodic/meldata.cc 2015-03-30 11:54:10.502550183 +1300
++++ 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 src.orig/melodic/meloptions.cc src/melodic/meloptions.cc
+--- src.orig/melodic/meloptions.cc 2015-03-30 11:54:10.502550183 +1300
++++ 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 src.orig/melodic/meloptions.h src/melodic/meloptions.h
+--- src.orig/melodic/meloptions.h 2015-03-30 11:54:10.502550183 +1300
++++ 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 src.orig/melodic/melreport.cc src/melodic/melreport.cc
+--- src.orig/melodic/melreport.cc 2015-03-30 11:54:10.502550183 +1300
++++ 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 src.orig/melodic/melreport.h src/melodic/melreport.h
+--- src.orig/melodic/melreport.h 2015-03-30 11:54:10.502550183 +1300
++++ 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 src.orig/mm/mixture_model.cc src/mm/mixture_model.cc
+--- src.orig/mm/mixture_model.cc 2015-03-30 11:54:10.522550233 +1300
++++ 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 src.orig/siena/siena_diff.cc src/siena/siena_diff.cc
+--- src.orig/siena/siena_diff.cc 2015-03-30 11:54:10.482550135 +1300
++++ 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 src.orig/topup/topupfns.cpp src/topup/topupfns.cpp
+--- src.orig/topup/topupfns.cpp 2015-03-30 11:54:10.522550233 +1300
++++ 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");
+
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2017-09-21 2:39 Benda XU
0 siblings, 0 replies; 9+ messages in thread
From: Benda XU @ 2017-09-21 2:39 UTC (permalink / raw
To: gentoo-commits
commit: 0d75b7b6bc3b549e4d3fbe95c65ebce4ef1d92cc
Author: Horea Christian <horea.christ <AT> yandex <DOT> com>
AuthorDate: Tue Aug 8 13:37:56 2017 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Sep 21 02:39:21 2017 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=0d75b7b6
sci-biology/fsl: version bump.
made env.dfile prefix-compatible
Closes: https://github.com/gentoo/sci/pull/804
Package-Manager: Portage-2.3.8, Repoman-2.3.3
sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch | 456 +++++++++++++++++++++
| 15 +
sci-biology/fsl/files/fsl-5.0.9-setup.patch | 115 ++++++
sci-biology/fsl/fsl-5.0.8.ebuild | 4 +-
.../fsl/{fsl-5.0.8.ebuild => fsl-5.0.9.ebuild} | 68 ++-
5 files changed, 621 insertions(+), 37 deletions(-)
diff --git a/sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch b/sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch
new file mode 100644
index 000000000..c28fabe42
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch
@@ -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");
+
--git a/sci-biology/fsl/files/fsl-5.0.9-headers.patch b/sci-biology/fsl/files/fsl-5.0.9-headers.patch
new file mode 100644
index 000000000..663dc565c
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-5.0.9-headers.patch
@@ -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 */
+
diff --git a/sci-biology/fsl/files/fsl-5.0.9-setup.patch b/sci-biology/fsl/files/fsl-5.0.9-setup.patch
new file mode 100644
index 000000000..c688cd6e8
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-5.0.9-setup.patch
@@ -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
diff --git a/sci-biology/fsl/fsl-5.0.8.ebuild b/sci-biology/fsl/fsl-5.0.8.ebuild
index 467255c5f..7916c0811 100644
--- a/sci-biology/fsl/fsl-5.0.8.ebuild
+++ b/sci-biology/fsl/fsl-5.0.8.ebuild
@@ -133,7 +133,9 @@ src_install() {
dosym /etc /usr/share/fsl/etc
dosym /usr/share/doc/${P} /usr/share/fsl/doc
- doenvd "${FILESDIR}"/99fsl
+ cp "${FILESDIR}"/99fsl "${TMPDIR}"/99fsl || die
+ eprefixify "${TMPDIR}"/99fsl
+ doenvd "${TMPDIR}"/99fsl
mv "${ED}"/usr/bin/{,fsl_}cluster || die
}
diff --git a/sci-biology/fsl/fsl-5.0.8.ebuild b/sci-biology/fsl/fsl-5.0.9.ebuild
similarity index 64%
copy from sci-biology/fsl/fsl-5.0.8.ebuild
copy to sci-biology/fsl/fsl-5.0.9.ebuild
index 467255c5f..bc96cec06 100644
--- a/sci-biology/fsl/fsl-5.0.8.ebuild
+++ b/sci-biology/fsl/fsl-5.0.9.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit eutils toolchain-funcs prefix
+inherit toolchain-funcs prefix
DESCRIPTION="Analysis of functional, structural, and diffusion MRI brain imaging data"
HOMEPAGE="http://www.fmrib.ox.ac.uk/fsl"
@@ -29,13 +29,16 @@ RDEPEND="${COMMON_DEPEND}
"
S=${WORKDIR}/${PN}
+UPSTREAM_FSLDIR="/usr/share/fsl"
-src_prepare(){
- epatch \
- "${FILESDIR}/${PN}"-5.0.8-setup.patch \
- "${FILESDIR}/${PN}"-5.0.8-headers.patch \
- "${FILESDIR}/${PN}"-5.0.8-fsldir_redux.patch
+PATCHES=(
+ "${FILESDIR}/${PN}"-5.0.9-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):" \
@@ -57,36 +60,28 @@ src_prepare(){
-e "s:-L\${LIB_ZLIB}::" \
${makefilelist} || die
- sed -i "s:\${FSLDIR}/bin/::g" \
- $(grep -rl "\${FSLDIR}/bin" src/*) \
- $(grep -rl "\${FSLDIR}/bin" etc/matlab/*)
- sed -i "s:\$FSLDIR/bin/::g" \
- $(grep -rl "\$FSLDIR/bin" src/*) \
- $(grep -rl "\$FSLDIR/bin" etc/matlab/*)
-
- sed -i "s:\$FSLDIR/data:${EPREFIX}/usr/share/fsl/data:g" \
- $(grep -rl "\$FSLDIR/data" src/*)
+ 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 -i "s:\${FSLDIR}/data:${EPREFIX}/usr/share/fsl/data:g" \
- $(grep -rl "\${FSLDIR}/data" src/*)
+ 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 -i "s:\$FSLDIR/etc:${EPREFIX}/etc:g" \
- $(grep -rl "\$FSLDIR/etc" src/*)
+ 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 -i "s:\${FSLDIR}/etc:${EPREFIX}/etc:g" \
- $(grep -rl "\${FSLDIR}/etc" src/*)
+ sed -e "s:/usr/share/fsl/doc:${EPREFIX}/usr/share/fsl/doc:g" \
+ $(grep -rl "/usr/share/fsl/doc" src/*) || die
- sed -i "s:\$FSLDIR/doc:${EPREFIX}/usr/share/fsl/doc:g" \
- $(grep -rl "\$FSLDIR/doc" src/*)
-
- sed -i "s:\${FSLDIR}/doc:${EPREFIX}/usr/share/fsl/doc:g" \
- $(grep -rl "\${FSLDIR}/doc" src/*)
-
- sed -i "s:\'\${FSLDIR}\'/doc:${EPREFIX}/usr/share/fsl/doc:g" \
- $(grep -rl "\'\${FSLDIR}\'/doc" src/*)
-
- sed -i -e "s:\$FSLDIR/etc:/etc:g" `grep -rlI \$FSLDIR/etc *`
- default
+ 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() {
@@ -128,12 +123,13 @@ src_install() {
#fi
#the following is needed for FSL and depending programs to be able
- #to find its files, since FSL uses an uncommon:
+ #to find its files, since FSL uses an uncommon installation path:
#https://github.com/gentoo-science/sci/pull/612#r60289295
- dosym /etc /usr/share/fsl/etc
- dosym /usr/share/doc/${P} /usr/share/fsl/doc
+ dosym /etc ${UPSTREAM_FSLDIR}/etc
+ dosym /usr/share/doc/${PF} ${UPSTREAM_FSLDIR}/doc
+ dosym /usr/bin ${UPSTREAM_FSLDIR}/bin
- doenvd "${FILESDIR}"/99fsl
+ doenvd "$(prefixify_ro "${FILESDIR}"/99fsl)"
mv "${ED}"/usr/bin/{,fsl_}cluster || die
}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2020-06-19 5:30 Horea Christian
0 siblings, 0 replies; 9+ messages in thread
From: Horea Christian @ 2020-06-19 5:30 UTC (permalink / raw
To: gentoo-commits
commit: bb46a3101c02d7fa039c78fa666d4d35d5e32989
Author: Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Fri Jun 19 05:30:09 2020 +0000
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Fri Jun 19 05:30:09 2020 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=bb46a310
sci-biology/fsl: gcc compatibility
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Horea Christian <chr <AT> chymera.eu>
sci-biology/fsl/files/fsl-6.0.2-gcc10_include.patch | 10 ++++++++++
sci-biology/fsl/fsl-6.0.2.ebuild | 1 +
2 files changed, 11 insertions(+)
diff --git a/sci-biology/fsl/files/fsl-6.0.2-gcc10_include.patch b/sci-biology/fsl/files/fsl-6.0.2-gcc10_include.patch
new file mode 100644
index 000000000..9ddb11a2b
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-6.0.2-gcc10_include.patch
@@ -0,0 +1,10 @@
+--- a/src/newimage/newimageio.h 2020-06-18 06:05:51.287864975 -0400
++++ b/src/newimage/newimageio.h 2020-06-18 06:06:27.535129711 -0400
+@@ -75,6 +75,7 @@
+ #include <iostream>
+ #include <fstream>
+ #include <sstream>
++#include <stdexcept>
+ #include "NewNifti/NewNifti.h"
+ #include "newmatio.h"
+ #include "newimage.h"
diff --git a/sci-biology/fsl/fsl-6.0.2.ebuild b/sci-biology/fsl/fsl-6.0.2.ebuild
index cde479421..07bc454ce 100644
--- a/sci-biology/fsl/fsl-6.0.2.ebuild
+++ b/sci-biology/fsl/fsl-6.0.2.ebuild
@@ -35,6 +35,7 @@ S=${WORKDIR}/${PN}
UPSTREAM_FSLDIR="/usr/share/fsl"
PATCHES=(
+ "${FILESDIR}/${PN}"-6.0.2-gcc10_include.patch
"${FILESDIR}/${PN}"-6.0.2-setup.patch
"${FILESDIR}/${PN}"-6.0.2-no_xmlpp.patch
"${FILESDIR}/${PN}"-5.0.11-niftiio_var_fix.patch
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2020-06-19 5:37 Horea Christian
0 siblings, 0 replies; 9+ messages in thread
From: Horea Christian @ 2020-06-19 5:37 UTC (permalink / raw
To: gentoo-commits
commit: 1fd30cbfb13b50d1d93269344921505777809459
Author: Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Fri Jun 19 05:36:54 2020 +0000
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Fri Jun 19 05:36:54 2020 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=1fd30cbf
sci-biology/fsl: dropped deprecated versions
no longer compatible with current GCC and fslpy unbundling
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Horea Christian <chr <AT> chymera.eu>
sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch | 44 --
.../fsl/files/fsl-5.0.11-qstring_compat.patch | 63 ---
sci-biology/fsl/files/fsl-5.0.11-setup.patch | 158 -------
| 32 --
sci-biology/fsl/files/fsl-5.0.4-setup.patch | 110 -----
sci-biology/fsl/files/fsl-5.0.6-fsldir_redux.patch | 456 ---------------------
sci-biology/fsl/files/fsl-5.0.8-fsldir_redux.patch | 452 --------------------
| 21 -
sci-biology/fsl/files/fsl-5.0.8-setup.patch | 113 -----
sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch | 456 ---------------------
sci-biology/fsl/files/fsl-5.0.9-setup.patch | 115 ------
sci-biology/fsl/fsl-5.0.11.ebuild | 157 -------
sci-biology/fsl/fsl-5.0.8.ebuild | 148 -------
sci-biology/fsl/fsl-5.0.9.ebuild | 142 -------
14 files changed, 2467 deletions(-)
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
deleted file mode 100644
index bccf0e238..000000000
--- a/sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-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
deleted file mode 100644
index 78aa020c6..000000000
--- a/sci-biology/fsl/files/fsl-5.0.11-qstring_compat.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From bbd60f634cdcdfbbb3eb8f3b6d00f366d9f34bf9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
-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<float> scratchRow(data.Nrows());//read/write a row at a time
- for (int64_t row=0;row<data.Ncols();row++) {
-diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
-index f310dc7..5e9bc18 100644
---- a/src/melodic/meldata.cc
-+++ b/src/melodic/meldata.cc
-@@ -118,7 +118,7 @@ namespace Melodic{
- tmpData = RawData.matrix(Mask);
- memmsg(" after reshape ");
- } else { //Read in Cifti
-- inputCifti.openFile(fname+".nii");
-+ inputCifti.openFile((fname+".nii").c_str());
- const vector<int64_t>& dims = inputCifti.getDimensions();
- tmpData.ReSize(dims[0],dims[1]); //swapped compared to cifti
- vector<float> 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<char> 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
deleted file mode 100644
index cf9cb785d..000000000
--- a/sci-biology/fsl/files/fsl-5.0.11-setup.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-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
deleted file mode 100644
index 803151bb7..000000000
--- a/sci-biology/fsl/files/fsl-5.0.4-headers.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- 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 <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 */
-
---- 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
deleted file mode 100644
index 0b961492a..000000000
--- a/sci-biology/fsl/files/fsl-5.0.4-setup.patch
+++ /dev/null
@@ -1,110 +0,0 @@
---- 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
deleted file mode 100644
index a4fff260f..000000000
--- a/sci-biology/fsl/files/fsl-5.0.6-fsldir_redux.patch
+++ /dev/null
@@ -1,456 +0,0 @@
---- 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<<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);
---- src/feat5/tsplot.cc.orig 2013-10-19 23:48:08.997273362 +1300
-+++ src/feat5/tsplot.cc 2013-10-19 23:50:59.376548902 +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 */
---- 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<int> G;
- vector<string> 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<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;
---- 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<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);
-
---- 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;
-- 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;
---- src/libvis/miscpic.h.orig 2013-10-20 00:11:03.706496109 +1300
-+++ src/libvis/miscpic.h 2013-10-20 00:12:24.515626764 +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;
---- src/melodic/melreport.cc.orig 2013-10-20 00:13:01.475686492 +1300
-+++ src/melodic/melreport.cc 2013-10-20 00:15:02.795882687 +1300
-@@ -85,7 +85,7 @@
-
- {//start IC page
- IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
-- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
-+ "@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
-@@ -488,7 +488,7 @@
- {//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
-+ "@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;
-
---- src/melodic/meloptions.cc.orig 2013-10-20 00:15:46.755953769 +1300
-+++ src/melodic/meloptions.cc 2013-10-20 00:18:26.176211442 +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++);
-
---- src/melodic/meloptions.h.orig 2013-10-20 00:19:32.176318206 +1300
-+++ src/melodic/meloptions.h 2013-10-20 00:19:53.455352701 +1300
-@@ -93,7 +93,6 @@
- ~MelodicOptions() { delete gopt; }
-
- string version;
-- string binpath;
- string logfname;
- bool filtermode;
- bool explicitnums;
---- src/melodic/meldata.cc.orig 2013-10-20 00:20:45.856437466 +1300
-+++ src/melodic/meldata.cc 2013-10-20 00:21:48.655538924 +1300
-@@ -921,7 +921,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){
-@@ -1086,7 +1086,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";
-
---- src/melodic/melreport.h.orig 2013-10-20 00:22:41.816624872 +1300
-+++ src/melodic/melreport.h 2013-10-20 00:24:25.555792499 +1300
-@@ -105,20 +105,20 @@
- 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>"
-+ "@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>"
-+ "@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;
-+ "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
- head << "<link REL=stylesheet TYPE=text/css href=file:"+
-- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
-+ "@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;
---- src/mm/mixture_model.cc.orig 2013-10-20 00:25:00.355848878 +1300
-+++ src/mm/mixture_model.cc 2013-10-20 00:25:32.185900186 +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;
---- src/siena/siena_diff.cc.orig 2013-10-20 00:26:13.215966685 +1300
-+++ src/siena/siena_diff.cc 2013-10-20 00:28:03.925145734 +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);
- }
---- src/topup/topupfns.cpp.orig 2013-10-20 00:28:36.456198320 +1300
-+++ src/topup/topupfns.cpp 2013-10-20 00:29:37.905297565 +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");
---- etc/matlab/call_fsl.m.orig 2013-10-20 23:17:58.626045346 +1300
-+++ etc/matlab/call_fsl.m 2013-10-20 23:20:06.556252150 +1300
-@@ -8,7 +8,7 @@
- % Debian/Ubuntu users should uncomment as
- % indicated
-
--fsldir=getenv('FSLDIR');
-+%fsldir=getenv('FSLDIR');
-
- % Debian/Ubuntu - uncomment the following
- %fsllibdir=sprintf('%s/%s', fsldir, 'bin');
---- etc/js/label-div.html.orig 2013-10-20 23:22:04.906443685 +1300
-+++ etc/js/label-div.html 2013-10-20 23:23:35.006589232 +1300
-@@ -2,12 +2,12 @@
- <head>
- <title>label-div</title>
- <!--[if IE]>
-- <script type="text/javascript" src="FSLDIR/etc/js/excanvas.js"></script>
-+ <script type="text/javascript" src="@GENTOO_PORTAGE_EPREFIX@/etc/js/excanvas.js"></script>
- <![endif]-->
-- <script type="text/javascript" src="FSLDIR/etc/js/strftime-min.js"></script>
-- <script type="text/javascript" src="FSLDIR/etc/js/rgbcolor.js"></script>
-- <script type="text/javascript" src="FSLDIR/etc/js/dygraph-canvas.js"></script>
-- <script type="text/javascript" src="FSLDIR/etc/js/dygraph.js"></script>
-+ <script type="text/javascript" src="@GENTOO_PORTAGE_EPREFIX@/etc/js/strftime-min.js"></script>
-+ <script type="text/javascript" src="@GENTOO_PORTAGE_EPREFIX@/etc/js/rgbcolor.js"></script>
-+ <script type="text/javascript" src="@GENTOO_PORTAGE_EPREFIX@/etc/js/dygraph-canvas.js"></script>
-+ <script type="text/javascript" src="@GENTOO_PORTAGE_EPREFIX@/etc/js/dygraph.js"></script>
- <script type="text/javascript" src="PNMDATA.js"></script>
- </head>
- <body>
diff --git a/sci-biology/fsl/files/fsl-5.0.8-fsldir_redux.patch b/sci-biology/fsl/files/fsl-5.0.8-fsldir_redux.patch
deleted file mode 100644
index 593c1c807..000000000
--- a/sci-biology/fsl/files/fsl-5.0.8-fsldir_redux.patch
+++ /dev/null
@@ -1,452 +0,0 @@
-diff -Naur src.orig/fast4/fast_two.cc src/fast4/fast_two.cc
---- src.orig/fast4/fast_two.cc 2015-03-30 11:54:10.522550233 +1300
-+++ 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 src.orig/feat5/feat_model.cc src/feat5/feat_model.cc
---- src.orig/feat5/feat_model.cc 2015-03-30 11:54:10.502550183 +1300
-+++ 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 src.orig/feat5/tsplot.cc src/feat5/tsplot.cc
---- src.orig/feat5/tsplot.cc 2015-03-30 11:54:10.502550183 +1300
-+++ 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 src.orig/first/first_utils.cc src/first/first_utils.cc
---- src.orig/first/first_utils.cc 2015-03-30 11:54:10.482550135 +1300
-+++ 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 src.orig/fnirt/fnirtfns.cpp src/fnirt/fnirtfns.cpp
---- src.orig/fnirt/fnirtfns.cpp 2015-03-30 11:54:10.522550233 +1300
-+++ 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 src.orig/fslsurface/fslsurface_first.cc src/fslsurface/fslsurface_first.cc
---- src.orig/fslsurface/fslsurface_first.cc 2015-03-30 11:54:10.522550233 +1300
-+++ 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 src.orig/fslsurface/fslsurfacemaths.cpp src/fslsurface/fslsurfacemaths.cpp
---- src.orig/fslsurface/fslsurfacemaths.cpp 2015-03-30 11:54:10.522550233 +1300
-+++ 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 src.orig/libvis/miscpic.h src/libvis/miscpic.h
---- src.orig/libvis/miscpic.h 2015-03-30 11:54:10.482550135 +1300
-+++ 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 src.orig/melodic/meldata.cc src/melodic/meldata.cc
---- src.orig/melodic/meldata.cc 2015-03-30 11:54:10.502550183 +1300
-+++ 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 src.orig/melodic/meloptions.cc src/melodic/meloptions.cc
---- src.orig/melodic/meloptions.cc 2015-03-30 11:54:10.502550183 +1300
-+++ 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 src.orig/melodic/meloptions.h src/melodic/meloptions.h
---- src.orig/melodic/meloptions.h 2015-03-30 11:54:10.502550183 +1300
-+++ 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 src.orig/melodic/melreport.cc src/melodic/melreport.cc
---- src.orig/melodic/melreport.cc 2015-03-30 11:54:10.502550183 +1300
-+++ 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 src.orig/melodic/melreport.h src/melodic/melreport.h
---- src.orig/melodic/melreport.h 2015-03-30 11:54:10.502550183 +1300
-+++ 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 src.orig/mm/mixture_model.cc src/mm/mixture_model.cc
---- src.orig/mm/mixture_model.cc 2015-03-30 11:54:10.522550233 +1300
-+++ 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 src.orig/siena/siena_diff.cc src/siena/siena_diff.cc
---- src.orig/siena/siena_diff.cc 2015-03-30 11:54:10.482550135 +1300
-+++ 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 src.orig/topup/topupfns.cpp src/topup/topupfns.cpp
---- src.orig/topup/topupfns.cpp 2015-03-30 11:54:10.522550233 +1300
-+++ 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");
-
diff --git a/sci-biology/fsl/files/fsl-5.0.8-headers.patch b/sci-biology/fsl/files/fsl-5.0.8-headers.patch
deleted file mode 100644
index ab2ab3da3..000000000
--- a/sci-biology/fsl/files/fsl-5.0.8-headers.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- 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 <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 */
-
---- 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.8-setup.patch b/sci-biology/fsl/files/fsl-5.0.8-setup.patch
deleted file mode 100644
index 0cbda5d5c..000000000
--- a/sci-biology/fsl/files/fsl-5.0.8-setup.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-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,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"
-
-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
-@@ -60,7 +60,7 @@
- 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"
- for projname in $PROJECTS; do
-
- if [ -d $FSLESRCDIR/$projname ] ; then
diff --git a/sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch b/sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch
deleted file mode 100644
index c28fabe42..000000000
--- a/sci-biology/fsl/files/fsl-5.0.9-fsldir_redux.patch
+++ /dev/null
@@ -1,456 +0,0 @@
-# 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");
-
diff --git a/sci-biology/fsl/files/fsl-5.0.9-setup.patch b/sci-biology/fsl/files/fsl-5.0.9-setup.patch
deleted file mode 100644
index c688cd6e8..000000000
--- a/sci-biology/fsl/files/fsl-5.0.9-setup.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-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
diff --git a/sci-biology/fsl/fsl-5.0.11.ebuild b/sci-biology/fsl/fsl-5.0.11.ebuild
deleted file mode 100644
index d3985072d..000000000
--- a/sci-biology/fsl/fsl-5.0.11.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# 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-libs/boost
- media-gfx/graphviz
- media-libs/gd
- media-libs/glu
- media-libs/libpng:0=
- sci-libs/ciftilib
- sci-libs/nlopt
- sys-libs/zlib
- "
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}
- dev-lang/tcl:0=
- dev-lang/tk:0=
- "
-
-S=${WORKDIR}/${PN}
-UPSTREAM_FSLDIR="/usr/share/fsl"
-
-PATCHES=(
- "${FILESDIR}/${PN}"-5.0.11-setup.patch
- "${FILESDIR}/${PN}"-5.0.11-no_xmlpp.patch
- "${FILESDIR}/${PN}"-5.0.11-niftiio_var_fix.patch
- "${FILESDIR}/${PN}"-5.0.11-ifstream_use.patch
- "${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
- "${FILESDIR}/${PN}"-5.0.11-qstring_compat.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" \
- -i $(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
-
- # script wanting to have access to flsversion at buildtime
- sed -e "s:/etc/fslversion:${S}/etc/fslversion:g" \
- -i ${makefilelist} || die
-}
-
-src_compile() {
- export FSLDIR=${WORKDIR}/${PN}
- export FSLCONDIR=${WORKDIR}/${PN}/config
- export FSLMACHTYPE=generic
-
- export USERLDFLAGS="${LDFLAGS}"
- export USERCFLAGS="${CFLAGS}"
- export USERCXXFLAGS="${CXXFLAGS}"
-
- export CIFTICFLAGS="$($(tc-getPKG_CONFIG) --cflags CiftiLib)"
- export CIFTILIBS="$($(tc-getPKG_CONFIG) --libs-only-l CiftiLib)"
-
- ./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
-}
diff --git a/sci-biology/fsl/fsl-5.0.8.ebuild b/sci-biology/fsl/fsl-5.0.8.ebuild
deleted file mode 100644
index d420bbacc..000000000
--- a/sci-biology/fsl/fsl-5.0.8.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils 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://dev.gentoo.org/~jlec/distfiles/${P}-sources.tar.gz"
-
-LICENSE="FSL BSD-2 newmat"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""
-
-COMMON_DEPEND="
- dev-libs/boost
- media-gfx/graphviz
- media-libs/gd
- media-libs/glu
- media-libs/libpng:0=
- sys-libs/zlib
- "
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}
- dev-lang/tcl:0=
- dev-lang/tk:0=
- "
-
-S=${WORKDIR}/${PN}
-
-src_prepare(){
- epatch \
- "${FILESDIR}/${PN}"-5.0.8-setup.patch \
- "${FILESDIR}/${PN}"-5.0.8-headers.patch \
- "${FILESDIR}/${PN}"-5.0.8-fsldir_redux.patch
-
- 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 -i "s:\${FSLDIR}/bin/::g" \
- $(grep -rl "\${FSLDIR}/bin" src/*) \
- $(grep -rl "\${FSLDIR}/bin" etc/matlab/*)
- sed -i "s:\$FSLDIR/bin/::g" \
- $(grep -rl "\$FSLDIR/bin" src/*) \
- $(grep -rl "\$FSLDIR/bin" etc/matlab/*)
-
- sed -i "s:\$FSLDIR/data:${EPREFIX}/usr/share/fsl/data:g" \
- $(grep -rl "\$FSLDIR/data" src/*)
-
- sed -i "s:\${FSLDIR}/data:${EPREFIX}/usr/share/fsl/data:g" \
- $(grep -rl "\${FSLDIR}/data" src/*)
-
- sed -i "s:\$FSLDIR/etc:${EPREFIX}/etc:g" \
- $(grep -rl "\$FSLDIR/etc" src/*)
-
- sed -i "s:\${FSLDIR}/etc:${EPREFIX}/etc:g" \
- $(grep -rl "\${FSLDIR}/etc" src/*)
-
- sed -i "s:\$FSLDIR/doc:${EPREFIX}/usr/share/fsl/doc:g" \
- $(grep -rl "\$FSLDIR/doc" src/*)
-
- sed -i "s:\${FSLDIR}/doc:${EPREFIX}/usr/share/fsl/doc:g" \
- $(grep -rl "\${FSLDIR}/doc" src/*)
-
- sed -i "s:\'\${FSLDIR}\'/doc:${EPREFIX}/usr/share/fsl/doc:g" \
- $(grep -rl "\'\${FSLDIR}\'/doc" src/*)
-
- sed -i -e "s:\$FSLDIR/etc:/etc:g" `grep -rlI \$FSLDIR/etc *`
- default
-}
-
-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:
- #https://github.com/gentoo-science/sci/pull/612#r60289295
- dosym ../../../etc /usr/share/fsl/etc
- dosym ../doc/${P} /usr/share/fsl/doc
-
- cp "${FILESDIR}"/99fsl "${TMPDIR}"/99fsl || die
- eprefixify "${TMPDIR}"/99fsl
- doenvd "${TMPDIR}"/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
-}
diff --git a/sci-biology/fsl/fsl-5.0.9.ebuild b/sci-biology/fsl/fsl-5.0.9.ebuild
deleted file mode 100644
index 6e9ff6233..000000000
--- a/sci-biology/fsl/fsl-5.0.9.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit 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://dev.gentoo.org/~jlec/distfiles/${P}-sources.tar.gz"
-
-LICENSE="FSL BSD-2 newmat"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""
-
-COMMON_DEPEND="
- dev-libs/boost
- media-gfx/graphviz
- media-libs/gd
- media-libs/glu
- media-libs/libpng:0=
- sys-libs/zlib
- "
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}
- dev-lang/tcl:0=
- dev-lang/tk:0=
- "
-
-S=${WORKDIR}/${PN}
-UPSTREAM_FSLDIR="/usr/share/fsl"
-
-PATCHES=(
- "${FILESDIR}/${PN}"-5.0.9-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
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2020-08-09 4:50 Horea Christian
0 siblings, 0 replies; 9+ messages in thread
From: Horea Christian @ 2020-08-09 4:50 UTC (permalink / raw
To: gentoo-commits
commit: 81a494f099f8cbc900bc38808c6115bfd5345127
Author: Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Sun Aug 9 04:49:47 2020 +0000
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Sun Aug 9 04:49:47 2020 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=81a494f0
sci-biology/fsl: fixed compilation bug
as per: https://github.com/gentoo/sci/issues/963
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Horea Christian <chr <AT> chymera.eu>
sci-biology/fsl/files/fsl-6.0.2-template.patch | 55 ++++++++++++++++++++++++++
sci-biology/fsl/fsl-6.0.2.ebuild | 1 +
2 files changed, 56 insertions(+)
diff --git a/sci-biology/fsl/files/fsl-6.0.2-template.patch b/sci-biology/fsl/files/fsl-6.0.2-template.patch
new file mode 100644
index 000000000..597241a3b
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-6.0.2-template.patch
@@ -0,0 +1,55 @@
+Subject: as discussed in https://github.com/gentoo/sci/issues/963
+
+--- a/src/newimage/generalio.cc 2019-09-11 09:24:32.000000000 -0400
++++ b/src/newimage/generalio.cc §2020-08-07 20:30:20.037494201 -0400
+@@ -308,6 +308,41 @@
+ return 0;
+ }
+
++template
++int readGeneralVolume<double>(volume<double>& target, const string& filename,
++ short& dtype, const bool swap2radiological,
++ int64_t x0, int64_t y0, int64_t z0, int64_t t0, int64_t d50, int64_t d60, int64_t d70,
++ int64_t x1, int64_t y1, int64_t z1, int64_t t1, int64_t d51, int64_t d61, int64_t d71,
++ const bool readAs4D);
++
++template
++int readGeneralVolume<float>(volume<float>& target, const string& filename,
++ short& dtype, const bool swap2radiological,
++ int64_t x0, int64_t y0, int64_t z0, int64_t t0, int64_t d50, int64_t d60, int64_t d70,
++ int64_t x1, int64_t y1, int64_t z1, int64_t t1, int64_t d51, int64_t d61, int64_t d71,
++ const bool readAs4D);
++
++template
++int readGeneralVolume<short>(volume<short>& target, const string& filename,
++ short& dtype, const bool swap2radiological,
++ int64_t x0, int64_t y0, int64_t z0, int64_t t0, int64_t d50, int64_t d60, int64_t d70,
++ int64_t x1, int64_t y1, int64_t z1, int64_t t1, int64_t d51, int64_t d61, int64_t d71,
++ const bool readAs4D);
++
++template
++int readGeneralVolume<char>(volume<char>& target, const string& filename,
++ short& dtype, const bool swap2radiological,
++ int64_t x0, int64_t y0, int64_t z0, int64_t t0, int64_t d50, int64_t d60, int64_t d70,
++ int64_t x1, int64_t y1, int64_t z1, int64_t t1, int64_t d51, int64_t d61, int64_t d71,
++ const bool readAs4D);
++
++template
++int readGeneralVolume<int>(volume<int>& target, const string& filename,
++ short& dtype, const bool swap2radiological,
++ int64_t x0, int64_t y0, int64_t z0, int64_t t0, int64_t d50, int64_t d60, int64_t d70,
++ int64_t x1, int64_t y1, int64_t z1, int64_t t1, int64_t d51, int64_t d61, int64_t d71,
++ const bool readAs4D);
++
+ template int read_volumeROI(volume<char>& target, const string& filename,
+ short& dtype,
+ int64_t x0, int64_t y0, int64_t z0, int64_t t0,
+
+--- a/src/fslsurface/fslsurfaceio.cc 2019-09-11 09:23:11.000000000 -0400
++++ b/src/fslsurface/fslsurfaceio.cc 2020-08-08 04:17:55.917387550 -0400
+@@ -1055,6 +1055,7 @@
+ return 0;
+ }
+
++ template int readGIFTI<float, unsigned int>( fslSurface<float, unsigned int> & surf, const string & filename);
+ template int writeGIFTI<float, unsigned int>( const fslSurface<float, unsigned int> & surf, const std::string & filename, int enc);
diff --git a/sci-biology/fsl/fsl-6.0.2.ebuild b/sci-biology/fsl/fsl-6.0.2.ebuild
index 07bc454ce..94603ced6 100644
--- a/sci-biology/fsl/fsl-6.0.2.ebuild
+++ b/sci-biology/fsl/fsl-6.0.2.ebuild
@@ -37,6 +37,7 @@ UPSTREAM_FSLDIR="/usr/share/fsl"
PATCHES=(
"${FILESDIR}/${PN}"-6.0.2-gcc10_include.patch
"${FILESDIR}/${PN}"-6.0.2-setup.patch
+ "${FILESDIR}/${PN}"-6.0.2-template.patch
"${FILESDIR}/${PN}"-6.0.2-no_xmlpp.patch
"${FILESDIR}/${PN}"-5.0.11-niftiio_var_fix.patch
"${FILESDIR}/${PN}"-5.0.11-ifstream_use.patch
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2020-09-17 15:15 Horea Christian
0 siblings, 0 replies; 9+ messages in thread
From: Horea Christian @ 2020-09-17 15:15 UTC (permalink / raw
To: gentoo-commits
commit: 21789df887204e7b98393fb115982ee36a71d8c1
Author: AbstractMethod <paul.polak <AT> med-image <DOT> info>
AuthorDate: Mon Sep 14 23:55:04 2020 +0000
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Thu Sep 17 15:14:25 2020 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=21789df8
Changes for fsl CUDA support
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Horea Christian <chr <AT> chymera.eu>
.../fsl/files/fsl-6.0.2-cuda_buildsettings.patch | 12 ++
sci-biology/fsl/files/fsl-6.0.2-eddy_cuda.patch | 21 +++
sci-biology/fsl/fsl-6.0.2-r1.ebuild | 202 +++++++++++++++++++++
sci-biology/fsl/metadata.xml | 3 +
4 files changed, 238 insertions(+)
diff --git a/sci-biology/fsl/files/fsl-6.0.2-cuda_buildsettings.patch b/sci-biology/fsl/files/fsl-6.0.2-cuda_buildsettings.patch
new file mode 100644
index 000000000..a3872acf0
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-6.0.2-cuda_buildsettings.patch
@@ -0,0 +1,12 @@
+diff -Naur fsl.orig/config/buildSettings.mk fsl/config/buildSettings.mk
+--- fsl.orig/config/buildSettings.mk 2020-07-23 15:43:42.277064365 -0400
++++ fsl/config/buildSettings.mk 2020-07-23 15:45:17.705069496 -0400
+@@ -141,7 +141,7 @@
+ # CUDA development environment
+ CUDAVER := $(or $(CUDAVER),9.1)
+ #$(info $$CUDAVER is [${CUDAVER}])
+-CUDA_INSTALLATION = /opt/cuda-${CUDAVER}
++CUDA_INSTALLATION = /opt/cuda
+ GENCODE_FLAGS = $(shell ${FSLDIR}/config/common/supportedGencodes.sh ${CUDA_INSTALLATION})
+ LIB_CUDA = ${CUDA_INSTALLATION}/lib64
+ INC_CUDA = ${CUDA_INSTALLATION}/include
diff --git a/sci-biology/fsl/files/fsl-6.0.2-eddy_cuda.patch b/sci-biology/fsl/files/fsl-6.0.2-eddy_cuda.patch
new file mode 100644
index 000000000..40409ec08
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-6.0.2-eddy_cuda.patch
@@ -0,0 +1,21 @@
+diff -Naur fsl.orig/src/eddy/Makefile fsl/src/eddy/Makefile
+--- fsl.orig/src/eddy/Makefile 2020-07-30 14:30:06.414884410 -0400
++++ fsl/src/eddy/Makefile 2020-07-30 14:33:03.400889914 -0400
+@@ -29,6 +29,8 @@
+ TMPCXXFLAGS_2=
+ TMPNAME_1=
+ TMPNAME_2=
++cuda=1
++cpu=1
+
+ ifndef cuda
+ ifndef cpu #Default single cpu, no threading
+@@ -74,7 +75,7 @@
+ ifdef NVCC11
+ NVCC=${NVCC11}
+ endif
+-NVCCFLAGS=-c -DCOMPILE_GPU -O3 -m 64 -std=c++11
++NVCCFLAGS=-c -DCOMPILE_GPU -O3 -m 64 -std=c++11 @@GENTOO_NVCC_FLAGS@@
+ ifeq ($(CLOBBER_CLANG),1)
+ NVCCFLAGS+= -DCLOBBER_CLANG
+ endif
diff --git a/sci-biology/fsl/fsl-6.0.2-r1.ebuild b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
new file mode 100644
index 000000000..0cadd4e4b
--- /dev/null
+++ b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cuda 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="cuda"
+
+DEPEND="
+ dev-libs/boost
+ dev-python/fslpy
+ media-gfx/graphviz
+ media-libs/gd
+ media-libs/glu
+ media-libs/libpng:0=
+ sci-libs/ciftilib
+ sci-libs/nlopt
+ sys-libs/zlib
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ >=virtual/lapack-3.8
+ >=virtual/blas-3.8
+
+ cuda? (
+ || (
+ ( =dev-util/nvidia-cuda-toolkit-10* =sys-devel/gcc-8* )
+ ( =dev-util/nvidia-cuda-toolkit-11* =sys-devel/gcc-9* )
+ )
+ )
+ "
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+UPSTREAM_FSLDIR="/usr/share/fsl"
+
+PATCHES=(
+ "${FILESDIR}/${PN}"-6.0.2-gcc10_include.patch
+ "${FILESDIR}/${PN}"-6.0.2-setup.patch
+ "${FILESDIR}/${PN}"-6.0.2-template.patch
+ "${FILESDIR}/${PN}"-6.0.2-no_xmlpp.patch
+ "${FILESDIR}/${PN}"-5.0.11-niftiio_var_fix.patch
+ "${FILESDIR}/${PN}"-5.0.11-ifstream_use.patch
+ "${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
+ "${FILESDIR}/${PN}"-6.0.2-qstring_compat.patch
+ "${FILESDIR}/${PN}"-5.0.9-headers.patch
+ "${FILESDIR}/${PN}"-6.0.2-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/buildSettings.mk || die
+
+ eprefixify $(grep -rl GENTOO_PORTAGE_EPREFIX src/*) \
+ etc/js/label-div.html
+
+ # Disable mist-clean the hard way for now.
+ rm -rf src/mist-clean
+
+ 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/*) \
+ -i $(grep -rl "\$FSLDIR/bin" src/*) \
+ $(grep -rl "\${FSLDIR}/bin" etc/matlab/*)\
+ $(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" \
+ -i $(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
+
+ # Use generic blas/lapack rather than openblas
+ sed -e "s:-lopenblas:-llapack -lblas:g" \
+ -i $(grep -rlI lopenblas *) || die
+
+ # script wanting to have access to flsversion at buildtime
+ sed -e "s:/etc/fslversion:${S}/etc/fslversion:g" \
+ -i ${makefilelist} || die
+
+ if use cuda; then
+ einfo
+
+ gcc_ver=`gcc-fullversion`
+ einfo "GCC version: ${gcc_ver}"
+
+ cuda_gcc=`cuda_gccdir`
+ cuda_NVCC_flags=`cuda_gccdir -f`
+ einfo "CUDA GCC path: ${cuda_gcc}"
+ einfo " ${cuda_NVCC_flags}"
+
+ CUDA_INSTALLATION="/opt/cuda"
+ CUDAVER=`cuda_toolkit_version`
+
+ eapply "${FILESDIR}/${PN}-6.0.2-eddy_cuda.patch"
+ eapply "${FILESDIR}/${PN}-6.0.2-cuda_buildsettings.patch"
+
+ sed -i \
+ -e "s:@@GENTOO_NVCC_FLAGS@@:${cuda_NVCC_flags}:" \
+ src/eddy/Makefile || die
+
+ cuda_sanitize
+ fi
+}
+
+src_compile() {
+ export FSLDIR=${WORKDIR}/${PN}
+ export FSLCONDIR=${WORKDIR}/${PN}/config
+ export FSLMACHTYPE=generic
+
+ export USERLDFLAGS="${LDFLAGS}"
+ export USERCFLAGS="${CFLAGS}"
+ export USERCXXFLAGS="${CXXFLAGS}"
+
+ export CIFTICFLAGS="$($(tc-getPKG_CONFIG) --cflags CiftiLib)"
+ export CIFTILIBS="$($(tc-getPKG_CONFIG) --libs-only-l CiftiLib)"
+
+ if use cuda; then
+ einfo "CUDA_INSTALLATION: ${CUDA_INSTALLATION}"
+ einfo "CUDAVER: ${CUDAVER}"
+ fi
+
+ ./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
+
+ #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
+}
diff --git a/sci-biology/fsl/metadata.xml b/sci-biology/fsl/metadata.xml
index d3788686e..9d12c769d 100644
--- a/sci-biology/fsl/metadata.xml
+++ b/sci-biology/fsl/metadata.xml
@@ -8,4 +8,7 @@
<longdescription>
FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.
</longdescription>
+ <use>
+ <flag name="cuda">Add support for CUDA</flag>
+ </use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
@ 2020-12-31 15:07 Aisha Tammy
0 siblings, 0 replies; 9+ messages in thread
From: Aisha Tammy @ 2020-12-31 15:07 UTC (permalink / raw
To: gentoo-commits
commit: 3ef3c15bafb5079dd2018f02ea63c50a36e51002
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Thu Dec 31 15:07:13 2020 +0000
Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Thu Dec 31 15:07:13 2020 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3ef3c15b
sci-biology/fsl: break large patch into two
this should fix up the build
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
...redux.patch => fsl-6.0.2-fsldir_redux-p1.patch} | 255 ---------------------
.../fsl/files/fsl-6.0.2-fsldir_redux-p2.patch | 255 +++++++++++++++++++++
sci-biology/fsl/fsl-6.0.2-r1.ebuild | 3 +-
sci-biology/fsl/fsl-6.0.2.ebuild | 3 +-
sci-biology/fsl/metadata.xml | 3 -
5 files changed, 259 insertions(+), 260 deletions(-)
diff --git a/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux.patch b/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p1.patch
similarity index 52%
rename from sci-biology/fsl/files/fsl-6.0.2-fsldir_redux.patch
rename to sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p1.patch
index dc1babd48..ca3945442 100644
--- a/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux.patch
+++ b/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p1.patch
@@ -238,258 +238,3 @@ index eaf55eb..3dc184d 100644
//file.bvars,mni_template.nii.gz
// string mni = string(fsldir)+"/data/standard/MNI152_T1_1mm";
cout<<"recon "<< string(argv[i_arg+1])<<endl;
-diff --git a/src/libvis/miscpic.h b/src/libvis/miscpic.h
-index a2f3855..5f440f2 100644
---- a/src/libvis/miscpic.h
-+++ b/src/libvis/miscpic.h
-@@ -90,12 +90,7 @@ namespace MISCPIC{
- markRight=false;
- 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 --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
-index 1749a45..c4ad234 100644
---- a/src/melodic/meldata.cc
-+++ b/src/melodic/meldata.cc
-@@ -992,7 +992,7 @@ namespace Melodic{
- 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){
-@@ -1157,7 +1157,7 @@ namespace Melodic{
- // 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 --git a/src/melodic/meloptions.cc b/src/melodic/meloptions.cc
-index 08170c7..252e72b 100644
---- a/src/melodic/meloptions.cc
-+++ b/src/melodic/meloptions.cc
-@@ -93,14 +93,6 @@ MelodicOptions* MelodicOptions::gopt = NULL;
- 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 --git a/src/melodic/meloptions.h b/src/melodic/meloptions.h
-index f546125..b964b7d 100644
---- a/src/melodic/meloptions.h
-+++ b/src/melodic/meloptions.h
-@@ -93,7 +93,6 @@ class MelodicOptions {
- ~MelodicOptions() { delete gopt; }
-
- string version;
-- string binpath;
- string logfname;
- bool filtermode;
- bool explicitnums;
-diff --git a/src/melodic/melreport.cc b/src/melodic/melreport.cc
-index 141b6c2..2625059 100644
---- a/src/melodic/melreport.cc
-+++ b/src/melodic/melreport.cc
-@@ -84,8 +84,8 @@ namespace Melodic{
- 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
-@@ -486,8 +486,8 @@ namespace Melodic{
-
- {//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
-@@ -665,8 +665,8 @@ namespace Melodic{
- 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 --git a/src/melodic/melreport.h b/src/melodic/melreport.h
-index 574fc4c..e444681 100644
---- a/src/melodic/melreport.h
-+++ b/src/melodic/melreport.h
-@@ -104,21 +104,21 @@ namespace Melodic{
- 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 @@ namespace Melodic{
- << "</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 --git a/src/mm/mixture_model.cc b/src/mm/mixture_model.cc
-index b8e6167..5f00693 100644
---- a/src/mm/mixture_model.cc
-+++ b/src/mm/mixture_model.cc
-@@ -2224,8 +2224,8 @@ namespace Mm {
-
- 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 --git a/src/siena/siena_diff.cc b/src/siena/siena_diff.cc
-index e19193a..17d8701 100644
---- a/src/siena/siena_diff.cc
-+++ b/src/siena/siena_diff.cc
-@@ -107,7 +107,7 @@ int main(int argc,char *argv[])
- {
- // {{{ 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 @@ if (argc<3)
-
- 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 @@ for (i = 3; i < argc; i++) {
- // }}}
- // {{{ 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 @@ if(1) // always done unless the above uncommented and used instead of this test
- 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 --git a/src/topup/topupfns.cpp b/src/topup/topupfns.cpp
-index 6873758..9e8b956 100644
---- a/src/topup/topupfns.cpp
-+++ b/src/topup/topupfns.cpp
-@@ -463,8 +463,7 @@ string existing_conf_file(const string& cfname)
- 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");
---
-2.24.1
-
diff --git a/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p2.patch b/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p2.patch
new file mode 100644
index 000000000..74bf19169
--- /dev/null
+++ b/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p2.patch
@@ -0,0 +1,255 @@
+diff --git a/src/libvis/miscpic.h b/src/libvis/miscpic.h
+index a2f3855..5f440f2 100644
+--- a/src/libvis/miscpic.h
++++ b/src/libvis/miscpic.h
+@@ -90,12 +90,7 @@ namespace MISCPIC{
+ markRight=false;
+ 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 --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
+index 1749a45..c4ad234 100644
+--- a/src/melodic/meldata.cc
++++ b/src/melodic/meldata.cc
+@@ -992,7 +992,7 @@ namespace Melodic{
+ 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){
+@@ -1157,7 +1157,7 @@ namespace Melodic{
+ // 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 --git a/src/melodic/meloptions.cc b/src/melodic/meloptions.cc
+index 08170c7..252e72b 100644
+--- a/src/melodic/meloptions.cc
++++ b/src/melodic/meloptions.cc
+@@ -93,14 +93,6 @@ MelodicOptions* MelodicOptions::gopt = NULL;
+ 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 --git a/src/melodic/meloptions.h b/src/melodic/meloptions.h
+index f546125..b964b7d 100644
+--- a/src/melodic/meloptions.h
++++ b/src/melodic/meloptions.h
+@@ -93,7 +93,6 @@ class MelodicOptions {
+ ~MelodicOptions() { delete gopt; }
+
+ string version;
+- string binpath;
+ string logfname;
+ bool filtermode;
+ bool explicitnums;
+diff --git a/src/melodic/melreport.cc b/src/melodic/melreport.cc
+index 141b6c2..2625059 100644
+--- a/src/melodic/melreport.cc
++++ b/src/melodic/melreport.cc
+@@ -84,8 +84,8 @@ namespace Melodic{
+ 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
+@@ -486,8 +486,8 @@ namespace Melodic{
+
+ {//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
+@@ -665,8 +665,8 @@ namespace Melodic{
+ 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 --git a/src/melodic/melreport.h b/src/melodic/melreport.h
+index 574fc4c..e444681 100644
+--- a/src/melodic/melreport.h
++++ b/src/melodic/melreport.h
+@@ -104,21 +104,21 @@ namespace Melodic{
+ 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 @@ namespace Melodic{
+ << "</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 --git a/src/mm/mixture_model.cc b/src/mm/mixture_model.cc
+index b8e6167..5f00693 100644
+--- a/src/mm/mixture_model.cc
++++ b/src/mm/mixture_model.cc
+@@ -2224,8 +2224,8 @@ namespace Mm {
+
+ 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 --git a/src/siena/siena_diff.cc b/src/siena/siena_diff.cc
+index e19193a..17d8701 100644
+--- a/src/siena/siena_diff.cc
++++ b/src/siena/siena_diff.cc
+@@ -107,7 +107,7 @@ int main(int argc,char *argv[])
+ {
+ // {{{ 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 @@ if (argc<3)
+
+ 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 @@ for (i = 3; i < argc; i++) {
+ // }}}
+ // {{{ 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 @@ if(1) // always done unless the above uncommented and used instead of this test
+ 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 --git a/src/topup/topupfns.cpp b/src/topup/topupfns.cpp
+index 6873758..9e8b956 100644
+--- a/src/topup/topupfns.cpp
++++ b/src/topup/topupfns.cpp
+@@ -463,8 +463,7 @@ string existing_conf_file(const string& cfname)
+ 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");
+--
+2.24.1
+
diff --git a/sci-biology/fsl/fsl-6.0.2-r1.ebuild b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
index 0cadd4e4b..c9162fd0e 100644
--- a/sci-biology/fsl/fsl-6.0.2-r1.ebuild
+++ b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
@@ -51,7 +51,8 @@ PATCHES=(
"${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
"${FILESDIR}/${PN}"-6.0.2-qstring_compat.patch
"${FILESDIR}/${PN}"-5.0.9-headers.patch
- "${FILESDIR}/${PN}"-6.0.2-fsldir_redux.patch
+ "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p1.patch
+ "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p2.patch
)
src_prepare() {
diff --git a/sci-biology/fsl/fsl-6.0.2.ebuild b/sci-biology/fsl/fsl-6.0.2.ebuild
index 94603ced6..8a7e0eebb 100644
--- a/sci-biology/fsl/fsl-6.0.2.ebuild
+++ b/sci-biology/fsl/fsl-6.0.2.ebuild
@@ -44,7 +44,8 @@ PATCHES=(
"${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
"${FILESDIR}/${PN}"-6.0.2-qstring_compat.patch
"${FILESDIR}/${PN}"-5.0.9-headers.patch
- "${FILESDIR}/${PN}"-6.0.2-fsldir_redux.patch
+ "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p1.patch
+ "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p2.patch
)
src_prepare(){
diff --git a/sci-biology/fsl/metadata.xml b/sci-biology/fsl/metadata.xml
index 9d12c769d..e171f1431 100644
--- a/sci-biology/fsl/metadata.xml
+++ b/sci-biology/fsl/metadata.xml
@@ -5,9 +5,6 @@
<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>
<use>
<flag name="cuda">Add support for CUDA</flag>
</use>
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-12-31 15:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-19 5:37 [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/ Horea Christian
-- strict thread matches above, loose matches on Subject: below --
2020-12-31 15:07 Aisha Tammy
2020-09-17 15:15 Horea Christian
2020-08-09 4:50 Horea Christian
2020-06-19 5:30 Horea Christian
2017-09-21 2:39 Benda XU
2015-04-20 1:11 Francois Bissey
2015-04-20 1:11 Francois Bissey
2015-04-20 1:11 Francois Bissey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox