Gentoo Archives: gentoo-commits

From: Aisha Tammy <gentoo@×××××.cc>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/files/, sci-biology/fsl/
Date: Thu, 31 Dec 2020 15:07:30
Message-Id: 1609427233.3ef3c15bafb5079dd2018f02ea63c50a36e51002.epsilon-0@gentoo
1 commit: 3ef3c15bafb5079dd2018f02ea63c50a36e51002
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Thu Dec 31 15:07:13 2020 +0000
4 Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
5 CommitDate: Thu Dec 31 15:07:13 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3ef3c15b
7
8 sci-biology/fsl: break large patch into two
9
10 this should fix up the build
11
12 Package-Manager: Portage-3.0.12, Repoman-3.0.2
13 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
14
15 ...redux.patch => fsl-6.0.2-fsldir_redux-p1.patch} | 255 ---------------------
16 .../fsl/files/fsl-6.0.2-fsldir_redux-p2.patch | 255 +++++++++++++++++++++
17 sci-biology/fsl/fsl-6.0.2-r1.ebuild | 3 +-
18 sci-biology/fsl/fsl-6.0.2.ebuild | 3 +-
19 sci-biology/fsl/metadata.xml | 3 -
20 5 files changed, 259 insertions(+), 260 deletions(-)
21
22 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
23 similarity index 52%
24 rename from sci-biology/fsl/files/fsl-6.0.2-fsldir_redux.patch
25 rename to sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p1.patch
26 index dc1babd48..ca3945442 100644
27 --- a/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux.patch
28 +++ b/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p1.patch
29 @@ -238,258 +238,3 @@ index eaf55eb..3dc184d 100644
30 //file.bvars,mni_template.nii.gz
31 // string mni = string(fsldir)+"/data/standard/MNI152_T1_1mm";
32 cout<<"recon "<< string(argv[i_arg+1])<<endl;
33 -diff --git a/src/libvis/miscpic.h b/src/libvis/miscpic.h
34 -index a2f3855..5f440f2 100644
35 ---- a/src/libvis/miscpic.h
36 -+++ b/src/libvis/miscpic.h
37 -@@ -90,12 +90,7 @@ namespace MISCPIC{
38 - markRight=false;
39 - trans= -10;
40 - edgethresh = 0.0;
41 -- if(getenv("FSLDIR")!=0){
42 -- lutbase = string(getenv("FSLDIR")) + "/etc/luts/";
43 -- }
44 -- else{
45 -- lutbase = string("/");
46 -- }
47 -+ lutbase = "@GENTOO_PORTAGE_EPREFIX@/etc/luts/";
48 - title = string("");
49 - cbartype = string("");
50 - cbarptr = NULL;
51 -diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
52 -index 1749a45..c4ad234 100644
53 ---- a/src/melodic/meldata.cc
54 -+++ b/src/melodic/meldata.cc
55 -@@ -992,7 +992,7 @@ namespace Melodic{
56 - void MelodicData::est_smoothness()
57 - {
58 - if(Resels == 0){
59 -- string SM_path = opts.binpath + "smoothest";
60 -+ string SM_path = "smoothest";
61 - string Mask_fname = logger.appendDir("mask");
62 -
63 - if(opts.segment.value().length()>0){
64 -@@ -1157,7 +1157,7 @@ namespace Melodic{
65 - // set up all strings
66 - string BET_outputfname = string(Mean_fname)+"_brain";
67 -
68 -- string BET_path = opts.binpath + "bet";
69 -+ string BET_path = "bet";
70 - string BET_optarg = "-m -f 0.4"; // see man bet
71 - string Mask_fname = BET_outputfname+"_mask";
72 -
73 -diff --git a/src/melodic/meloptions.cc b/src/melodic/meloptions.cc
74 -index 08170c7..252e72b 100644
75 ---- a/src/melodic/meloptions.cc
76 -+++ b/src/melodic/meloptions.cc
77 -@@ -93,14 +93,6 @@ MelodicOptions* MelodicOptions::gopt = NULL;
78 - explicitnums = false;
79 - logfname = string("log.txt");
80 -
81 -- // work out the path to the $FSLDIR/bin directory
82 -- if(getenv("FSLDIR")!=0){
83 -- binpath = (string) getenv("FSLDIR") + "/bin/";
84 -- } else{
85 -- binpath = argv[0];
86 -- binpath = binpath.substr(0,binpath.length()-7);
87 -- }
88 --
89 - // parse once to establish log directory name
90 - for(int a = options.parse_command_line(argc, argv); a < argc; a++);
91 -
92 -diff --git a/src/melodic/meloptions.h b/src/melodic/meloptions.h
93 -index f546125..b964b7d 100644
94 ---- a/src/melodic/meloptions.h
95 -+++ b/src/melodic/meloptions.h
96 -@@ -93,7 +93,6 @@ class MelodicOptions {
97 - ~MelodicOptions() { delete gopt; }
98 -
99 - string version;
100 -- string binpath;
101 - string logfname;
102 - bool filtermode;
103 - bool explicitnums;
104 -diff --git a/src/melodic/melreport.cc b/src/melodic/melreport.cc
105 -index 141b6c2..2625059 100644
106 ---- a/src/melodic/melreport.cc
107 -+++ b/src/melodic/melreport.cc
108 -@@ -84,8 +84,8 @@ namespace Melodic{
109 - IChtml.setDir(report.getDir(),mmodel.get_prefix()+".html");
110 -
111 - {//start IC page
112 -- IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
113 -- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
114 -+ IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
115 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
116 - << "<style type=\"text/css\">OBJECT { width: 100% }</style>"
117 - << "<TITLE>FSL</TITLE></HEAD>" << endl
118 - << "<IFRAME height=" << int(melodat.get_numfiles()/30 + 1)*50
119 -@@ -486,8 +486,8 @@ namespace Melodic{
120 -
121 - {//start IC2 page
122 - IChtml2.setDir(report.getDir(),mmodel.get_prefix()+"_MM.html");
123 -- IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
124 -- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
125 -+ IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
126 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
127 - << "<style type=\"text/css\">OBJECT { width: 100% }</style>"
128 - << "<TITLE>FSL</TITLE></HEAD>" << endl
129 - << "<IFRAME height="<< int(melodat.get_numfiles()/30 + 1)*50
130 -@@ -665,8 +665,8 @@ namespace Melodic{
131 - IChtml << "<HTML> " << endl
132 - << "<TITLE>MELODIC Component " << num2str(cnum)
133 - << "</TITLE>" << endl
134 -- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
135 -- << "/doc/images/fsl-bg.jpg\">" << endl
136 -+ << "<BODY BACKGROUND=\"file:"
137 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
138 - << "<hr><CENTER><H1>MELODIC Component " << num2str(cnum)
139 - << "</H1>"<< endl;
140 -
141 -diff --git a/src/melodic/melreport.h b/src/melodic/melreport.h
142 -index 574fc4c..e444681 100644
143 ---- a/src/melodic/melreport.h
144 -+++ b/src/melodic/melreport.h
145 -@@ -104,21 +104,21 @@ namespace Melodic{
146 - const time_t tmptime = time(NULL);
147 - system(("mkdir "+ logger.appendDir("report") + " 2>/dev/null").c_str());
148 - report.setDir(logger.appendDir("report"),"00index.html",true,false,ios::out);
149 -- report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
150 -- (string) getenv("FSLDIR") +"/doc/fsl.css>"
151 -+ report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
152 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
153 - << "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
154 - << endl <<endl;
155 - loghtml.setDir(report.getDir(),"log.html");
156 -- loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
157 -- (string) getenv("FSLDIR") +"/doc/fsl.css>"
158 -+ loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
159 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
160 - << "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
161 - << endl <<endl;
162 - navigator.setDir(report.getDir(),"nav.html");
163 - head.setDir(report.getDir(),"head.html");
164 -- navigator << "<link REL=stylesheet TYPE=text/css href=file:"+
165 -- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
166 -- head << "<link REL=stylesheet TYPE=text/css href=file:"+
167 -- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
168 -+ navigator << "<link REL=stylesheet TYPE=text/css href=file:"
169 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
170 -+ head << "<link REL=stylesheet TYPE=text/css href=file:"
171 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
172 - head <<"<TABLE BORDER=0><TR>" << endl
173 - <<" <TD ALIGN=CENTER WIDTH=100%>"<< endl
174 - <<"<TABLE BORDER=0>"<< endl
175 -@@ -130,8 +130,8 @@ namespace Melodic{
176 - << "</tr></table>" << endl
177 - << "<TD ALIGN=RIGHT>" << endl
178 - << "<a href=http://www.fmrib.ox.ac.uk/fsl target=_top>" << endl
179 -- << "<IMG BORDER=0 SRC=file:"<< getenv("FSLDIR")
180 -- << "/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
181 -+ << "<IMG BORDER=0 SRC=file:"
182 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
183 - << "</TD>"<<endl<<"</TR></TABLE> <hr>"<<endl;
184 - if(opts.guireport.value()==""){
185 - report <<"<OBJECT data=head.html></OBJECT>" << endl;
186 -diff --git a/src/mm/mixture_model.cc b/src/mm/mixture_model.cc
187 -index b8e6167..5f00693 100644
188 ---- a/src/mm/mixture_model.cc
189 -+++ b/src/mm/mixture_model.cc
190 -@@ -2224,8 +2224,8 @@ namespace Mm {
191 -
192 - htmllog << "<HTML> " << endl
193 - << "<TITLE>Mixture Model fit for" << data_name << "</TITLE>" << endl
194 -- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
195 -- << "/doc/images/fsl-bg.jpg\">" << endl
196 -+ << "<BODY BACKGROUND=\"file:"
197 -+ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
198 - << "<hr><CENTER><H1>Mixture Model fit for<br>" << data_name << " </H1>"<< endl;
199 -
200 - htmllog << "<hr><p>" << endl;
201 -diff --git a/src/siena/siena_diff.cc b/src/siena/siena_diff.cc
202 -index e19193a..17d8701 100644
203 ---- a/src/siena/siena_diff.cc
204 -+++ b/src/siena/siena_diff.cc
205 -@@ -107,7 +107,7 @@ int main(int argc,char *argv[])
206 - {
207 - // {{{ vars
208 -
209 --char thestring[10000], segoptions[10000], fsldir[10000];
210 -+char thestring[10000], segoptions[10000];
211 - int x_size, y_size, z_size, size, x, y, z, i, count,
212 - seg2=0, ignore_z=0, ignore_top_slices=0, //erode_mask=0,
213 - ignore_bottom_slices=0, debug=0, flow_output=1, edge_masking=0;
214 -@@ -124,8 +124,6 @@ if (argc<3)
215 -
216 - string argv1(argv[1]), argv2(argv[2]);
217 -
218 --sprintf(fsldir,"%s",getenv("FSLDIR"));
219 --
220 - for (i = 3; i < argc; i++) {
221 - if (!strcmp(argv[i], "-i"))
222 - ignore_z=1;
223 -@@ -209,26 +207,26 @@ for (i = 3; i < argc; i++) {
224 - // }}}
225 - // {{{ transform images and masks
226 -
227 --sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
228 -- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
229 -+sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
230 -+ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
231 - printf("%s\n",thestring); system(thestring);
232 -
233 --sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
234 -- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
235 -+sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
236 -+ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
237 - printf("%s\n",thestring); system(thestring);
238 -
239 --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",
240 -- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
241 -+sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
242 -+ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
243 - printf("%s\n",thestring); system(thestring);
244 -
245 --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",
246 -- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
247 -+sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
248 -+ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
249 - printf("%s\n",thestring); system(thestring);
250 -
251 - if (edge_masking)
252 - {
253 -- 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",
254 -- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
255 -+ 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",
256 -+ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
257 - printf("%s\n",thestring); system(thestring);
258 - }
259 -
260 -@@ -287,8 +285,8 @@ if(1) // always done unless the above uncommented and used instead of this test
261 - cout << "saving image 1 to disk prior to segmentation" << endl;
262 - save_volume(in1,argv1+"_halfwayto_"+argv2+"_brain");
263 - in1.destroy();
264 -- sprintf(thestring,"%s/bin/fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
265 -- fsldir,segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
266 -+ sprintf(thestring,"fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
267 -+ segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
268 - cout << thestring << endl;
269 - system(thestring);
270 - }
271 -diff --git a/src/topup/topupfns.cpp b/src/topup/topupfns.cpp
272 -index 6873758..9e8b956 100644
273 ---- a/src/topup/topupfns.cpp
274 -+++ b/src/topup/topupfns.cpp
275 -@@ -463,8 +463,7 @@ string existing_conf_file(const string& cfname)
276 - if (TOPUP::check_exist(ecfname)) return(ecfname);
277 - }
278 - if (!TOPUP::path(cfname).length()) { // If no path explicitly given
279 -- const char *fsldir_ptr = getenv("FSLDIR");
280 -- ecfname = string(fsldir_ptr) + string("/etc/flirtsch/") + cfname;
281 -+ ecfname = string("@GENTOO_PORTAGE_EPREFIX@/etc/flirtsch/") + cfname;
282 - if (TOPUP::check_exist(ecfname)) return(ecfname);
283 - else if (!TOPUP::extension(ecfname).length()) { // If no path _and_ no extension given
284 - ecfname += string(".cnf");
285 ---
286 -2.24.1
287 -
288
289 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
290 new file mode 100644
291 index 000000000..74bf19169
292 --- /dev/null
293 +++ b/sci-biology/fsl/files/fsl-6.0.2-fsldir_redux-p2.patch
294 @@ -0,0 +1,255 @@
295 +diff --git a/src/libvis/miscpic.h b/src/libvis/miscpic.h
296 +index a2f3855..5f440f2 100644
297 +--- a/src/libvis/miscpic.h
298 ++++ b/src/libvis/miscpic.h
299 +@@ -90,12 +90,7 @@ namespace MISCPIC{
300 + markRight=false;
301 + trans= -10;
302 + edgethresh = 0.0;
303 +- if(getenv("FSLDIR")!=0){
304 +- lutbase = string(getenv("FSLDIR")) + "/etc/luts/";
305 +- }
306 +- else{
307 +- lutbase = string("/");
308 +- }
309 ++ lutbase = "@GENTOO_PORTAGE_EPREFIX@/etc/luts/";
310 + title = string("");
311 + cbartype = string("");
312 + cbarptr = NULL;
313 +diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
314 +index 1749a45..c4ad234 100644
315 +--- a/src/melodic/meldata.cc
316 ++++ b/src/melodic/meldata.cc
317 +@@ -992,7 +992,7 @@ namespace Melodic{
318 + void MelodicData::est_smoothness()
319 + {
320 + if(Resels == 0){
321 +- string SM_path = opts.binpath + "smoothest";
322 ++ string SM_path = "smoothest";
323 + string Mask_fname = logger.appendDir("mask");
324 +
325 + if(opts.segment.value().length()>0){
326 +@@ -1157,7 +1157,7 @@ namespace Melodic{
327 + // set up all strings
328 + string BET_outputfname = string(Mean_fname)+"_brain";
329 +
330 +- string BET_path = opts.binpath + "bet";
331 ++ string BET_path = "bet";
332 + string BET_optarg = "-m -f 0.4"; // see man bet
333 + string Mask_fname = BET_outputfname+"_mask";
334 +
335 +diff --git a/src/melodic/meloptions.cc b/src/melodic/meloptions.cc
336 +index 08170c7..252e72b 100644
337 +--- a/src/melodic/meloptions.cc
338 ++++ b/src/melodic/meloptions.cc
339 +@@ -93,14 +93,6 @@ MelodicOptions* MelodicOptions::gopt = NULL;
340 + explicitnums = false;
341 + logfname = string("log.txt");
342 +
343 +- // work out the path to the $FSLDIR/bin directory
344 +- if(getenv("FSLDIR")!=0){
345 +- binpath = (string) getenv("FSLDIR") + "/bin/";
346 +- } else{
347 +- binpath = argv[0];
348 +- binpath = binpath.substr(0,binpath.length()-7);
349 +- }
350 +-
351 + // parse once to establish log directory name
352 + for(int a = options.parse_command_line(argc, argv); a < argc; a++);
353 +
354 +diff --git a/src/melodic/meloptions.h b/src/melodic/meloptions.h
355 +index f546125..b964b7d 100644
356 +--- a/src/melodic/meloptions.h
357 ++++ b/src/melodic/meloptions.h
358 +@@ -93,7 +93,6 @@ class MelodicOptions {
359 + ~MelodicOptions() { delete gopt; }
360 +
361 + string version;
362 +- string binpath;
363 + string logfname;
364 + bool filtermode;
365 + bool explicitnums;
366 +diff --git a/src/melodic/melreport.cc b/src/melodic/melreport.cc
367 +index 141b6c2..2625059 100644
368 +--- a/src/melodic/melreport.cc
369 ++++ b/src/melodic/melreport.cc
370 +@@ -84,8 +84,8 @@ namespace Melodic{
371 + IChtml.setDir(report.getDir(),mmodel.get_prefix()+".html");
372 +
373 + {//start IC page
374 +- IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
375 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
376 ++ IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
377 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
378 + << "<style type=\"text/css\">OBJECT { width: 100% }</style>"
379 + << "<TITLE>FSL</TITLE></HEAD>" << endl
380 + << "<IFRAME height=" << int(melodat.get_numfiles()/30 + 1)*50
381 +@@ -486,8 +486,8 @@ namespace Melodic{
382 +
383 + {//start IC2 page
384 + IChtml2.setDir(report.getDir(),mmodel.get_prefix()+"_MM.html");
385 +- IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
386 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
387 ++ IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
388 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
389 + << "<style type=\"text/css\">OBJECT { width: 100% }</style>"
390 + << "<TITLE>FSL</TITLE></HEAD>" << endl
391 + << "<IFRAME height="<< int(melodat.get_numfiles()/30 + 1)*50
392 +@@ -665,8 +665,8 @@ namespace Melodic{
393 + IChtml << "<HTML> " << endl
394 + << "<TITLE>MELODIC Component " << num2str(cnum)
395 + << "</TITLE>" << endl
396 +- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
397 +- << "/doc/images/fsl-bg.jpg\">" << endl
398 ++ << "<BODY BACKGROUND=\"file:"
399 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
400 + << "<hr><CENTER><H1>MELODIC Component " << num2str(cnum)
401 + << "</H1>"<< endl;
402 +
403 +diff --git a/src/melodic/melreport.h b/src/melodic/melreport.h
404 +index 574fc4c..e444681 100644
405 +--- a/src/melodic/melreport.h
406 ++++ b/src/melodic/melreport.h
407 +@@ -104,21 +104,21 @@ namespace Melodic{
408 + const time_t tmptime = time(NULL);
409 + system(("mkdir "+ logger.appendDir("report") + " 2>/dev/null").c_str());
410 + report.setDir(logger.appendDir("report"),"00index.html",true,false,ios::out);
411 +- report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
412 +- (string) getenv("FSLDIR") +"/doc/fsl.css>"
413 ++ report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
414 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
415 + << "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
416 + << endl <<endl;
417 + loghtml.setDir(report.getDir(),"log.html");
418 +- loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
419 +- (string) getenv("FSLDIR") +"/doc/fsl.css>"
420 ++ loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
421 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
422 + << "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
423 + << endl <<endl;
424 + navigator.setDir(report.getDir(),"nav.html");
425 + head.setDir(report.getDir(),"head.html");
426 +- navigator << "<link REL=stylesheet TYPE=text/css href=file:"+
427 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
428 +- head << "<link REL=stylesheet TYPE=text/css href=file:"+
429 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
430 ++ navigator << "<link REL=stylesheet TYPE=text/css href=file:"
431 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
432 ++ head << "<link REL=stylesheet TYPE=text/css href=file:"
433 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
434 + head <<"<TABLE BORDER=0><TR>" << endl
435 + <<" <TD ALIGN=CENTER WIDTH=100%>"<< endl
436 + <<"<TABLE BORDER=0>"<< endl
437 +@@ -130,8 +130,8 @@ namespace Melodic{
438 + << "</tr></table>" << endl
439 + << "<TD ALIGN=RIGHT>" << endl
440 + << "<a href=http://www.fmrib.ox.ac.uk/fsl target=_top>" << endl
441 +- << "<IMG BORDER=0 SRC=file:"<< getenv("FSLDIR")
442 +- << "/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
443 ++ << "<IMG BORDER=0 SRC=file:"
444 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
445 + << "</TD>"<<endl<<"</TR></TABLE> <hr>"<<endl;
446 + if(opts.guireport.value()==""){
447 + report <<"<OBJECT data=head.html></OBJECT>" << endl;
448 +diff --git a/src/mm/mixture_model.cc b/src/mm/mixture_model.cc
449 +index b8e6167..5f00693 100644
450 +--- a/src/mm/mixture_model.cc
451 ++++ b/src/mm/mixture_model.cc
452 +@@ -2224,8 +2224,8 @@ namespace Mm {
453 +
454 + htmllog << "<HTML> " << endl
455 + << "<TITLE>Mixture Model fit for" << data_name << "</TITLE>" << endl
456 +- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
457 +- << "/doc/images/fsl-bg.jpg\">" << endl
458 ++ << "<BODY BACKGROUND=\"file:"
459 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
460 + << "<hr><CENTER><H1>Mixture Model fit for<br>" << data_name << " </H1>"<< endl;
461 +
462 + htmllog << "<hr><p>" << endl;
463 +diff --git a/src/siena/siena_diff.cc b/src/siena/siena_diff.cc
464 +index e19193a..17d8701 100644
465 +--- a/src/siena/siena_diff.cc
466 ++++ b/src/siena/siena_diff.cc
467 +@@ -107,7 +107,7 @@ int main(int argc,char *argv[])
468 + {
469 + // {{{ vars
470 +
471 +-char thestring[10000], segoptions[10000], fsldir[10000];
472 ++char thestring[10000], segoptions[10000];
473 + int x_size, y_size, z_size, size, x, y, z, i, count,
474 + seg2=0, ignore_z=0, ignore_top_slices=0, //erode_mask=0,
475 + ignore_bottom_slices=0, debug=0, flow_output=1, edge_masking=0;
476 +@@ -124,8 +124,6 @@ if (argc<3)
477 +
478 + string argv1(argv[1]), argv2(argv[2]);
479 +
480 +-sprintf(fsldir,"%s",getenv("FSLDIR"));
481 +-
482 + for (i = 3; i < argc; i++) {
483 + if (!strcmp(argv[i], "-i"))
484 + ignore_z=1;
485 +@@ -209,26 +207,26 @@ for (i = 3; i < argc; i++) {
486 + // }}}
487 + // {{{ transform images and masks
488 +
489 +-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
490 +- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
491 ++sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
492 ++ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
493 + printf("%s\n",thestring); system(thestring);
494 +
495 +-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
496 +- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
497 ++sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
498 ++ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
499 + printf("%s\n",thestring); system(thestring);
500 +
501 +-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",
502 +- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
503 ++sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
504 ++ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
505 + printf("%s\n",thestring); system(thestring);
506 +
507 +-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",
508 +- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
509 ++sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
510 ++ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
511 + printf("%s\n",thestring); system(thestring);
512 +
513 + if (edge_masking)
514 + {
515 +- 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",
516 +- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
517 ++ 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",
518 ++ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
519 + printf("%s\n",thestring); system(thestring);
520 + }
521 +
522 +@@ -287,8 +285,8 @@ if(1) // always done unless the above uncommented and used instead of this test
523 + cout << "saving image 1 to disk prior to segmentation" << endl;
524 + save_volume(in1,argv1+"_halfwayto_"+argv2+"_brain");
525 + in1.destroy();
526 +- sprintf(thestring,"%s/bin/fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
527 +- fsldir,segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
528 ++ sprintf(thestring,"fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
529 ++ segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
530 + cout << thestring << endl;
531 + system(thestring);
532 + }
533 +diff --git a/src/topup/topupfns.cpp b/src/topup/topupfns.cpp
534 +index 6873758..9e8b956 100644
535 +--- a/src/topup/topupfns.cpp
536 ++++ b/src/topup/topupfns.cpp
537 +@@ -463,8 +463,7 @@ string existing_conf_file(const string& cfname)
538 + if (TOPUP::check_exist(ecfname)) return(ecfname);
539 + }
540 + if (!TOPUP::path(cfname).length()) { // If no path explicitly given
541 +- const char *fsldir_ptr = getenv("FSLDIR");
542 +- ecfname = string(fsldir_ptr) + string("/etc/flirtsch/") + cfname;
543 ++ ecfname = string("@GENTOO_PORTAGE_EPREFIX@/etc/flirtsch/") + cfname;
544 + if (TOPUP::check_exist(ecfname)) return(ecfname);
545 + else if (!TOPUP::extension(ecfname).length()) { // If no path _and_ no extension given
546 + ecfname += string(".cnf");
547 +--
548 +2.24.1
549 +
550
551 diff --git a/sci-biology/fsl/fsl-6.0.2-r1.ebuild b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
552 index 0cadd4e4b..c9162fd0e 100644
553 --- a/sci-biology/fsl/fsl-6.0.2-r1.ebuild
554 +++ b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
555 @@ -51,7 +51,8 @@ PATCHES=(
556 "${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
557 "${FILESDIR}/${PN}"-6.0.2-qstring_compat.patch
558 "${FILESDIR}/${PN}"-5.0.9-headers.patch
559 - "${FILESDIR}/${PN}"-6.0.2-fsldir_redux.patch
560 + "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p1.patch
561 + "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p2.patch
562 )
563
564 src_prepare() {
565
566 diff --git a/sci-biology/fsl/fsl-6.0.2.ebuild b/sci-biology/fsl/fsl-6.0.2.ebuild
567 index 94603ced6..8a7e0eebb 100644
568 --- a/sci-biology/fsl/fsl-6.0.2.ebuild
569 +++ b/sci-biology/fsl/fsl-6.0.2.ebuild
570 @@ -44,7 +44,8 @@ PATCHES=(
571 "${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
572 "${FILESDIR}/${PN}"-6.0.2-qstring_compat.patch
573 "${FILESDIR}/${PN}"-5.0.9-headers.patch
574 - "${FILESDIR}/${PN}"-6.0.2-fsldir_redux.patch
575 + "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p1.patch
576 + "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p2.patch
577 )
578
579 src_prepare(){
580
581 diff --git a/sci-biology/fsl/metadata.xml b/sci-biology/fsl/metadata.xml
582 index 9d12c769d..e171f1431 100644
583 --- a/sci-biology/fsl/metadata.xml
584 +++ b/sci-biology/fsl/metadata.xml
585 @@ -5,9 +5,6 @@
586 <email>sci-biology@g.o</email>
587 <name>Gentoo Biology Project</name>
588 </maintainer>
589 - <longdescription>
590 -FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.
591 -</longdescription>
592 <use>
593 <flag name="cuda">Add support for CUDA</flag>
594 </use>