1 |
commit: c7f45b539af87c6ba4fe535181d5d4afa25baa66 |
2 |
Author: François Bissey <frp.bissey <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Oct 21 01:04:05 2018 +0000 |
4 |
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com> |
5 |
CommitDate: Sun Oct 21 14:29:38 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=c7f45b53 |
7 |
|
8 |
sci-biology/fsl: upstream bump |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
11 |
Signed-off-by: Horea Christian <horea.christ <AT> yandex.com> |
12 |
|
13 |
.../fsl-5.0.11-fslsurface_parallel_make.patch | 14 ++ |
14 |
.../fsl/files/fsl-5.0.11-ifstream_use.patch | 13 ++ |
15 |
.../fsl/files/fsl-5.0.11-niftiio_var_fix.patch | 24 ++++ |
16 |
sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch | 44 ++++++ |
17 |
.../fsl/files/fsl-5.0.11-qstring_compat.patch | 63 ++++++++ |
18 |
sci-biology/fsl/files/fsl-5.0.11-setup.patch | 158 +++++++++++++++++++++ |
19 |
sci-biology/fsl/fsl-5.0.11.ebuild | 157 ++++++++++++++++++++ |
20 |
7 files changed, 473 insertions(+) |
21 |
|
22 |
diff --git a/sci-biology/fsl/files/fsl-5.0.11-fslsurface_parallel_make.patch b/sci-biology/fsl/files/fsl-5.0.11-fslsurface_parallel_make.patch |
23 |
new file mode 100644 |
24 |
index 000000000..026543d4f |
25 |
--- /dev/null |
26 |
+++ b/sci-biology/fsl/files/fsl-5.0.11-fslsurface_parallel_make.patch |
27 |
@@ -0,0 +1,14 @@ |
28 |
+diff --git a/src/fslsurface/Makefile b/src/fslsurface/Makefile |
29 |
+index 37f459c..008f443 100644 |
30 |
+--- a/src/fslsurface/Makefile |
31 |
++++ b/src/fslsurface/Makefile |
32 |
+@@ -57,7 +57,7 @@ fslsurfacegl.a: fslsurfacegl.o fslsurface.a |
33 |
+ ${AR} -r libfslsurfacegl.a fslsurfacegl.o |
34 |
+ fslsurface_backcompat.a: fslsurface_first.o fslsurface_dataconv.o fslsurface.a |
35 |
+ ${AR} -r libfslsurface_backcompat.a fslsurface_first.o fslsurface_dataconv.o |
36 |
+-fslsurfacemaths: fslsurface.a fslsurfacemaths.o |
37 |
++fslsurfacemaths: fslsurface.a fslsurfacemaths.o fslsurfaceio.o fslsurfacefns.o fslsurface_first.o fslsurface.o |
38 |
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ fslsurfacemaths.o fslsurfaceio.o fslsurfacefns.o fslsurface_first.o fslsurface.o ${LIBS} ${FMLIBS} |
39 |
+-marching_cubes: fslsurface.a marching_cubes.o |
40 |
++marching_cubes: fslsurface.a marching_cubes.o fslsurfaceio.o fslsurfacefns.o |
41 |
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ marching_cubes.o fslsurfaceio.o fslsurfacefns.o ${LIBS} ${FMLIBS} |
42 |
|
43 |
diff --git a/sci-biology/fsl/files/fsl-5.0.11-ifstream_use.patch b/sci-biology/fsl/files/fsl-5.0.11-ifstream_use.patch |
44 |
new file mode 100644 |
45 |
index 000000000..c4ba003b7 |
46 |
--- /dev/null |
47 |
+++ b/sci-biology/fsl/files/fsl-5.0.11-ifstream_use.patch |
48 |
@@ -0,0 +1,13 @@ |
49 |
+diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc |
50 |
+index f310dc7..03fe8bb 100644 |
51 |
+--- a/src/melodic/meldata.cc |
52 |
++++ b/src/melodic/meldata.cc |
53 |
+@@ -1015,7 +1015,7 @@ namespace Melodic{ |
54 |
+ Resels = 1.0; |
55 |
+ |
56 |
+ in.open(logger.appendDir("smoothest").c_str(), ios::in); |
57 |
+- if(in>0){ |
58 |
++ if(in.is_open()){ |
59 |
+ for(int ctr=1; ctr<7; ctr++) |
60 |
+ in >> str; |
61 |
+ in.close(); |
62 |
|
63 |
diff --git a/sci-biology/fsl/files/fsl-5.0.11-niftiio_var_fix.patch b/sci-biology/fsl/files/fsl-5.0.11-niftiio_var_fix.patch |
64 |
new file mode 100644 |
65 |
index 000000000..f1a833b75 |
66 |
--- /dev/null |
67 |
+++ b/sci-biology/fsl/files/fsl-5.0.11-niftiio_var_fix.patch |
68 |
@@ -0,0 +1,24 @@ |
69 |
+diff --git a/src/fslio/dbh.h b/src/fslio/dbh.h |
70 |
+index eff0a50a..fbce1770 100644 |
71 |
+--- a/src/fslio/dbh.h |
72 |
++++ b/src/fslio/dbh.h |
73 |
+@@ -79,19 +79,6 @@ struct dsr /* dsr */ |
74 |
+ struct data_history hist; /* 148 + 200 */ |
75 |
+ }; /* total=348 */ |
76 |
+ |
77 |
+-/* Acceptable values for hdr.dime.datatype */ |
78 |
+- |
79 |
+-#define DT_NONE 0 |
80 |
+-#define DT_UNKNOWN 0 |
81 |
+-#define DT_BINARY 1 |
82 |
+-#define DT_UNSIGNED_CHAR 2 |
83 |
+-#define DT_SIGNED_SHORT 4 |
84 |
+-#define DT_SIGNED_INT 8 |
85 |
+-#define DT_FLOAT 16 |
86 |
+-#define DT_COMPLEX 32 |
87 |
+-#define DT_DOUBLE 64 |
88 |
+-#define DT_RGB 128 |
89 |
+-#define DT_ALL 255 |
90 |
+ |
91 |
+ typedef struct |
92 |
+ { |
93 |
|
94 |
diff --git a/sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch b/sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch |
95 |
new file mode 100644 |
96 |
index 000000000..bccf0e238 |
97 |
--- /dev/null |
98 |
+++ b/sci-biology/fsl/files/fsl-5.0.11-no_xmlpp.patch |
99 |
@@ -0,0 +1,44 @@ |
100 |
+diff --git a/src/flameo/Makefile b/src/flameo/Makefile |
101 |
+index 5389e2f..52785c3 100644 |
102 |
+--- a/src/flameo/Makefile |
103 |
++++ b/src/flameo/Makefile |
104 |
+@@ -2,7 +2,7 @@ include ${FSLCONFDIR}/default.mk |
105 |
+ |
106 |
+ PROJNAME = flame |
107 |
+ |
108 |
+-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 |
109 |
++USRINCFLAGS = -fPIC -I${INC_NEWMAT} -I${INC_PROB} -I${INC_ZLIB} -I${FSLEXTINC} ${CIFTICFLAGS} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio |
110 |
+ USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_ZLIB} |
111 |
+ |
112 |
+ UNAME := $(shell uname) |
113 |
+@@ -10,7 +10,7 @@ ifeq (${UNAME},Darwin) |
114 |
+ LIBS = -liconv |
115 |
+ endif |
116 |
+ |
117 |
+-LIBS += -lutils -lnewimage -lmiscmaths -lm -lnewmat -lfslio -lniftiio -lcifti -lxml++-2.6 -lxml2 -lboost_filesystem -lboost_system -lznz -lprob -lz |
118 |
++LIBS += -lutils -lnewimage -lmiscmaths -lm -lnewmat -lfslio -lniftiio ${CIFTILIBS} -lboost_filesystem -lboost_system -lznz -lprob -lz |
119 |
+ |
120 |
+ XFILES = flameo |
121 |
+ |
122 |
+diff --git a/src/melodic/Makefile b/src/melodic/Makefile |
123 |
+index 53b951a..803c39e 100644 |
124 |
+--- a/src/melodic/Makefile |
125 |
++++ b/src/melodic/Makefile |
126 |
+@@ -7,7 +7,7 @@ OPTFLAGS_alphaev6-dec-osf5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui |
127 |
+ |
128 |
+ PROJNAME = melodic |
129 |
+ |
130 |
+-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 |
131 |
++USRINCFLAGS = -fPIC -I${INC_NEWMAT} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_ZLIB} -I${FSLEXTINC} ${CIFTICFLAGS} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio |
132 |
+ USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_GD} -L${LIB_GDC} -L${LIB_PNG} -L${LIB_ZLIB} |
133 |
+ |
134 |
+ UNAME := $(shell uname) |
135 |
+@@ -15,7 +15,7 @@ ifeq (${UNAME},Darwin) |
136 |
+ LIBS = -liconv |
137 |
+ endif |
138 |
+ |
139 |
+-LIBS += -lutils -lnewimage -lmiscplot -lmiscpic -lmiscmaths -lfslio -lniftiio -lcifti -lxml++-2.6 -lxml2 -lboost_filesystem -lboost_system -lznz -lnewmat -lprob -lm -lgdc -lgd -lpng -lz |
140 |
++LIBS += -lutils -lnewimage -lmiscplot -lmiscpic -lmiscmaths -lfslio -lniftiio ${CIFTILIBS} -lboost_filesystem -lboost_system -lznz -lnewmat -lprob -lm -lgdc -lgd -lpng -lz |
141 |
+ |
142 |
+ TEST_OBJS = test.o |
143 |
+ |
144 |
|
145 |
diff --git a/sci-biology/fsl/files/fsl-5.0.11-qstring_compat.patch b/sci-biology/fsl/files/fsl-5.0.11-qstring_compat.patch |
146 |
new file mode 100644 |
147 |
index 000000000..78aa020c6 |
148 |
--- /dev/null |
149 |
+++ b/sci-biology/fsl/files/fsl-5.0.11-qstring_compat.patch |
150 |
@@ -0,0 +1,63 @@ |
151 |
+From bbd60f634cdcdfbbb3eb8f3b6d00f366d9f34bf9 Mon Sep 17 00:00:00 2001 |
152 |
+From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@×××××.com> |
153 |
+Date: Thu, 18 Oct 2018 11:21:05 +1300 |
154 |
+Subject: [PATCH] Basic compatibility between for AString built with either |
155 |
+ glib ustring or QString |
156 |
+ |
157 |
+--- |
158 |
+ src/flameo/gsa.cc | 4 ++-- |
159 |
+ src/melodic/meldata.cc | 2 +- |
160 |
+ src/melodic/meldata.h | 2 +- |
161 |
+ 3 files changed, 4 insertions(+), 4 deletions(-) |
162 |
+ |
163 |
+diff --git a/src/flameo/gsa.cc b/src/flameo/gsa.cc |
164 |
+index 6a477f9..0860d46 100644 |
165 |
+--- a/src/flameo/gsa.cc |
166 |
++++ b/src/flameo/gsa.cc |
167 |
+@@ -74,7 +74,7 @@ namespace GSA { |
168 |
+ sourceType=mode; |
169 |
+ if ( sourceType.compare("CIFTI") == 0 ) { |
170 |
+ cifti::CiftiFile inputCifti; |
171 |
+- inputCifti.openFile(fslbasename(filename)+".nii"); |
172 |
++ inputCifti.openFile((fslbasename(filename)+".nii").c_str()); |
173 |
+ ciftiExemplar=inputCifti.getCiftiXML(); |
174 |
+ cerr << "ndim " << ciftiExemplar.getNumberOfDimensions() << endl; |
175 |
+ cerr << "type1 " << ciftiExemplar.getMappingType(0) << endl; |
176 |
+@@ -194,7 +194,7 @@ namespace GSA { |
177 |
+ scalarsMap.setLength(data.Nrows()); |
178 |
+ ciftiExemplar.setMap(0, scalarsMap); |
179 |
+ CiftiFile outputFile; |
180 |
+- outputFile.setWritingFile(fslbasename(filename)+extension+".nii");//sets up on-disk writing with default writing version |
181 |
++ outputFile.setWritingFile((fslbasename(filename)+extension+".nii").c_str());//sets up on-disk writing with default writing version |
182 |
+ outputFile.setCiftiXML(ciftiExemplar,false); |
183 |
+ vector<float> scratchRow(data.Nrows());//read/write a row at a time |
184 |
+ for (int64_t row=0;row<data.Ncols();row++) { |
185 |
+diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc |
186 |
+index f310dc7..5e9bc18 100644 |
187 |
+--- a/src/melodic/meldata.cc |
188 |
++++ b/src/melodic/meldata.cc |
189 |
+@@ -118,7 +118,7 @@ namespace Melodic{ |
190 |
+ tmpData = RawData.matrix(Mask); |
191 |
+ memmsg(" after reshape "); |
192 |
+ } else { //Read in Cifti |
193 |
+- inputCifti.openFile(fname+".nii"); |
194 |
++ inputCifti.openFile((fname+".nii").c_str()); |
195 |
+ const vector<int64_t>& dims = inputCifti.getDimensions(); |
196 |
+ tmpData.ReSize(dims[0],dims[1]); //swapped compared to cifti |
197 |
+ vector<float> scratchRow(dims[0]);//read/write a row at a time |
198 |
+diff --git a/src/melodic/meldata.h b/src/melodic/meldata.h |
199 |
+index 1e1adfc..d898152 100644 |
200 |
+--- a/src/melodic/meldata.h |
201 |
++++ b/src/melodic/meldata.h |
202 |
+@@ -109,7 +109,7 @@ namespace Melodic{ |
203 |
+ message(" " << logger.appendDir(fname) << endl); |
204 |
+ } else { //Process CIFTI save ICs as float |
205 |
+ cifti::CiftiFile outputFile; |
206 |
+- outputFile.setWritingFile(logger.appendDir(fname)+".nii");//sets up on-disk writing with default writing version |
207 |
++ outputFile.setWritingFile((logger.appendDir(fname)+".nii").c_str());//sets up on-disk writing with default writing version |
208 |
+ cifti::CiftiXML xml(inputCifti.getCiftiXML()); |
209 |
+ cifti::CiftiScalarsMap scalarsMap; |
210 |
+ std::vector<char> foo = xml.writeXMLToVector(); |
211 |
+-- |
212 |
+2.18.1 |
213 |
+ |
214 |
|
215 |
diff --git a/sci-biology/fsl/files/fsl-5.0.11-setup.patch b/sci-biology/fsl/files/fsl-5.0.11-setup.patch |
216 |
new file mode 100644 |
217 |
index 000000000..cf9cb785d |
218 |
--- /dev/null |
219 |
+++ b/sci-biology/fsl/files/fsl-5.0.11-setup.patch |
220 |
@@ -0,0 +1,158 @@ |
221 |
+diff --git a/build b/build |
222 |
+index 6827443..19b2002 100755 |
223 |
+--- a/build |
224 |
++++ b/build |
225 |
+@@ -3,7 +3,7 @@ |
226 |
+ if [ $# -ge 1 ] ; then |
227 |
+ PROJECTS="$@"; |
228 |
+ else |
229 |
+- MASTERPROJECTS="CiftiLib-master utils znzlib NewNifti niftiio fslio giftiio miscmaths newimage libhfunc libvis first_lib \ |
230 |
++ MASTERPROJECTS="utils znzlib NewNifti niftiio fslio giftiio miscmaths newimage libhfunc libvis first_lib \ |
231 |
+ meshclass fslvtkio misc_tcl basisfield warpfns bint shapeModel MVdisc fslvtkconv fslsurface libmeshutils newmesh \ |
232 |
+ DiscreteOpt FastPDlib MSMRegLib \ |
233 |
+ misc_c avwutils basil bet2 cluster dpm copain tissue fast4 feat5 film filmbabe flirt fabber baycest \ |
234 |
+@@ -25,8 +25,8 @@ flameo oxford_asl relax qboot topup ptx2 lesions eddy dwssfp verbena MSM bianca |
235 |
+ done |
236 |
+ fi |
237 |
+ |
238 |
+-echo "Building projects - see build.log file for progress..." |
239 |
+-./config/common/buildproj $PROJECTS > ./build.log 2>&1 |
240 |
++echo "Building projects" |
241 |
++./config/common/buildproj $PROJECTS |
242 |
+ finalStatus=$? |
243 |
+ if [ $finalStatus -eq 0 ]; then |
244 |
+ echo "Build completed successfully."; |
245 |
+diff --git a/config/common/buildproj b/config/common/buildproj |
246 |
+index 3450bda..ec3edc1 100755 |
247 |
+--- a/config/common/buildproj |
248 |
++++ b/config/common/buildproj |
249 |
+@@ -11,10 +11,10 @@ if [ X$1 = X-strict ] ; then |
250 |
+ fi |
251 |
+ PROJECTS="$@" ; export PROJECTS ; |
252 |
+ |
253 |
+-FSLDIR=`pwd` |
254 |
++#FSLDIR=`pwd` |
255 |
+ FSLDEVDIR=${FSLDIR} |
256 |
+ FSLCONFDIR=${FSLDIR}/config |
257 |
+-FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh` |
258 |
++#FSLMACHTYPE=`${FSLDIR}/etc/fslconf/fslmachtype.sh` |
259 |
+ export FSLDIR FSLDEVDIR FSLCONFDIR FSLMACHTYPE |
260 |
+ |
261 |
+ buildmessages="" ; export buildmessages ; |
262 |
+@@ -66,7 +66,7 @@ for projname in $PROJECTS; do |
263 |
+ if [ -x ./fslconfig ] ; then |
264 |
+ . ./fslconfig ; |
265 |
+ fi |
266 |
+- if ${MAKE} -k ${MAKEOPTIONS} ; then |
267 |
++ if ${MAKE} ${MAKEOPTIONS} ${MAKEOPTS} ; then |
268 |
+ if ${MAKE} ${MAKEOPTIONS} install ; then |
269 |
+ installok=true; |
270 |
+ # Clean up after ourselves |
271 |
+@@ -81,6 +81,7 @@ for projname in $PROJECTS; do |
272 |
+ if [ $installok = false ] ; then |
273 |
+ echo " " |
274 |
+ echo "ERROR::Could not install $projname successfully" ; |
275 |
++ exit 1 |
276 |
+ fi |
277 |
+ else |
278 |
+ echo " " |
279 |
+@@ -89,6 +90,7 @@ for projname in $PROJECTS; do |
280 |
+ echo " " |
281 |
+ echo " " |
282 |
+ errorprojs="$errorprojs $projname" ; export errorprojs ; |
283 |
++ exit 1 |
284 |
+ fi |
285 |
+ fi |
286 |
+ done |
287 |
+diff --git a/config/common/vars.mk b/config/common/vars.mk |
288 |
+index 53754be..ff7a117 100755 |
289 |
+--- a/config/common/vars.mk |
290 |
++++ b/config/common/vars.mk |
291 |
+@@ -24,15 +24,15 @@ USRINCFLAGS = |
292 |
+ USRCFLAGS = |
293 |
+ USRCXXFLAGS = |
294 |
+ |
295 |
+-LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR} |
296 |
++LDFLAGS = ${ARCHLDFLAGS} ${USRLDFLAGS} -L. -L${DEVLIBDIR} -L${LIBDIR} ${USERLDFLAGS} |
297 |
+ |
298 |
+-AccumulatedIncFlags = -I${INC_BOOST} ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} |
299 |
++AccumulatedIncFlags = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR} ${CPPFLAGS} |
300 |
+ |
301 |
+ CFLAGS = ${ANSI_FLAGS} ${ANSI_CFLAGS} ${DBGFLAGS} ${USEDCSTATICFLAGS} ${USRCFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ |
302 |
+- ${AccumulatedIncFlags} |
303 |
++ ${AccumulatedIncFlags} ${USERCFLAGS} |
304 |
+ |
305 |
+-CXXFLAGS = ${ANSI_FLAGS} ${ANSI_CXXFLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ |
306 |
+- ${AccumulatedIncFlags} |
307 |
++CXXFLAGS = ${ANSI_CXXFLAGS} ${DBGFLAGS} ${USEDCXXSTATICFLAGS} ${USRCXXFLAGS} ${ARCHFLAGS} ${OPTFLAGS} \ |
308 |
++ ${AccumulatedIncFlags} ${USERCXXFLAGS} |
309 |
+ |
310 |
+ HFILES = *.h |
311 |
+ AFILES = *.a |
312 |
+diff --git a/config/generic/systemvars.mk b/config/generic/systemvars.mk |
313 |
+index e40e3d6..ddb5bfe 100755 |
314 |
+--- a/config/generic/systemvars.mk |
315 |
++++ b/config/generic/systemvars.mk |
316 |
+@@ -4,20 +4,20 @@ SHELL = /bin/sh |
317 |
+ |
318 |
+ # System dependent commands (NB: the first two are the most platform dependent) |
319 |
+ |
320 |
+-INSTALL = ginstall -p |
321 |
+-RANLIB = ranlib |
322 |
++INSTALL = install -p |
323 |
++RANLIB = @@GENTOO_RANLIB@@ |
324 |
+ |
325 |
+ RM = /bin/rm |
326 |
+ CP = /bin/cp |
327 |
+ MV = /bin/mv |
328 |
+ CHMOD = /bin/chmod |
329 |
+ MKDIR = /bin/mkdir |
330 |
+-TCLSH = ${FSLDIR}/bin/fsltclsh |
331 |
++TCLSH = tclsh |
332 |
+ |
333 |
+ # Compiler dependent variables |
334 |
+ |
335 |
+-CC = gcc |
336 |
+-CXX = c++ |
337 |
++CC = @@GENTOO_CC@@ |
338 |
++CXX = @@GENTOO_CXX@@ |
339 |
+ CSTATICFLAGS = -static |
340 |
+ CXXSTATICFLAGS = -static |
341 |
+ |
342 |
+@@ -25,7 +25,7 @@ ARCHFLAGS = |
343 |
+ |
344 |
+ DEPENDFLAGS = -MM |
345 |
+ |
346 |
+-OPTFLAGS = -O3 -fexpensive-optimizations ${ARCHFLAGS} |
347 |
++OPTFLAGS = |
348 |
+ MACHDBGFLAGS = |
349 |
+ GNU_ANSI_FLAGS = -Wall -ansi -pedantic |
350 |
+ SGI_ANSI_FLAGS = -ansi -fullwarn |
351 |
+diff --git a/extras/build b/extras/build |
352 |
+index 6133a1b..caeae2d 100755 |
353 |
+--- a/extras/build |
354 |
++++ b/extras/build |
355 |
+@@ -104,8 +104,8 @@ PROJECTS="${PROJECTS} libpng" |
356 |
+ if [ ${BUILDICONV} -eq 1 ]; then |
357 |
+ PROJECTS="${PROJECTS} libiconv" |
358 |
+ fi |
359 |
+-PROJECTS="${PROJECTS} libgd libgdc libprob libcprob newmat cprob newran fftw" |
360 |
+-PROJECTS="${PROJECTS} boost libxml2-2.9.2 libxml++-2.34.0 libsqlite libnlopt ../include/armawrap/dummy_newmat" |
361 |
++PROJECTS="libgdc libprob libcprob newmat cprob newran" |
362 |
++PROJECTS="${PROJECTS} ../include/armawrap/dummy_newmat" |
363 |
+ for projname in $PROJECTS; do |
364 |
+ if [ -d $FSLESRCDIR/$projname ] ; then |
365 |
+ buildIt $FSLESRCDIR $projname 1 |
366 |
+diff --git a/src/mist-clean/Makefile b/src/mist-clean/Makefile |
367 |
+index b3a32fc..e949ba1 100755 |
368 |
+--- a/src/mist-clean/Makefile |
369 |
++++ b/src/mist-clean/Makefile |
370 |
+@@ -52,7 +52,7 @@ installpython: |
371 |
+ cp -r python/* ${DESTDIR}/python/mist |
372 |
+ |
373 |
+ clean: |
374 |
+- rm ${OBJS} mist/mist.o mist/mist |
375 |
++ rm -f ${OBJS} mist/mist.o mist/mist || echo "CLEAN could not locate some files scheduled for deletion." |
376 |
+ |
377 |
+ .PHONY: all clean installdata |
378 |
+ |
379 |
|
380 |
diff --git a/sci-biology/fsl/fsl-5.0.11.ebuild b/sci-biology/fsl/fsl-5.0.11.ebuild |
381 |
new file mode 100644 |
382 |
index 000000000..d3985072d |
383 |
--- /dev/null |
384 |
+++ b/sci-biology/fsl/fsl-5.0.11.ebuild |
385 |
@@ -0,0 +1,157 @@ |
386 |
+# Copyright 1999-2018 Gentoo Authors |
387 |
+# Distributed under the terms of the GNU General Public License v2 |
388 |
+ |
389 |
+EAPI=6 |
390 |
+ |
391 |
+inherit flag-o-matic toolchain-funcs prefix |
392 |
+ |
393 |
+DESCRIPTION="Analysis of functional, structural, and diffusion MRI brain imaging data" |
394 |
+HOMEPAGE="http://www.fmrib.ox.ac.uk/fsl" |
395 |
+SRC_URI="https://fsl.fmrib.ox.ac.uk/fsldownloads/${P}-sources.tar.gz -> ${P}.tar.gz" |
396 |
+ |
397 |
+LICENSE="FSL BSD-2 newmat" |
398 |
+SLOT="0" |
399 |
+KEYWORDS="~amd64" |
400 |
+IUSE="" |
401 |
+ |
402 |
+COMMON_DEPEND=" |
403 |
+ dev-libs/boost |
404 |
+ media-gfx/graphviz |
405 |
+ media-libs/gd |
406 |
+ media-libs/glu |
407 |
+ media-libs/libpng:0= |
408 |
+ sci-libs/ciftilib |
409 |
+ sci-libs/nlopt |
410 |
+ sys-libs/zlib |
411 |
+ " |
412 |
+DEPEND="${COMMON_DEPEND}" |
413 |
+RDEPEND="${COMMON_DEPEND} |
414 |
+ dev-lang/tcl:0= |
415 |
+ dev-lang/tk:0= |
416 |
+ " |
417 |
+ |
418 |
+S=${WORKDIR}/${PN} |
419 |
+UPSTREAM_FSLDIR="/usr/share/fsl" |
420 |
+ |
421 |
+PATCHES=( |
422 |
+ "${FILESDIR}/${PN}"-5.0.11-setup.patch |
423 |
+ "${FILESDIR}/${PN}"-5.0.11-no_xmlpp.patch |
424 |
+ "${FILESDIR}/${PN}"-5.0.11-niftiio_var_fix.patch |
425 |
+ "${FILESDIR}/${PN}"-5.0.11-ifstream_use.patch |
426 |
+ "${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch |
427 |
+ "${FILESDIR}/${PN}"-5.0.11-qstring_compat.patch |
428 |
+ "${FILESDIR}/${PN}"-5.0.9-headers.patch |
429 |
+ "${FILESDIR}/${PN}"-5.0.9-fsldir_redux.patch |
430 |
+) |
431 |
+ |
432 |
+src_prepare(){ |
433 |
+ default |
434 |
+ |
435 |
+ sed -i \ |
436 |
+ -e "s:@@GENTOO_RANLIB@@:$(tc-getRANLIB):" \ |
437 |
+ -e "s:@@GENTOO_CC@@:$(tc-getCC):" \ |
438 |
+ -e "s:@@GENTOO_CXX@@:$(tc-getCXX):" \ |
439 |
+ config/generic/systemvars.mk || die |
440 |
+ |
441 |
+ eprefixify $(grep -rl GENTOO_PORTAGE_EPREFIX src/*) \ |
442 |
+ etc/js/label-div.html |
443 |
+ |
444 |
+ makefilelist=$(find src/ -name Makefile) |
445 |
+ |
446 |
+ sed -i \ |
447 |
+ -e "s:-I\${INC_BOOST}::" \ |
448 |
+ -e "s:-I\${INC_ZLIB}::" \ |
449 |
+ -e "s:-I\${INC_GD}::" \ |
450 |
+ -e "s:-I\${INC_PNG}::" \ |
451 |
+ -e "s:-L\${LIB_GD}::" \ |
452 |
+ -e "s:-L\${LIB_PNG}::" \ |
453 |
+ -e "s:-L\${LIB_ZLIB}::" \ |
454 |
+ ${makefilelist} || die |
455 |
+ |
456 |
+ sed -e "s:\${FSLDIR}/bin/::g" \ |
457 |
+ -e "s:\$FSLDIR/bin/::g" \ |
458 |
+ -i $(grep -rl "\${FSLDIR}/bin" src/*) \ |
459 |
+ $(grep -rl "\${FSLDIR}/bin" etc/matlab/*) || die |
460 |
+ |
461 |
+ sed -e "s:\$FSLDIR/data:${EPREFIX}/usr/share/fsl/data:g" \ |
462 |
+ -e "s:\${FSLDIR}/data:${EPREFIX}/usr/share/fsl/data:g" \ |
463 |
+ -i $(grep -rl "\$FSLDIR/data" src/*) \ |
464 |
+ $(grep -rl "\${FSLDIR}/data" src/*) || die |
465 |
+ |
466 |
+ sed -e "s:\$FSLDIR/doc:${EPREFIX}/usr/share/fsl/doc:g" \ |
467 |
+ -e "s:\${FSLDIR}/doc:${EPREFIX}/usr/share/fsl/doc:g" \ |
468 |
+ -i $(grep -rl "\$FSLDIR/doc" src/*) \ |
469 |
+ $(grep -rl "\${FSLDIR}/doc" src/*) || die |
470 |
+ |
471 |
+ sed -e "s:/usr/share/fsl/doc:${EPREFIX}/usr/share/fsl/doc:g" \ |
472 |
+ -i $(grep -rl "/usr/share/fsl/doc" src/*) || die |
473 |
+ |
474 |
+ sed -e "s:\$FSLDIR/etc:${EPREFIX}/etc:g" \ |
475 |
+ -e "s:\${FSLDIR}/etc:${EPREFIX}/etc:g" \ |
476 |
+ -i $(grep -rlI "\$FSLDIR/etc" *) \ |
477 |
+ -i $(grep -rlI "\${FSLDIR}/etc" *) || die |
478 |
+ |
479 |
+ # script wanting to have access to flsversion at buildtime |
480 |
+ sed -e "s:/etc/fslversion:${S}/etc/fslversion:g" \ |
481 |
+ -i ${makefilelist} || die |
482 |
+} |
483 |
+ |
484 |
+src_compile() { |
485 |
+ export FSLDIR=${WORKDIR}/${PN} |
486 |
+ export FSLCONDIR=${WORKDIR}/${PN}/config |
487 |
+ export FSLMACHTYPE=generic |
488 |
+ |
489 |
+ export USERLDFLAGS="${LDFLAGS}" |
490 |
+ export USERCFLAGS="${CFLAGS}" |
491 |
+ export USERCXXFLAGS="${CXXFLAGS}" |
492 |
+ |
493 |
+ export CIFTICFLAGS="$($(tc-getPKG_CONFIG) --cflags CiftiLib)" |
494 |
+ export CIFTILIBS="$($(tc-getPKG_CONFIG) --libs-only-l CiftiLib)" |
495 |
+ |
496 |
+ ./build || die |
497 |
+} |
498 |
+ |
499 |
+src_install() { |
500 |
+ sed -i "s:\${FSLDIR}/tcl:/usr/libexec/fsl:g" \ |
501 |
+ $(grep -lI "\${FSLDIR}/tcl" bin/*) \ |
502 |
+ $(grep -l "\${FSLDIR}/tcl" tcl/*) || die |
503 |
+ sed -i "s:\$FSLDIR/tcl:/usr/libexec/fsl:g" \ |
504 |
+ $(grep -l "\$FSLDIR/tcl" tcl/*) || die |
505 |
+ |
506 |
+ dobin bin/* |
507 |
+ |
508 |
+ insinto /usr/share/${PN} |
509 |
+ doins -r data |
510 |
+ dodoc -r doc/. refdoc |
511 |
+ |
512 |
+ insinto /usr/libexec/fsl |
513 |
+ doins -r tcl/* |
514 |
+ |
515 |
+ insinto /etc/fslconf |
516 |
+ doins etc/fslconf/fsl.sh |
517 |
+ |
518 |
+ insinto /etc |
519 |
+ doins etc/fslversion |
520 |
+ doins -r etc/default_flobs.flobs etc/flirtsch etc/js etc/luts |
521 |
+ #if use matlab; then |
522 |
+ # doins etc/matlab |
523 |
+ #fi |
524 |
+ |
525 |
+ #the following is needed for FSL and depending programs to be able |
526 |
+ #to find its files, since FSL uses an uncommon installation path: |
527 |
+ #https://github.com/gentoo-science/sci/pull/612#r60289295 |
528 |
+ dosym ../../../etc ${UPSTREAM_FSLDIR}/etc |
529 |
+ dosym ../doc/${PF} ${UPSTREAM_FSLDIR}/doc |
530 |
+ dosym ../../bin ${UPSTREAM_FSLDIR}/bin |
531 |
+ |
532 |
+ doenvd "$(prefixify_ro "${FILESDIR}"/99fsl)" |
533 |
+ mv "${ED}"/usr/bin/{,fsl_}cluster || die |
534 |
+} |
535 |
+ |
536 |
+pkg_postinst() { |
537 |
+ echo |
538 |
+ einfo "Please run the following commands if you" |
539 |
+ einfo "intend to use fsl from an existing shell:" |
540 |
+ einfo "env-update && source /etc/profile" |
541 |
+ echo |
542 |
+} |