Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/fsl/, sci-biology/fsl/files/
Date: Sun, 18 Jul 2021 10:48:12
Message-Id: 1626605245.1c4f022505e83357adc3fbab929ea55396aee27d.andrewammerlaan@gentoo
1 commit: 1c4f022505e83357adc3fbab929ea55396aee27d
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 18 10:47:25 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 18 10:47:25 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=1c4f0225
7
8 sci-biology/fsl: add version 6.0.4
9
10 Closes: https://github.com/gentoo/sci/pull/1074
11 Co-authored-by: Paul Polak <paul.polak <AT> med-image.info>
12 Package-Manager: Portage-3.0.20, Repoman-3.0.3
13 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
14
15 .../fsl/files/fsl-6.0.4-cuda_buildsettings.patch | 12 +
16 sci-biology/fsl/files/fsl-6.0.4-eddy_cuda.patch | 21 ++
17 sci-biology/fsl/files/fsl-6.0.4-fdt_cuda.patch | 14 +
18 sci-biology/fsl/files/fsl-6.0.4-flameo_std.patch | 11 +
19 .../fsl/files/fsl-6.0.4-fsldir_redux-p1.patch | 240 ++++++++++++++
20 .../fsl/files/fsl-6.0.4-fsldir_redux-p2.patch | 254 +++++++++++++++
21 .../fsl/files/fsl-6.0.4-gcc10_include.patch | 11 +
22 sci-biology/fsl/files/fsl-6.0.4-melodic_std.patch | 11 +
23 .../fsl-6.0.4-remove_fslpy_collisions-p1.patch | 303 ++++++++++++++++++
24 .../fsl-6.0.4-remove_fslpy_collisions-p2.patch | 348 +++++++++++++++++++++
25 sci-biology/fsl/files/fsl-6.0.4-setup.patch | 174 +++++++++++
26 sci-biology/fsl/fsl-6.0.2-r1.ebuild | 4 +-
27 sci-biology/fsl/fsl-6.0.2.ebuild | 6 +-
28 .../fsl/{fsl-6.0.2-r1.ebuild => fsl-6.0.4.ebuild} | 36 ++-
29 14 files changed, 1429 insertions(+), 16 deletions(-)
30
31 diff --git a/sci-biology/fsl/files/fsl-6.0.4-cuda_buildsettings.patch b/sci-biology/fsl/files/fsl-6.0.4-cuda_buildsettings.patch
32 new file mode 100644
33 index 000000000..749e80623
34 --- /dev/null
35 +++ b/sci-biology/fsl/files/fsl-6.0.4-cuda_buildsettings.patch
36 @@ -0,0 +1,12 @@
37 +diff -Naur fsl.orig/config/buildSettings.mk fsl/config/buildSettings.mk
38 +--- fsl.orig/config/buildSettings.mk 2020-12-02 16:22:57.999912865 -0500
39 ++++ fsl/config/buildSettings.mk 2020-12-02 16:24:15.332915270 -0500
40 +@@ -144,7 +144,7 @@
41 + # CUDA development environment
42 + CUDAVER := $(or $(CUDAVER),9.1)
43 + #$(info $$CUDAVER is [${CUDAVER}])
44 +-CUDA_INSTALLATION = /opt/cuda-${CUDAVER}
45 ++CUDA_INSTALLATION = /opt/cuda
46 + ifdef SINGULARITY_NAME
47 + CUDA_INSTALLATION = /usr/local/cuda-${CUDAVER}
48 + endif
49
50 diff --git a/sci-biology/fsl/files/fsl-6.0.4-eddy_cuda.patch b/sci-biology/fsl/files/fsl-6.0.4-eddy_cuda.patch
51 new file mode 100644
52 index 000000000..ad118c39a
53 --- /dev/null
54 +++ b/sci-biology/fsl/files/fsl-6.0.4-eddy_cuda.patch
55 @@ -0,0 +1,21 @@
56 +diff -Naur fsl.orig/src/eddy/Makefile fsl/src/eddy/Makefile
57 +--- fsl.orig/src/eddy/Makefile 2020-12-02 16:07:47.327884548 -0500
58 ++++ fsl/src/eddy/Makefile 2020-12-02 16:11:21.149891196 -0500
59 +@@ -29,6 +29,8 @@
60 + TMPCXXFLAGS_2=
61 + TMPNAME_1=
62 + TMPNAME_2=
63 ++cuda=1
64 ++cpu=1
65 + TOPUP_DIR=../topup
66 +
67 + ifndef cuda
68 +@@ -74,7 +75,7 @@
69 + ifdef NVCC11
70 + NVCC=${NVCC11}
71 + endif
72 +-NVCCFLAGS=-c -DCOMPILE_GPU -O3 -m 64 -std=c++11
73 ++NVCCFLAGS=-c -DCOMPILE_GPU -O3 -m 64 -std=c++11 @@GENTOO_NVCC_FLAGS@@
74 + ifeq ($(CLOBBER_CLANG),1)
75 + NVCCFLAGS+= -DCLOBBER_CLANG
76 + endif
77
78 diff --git a/sci-biology/fsl/files/fsl-6.0.4-fdt_cuda.patch b/sci-biology/fsl/files/fsl-6.0.4-fdt_cuda.patch
79 new file mode 100644
80 index 000000000..7f322027b
81 --- /dev/null
82 +++ b/sci-biology/fsl/files/fsl-6.0.4-fdt_cuda.patch
83 @@ -0,0 +1,14 @@
84 +diff -Naur fsl.orig/src/fdt/Makefile fsl/src/fdt/Makefile
85 +--- fsl.orig/src/fdt/Makefile 2020-12-02 19:06:55.826218772 -0500
86 ++++ fsl/src/fdt/Makefile 2020-12-02 19:08:02.883220858 -0500
87 +@@ -6,7 +6,9 @@
88 + $(eval $($(PROJNAME)_MASTERBUILD))
89 + endif
90 +
91 +-ifeq ($(COMPILE_GPU), 1)
92 ++# disable CUDA support for fdt
93 ++#ifeq ($(COMPILE_GPU), 1)
94 ++ifeq (0, 1)
95 + COMPILE_WITH_GPU=libbedpostx_cuda.so merge_parts_gpu xfibres_gpu CUDA/split_parts_gpu
96 + SCRIPTS_GPU=CUDA/bedpostx_gpu CUDA/bedpostx_postproc_gpu.sh
97 + endif
98
99 diff --git a/sci-biology/fsl/files/fsl-6.0.4-flameo_std.patch b/sci-biology/fsl/files/fsl-6.0.4-flameo_std.patch
100 new file mode 100644
101 index 000000000..a991f1ed3
102 --- /dev/null
103 +++ b/sci-biology/fsl/files/fsl-6.0.4-flameo_std.patch
104 @@ -0,0 +1,11 @@
105 +diff -Naur fsl.orig/src/flameo/Makefile fsl/src/flameo/Makefile
106 +--- fsl.orig/src/flameo/Makefile 2021-01-06 14:04:35.728274475 -0500
107 ++++ fsl/src/flameo/Makefile 2021-01-06 14:08:18.204269285 -0500
108 +@@ -4,6 +4,7 @@
109 +
110 + 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
111 + USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_ZLIB}
112 ++USRCXXFLAGS = -std=c++11
113 +
114 + UNAME := $(shell uname)
115 + ifeq (${UNAME},Darwin)
116
117 diff --git a/sci-biology/fsl/files/fsl-6.0.4-fsldir_redux-p1.patch b/sci-biology/fsl/files/fsl-6.0.4-fsldir_redux-p1.patch
118 new file mode 100644
119 index 000000000..ca3945442
120 --- /dev/null
121 +++ b/sci-biology/fsl/files/fsl-6.0.4-fsldir_redux-p1.patch
122 @@ -0,0 +1,240 @@
123 +From 2bc4be1f55b27a733e1e624b34bc570187ba95e1 Mon Sep 17 00:00:00 2001
124 +From: François Bissey <frp.bissey@×××××.com>
125 +Date: Mon, 20 Jan 2020 11:40:53 +1300
126 +Subject: [PATCH] Making sure fsl code and executable can find other executable
127 + and data in standard location.
128 +
129 +---
130 + src/fast4/fast_two.cc | 8 ++++----
131 + src/feat5/feat_model.cc | 8 +++-----
132 + src/feat5/tsplot.cc | 7 +++----
133 + src/first/first_utils.cc | 4 ++--
134 + src/fnirt/fnirtfns.cpp | 11 ++++-------
135 + src/fslsurface/fslsurface_first.cc | 6 ++----
136 + src/fslsurface/fslsurfacemaths.cpp | 12 ------------
137 + src/libvis/miscpic.h | 7 +------
138 + src/melodic/meldata.cc | 4 ++--
139 + src/melodic/meloptions.cc | 8 --------
140 + src/melodic/meloptions.h | 1 -
141 + src/melodic/melreport.cc | 12 ++++++------
142 + src/melodic/melreport.h | 20 ++++++++++----------
143 + src/mm/mixture_model.cc | 4 ++--
144 + src/siena/siena_diff.cc | 28 +++++++++++++---------------
145 + src/topup/topupfns.cpp | 3 +--
146 + 16 files changed, 53 insertions(+), 90 deletions(-)
147 +
148 +diff --git a/src/fast4/fast_two.cc b/src/fast4/fast_two.cc
149 +index 592b5df..b525444 100644
150 +--- a/src/fast4/fast_two.cc
151 ++++ b/src/fast4/fast_two.cc
152 +@@ -166,7 +166,7 @@ int prior_registration(string inname, string main_prior_vol, NEWIMAGE::volume<fl
153 + string csfPriorName, grayPriorName, whitePriorName;
154 + if(alternatePriors.unset())
155 + {
156 +- string priorRootName=string(getenv("FSLDIR")) + "/data/standard/tissuepriors/avg152T1_";
157 ++ string priorRootName="@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/tissuepriors/avg152T1_";
158 + csfPriorName = priorRootName+"csf";
159 + grayPriorName = priorRootName+"gray";
160 + whitePriorName = priorRootName+"white";
161 +@@ -215,15 +215,15 @@ string csfPriorName, grayPriorName, whitePriorName;
162 + if(bapused>0)
163 + {
164 + char reg[1024];
165 +- 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());
166 ++ 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());
167 + if(verbose.value())
168 + cout<<reg<<endl;
169 + system(reg);
170 +- 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());
171 ++ 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());
172 + if(verbose.value())
173 + cout<<reg<<endl;
174 + system(reg);
175 +- 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());
176 ++ 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());
177 + if(verbose.value())
178 + cout << reg << endl;
179 + system(reg);
180 +diff --git a/src/feat5/feat_model.cc b/src/feat5/feat_model.cc
181 +index 399a13e..e15e43c 100644
182 +--- a/src/feat5/feat_model.cc
183 ++++ b/src/feat5/feat_model.cc
184 +@@ -744,7 +744,7 @@ int main(int argc, char **argv)
185 + vector<int> G;
186 + vector<string> titles;
187 + float tr, mult, trmult, nltffwhm=0, maxconvwin=0;
188 +- char fl[10000], *FSLDIR;
189 ++ char fl[10000];
190 + string fn, filename;
191 + FONT_DATA *font_data = new FONT_DATA[1];
192 +
193 +@@ -763,8 +763,6 @@ int main(int argc, char **argv)
194 + if (argc==3)
195 + motionparams=remmean(read_ascii_matrix(argv[2]));
196 +
197 +- FSLDIR=getenv("FSLDIR");
198 +-
199 + fn = string(argv[1])+".fsf";
200 +
201 + level = atoi(find_line(fn, "fmri(level)", fl));
202 +@@ -1510,7 +1508,7 @@ int main(int argc, char **argv)
203 + writeCovarianceImage(string(argv[1])+"_cov.ppm", contrasts, F, nftests, realDesign, level, evs.eigenvals, font_data, contrasts.RE);
204 + writeImagePreview(string(argv[1])+".ppm", contrasts, F, nftests, realDesign, level, evs, font_data, titles, tr, nltffwhm, nTimepoints, G);
205 +
206 +- filename=string(getenv("FSLDIR"))+"/bin/wpng -q -overwrite "+string(argv[1])+".ppm ";
207 ++ filename="wpng -q -overwrite "+string(argv[1])+".ppm ";
208 + system(filename.c_str());
209 +
210 + return(0);
211 +@@ -2161,6 +2159,6 @@ char the_string[10000];
212 +
213 + fclose(outputfile);
214 +
215 +- filename=string(getenv("FSLDIR")) + "/bin/wpng -q -overwrite " + filename;
216 ++ filename="wpng -q -overwrite " + filename;
217 + system(filename.c_str());
218 + }
219 +diff --git a/src/feat5/tsplot.cc b/src/feat5/tsplot.cc
220 +index ae191fd..3a02b55 100644
221 +--- a/src/feat5/tsplot.cc
222 ++++ b/src/feat5/tsplot.cc
223 +@@ -293,7 +293,7 @@ int main(int argc, char **argv)
224 + ofstream outputFile;
225 + int numEVs, npts, numContrasts=1, nftests=0, GRPHSIZE(600), PSSIZE(600);
226 + vector<double> normalisedContrasts, model, triggers;
227 +- string fmriFileName, fslPath, featdir, vType, indexText;
228 ++ string fmriFileName, featdir, vType, indexText;
229 + ColumnVector NewimageVoxCoord(4),NiftiVoxCoord(4);
230 + bool outputText(true), useCoordinate(false), prewhiten(false), useTriggers(false), customMask(false), modelFree(false), isHigherLevel(false), outputDataOnly(false);
231 + bool zWeightClusters(true);
232 +@@ -307,7 +307,6 @@ volume<float> immask;
233 + if (argc<2) usage("");
234 + featdir=string(argv[1]);
235 + fmriFileName=featdir+"/filtered_func_data";
236 +- fslPath=string(getenv("FSLDIR"));
237 +
238 + string outputName(featdir);
239 +
240 +@@ -753,7 +752,7 @@ volume4D<float> acs;
241 + cerr << "Can't open output report file " << outputName << endl;
242 + exit(1);
243 + }
244 +- 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;
245 ++ 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;
246 + if (useTriggers) outputFile << "\n<hr><b>Peristimulus plots</b><p>\n"<< peristimulusText <<"\n<HR></BODY></HTML>\n\n";
247 + else outputFile << "\n</BODY></HTML>\n\n";
248 + outputFile.close();
249 +@@ -768,7 +767,7 @@ volume4D<float> acs;
250 + cerr << "Can't open output report file " << outputName << endl;
251 + exit(1);
252 + }
253 +- 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;
254 ++ 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;
255 + outputFile.close();
256 +
257 + /* now output same thing without start and end, for inclusion in feat report */
258 +diff --git a/src/first/first_utils.cc b/src/first/first_utils.cc
259 +index 68be44b..85960f4 100644
260 +--- a/src/first/first_utils.cc
261 ++++ b/src/first/first_utils.cc
262 +@@ -1954,8 +1954,8 @@ void do_work_bvars(){
263 + if (!surfaceVAout.value()) {
264 + // 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)
265 + volume<float> refim;
266 +- if (useReconMNI.value()) { read_volume(refim,string(getenv("FSLDIR")) + "/data/standard/MNI152_T1_1mm"); }
267 +- else { read_volume(refim,string(getenv("FSLDIR")) + "/data/standard/MNI152_T1_1mm"); }
268 ++ if (useReconMNI.value()) { read_volume(refim,"@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm"); }
269 ++ else { read_volume(refim,"@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm"); }
270 + volume<float> maskvol(refim);
271 + maskvol=0.0f;
272 + volume4D<float> volnormals;
273 +diff --git a/src/fnirt/fnirtfns.cpp b/src/fnirt/fnirtfns.cpp
274 +index 24e26fd..77899e7 100644
275 +--- a/src/fnirt/fnirtfns.cpp
276 ++++ b/src/fnirt/fnirtfns.cpp
277 +@@ -1203,8 +1203,7 @@ string existing_ref_fname(const string& ref_fname)
278 + return(string(ref_fname));
279 + }
280 + else {
281 +- const char *fsldir_ptr = getenv("FSLDIR");
282 +- string eref_fname = string(fsldir_ptr) + string("/data/standard/") + ref_fname;
283 ++ string eref_fname = string("@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/") + ref_fname;
284 + if (NEWIMAGE::FslFileExists(eref_fname)) return(eref_fname);
285 + else return(string(""));
286 + }
287 +@@ -1230,9 +1229,8 @@ string existing_ref_fname(const string& ref_fname)
288 + NEWIMAGE::read_volume_hdr_only(vref,ref_fname); // Throws if file dont exist
289 + eref_fname = ref_fname;
290 + }
291 +- catch(...) { // Didn't exist in current directory, try in ${FSLDIR}/data/standard
292 +- const char *fsldir_ptr = getenv("FSLDIR");
293 +- eref_fname = string(fsldir_ptr) + string("/data/standard/") + ref_fname;
294 ++ catch(...) { // Didn't exist in current directory, try in .../data/standard
295 ++ eref_fname = string("@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/") + ref_fname;
296 + try {
297 + cout << "Could not find " << ref_fname << ", now checking " << eref_fname << endl;
298 + NEWIMAGE::read_volume_hdr_only(vref,eref_fname); // Throws if file dont exist
299 +@@ -1267,8 +1265,7 @@ string existing_conf_file(const string& cfname)
300 + if (check_exist(ecfname)) return(ecfname);
301 + }
302 + if (!FNIRT::path(cfname).length()) { // If no path explicitly given
303 +- const char *fsldir_ptr = getenv("FSLDIR");
304 +- ecfname = string(fsldir_ptr) + string("/etc/flirtsch/") + cfname;
305 ++ ecfname = string("@GENTOO_PORTAGE_EPREFIX@/etc/flirtsch/") + cfname;
306 + if (check_exist(ecfname)) return(ecfname);
307 + else if (!FNIRT::extension(ecfname).length()) { // If no path _and_ no extension given
308 + ecfname += string(".cnf");
309 +diff --git a/src/fslsurface/fslsurface_first.cc b/src/fslsurface/fslsurface_first.cc
310 +index faec642..b2ef794 100644
311 +--- a/src/fslsurface/fslsurface_first.cc
312 ++++ b/src/fslsurface/fslsurface_first.cc
313 +@@ -500,8 +500,7 @@ namespace fslsurface_name {
314 +
315 + volume<float>* immni = new volume<float>();
316 +
317 +- char* fsldir = getenv("FSLDIR");
318 +- read_volume_hdr_only(*immni, string(fsldir) + "/data/standard/MNI152_T1_1mm");
319 ++ read_volume_hdr_only(*immni, "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm");
320 +
321 + //read_volume_hdr_only(*immni, template_name);
322 +
323 +@@ -699,8 +698,7 @@ namespace fslsurface_name {
324 +
325 + volume<float>* immni = new volume<float>();
326 +
327 +- char* fsldir = getenv("FSLDIR");
328 +- read_volume_hdr_only(*immni, string(fsldir) + "/data/standard/MNI152_T1_1mm");
329 ++ read_volume_hdr_only(*immni, "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/data/standard/MNI152_T1_1mm");
330 +
331 + //read_volume_hdr_only(*immni, template_name);
332 +
333 +diff --git a/src/fslsurface/fslsurfacemaths.cpp b/src/fslsurface/fslsurfacemaths.cpp
334 +index eaf55eb..3dc184d 100644
335 +--- a/src/fslsurface/fslsurfacemaths.cpp
336 ++++ b/src/fslsurface/fslsurfacemaths.cpp
337 +@@ -598,12 +598,6 @@ int main (int argc, char * argv[])
338 +
339 + }else if (command == "-reconFromBvars"){
340 + cout<<"do recon "<<endl;
341 +- char* fsldir = getenv("FSLDIR");
342 +- if (fsldir == NULL)
343 +- {
344 +- cerr<<"FSLDIR has not been set. "<<endl;
345 +- exit(EXIT_FAILURE);
346 +- }
347 + //file.bvars,mni_template.nii.gz
348 + // string mni = string(fsldir)+"/data/standard/MNI152_T1_1mm";
349 + reconSurface_from_bvars( surf, string(argv[i_arg+1]));
350 +@@ -612,12 +606,6 @@ int main (int argc, char * argv[])
351 +
352 + }else if (command == "-reconAllFromBvarsAndSave"){
353 + cout<<"do recon+save "<<argc<<" "<<i_arg<<endl;
354 +- char* fsldir = getenv("FSLDIR");
355 +- if (fsldir == NULL)
356 +- {
357 +- cerr<<"FSLDIR has not been set. "<<endl;
358 +- exit(EXIT_FAILURE);
359 +- }
360 + //file.bvars,mni_template.nii.gz
361 + // string mni = string(fsldir)+"/data/standard/MNI152_T1_1mm";
362 + cout<<"recon "<< string(argv[i_arg+1])<<endl;
363
364 diff --git a/sci-biology/fsl/files/fsl-6.0.4-fsldir_redux-p2.patch b/sci-biology/fsl/files/fsl-6.0.4-fsldir_redux-p2.patch
365 new file mode 100644
366 index 000000000..af498b400
367 --- /dev/null
368 +++ b/sci-biology/fsl/files/fsl-6.0.4-fsldir_redux-p2.patch
369 @@ -0,0 +1,254 @@
370 +diff --git a/src/libvis/miscpic.h b/src/libvis/miscpic.h
371 +index a2f3855..5f440f2 100644
372 +--- a/src/libvis/miscpic.h
373 ++++ b/src/libvis/miscpic.h
374 +@@ -90,12 +90,7 @@ namespace MISCPIC{
375 + markRight=false;
376 + trans= -10;
377 + edgethresh = 0.0;
378 +- if(getenv("FSLDIR")!=0){
379 +- lutbase = string(getenv("FSLDIR")) + "/etc/luts/";
380 +- }
381 +- else{
382 +- lutbase = string("/");
383 +- }
384 ++ lutbase = "@GENTOO_PORTAGE_EPREFIX@/etc/luts/";
385 + title = string("");
386 + cbartype = string("");
387 + cbarptr = NULL;
388 +diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
389 +index 1749a45..c4ad234 100644
390 +--- a/src/melodic/meldata.cc
391 ++++ b/src/melodic/meldata.cc
392 +@@ -992,7 +992,7 @@ namespace Melodic{
393 + void MelodicData::est_smoothness()
394 + {
395 + if(Resels == 0){
396 +- string SM_path = opts.binpath + "smoothest";
397 ++ string SM_path = "smoothest";
398 + string Mask_fname = logger.appendDir("mask");
399 +
400 + if(opts.segment.value().length()>0){
401 +@@ -1157,7 +1157,7 @@ namespace Melodic{
402 + // set up all strings
403 + string BET_outputfname = string(Mean_fname)+"_brain";
404 +
405 +- string BET_path = opts.binpath + "bet";
406 ++ string BET_path = "bet";
407 + string BET_optarg = "-m -f 0.4"; // see man bet
408 + string Mask_fname = BET_outputfname+"_mask";
409 +
410 +diff --git a/src/melodic/meloptions.cc b/src/melodic/meloptions.cc
411 +index 08170c7..252e72b 100644
412 +--- a/src/melodic/meloptions.cc
413 ++++ b/src/melodic/meloptions.cc
414 +@@ -93,14 +93,6 @@ MelodicOptions* MelodicOptions::gopt = NULL;
415 + explicitnums = false;
416 + logfname = string("log.txt");
417 +
418 +- // work out the path to the $FSLDIR/bin directory
419 +- if(getenv("FSLDIR")!=0){
420 +- binpath = (string) getenv("FSLDIR") + "/bin/";
421 +- } else{
422 +- binpath = argv[0];
423 +- binpath = binpath.substr(0,binpath.length()-7);
424 +- }
425 +-
426 + // parse once to establish log directory name
427 + for(int a = options.parse_command_line(argc, argv); a < argc; a++);
428 +
429 +diff --git a/src/melodic/meloptions.h b/src/melodic/meloptions.h
430 +index f546125..b964b7d 100644
431 +--- a/src/melodic/meloptions.h
432 ++++ b/src/melodic/meloptions.h
433 +@@ -93,7 +93,6 @@ class MelodicOptions {
434 + ~MelodicOptions() { delete gopt; }
435 +
436 + string version;
437 +- string binpath;
438 + string logfname;
439 + bool filtermode;
440 + bool explicitnums;
441 +diff --git a/src/melodic/melreport.cc b/src/melodic/melreport.cc
442 +index 141b6c2..2625059 100644
443 +--- a/src/melodic/melreport.cc
444 ++++ b/src/melodic/melreport.cc
445 +@@ -84,8 +84,8 @@ namespace Melodic{
446 + IChtml.setDir(report.getDir(),mmodel.get_prefix()+".html");
447 +
448 + {//start IC page
449 +- IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
450 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
451 ++ IChtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
452 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
453 + << "<style type=\"text/css\">OBJECT { width: 100% }</style>"
454 + << "<TITLE>FSL</TITLE></HEAD>" << endl
455 + << "<IFRAME height=" << int(melodat.get_numfiles()/30 + 1)*50
456 +@@ -486,8 +486,8 @@ namespace Melodic{
457 +
458 + {//start IC2 page
459 + IChtml2.setDir(report.getDir(),mmodel.get_prefix()+"_MM.html");
460 +- IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
461 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl
462 ++ IChtml2 << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
463 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl
464 + << "<style type=\"text/css\">OBJECT { width: 100% }</style>"
465 + << "<TITLE>FSL</TITLE></HEAD>" << endl
466 + << "<IFRAME height="<< int(melodat.get_numfiles()/30 + 1)*50
467 +@@ -665,8 +665,8 @@ namespace Melodic{
468 + IChtml << "<HTML> " << endl
469 + << "<TITLE>MELODIC Component " << num2str(cnum)
470 + << "</TITLE>" << endl
471 +- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
472 +- << "/doc/images/fsl-bg.jpg\">" << endl
473 ++ << "<BODY BACKGROUND=\"file:"
474 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
475 + << "<hr><CENTER><H1>MELODIC Component " << num2str(cnum)
476 + << "</H1>"<< endl;
477 +
478 +diff --git a/src/melodic/melreport.h b/src/melodic/melreport.h
479 +index 574fc4c..e444681 100644
480 +--- a/src/melodic/melreport.h
481 ++++ b/src/melodic/melreport.h
482 +@@ -104,21 +104,21 @@ namespace Melodic{
483 + const time_t tmptime = time(NULL);
484 + system(("mkdir "+ logger.appendDir("report") + " 2>/dev/null").c_str());
485 + report.setDir(logger.appendDir("report"),"00index.html",true,false,ios::out);
486 +- report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
487 +- (string) getenv("FSLDIR") +"/doc/fsl.css>"
488 ++ report << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
489 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
490 + << "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
491 + << endl <<endl;
492 + loghtml.setDir(report.getDir(),"log.html");
493 +- loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:" +
494 +- (string) getenv("FSLDIR") +"/doc/fsl.css>"
495 ++ loghtml << "<HTML><HEAD><link REL=stylesheet TYPE=text/css href=file:"
496 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>"
497 + << "<TITLE>MELODIC report</TITLE></HEAD><BODY>"
498 + << endl <<endl;
499 + navigator.setDir(report.getDir(),"nav.html");
500 + head.setDir(report.getDir(),"head.html");
501 +- navigator << "<link REL=stylesheet TYPE=text/css href=file:"+
502 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
503 +- head << "<link REL=stylesheet TYPE=text/css href=file:"+
504 +- (string) getenv("FSLDIR") +"/doc/fsl.css>" << endl;
505 ++ navigator << "<link REL=stylesheet TYPE=text/css href=file:"
506 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
507 ++ head << "<link REL=stylesheet TYPE=text/css href=file:"
508 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/fsl.css>" << endl;
509 + head <<"<TABLE BORDER=0><TR>" << endl
510 + <<" <TD ALIGN=CENTER WIDTH=100%>"<< endl
511 + <<"<TABLE BORDER=0>"<< endl
512 +@@ -130,8 +130,8 @@ namespace Melodic{
513 + << "</tr></table>" << endl
514 + << "<TD ALIGN=RIGHT>" << endl
515 + << "<a href=http://www.fmrib.ox.ac.uk/fsl target=_top>" << endl
516 +- << "<IMG BORDER=0 SRC=file:"<< getenv("FSLDIR")
517 +- << "/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
518 ++ << "<IMG BORDER=0 SRC=file:"
519 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-logo-big.jpg WIDTH=165></a>" << endl
520 + << "</TD>"<<endl<<"</TR></TABLE> <hr>"<<endl;
521 + if(opts.guireport.value()==""){
522 + report <<"<OBJECT data=head.html></OBJECT>" << endl;
523 +diff --git a/src/mm/mixture_model.cc b/src/mm/mixture_model.cc
524 +index b8e6167..5f00693 100644
525 +--- a/src/mm/mixture_model.cc
526 ++++ b/src/mm/mixture_model.cc
527 +@@ -2224,8 +2224,8 @@ namespace Mm {
528 +
529 + htmllog << "<HTML> " << endl
530 + << "<TITLE>Mixture Model fit for" << data_name << "</TITLE>" << endl
531 +- << "<BODY BACKGROUND=\"file:" << getenv("FSLDIR")
532 +- << "/doc/images/fsl-bg.jpg\">" << endl
533 ++ << "<BODY BACKGROUND=\"file:"
534 ++ << "@GENTOO_PORTAGE_EPREFIX@/usr/share/fsl/doc/images/fsl-bg.jpg\">" << endl
535 + << "<hr><CENTER><H1>Mixture Model fit for<br>" << data_name << " </H1>"<< endl;
536 +
537 + htmllog << "<hr><p>" << endl;
538 +diff -Naur fsl.orig/src/siena/siena_diff.cc fsl/src/siena/siena_diff.cc
539 +--- fsl.orig/src/siena/siena_diff.cc 2020-12-02 15:52:50.359856656 -0500
540 ++++ fsl/src/siena/siena_diff.cc 2020-12-02 16:03:25.699876412 -0500
541 +@@ -107,7 +107,7 @@
542 + {
543 + // {{{ vars
544 +
545 +-char thestring[10000], segoptions[10000], fsldir[10000];
546 ++char thestring[10000], segoptions[10000];
547 + int x_size, y_size, z_size, size, x, y, z, i, count,
548 + seg2=0, ignore_z=0, ignore_top_slices=0, //erode_mask=0,
549 + ignore_bottom_slices=0, debug=0, flow_output=1, edge_masking=0;
550 +@@ -124,8 +124,6 @@
551 +
552 + string argv1(argv[1]), argv2(argv[2]);
553 +
554 +-sprintf(fsldir,"%s",getenv("FSLDIR"));
555 +-
556 + for (i = 3; i < argc; i++)
557 + {
558 + if (!strcmp(argv[i], "-i"))
559 +@@ -206,26 +204,26 @@
560 + // }}}
561 + // {{{ transform images and masks
562 +
563 +-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
564 +- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
565 ++sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
566 ++ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
567 + printf("%s\n",thestring); system(thestring);
568 +
569 +-sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
570 +- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
571 ++sprintf(thestring,"flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
572 ++ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
573 + printf("%s\n",thestring); system(thestring);
574 +
575 +-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",
576 +- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
577 ++sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
578 ++ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
579 + printf("%s\n",thestring); system(thestring);
580 +
581 +-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",
582 +- fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
583 ++sprintf(thestring,"flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
584 ++ argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
585 + printf("%s\n",thestring); system(thestring);
586 +
587 + if (edge_masking)
588 + {
589 +- 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",
590 +- fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
591 ++ 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",
592 ++ argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
593 + printf("%s\n",thestring); system(thestring);
594 + }
595 +
596 +@@ -284,8 +282,8 @@
597 + cout << "saving image 1 to disk prior to segmentation" << endl;
598 + save_volume(in1,argv1+"_halfwayto_"+argv2+"_brain");
599 + in1.destroy();
600 +- sprintf(thestring,"%s/bin/fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
601 +- fsldir,segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
602 ++ sprintf(thestring,"fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
603 ++ segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
604 + cout << thestring << endl;
605 + system(thestring);
606 + }
607 +diff --git a/src/topup/topupfns.cpp b/src/topup/topupfns.cpp
608 +index 6873758..9e8b956 100644
609 +--- a/src/topup/topupfns.cpp
610 ++++ b/src/topup/topupfns.cpp
611 +@@ -463,8 +463,7 @@ string existing_conf_file(const string& cfname)
612 + if (TOPUP::check_exist(ecfname)) return(ecfname);
613 + }
614 + if (!TOPUP::path(cfname).length()) { // If no path explicitly given
615 +- const char *fsldir_ptr = getenv("FSLDIR");
616 +- ecfname = string(fsldir_ptr) + string("/etc/flirtsch/") + cfname;
617 ++ ecfname = string("@GENTOO_PORTAGE_EPREFIX@/etc/flirtsch/") + cfname;
618 + if (TOPUP::check_exist(ecfname)) return(ecfname);
619 + else if (!TOPUP::extension(ecfname).length()) { // If no path _and_ no extension given
620 + ecfname += string(".cnf");
621 +--
622 +2.24.1
623 +
624
625 diff --git a/sci-biology/fsl/files/fsl-6.0.4-gcc10_include.patch b/sci-biology/fsl/files/fsl-6.0.4-gcc10_include.patch
626 new file mode 100644
627 index 000000000..ae836c065
628 --- /dev/null
629 +++ b/sci-biology/fsl/files/fsl-6.0.4-gcc10_include.patch
630 @@ -0,0 +1,11 @@
631 +diff -Naur fsl.orig/src/newimage/newimageio.h fsl/src/newimage/newimageio.h
632 +--- fsl.orig/src/newimage/newimageio.h 2020-12-02 15:15:27.012786899 -0500
633 ++++ fsl/src/newimage/newimageio.h 2020-12-02 15:19:51.046795110 -0500
634 +@@ -75,6 +75,7 @@
635 + #include <iostream>
636 + #include <fstream>
637 + #include <sstream>
638 ++#include <stdexcept>
639 + #include "NewNifti/NewNifti.h"
640 + #include "newmatio.h"
641 + #include "newimage.h"
642
643 diff --git a/sci-biology/fsl/files/fsl-6.0.4-melodic_std.patch b/sci-biology/fsl/files/fsl-6.0.4-melodic_std.patch
644 new file mode 100644
645 index 000000000..83b5b9932
646 --- /dev/null
647 +++ b/sci-biology/fsl/files/fsl-6.0.4-melodic_std.patch
648 @@ -0,0 +1,11 @@
649 +diff -Naur fsl.orig/src/melodic/Makefile fsl/src/melodic/Makefile
650 +--- fsl.orig/src/melodic/Makefile 2021-01-06 14:04:35.743274475 -0500
651 ++++ fsl/src/melodic/Makefile 2021-01-06 14:11:27.924264859 -0500
652 +@@ -9,6 +9,7 @@
653 +
654 + 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
655 + USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_GD} -L${LIB_GDC} -L${LIB_PNG} -L${LIB_ZLIB}
656 ++USRCXXFLAGS = -std=c++11
657 +
658 + UNAME := $(shell uname)
659 + ifeq (${UNAME},Darwin)
660
661 diff --git a/sci-biology/fsl/files/fsl-6.0.4-remove_fslpy_collisions-p1.patch b/sci-biology/fsl/files/fsl-6.0.4-remove_fslpy_collisions-p1.patch
662 new file mode 100644
663 index 000000000..434dc9cf6
664 --- /dev/null
665 +++ b/sci-biology/fsl/files/fsl-6.0.4-remove_fslpy_collisions-p1.patch
666 @@ -0,0 +1,303 @@
667 +diff -Naur fsl.orig/src/fslio/imln fsl/src/fslio/imln
668 +--- fsl.orig/src/fslio/imln 2021-02-01 15:29:34.842752994 -0500
669 ++++ fsl/src/fslio/imln 1969-12-31 19:00:00.000000000 -0500
670 +@@ -1,90 +0,0 @@
671 +-#!/bin/sh
672 +-
673 +-# imln - make symbolic link(s) to image file(s)
674 +-#
675 +-# Stephen Smith and Mark Jenkinson, FMRIB Image Analysis Group
676 +-#
677 +-# Copyright (C) 1999-2004 University of Oxford
678 +-#
679 +-# Part of FSL - FMRIB's Software Library
680 +-# http://www.fmrib.ox.ac.uk/fsl
681 +-# fsl@×××××××××××.uk
682 +-#
683 +-# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
684 +-# Imaging of the Brain), Department of Clinical Neurology, Oxford
685 +-# University, Oxford, UK
686 +-#
687 +-#
688 +-# LICENCE
689 +-#
690 +-# FMRIB Software Library, Release 6.0 (c) 2018, The University of
691 +-# Oxford (the "Software")
692 +-#
693 +-# The Software remains the property of the Oxford University Innovation
694 +-# ("the University").
695 +-#
696 +-# The Software is distributed "AS IS" under this Licence solely for
697 +-# non-commercial use in the hope that it will be useful, but in order
698 +-# that the University as a charitable foundation protects its assets for
699 +-# the benefit of its educational and research purposes, the University
700 +-# makes clear that no condition is made or to be implied, nor is any
701 +-# warranty given or to be implied, as to the accuracy of the Software,
702 +-# or that it will be suitable for any particular purpose or for use
703 +-# under any specific conditions. Furthermore, the University disclaims
704 +-# all responsibility for the use which is made of the Software. It
705 +-# further disclaims any liability for the outcomes arising from using
706 +-# the Software.
707 +-#
708 +-# The Licensee agrees to indemnify the University and hold the
709 +-# University harmless from and against any and all claims, damages and
710 +-# liabilities asserted by third parties (including claims for
711 +-# negligence) which arise directly or indirectly from the use of the
712 +-# Software or the sale of any products based on the Software.
713 +-#
714 +-# No part of the Software may be reproduced, modified, transmitted or
715 +-# transferred in any form or by any means, electronic or mechanical,
716 +-# without the express permission of the University. The permission of
717 +-# the University is not required if the said reproduction, modification,
718 +-# transmission or transference is done without financial return, the
719 +-# conditions of this Licence are imposed upon the receiver of the
720 +-# product, and all original and amended source code is included in any
721 +-# transmitted product. You may be held legally responsible for any
722 +-# copyright infringement that is caused or encouraged by your failure to
723 +-# abide by these terms and conditions.
724 +-#
725 +-# You are not permitted under this Licence to use this Software
726 +-# commercially. Use for which any financial return is received shall be
727 +-# defined as commercial use, and includes (1) integration of all or part
728 +-# of the source code or the Software into a product for sale or license
729 +-# by or on behalf of Licensee to third parties or (2) use of the
730 +-# Software or any derivative of it for research with the final aim of
731 +-# developing software products for sale or license to a third party or
732 +-# (3) use of the Software or any derivative of it for research with the
733 +-# final aim of developing non-software products for sale or license to a
734 +-# third party, or (4) use of the Software to provide any service to an
735 +-# external organisation for which payment is received. If you are
736 +-# interested in using the Software commercially, please contact Oxford
737 +-# University Innovation ("OUI"), the technology transfer company of the
738 +-# University, to negotiate a licence. Contact details are:
739 +-# fsl@××××××××××××××××.uk quoting Reference Project 9564, FSL.
740 +-export LC_ALL=C
741 +-
742 +-if [ $# -lt 2 ] ; then
743 +- echo "Usage: $0 <file1> <file2>"
744 +- echo " Makes a link (called file2) to file1"
745 +- echo " NB: filenames can be basenames or include an extension"
746 +- exit 1;
747 +-fi
748 +-
749 +-f1=`${FSLDIR}/bin/remove_ext $1`;
750 +-f2=`${FSLDIR}/bin/remove_ext $2`;
751 +-
752 +-if [ -f ${f1}.hdr ] ; then ln -fs ${f1}.hdr ${f2}.hdr ; fi
753 +-if [ -f ${f1}.hdr.gz ] ; then ln -fs ${f1}.hdr.gz ${f2}.hdr.gz ; fi
754 +-if [ -f ${f1}.img ] ; then ln -fs ${f1}.img ${f2}.img ; fi
755 +-if [ -f ${f1}.img.gz ] ; then ln -fs ${f1}.img.gz ${f2}.img.gz ; fi
756 +-if [ -f ${f1}.nii ] ; then ln -fs ${f1}.nii ${f2}.nii ; fi
757 +-if [ -f ${f1}.nii.gz ] ; then ln -fs ${f1}.nii.gz ${f2}.nii.gz ; fi
758 +-if [ -f ${f1}.mnc ] ; then ln -fs ${f1}.mnc ${f2}.mnc ; fi
759 +-if [ -f ${f1}.mnc.gz ] ; then ln -fs ${f1}.mnc.gz ${f2}.mnc.gz ; fi
760 +-
761 +diff -Naur fsl.orig/src/fslio/imrm fsl/src/fslio/imrm
762 +--- fsl.orig/src/fslio/imrm 2021-02-01 15:29:34.842752994 -0500
763 ++++ fsl/src/fslio/imrm 1969-12-31 19:00:00.000000000 -0500
764 +@@ -1,83 +0,0 @@
765 +-#!/bin/sh
766 +-
767 +-# imrm - remove image files
768 +-#
769 +-# Stephen Smith and Mark Jenkinson, FMRIB Image Analysis Group
770 +-#
771 +-# Copyright (C) 1999-2004 University of Oxford
772 +-#
773 +-# Part of FSL - FMRIB's Software Library
774 +-# http://www.fmrib.ox.ac.uk/fsl
775 +-# fsl@×××××××××××.uk
776 +-#
777 +-# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
778 +-# Imaging of the Brain), Department of Clinical Neurology, Oxford
779 +-# University, Oxford, UK
780 +-#
781 +-#
782 +-# LICENCE
783 +-#
784 +-# FMRIB Software Library, Release 6.0 (c) 2018, The University of
785 +-# Oxford (the "Software")
786 +-#
787 +-# The Software remains the property of the Oxford University Innovation
788 +-# ("the University").
789 +-#
790 +-# The Software is distributed "AS IS" under this Licence solely for
791 +-# non-commercial use in the hope that it will be useful, but in order
792 +-# that the University as a charitable foundation protects its assets for
793 +-# the benefit of its educational and research purposes, the University
794 +-# makes clear that no condition is made or to be implied, nor is any
795 +-# warranty given or to be implied, as to the accuracy of the Software,
796 +-# or that it will be suitable for any particular purpose or for use
797 +-# under any specific conditions. Furthermore, the University disclaims
798 +-# all responsibility for the use which is made of the Software. It
799 +-# further disclaims any liability for the outcomes arising from using
800 +-# the Software.
801 +-#
802 +-# The Licensee agrees to indemnify the University and hold the
803 +-# University harmless from and against any and all claims, damages and
804 +-# liabilities asserted by third parties (including claims for
805 +-# negligence) which arise directly or indirectly from the use of the
806 +-# Software or the sale of any products based on the Software.
807 +-#
808 +-# No part of the Software may be reproduced, modified, transmitted or
809 +-# transferred in any form or by any means, electronic or mechanical,
810 +-# without the express permission of the University. The permission of
811 +-# the University is not required if the said reproduction, modification,
812 +-# transmission or transference is done without financial return, the
813 +-# conditions of this Licence are imposed upon the receiver of the
814 +-# product, and all original and amended source code is included in any
815 +-# transmitted product. You may be held legally responsible for any
816 +-# copyright infringement that is caused or encouraged by your failure to
817 +-# abide by these terms and conditions.
818 +-#
819 +-# You are not permitted under this Licence to use this Software
820 +-# commercially. Use for which any financial return is received shall be
821 +-# defined as commercial use, and includes (1) integration of all or part
822 +-# of the source code or the Software into a product for sale or license
823 +-# by or on behalf of Licensee to third parties or (2) use of the
824 +-# Software or any derivative of it for research with the final aim of
825 +-# developing software products for sale or license to a third party or
826 +-# (3) use of the Software or any derivative of it for research with the
827 +-# final aim of developing non-software products for sale or license to a
828 +-# third party, or (4) use of the Software to provide any service to an
829 +-# external organisation for which payment is received. If you are
830 +-# interested in using the Software commercially, please contact Oxford
831 +-# University Innovation ("OUI"), the technology transfer company of the
832 +-# University, to negotiate a licence. Contact details are:
833 +-# fsl@××××××××××××××××.uk quoting Reference Project 9564, FSL.
834 +-export LC_ALL=C
835 +-
836 +-if [ $# -lt 1 ] ; then
837 +- echo "Usage: $0 <list of image names to remove>"
838 +- echo "NB: filenames can be basenames or not"
839 +- exit 1;
840 +-fi
841 +-
842 +-for f in $@ ; do
843 +- fn=`${FSLDIR}/bin/remove_ext $f`;
844 +- # do the rm silently
845 +- /bin/rm -f ${fn}.img ${fn}.hdr ${fn}.hdr.gz ${fn}.img.gz ${fn}.nii ${fn}.nii.gz ${fn}.mnc ${fn}.mnc.gz
846 +-done
847 +-
848 +diff -Naur fsl.orig/src/fslio/imtest fsl/src/fslio/imtest
849 +--- fsl.orig/src/fslio/imtest 2021-02-01 15:29:34.842752994 -0500
850 ++++ fsl/src/fslio/imtest 1969-12-31 19:00:00.000000000 -0500
851 +@@ -1,118 +0,0 @@
852 +-#!/bin/sh
853 +-
854 +-# imtest - test to see if a valid image file exists with this name (root)
855 +-#
856 +-# Stephen Smith and Mark Jenkinson, FMRIB Image Analysis Group
857 +-#
858 +-# Copyright (C) 1999-2004 University of Oxford
859 +-#
860 +-# Part of FSL - FMRIB's Software Library
861 +-# http://www.fmrib.ox.ac.uk/fsl
862 +-# fsl@×××××××××××.uk
863 +-#
864 +-# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
865 +-# Imaging of the Brain), Department of Clinical Neurology, Oxford
866 +-# University, Oxford, UK
867 +-#
868 +-#
869 +-# LICENCE
870 +-#
871 +-# FMRIB Software Library, Release 6.0 (c) 2018, The University of
872 +-# Oxford (the "Software")
873 +-#
874 +-# The Software remains the property of the Oxford University Innovation
875 +-# ("the University").
876 +-#
877 +-# The Software is distributed "AS IS" under this Licence solely for
878 +-# non-commercial use in the hope that it will be useful, but in order
879 +-# that the University as a charitable foundation protects its assets for
880 +-# the benefit of its educational and research purposes, the University
881 +-# makes clear that no condition is made or to be implied, nor is any
882 +-# warranty given or to be implied, as to the accuracy of the Software,
883 +-# or that it will be suitable for any particular purpose or for use
884 +-# under any specific conditions. Furthermore, the University disclaims
885 +-# all responsibility for the use which is made of the Software. It
886 +-# further disclaims any liability for the outcomes arising from using
887 +-# the Software.
888 +-#
889 +-# The Licensee agrees to indemnify the University and hold the
890 +-# University harmless from and against any and all claims, damages and
891 +-# liabilities asserted by third parties (including claims for
892 +-# negligence) which arise directly or indirectly from the use of the
893 +-# Software or the sale of any products based on the Software.
894 +-#
895 +-# No part of the Software may be reproduced, modified, transmitted or
896 +-# transferred in any form or by any means, electronic or mechanical,
897 +-# without the express permission of the University. The permission of
898 +-# the University is not required if the said reproduction, modification,
899 +-# transmission or transference is done without financial return, the
900 +-# conditions of this Licence are imposed upon the receiver of the
901 +-# product, and all original and amended source code is included in any
902 +-# transmitted product. You may be held legally responsible for any
903 +-# copyright infringement that is caused or encouraged by your failure to
904 +-# abide by these terms and conditions.
905 +-#
906 +-# You are not permitted under this Licence to use this Software
907 +-# commercially. Use for which any financial return is received shall be
908 +-# defined as commercial use, and includes (1) integration of all or part
909 +-# of the source code or the Software into a product for sale or license
910 +-# by or on behalf of Licensee to third parties or (2) use of the
911 +-# Software or any derivative of it for research with the final aim of
912 +-# developing software products for sale or license to a third party or
913 +-# (3) use of the Software or any derivative of it for research with the
914 +-# final aim of developing non-software products for sale or license to a
915 +-# third party, or (4) use of the Software to provide any service to an
916 +-# external organisation for which payment is received. If you are
917 +-# interested in using the Software commercially, please contact Oxford
918 +-# University Innovation ("OUI"), the technology transfer company of the
919 +-# University, to negotiate a licence. Contact details are:
920 +-# fsl@××××××××××××××××.uk quoting Reference Project 9564, FSL.
921 +-export LC_ALL=C
922 +-
923 +-# return 0 if no image exists or 1 if the image exists
924 +-
925 +-if [ $# -lt 1 ] ; then
926 +- echo "0";
927 +- exit;
928 +-fi
929 +-
930 +-inputfile=$1
931 +-
932 +-
933 +-
934 +-for i in 1 2 3 4 5 6 7 8 9 10 11 12
935 +-do
936 +-if [ -h $inputfile ] ; then
937 +-inputfile=`readlink $inputfile`;
938 +-fi
939 +-done
940 +-
941 +-filename=`${FSLDIR}/bin/remove_ext $inputfile`;
942 +-
943 +-if [ -r ${filename}.nii ] || [ -r ${filename}.nii.gz ] ; then
944 +- echo "1";
945 +- exit;
946 +-fi
947 +-
948 +-if [ -r ${filename}.mnc ] || [ -r ${filename}.mnc.gz ] ; then
949 +- echo "1";
950 +- exit;
951 +-fi
952 +-
953 +-if [ ! -r ${filename}.hdr ] && [ ! -r ${filename}.hdr.gz ] ; then
954 +- # return 0 here as no header exists and no single image means no image!
955 +- echo "0";
956 +- exit;
957 +-fi
958 +-
959 +-if [ ! -r ${filename}.img ] && [ ! -r ${filename}.img.gz ] ; then
960 +- # return 0 here as no img file exists and no single image means no image!
961 +- echo "0";
962 +- exit;
963 +-fi
964 +-
965 +-# only gets to here if there was a hdr and an img file
966 +-
967 +-echo "1";
968 +-exit;
969 +-
970
971 diff --git a/sci-biology/fsl/files/fsl-6.0.4-remove_fslpy_collisions-p2.patch b/sci-biology/fsl/files/fsl-6.0.4-remove_fslpy_collisions-p2.patch
972 new file mode 100644
973 index 000000000..ddb7cfb67
974 --- /dev/null
975 +++ b/sci-biology/fsl/files/fsl-6.0.4-remove_fslpy_collisions-p2.patch
976 @@ -0,0 +1,348 @@
977 +diff -Naur fsl.orig/src/fslio/Makefile fsl/src/fslio/Makefile
978 +--- fsl.orig/src/fslio/Makefile 2021-02-01 15:29:34.842752994 -0500
979 ++++ fsl/src/fslio/Makefile 2021-02-01 15:32:19.723761859 -0500
980 +@@ -6,7 +6,7 @@
981 +
982 + OBJS=fslio.o
983 +
984 +-SCRIPTS = remove_ext fsloutputtype imtest imglob imcp imln imrm immv
985 ++SCRIPTS = fsloutputtype imglob imcp immv
986 +
987 + all:
988 +
989 +diff -Naur fsl.orig/src/fslio/remove_ext fsl/src/fslio/remove_ext
990 +--- fsl.orig/src/fslio/remove_ext 2021-02-01 15:29:34.842752994 -0500
991 ++++ fsl/src/fslio/remove_ext 1969-12-31 19:00:00.000000000 -0500
992 +@@ -1,87 +0,0 @@
993 +-#!/bin/sh
994 +-
995 +-# remove_ext - remove extension from image filename
996 +-#
997 +-# Stephen Smith and Mark Jenkinson, FMRIB Image Analysis Group
998 +-#
999 +-# Copyright (C) 1999-2004 University of Oxford
1000 +-#
1001 +-# Part of FSL - FMRIB's Software Library
1002 +-# http://www.fmrib.ox.ac.uk/fsl
1003 +-# fsl@×××××××××××.uk
1004 +-#
1005 +-# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
1006 +-# Imaging of the Brain), Department of Clinical Neurology, Oxford
1007 +-# University, Oxford, UK
1008 +-#
1009 +-#
1010 +-# LICENCE
1011 +-#
1012 +-# FMRIB Software Library, Release 6.0 (c) 2018, The University of
1013 +-# Oxford (the "Software")
1014 +-#
1015 +-# The Software remains the property of the Oxford University Innovation
1016 +-# ("the University").
1017 +-#
1018 +-# The Software is distributed "AS IS" under this Licence solely for
1019 +-# non-commercial use in the hope that it will be useful, but in order
1020 +-# that the University as a charitable foundation protects its assets for
1021 +-# the benefit of its educational and research purposes, the University
1022 +-# makes clear that no condition is made or to be implied, nor is any
1023 +-# warranty given or to be implied, as to the accuracy of the Software,
1024 +-# or that it will be suitable for any particular purpose or for use
1025 +-# under any specific conditions. Furthermore, the University disclaims
1026 +-# all responsibility for the use which is made of the Software. It
1027 +-# further disclaims any liability for the outcomes arising from using
1028 +-# the Software.
1029 +-#
1030 +-# The Licensee agrees to indemnify the University and hold the
1031 +-# University harmless from and against any and all claims, damages and
1032 +-# liabilities asserted by third parties (including claims for
1033 +-# negligence) which arise directly or indirectly from the use of the
1034 +-# Software or the sale of any products based on the Software.
1035 +-#
1036 +-# No part of the Software may be reproduced, modified, transmitted or
1037 +-# transferred in any form or by any means, electronic or mechanical,
1038 +-# without the express permission of the University. The permission of
1039 +-# the University is not required if the said reproduction, modification,
1040 +-# transmission or transference is done without financial return, the
1041 +-# conditions of this Licence are imposed upon the receiver of the
1042 +-# product, and all original and amended source code is included in any
1043 +-# transmitted product. You may be held legally responsible for any
1044 +-# copyright infringement that is caused or encouraged by your failure to
1045 +-# abide by these terms and conditions.
1046 +-#
1047 +-# You are not permitted under this Licence to use this Software
1048 +-# commercially. Use for which any financial return is received shall be
1049 +-# defined as commercial use, and includes (1) integration of all or part
1050 +-# of the source code or the Software into a product for sale or license
1051 +-# by or on behalf of Licensee to third parties or (2) use of the
1052 +-# Software or any derivative of it for research with the final aim of
1053 +-# developing software products for sale or license to a third party or
1054 +-# (3) use of the Software or any derivative of it for research with the
1055 +-# final aim of developing non-software products for sale or license to a
1056 +-# third party, or (4) use of the Software to provide any service to an
1057 +-# external organisation for which payment is received. If you are
1058 +-# interested in using the Software commercially, please contact Oxford
1059 +-# University Innovation ("OUI"), the technology transfer company of the
1060 +-# University, to negotiate a licence. Contact details are:
1061 +-# fsl@××××××××××××××××.uk quoting Reference Project 9564, FSL.
1062 +-export LC_ALL=C
1063 +-
1064 +-
1065 +-if [ $# -lt 1 ] ; then
1066 +- exit 1
1067 +-fi
1068 +-
1069 +-lst="";
1070 +-for fn in $@ ; do
1071 +- # for the ones at the end of the line
1072 +- f=`echo "$fn" | sed 's/\.hdr\.gz$//' | sed 's/\.img\.gz$//' | sed 's/\.hdr$//' | sed 's/\.img$//' | sed 's/\.nii.gz$//' | sed 's/\.nii$//' | sed 's/\.mnc.gz$//' | sed 's/\.mnc$//' | sed 's/\.$//'`;
1073 +- # for the ones in the middle of the line
1074 +- f=`echo "$f" | sed 's/\.hdr\.gz[ ]/ /g' | sed 's/\.img\.gz[ ]/ /g' | sed 's/\.hdr[ ]/ /g' | sed 's/\.img[ ]/ /g' | sed 's/\.nii\.gz[ ]/ /g' | sed 's/\.nii[ ]/ /g' | sed 's/\.mnc\.gz[ ]/ /g' | sed 's/\.mnc[ ]/ /g' |sed 's/\.[ ]/ /g'`;
1075 +- lst="$lst $f";
1076 +-done
1077 +-echo $lst;
1078 +-
1079 +-
1080 +diff -Naur fsl.orig/src/misc_scripts/fsl_abspath fsl/src/misc_scripts/fsl_abspath
1081 +--- fsl.orig/src/misc_scripts/fsl_abspath 2021-02-01 15:29:34.828752994 -0500
1082 ++++ fsl/src/misc_scripts/fsl_abspath 1969-12-31 19:00:00.000000000 -0500
1083 +@@ -1,71 +0,0 @@
1084 +-#!/usr/bin/env fslpython
1085 +-# fsl_abspath - return true file path
1086 +-# Matthew Webster FMRIB Image Analysis Group
1087 +-# Copyright (C) 2009 University of Oxford
1088 +-# Part of FSL - FMRIB's Software Library
1089 +-# http://www.fmrib.ox.ac.uk/fsl
1090 +-# fsl@×××××××××××.uk
1091 +-#
1092 +-# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
1093 +-# Imaging of the Brain), Department of Clinical Neurology, Oxford
1094 +-# University, Oxford, UK
1095 +-#
1096 +-#
1097 +-# LICENCE
1098 +-#
1099 +-# FMRIB Software Library, Release 6.0 (c) 2018, The University of
1100 +-# Oxford (the "Software")
1101 +-#
1102 +-# The Software remains the property of the Oxford University Innovation
1103 +-# ("the University").
1104 +-#
1105 +-# The Software is distributed "AS IS" under this Licence solely for
1106 +-# non-commercial use in the hope that it will be useful, but in order
1107 +-# that the University as a charitable foundation protects its assets for
1108 +-# the benefit of its educational and research purposes, the University
1109 +-# makes clear that no condition is made or to be implied, nor is any
1110 +-# warranty given or to be implied, as to the accuracy of the Software,
1111 +-# or that it will be suitable for any particular purpose or for use
1112 +-# under any specific conditions. Furthermore, the University disclaims
1113 +-# all responsibility for the use which is made of the Software. It
1114 +-# further disclaims any liability for the outcomes arising from using
1115 +-# the Software.
1116 +-#
1117 +-# The Licensee agrees to indemnify the University and hold the
1118 +-# University harmless from and against any and all claims, damages and
1119 +-# liabilities asserted by third parties (including claims for
1120 +-# negligence) which arise directly or indirectly from the use of the
1121 +-# Software or the sale of any products based on the Software.
1122 +-#
1123 +-# No part of the Software may be reproduced, modified, transmitted or
1124 +-# transferred in any form or by any means, electronic or mechanical,
1125 +-# without the express permission of the University. The permission of
1126 +-# the University is not required if the said reproduction, modification,
1127 +-# transmission or transference is done without financial return, the
1128 +-# conditions of this Licence are imposed upon the receiver of the
1129 +-# product, and all original and amended source code is included in any
1130 +-# transmitted product. You may be held legally responsible for any
1131 +-# copyright infringement that is caused or encouraged by your failure to
1132 +-# abide by these terms and conditions.
1133 +-#
1134 +-# You are not permitted under this Licence to use this Software
1135 +-# commercially. Use for which any financial return is received shall be
1136 +-# defined as commercial use, and includes (1) integration of all or part
1137 +-# of the source code or the Software into a product for sale or license
1138 +-# by or on behalf of Licensee to third parties or (2) use of the
1139 +-# Software or any derivative of it for research with the final aim of
1140 +-# developing software products for sale or license to a third party or
1141 +-# (3) use of the Software or any derivative of it for research with the
1142 +-# final aim of developing non-software products for sale or license to a
1143 +-# third party, or (4) use of the Software to provide any service to an
1144 +-# external organisation for which payment is received. If you are
1145 +-# interested in using the Software commercially, please contact Oxford
1146 +-# University Innovation ("OUI"), the technology transfer company of the
1147 +-# University, to negotiate a licence. Contact details are:
1148 +-# fsl@××××××××××××××××.uk quoting Reference Project 9564, FSL.
1149 +-from __future__ import print_function
1150 +-import sys
1151 +-import os
1152 +-
1153 +-print (os.path.realpath(sys.argv[1]))
1154 +-sys.exit(0)
1155 +diff -Naur fsl.orig/src/misc_scripts/Makefile fsl/src/misc_scripts/Makefile
1156 +--- fsl.orig/src/misc_scripts/Makefile 2021-02-01 15:29:34.828752994 -0500
1157 ++++ fsl/src/misc_scripts/Makefile 2021-02-01 15:32:56.027763811 -0500
1158 +@@ -2,6 +2,6 @@
1159 +
1160 + PROJNAME = misc_scripts
1161 +
1162 +-SCRIPTS = fslecho regscript remove_vols replace_and_average_fmrib linkbedpost ocmr_preproc correct_and_average eddy_correct Text2Vest Vest2Text AnatomicalAverage fsl_abspath fsl_anat fslFixText
1163 ++SCRIPTS = fslecho regscript remove_vols replace_and_average_fmrib linkbedpost ocmr_preproc correct_and_average eddy_correct AnatomicalAverage fsl_anat fslFixText
1164 +
1165 + all:
1166 +diff -Naur fsl.orig/src/misc_scripts/Text2Vest fsl/src/misc_scripts/Text2Vest
1167 +--- fsl.orig/src/misc_scripts/Text2Vest 2021-02-01 15:29:34.828752994 -0500
1168 ++++ fsl/src/misc_scripts/Text2Vest 1969-12-31 19:00:00.000000000 -0500
1169 +@@ -1,80 +0,0 @@
1170 +-#!/bin/sh
1171 +-# Copyright (C) 2012 University of Oxford
1172 +-#
1173 +-# Part of FSL - FMRIB's Software Library
1174 +-# http://www.fmrib.ox.ac.uk/fsl
1175 +-# fsl@×××××××××××.uk
1176 +-#
1177 +-# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
1178 +-# Imaging of the Brain), Department of Clinical Neurology, Oxford
1179 +-# University, Oxford, UK
1180 +-#
1181 +-#
1182 +-# LICENCE
1183 +-#
1184 +-# FMRIB Software Library, Release 6.0 (c) 2018, The University of
1185 +-# Oxford (the "Software")
1186 +-#
1187 +-# The Software remains the property of the Oxford University Innovation
1188 +-# ("the University").
1189 +-#
1190 +-# The Software is distributed "AS IS" under this Licence solely for
1191 +-# non-commercial use in the hope that it will be useful, but in order
1192 +-# that the University as a charitable foundation protects its assets for
1193 +-# the benefit of its educational and research purposes, the University
1194 +-# makes clear that no condition is made or to be implied, nor is any
1195 +-# warranty given or to be implied, as to the accuracy of the Software,
1196 +-# or that it will be suitable for any particular purpose or for use
1197 +-# under any specific conditions. Furthermore, the University disclaims
1198 +-# all responsibility for the use which is made of the Software. It
1199 +-# further disclaims any liability for the outcomes arising from using
1200 +-# the Software.
1201 +-#
1202 +-# The Licensee agrees to indemnify the University and hold the
1203 +-# University harmless from and against any and all claims, damages and
1204 +-# liabilities asserted by third parties (including claims for
1205 +-# negligence) which arise directly or indirectly from the use of the
1206 +-# Software or the sale of any products based on the Software.
1207 +-#
1208 +-# No part of the Software may be reproduced, modified, transmitted or
1209 +-# transferred in any form or by any means, electronic or mechanical,
1210 +-# without the express permission of the University. The permission of
1211 +-# the University is not required if the said reproduction, modification,
1212 +-# transmission or transference is done without financial return, the
1213 +-# conditions of this Licence are imposed upon the receiver of the
1214 +-# product, and all original and amended source code is included in any
1215 +-# transmitted product. You may be held legally responsible for any
1216 +-# copyright infringement that is caused or encouraged by your failure to
1217 +-# abide by these terms and conditions.
1218 +-#
1219 +-# You are not permitted under this Licence to use this Software
1220 +-# commercially. Use for which any financial return is received shall be
1221 +-# defined as commercial use, and includes (1) integration of all or part
1222 +-# of the source code or the Software into a product for sale or license
1223 +-# by or on behalf of Licensee to third parties or (2) use of the
1224 +-# Software or any derivative of it for research with the final aim of
1225 +-# developing software products for sale or license to a third party or
1226 +-# (3) use of the Software or any derivative of it for research with the
1227 +-# final aim of developing non-software products for sale or license to a
1228 +-# third party, or (4) use of the Software to provide any service to an
1229 +-# external organisation for which payment is received. If you are
1230 +-# interested in using the Software commercially, please contact Oxford
1231 +-# University Innovation ("OUI"), the technology transfer company of the
1232 +-# University, to negotiate a licence. Contact details are:
1233 +-# fsl@××××××××××××××××.uk quoting Reference Project 9564, FSL.
1234 +-export LC_ALL=C
1235 +-if [ $# -lt 2 ] ; then
1236 +- echo "`basename $0` <text file> <vest file>"
1237 +- exit 0
1238 +-fi
1239 +-
1240 +-NumPoints=`grep -cve '^\s*$' $1`
1241 +-NumWaves=`wc $1 | awk '{ print $2 }'`
1242 +-NumWaves=`expr $NumWaves / $NumPoints`
1243 +-
1244 +-echo /NumWaves $NumWaves > $2
1245 +-echo /NumPoints $NumPoints >> $2
1246 +-echo /Matrix >> $2
1247 +-
1248 +-cat $1 >> $2
1249 +-
1250 +diff -Naur fsl.orig/src/misc_scripts/Vest2Text fsl/src/misc_scripts/Vest2Text
1251 +--- fsl.orig/src/misc_scripts/Vest2Text 2021-02-01 15:29:34.828752994 -0500
1252 ++++ fsl/src/misc_scripts/Vest2Text 1969-12-31 19:00:00.000000000 -0500
1253 +@@ -1,71 +0,0 @@
1254 +-#!/bin/sh
1255 +-# Copyright (C) 2012 University of Oxford
1256 +-#
1257 +-# Part of FSL - FMRIB's Software Library
1258 +-# http://www.fmrib.ox.ac.uk/fsl
1259 +-# fsl@×××××××××××.uk
1260 +-#
1261 +-# Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
1262 +-# Imaging of the Brain), Department of Clinical Neurology, Oxford
1263 +-# University, Oxford, UK
1264 +-#
1265 +-#
1266 +-# LICENCE
1267 +-#
1268 +-# FMRIB Software Library, Release 6.0 (c) 2018, The University of
1269 +-# Oxford (the "Software")
1270 +-#
1271 +-# The Software remains the property of the Oxford University Innovation
1272 +-# ("the University").
1273 +-#
1274 +-# The Software is distributed "AS IS" under this Licence solely for
1275 +-# non-commercial use in the hope that it will be useful, but in order
1276 +-# that the University as a charitable foundation protects its assets for
1277 +-# the benefit of its educational and research purposes, the University
1278 +-# makes clear that no condition is made or to be implied, nor is any
1279 +-# warranty given or to be implied, as to the accuracy of the Software,
1280 +-# or that it will be suitable for any particular purpose or for use
1281 +-# under any specific conditions. Furthermore, the University disclaims
1282 +-# all responsibility for the use which is made of the Software. It
1283 +-# further disclaims any liability for the outcomes arising from using
1284 +-# the Software.
1285 +-#
1286 +-# The Licensee agrees to indemnify the University and hold the
1287 +-# University harmless from and against any and all claims, damages and
1288 +-# liabilities asserted by third parties (including claims for
1289 +-# negligence) which arise directly or indirectly from the use of the
1290 +-# Software or the sale of any products based on the Software.
1291 +-#
1292 +-# No part of the Software may be reproduced, modified, transmitted or
1293 +-# transferred in any form or by any means, electronic or mechanical,
1294 +-# without the express permission of the University. The permission of
1295 +-# the University is not required if the said reproduction, modification,
1296 +-# transmission or transference is done without financial return, the
1297 +-# conditions of this Licence are imposed upon the receiver of the
1298 +-# product, and all original and amended source code is included in any
1299 +-# transmitted product. You may be held legally responsible for any
1300 +-# copyright infringement that is caused or encouraged by your failure to
1301 +-# abide by these terms and conditions.
1302 +-#
1303 +-# You are not permitted under this Licence to use this Software
1304 +-# commercially. Use for which any financial return is received shall be
1305 +-# defined as commercial use, and includes (1) integration of all or part
1306 +-# of the source code or the Software into a product for sale or license
1307 +-# by or on behalf of Licensee to third parties or (2) use of the
1308 +-# Software or any derivative of it for research with the final aim of
1309 +-# developing software products for sale or license to a third party or
1310 +-# (3) use of the Software or any derivative of it for research with the
1311 +-# final aim of developing non-software products for sale or license to a
1312 +-# third party, or (4) use of the Software to provide any service to an
1313 +-# external organisation for which payment is received. If you are
1314 +-# interested in using the Software commercially, please contact Oxford
1315 +-# University Innovation ("OUI"), the technology transfer company of the
1316 +-# University, to negotiate a licence. Contact details are:
1317 +-# fsl@××××××××××××××××.uk quoting Reference Project 9564, FSL.
1318 +-export LC_ALL=C
1319 +-if [ $# -lt 2 ] ; then
1320 +- echo "`basename $0` <vest file> <text file>"
1321 +- exit 0
1322 +-fi
1323 +-sed -e "/\//d" $1 | sed '/^$/d' > $2
1324 +-
1325
1326 diff --git a/sci-biology/fsl/files/fsl-6.0.4-setup.patch b/sci-biology/fsl/files/fsl-6.0.4-setup.patch
1327 new file mode 100644
1328 index 000000000..061e1a22a
1329 --- /dev/null
1330 +++ b/sci-biology/fsl/files/fsl-6.0.4-setup.patch
1331 @@ -0,0 +1,174 @@
1332 +diff -Naur fsl.orig/build fsl/build
1333 +--- fsl.orig/build 2020-12-02 15:29:12.180812558 -0500
1334 ++++ fsl/build 2020-12-02 15:34:03.854821628 -0500
1335 +@@ -28,7 +28,6 @@
1336 + # The build order for MASTERLIBS is very important, and should not be modified unless you know what
1337 + # you are doing.
1338 + MASTERLIBS="
1339 +- CiftiLib-master \
1340 + utils \
1341 + znzlib \
1342 + NewNifti \
1343 +@@ -157,8 +156,8 @@
1344 + done #project (MASTERPROJECTS)
1345 + fi #full build
1346 +
1347 +-echo "Building projects - see build.log file for progress..."
1348 +-./config/common/buildproj $PROJECTS > ./build.log 2>&1
1349 ++echo "Building projects"
1350 ++./config/common/buildproj $PROJECTS
1351 + finalStatus=$?
1352 + if [ $finalStatus -eq 0 ]; then
1353 + echo "Build completed successfully.";
1354 +diff -Naur fsl.orig/config/buildSettings.mk fsl/config/buildSettings.mk
1355 +--- fsl.orig/config/buildSettings.mk 2020-12-02 15:29:11.993812552 -0500
1356 ++++ fsl/config/buildSettings.mk 2020-12-02 15:39:37.269831995 -0500
1357 +@@ -18,7 +18,7 @@
1358 + CHMOD = /bin/chmod
1359 + MKDIR = /bin/mkdir
1360 + INSTALL = install -p
1361 +-TCLSH = ${FSLDIR}/bin/fsltclsh
1362 ++TCLSH = tclsh
1363 + DEPENDFLAGS = -MM
1364 + MACHDBGFLAGS = -g
1365 + #####################################################################
1366 +@@ -127,19 +127,19 @@
1367 + #####################################################################
1368 + ifeq ($(SYSTYPE), Linux)
1369 + ############### System Vars #####################################
1370 +-CC = gcc
1371 +-CXX = c++
1372 +-CXX11 = c++
1373 ++CC = @@GENTOO_CC@@
1374 ++CXX = @@GENTOO_CXX@@
1375 ++CXX11 = @@GENTOO_CXX@@
1376 + CSTATICFLAGS = -static
1377 + CXXSTATICFLAGS = -static
1378 +-ARCHFLAGS = -m64
1379 +-ARCHLDFLAGS = -Wl,-rpath,'$$ORIGIN/../lib'
1380 ++ARCHFLAGS =
1381 ++ARCHLDFLAGS =
1382 + PARALLELFLAGS = -fopenmp
1383 +-OPTFLAGS = -g -O3 -fexpensive-optimizations ${ARCHFLAGS}
1384 ++OPTFLAGS =
1385 + GNU_ANSI_FLAGS = -Wall -ansi -pedantic -Wno-long-long
1386 + SGI_ANSI_FLAGS = -ansi -fullwarn
1387 + ANSI_FLAGS = ${GNU_ANSI_FLAGS}
1388 +-RANLIB = echo
1389 ++RANLIB = @@GENTOO_RANLIB@@
1390 + FSLML = ${FSLDIR}/bin/fslml
1391 + # CUDA development environment
1392 + CUDAVER := $(or $(CUDAVER),9.1)
1393 +@@ -158,8 +158,8 @@
1394 + NVCC = ${CUDA_INSTALLATION}/bin/nvcc
1395 + ############### External Libs #####################################
1396 + # ZLIB library
1397 +-LIB_ZLIB = ${FSLEXTLIB}
1398 +-INC_ZLIB = ${FSLEXTINC}
1399 ++#LIB_ZLIB = ${FSLEXTLIB}
1400 ++#INC_ZLIB = ${FSLEXTINC}
1401 + # QT library
1402 + QTDIR = /usr/lib/qt3
1403 + LIB_QT = ${QTDIR}/lib
1404 +diff -Naur fsl.orig/config/common/buildproj fsl/config/common/buildproj
1405 +--- fsl.orig/config/common/buildproj 2020-12-02 15:29:11.993812552 -0500
1406 ++++ fsl/config/common/buildproj 2020-12-02 15:41:25.579835363 -0500
1407 +@@ -11,10 +11,10 @@
1408 + fi
1409 + PROJECTS="$@" ; export PROJECTS ;
1410 +
1411 +-FSLDIR=`pwd`
1412 ++#FSLDIR=`pwd`
1413 + FSLDEVDIR=${FSLDIR}
1414 + FSLCONFDIR=${FSLDIR}/config
1415 +-FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh`
1416 ++#FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh`
1417 + FSLMASTERBUILD=1
1418 + export FSLDIR FSLDEVDIR FSLCONFDIR FSLMACHTYPE FSLMASTERBUILD
1419 +
1420 +@@ -67,7 +67,7 @@
1421 + if [ -x ./fslconfig ] ; then
1422 + . ./fslconfig ;
1423 + fi
1424 +- if ${MAKE} -k ${MAKEOPTIONS} ; then
1425 ++ if ${MAKE} ${MAKEOPTIONS} ; then
1426 + if ${MAKE} ${MAKEOPTIONS} install ; then
1427 + installok=true;
1428 + # Clean up after ourselves
1429 +@@ -82,6 +82,7 @@
1430 + if [ $installok = false ] ; then
1431 + echo " "
1432 + echo "ERROR::Could not install $projname successfully" ;
1433 ++ exit 1
1434 + fi
1435 + else
1436 + echo " "
1437 +@@ -90,6 +91,7 @@
1438 + echo " "
1439 + echo " "
1440 + errorprojs="$errorprojs $projname" ; export errorprojs ;
1441 ++ exit 1
1442 + fi
1443 + fi
1444 + done
1445 +diff -Naur fsl.orig/config/common/vars.mk fsl/config/common/vars.mk
1446 +--- fsl.orig/config/common/vars.mk 2020-12-02 15:29:11.993812552 -0500
1447 ++++ fsl/config/common/vars.mk 2020-12-02 15:43:00.602838318 -0500
1448 +@@ -24,15 +24,15 @@
1449 + USRCFLAGS =
1450 + USRCXXFLAGS =
1451 +
1452 +-LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR}
1453 ++LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR} ${USERLDFLAGS}
1454 +
1455 +-AccumulatedIncFlags = -I${INC_BOOST} ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}
1456 ++AccumulatedIncFlags = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} ${CPPFLAGS}
1457 +
1458 + CFLAGS = ${ANSI_FLAGS} ${ANSI_CFLAGS} ${DBGFLAGS} ${USEDCSTATICFLAGS} ${USRCFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \
1459 +- ${AccumulatedIncFlags}
1460 ++ ${AccumulatedIncFlags} ${USERCFLAGS}
1461 +
1462 +-CXXFLAGS = ${ANSI_FLAGS} ${ANSI_CXXFLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \
1463 +- ${AccumulatedIncFlags}
1464 ++CXXFLAGS = ${ANSI_CXXFLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \
1465 ++ ${AccumulatedIncFlags} ${USERCXXFLAGS}
1466 +
1467 + HFILES = *.h
1468 + AFILES = *.a
1469 +diff -Naur fsl.orig/extras/build fsl/extras/build
1470 +--- fsl.orig/extras/build 2020-12-02 15:29:12.404812565 -0500
1471 ++++ fsl/extras/build 2020-12-02 15:44:06.906840380 -0500
1472 +@@ -96,16 +96,16 @@
1473 + BUILDICONV=1
1474 + fi
1475 + fi
1476 +-PROJECTS="tcl tk"
1477 ++#PROJECTS="tcl tk"
1478 + if [ ${BUILDZLIB} -eq 1 ]; then
1479 + PROJECTS="${PROJECTS} zlib"
1480 + fi
1481 +-PROJECTS="${PROJECTS} libpng"
1482 ++#PROJECTS="${PROJECTS} libpng"
1483 + if [ ${BUILDICONV} -eq 1 ]; then
1484 + PROJECTS="${PROJECTS} libiconv"
1485 + fi
1486 +-PROJECTS="${PROJECTS} libgd libgdc libprob libcprob newmat cprob newran fftw"
1487 +-PROJECTS="${PROJECTS} boost libxml2-2.9.2 libxmlpp libsqlite libnlopt ../include/armawrap/dummy_newmat"
1488 ++PROJECTS="${PROJECTS} libgdc libprob libcprob newmat cprob newran"
1489 ++PROJECTS="${PROJECTS} ../include/armawrap/dummy_newmat"
1490 + for projname in $PROJECTS; do
1491 + if [ -d $FSLESRCDIR/$projname ] ; then
1492 + buildIt $FSLESRCDIR $projname 1
1493 +diff -Naur fsl.orig/src/mist/Makefile fsl/src/mist/Makefile
1494 +--- fsl.orig/src/mist/Makefile 2020-12-02 15:29:12.875812580 -0500
1495 ++++ fsl/src/mist/Makefile 2020-12-02 15:45:09.805842335 -0500
1496 +@@ -52,6 +52,8 @@
1497 + cp -r python/* ${DESTDIR}/python/mist
1498 +
1499 + clean:
1500 +- rm -f ${OBJS} mist/mist.o mist/mist
1501 ++ rm -f ${OBJS} mist/mist.o mist/mist || echo "CLEAN could not locate some files scheduled for deletion."
1502 ++
1503 ++
1504 +
1505 + .PHONY: all clean installdata
1506
1507 diff --git a/sci-biology/fsl/fsl-6.0.2-r1.ebuild b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
1508 index 71314a8f8..ae12098ec 100644
1509 --- a/sci-biology/fsl/fsl-6.0.2-r1.ebuild
1510 +++ b/sci-biology/fsl/fsl-6.0.2-r1.ebuild
1511 @@ -6,7 +6,7 @@ EAPI=7
1512 inherit cuda flag-o-matic toolchain-funcs prefix
1513
1514 DESCRIPTION="Analysis of functional, structural, and diffusion MRI brain imaging data"
1515 -HOMEPAGE="http://www.fmrib.ox.ac.uk/fsl"
1516 +HOMEPAGE="https://www.fmrib.ox.ac.uk/fsl"
1517 SRC_URI="https://fsl.fmrib.ox.ac.uk/fsldownloads/${P}-sources.tar.gz -> ${P}.tar.gz"
1518
1519 LICENSE="FSL BSD-2 newmat"
1520 @@ -16,7 +16,7 @@ IUSE="cuda"
1521
1522 DEPEND="
1523 dev-libs/boost
1524 - dev-python/fslpy
1525 + <dev-python/fslpy-3
1526 media-gfx/graphviz
1527 media-libs/gd
1528 media-libs/glu
1529
1530 diff --git a/sci-biology/fsl/fsl-6.0.2.ebuild b/sci-biology/fsl/fsl-6.0.2.ebuild
1531 index 8a7e0eebb..f490b6e7c 100644
1532 --- a/sci-biology/fsl/fsl-6.0.2.ebuild
1533 +++ b/sci-biology/fsl/fsl-6.0.2.ebuild
1534 @@ -1,4 +1,4 @@
1535 -# Copyright 1999-2020 Gentoo Authors
1536 +# Copyright 1999-2021 Gentoo Authors
1537 # Distributed under the terms of the GNU General Public License v2
1538
1539 EAPI=7
1540 @@ -6,7 +6,7 @@ EAPI=7
1541 inherit flag-o-matic toolchain-funcs prefix
1542
1543 DESCRIPTION="Analysis of functional, structural, and diffusion MRI brain imaging data"
1544 -HOMEPAGE="http://www.fmrib.ox.ac.uk/fsl"
1545 +HOMEPAGE="https://www.fmrib.ox.ac.uk/fsl"
1546 SRC_URI="https://fsl.fmrib.ox.ac.uk/fsldownloads/${P}-sources.tar.gz -> ${P}.tar.gz"
1547
1548 LICENSE="FSL BSD-2 newmat"
1549 @@ -16,7 +16,7 @@ IUSE=""
1550
1551 DEPEND="
1552 dev-libs/boost
1553 - dev-python/fslpy
1554 + <dev-python/fslpy-3
1555 media-gfx/graphviz
1556 media-libs/gd
1557 media-libs/glu
1558
1559 diff --git a/sci-biology/fsl/fsl-6.0.2-r1.ebuild b/sci-biology/fsl/fsl-6.0.4.ebuild
1560 similarity index 83%
1561 copy from sci-biology/fsl/fsl-6.0.2-r1.ebuild
1562 copy to sci-biology/fsl/fsl-6.0.4.ebuild
1563 index 71314a8f8..e0feb82d9 100644
1564 --- a/sci-biology/fsl/fsl-6.0.2-r1.ebuild
1565 +++ b/sci-biology/fsl/fsl-6.0.4.ebuild
1566 @@ -6,7 +6,7 @@ EAPI=7
1567 inherit cuda flag-o-matic toolchain-funcs prefix
1568
1569 DESCRIPTION="Analysis of functional, structural, and diffusion MRI brain imaging data"
1570 -HOMEPAGE="http://www.fmrib.ox.ac.uk/fsl"
1571 +HOMEPAGE="https://www.fmrib.ox.ac.uk/fsl"
1572 SRC_URI="https://fsl.fmrib.ox.ac.uk/fsldownloads/${P}-sources.tar.gz -> ${P}.tar.gz"
1573
1574 LICENSE="FSL BSD-2 newmat"
1575 @@ -16,7 +16,7 @@ IUSE="cuda"
1576
1577 DEPEND="
1578 dev-libs/boost
1579 - dev-python/fslpy
1580 + >=dev-python/fslpy-3
1581 media-gfx/graphviz
1582 media-libs/gd
1583 media-libs/glu
1584 @@ -42,8 +42,8 @@ S=${WORKDIR}/${PN}
1585 UPSTREAM_FSLDIR="/usr/share/fsl"
1586
1587 PATCHES=(
1588 - "${FILESDIR}/${PN}"-6.0.2-gcc10_include.patch
1589 - "${FILESDIR}/${PN}"-6.0.2-setup.patch
1590 + "${FILESDIR}/${P}"-gcc10_include.patch
1591 + "${FILESDIR}/${P}"-setup.patch
1592 "${FILESDIR}/${PN}"-6.0.2-template.patch
1593 "${FILESDIR}/${PN}"-6.0.2-no_xmlpp.patch
1594 "${FILESDIR}/${PN}"-5.0.11-niftiio_var_fix.patch
1595 @@ -51,8 +51,13 @@ PATCHES=(
1596 "${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
1597 "${FILESDIR}/${PN}"-6.0.2-qstring_compat.patch
1598 "${FILESDIR}/${PN}"-5.0.9-headers.patch
1599 - "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p1.patch
1600 - "${FILESDIR}/${PN}"-6.0.2-fsldir_redux-p2.patch
1601 + "${FILESDIR}/${P}"-fsldir_redux-p1.patch
1602 + "${FILESDIR}/${P}"-fsldir_redux-p2.patch
1603 + "${FILESDIR}/${P}"-flameo_std.patch
1604 + "${FILESDIR}/${P}"-melodic_std.patch
1605 + "${FILESDIR}/${P}"-remove_fslpy_collisions-p1.patch
1606 + "${FILESDIR}/${P}"-remove_fslpy_collisions-p2.patch
1607 + "${FILESDIR}/${P}"-fdt_cuda.patch
1608 )
1609
1610 src_prepare() {
1611 @@ -67,8 +72,11 @@ src_prepare() {
1612 eprefixify $(grep -rl GENTOO_PORTAGE_EPREFIX src/*) \
1613 etc/js/label-div.html
1614
1615 - # Disable mist-clean the hard way for now.
1616 - rm -rf src/mist-clean
1617 + # Disable mist the hard way for now.
1618 + rm -r src/mist || die
1619 +
1620 + # Disable ptx2 for now
1621 + rm -r src/ptx2 || die
1622
1623 makefilelist=$(find src/ -name Makefile)
1624
1625 @@ -111,7 +119,7 @@ src_prepare() {
1626 sed -e "s:-lopenblas:-llapack -lblas:g" \
1627 -i $(grep -rlI lopenblas *) || die
1628
1629 - # script wanting to have access to flsversion at buildtime
1630 + # script wanting to have access to fslversion at buildtime
1631 sed -e "s:/etc/fslversion:${S}/etc/fslversion:g" \
1632 -i ${makefilelist} || die
1633
1634 @@ -129,8 +137,8 @@ src_prepare() {
1635 CUDA_INSTALLATION="/opt/cuda"
1636 CUDAVER=`cuda_toolkit_version`
1637
1638 - eapply "${FILESDIR}/${PN}-6.0.2-eddy_cuda.patch"
1639 - eapply "${FILESDIR}/${PN}-6.0.2-cuda_buildsettings.patch"
1640 + eapply "${FILESDIR}/${P}-eddy_cuda.patch"
1641 + eapply "${FILESDIR}/${P}-cuda_buildsettings.patch"
1642
1643 sed -i \
1644 -e "s:@@GENTOO_NVCC_FLAGS@@:${cuda_NVCC_flags}:" \
1645 @@ -145,8 +153,14 @@ src_compile() {
1646 export FSLCONDIR=${WORKDIR}/${PN}/config
1647 export FSLMACHTYPE=generic
1648
1649 + # define the default build system to match upstream official standard
1650 + # -> individual projects may overwrite the '-std=' flag
1651 + export ANSI_CFLAGS="-std=c99"
1652 + export ANSI_CXXFLAGS="-std=c++98"
1653 +
1654 export USERLDFLAGS="${LDFLAGS}"
1655 export USERCFLAGS="${CFLAGS}"
1656 + export USERCPPFLAGS="${CPPFLAGS}"
1657 export USERCXXFLAGS="${CXXFLAGS}"
1658
1659 export CIFTICFLAGS="$($(tc-getPKG_CONFIG) --cflags CiftiLib)"