sci-biology/fsl: patch porting to deal with cifti
Package-Manager: Portage-2.3.76, Repoman-2.3.16
This commit is contained in:
parent
304ee84ff0
commit
6dfe74edc7
@ -1,3 +1,8 @@
|
||||
07 Nov 2019; François Bissey <frp.bissey@gmail.com>
|
||||
+files/fsl-6.0.2-no_xmlpp.patch, +files/fsl-6.0.2-qstring_compat.patch,
|
||||
fsl-6.0.2.ebuild:
|
||||
sci-biology/fsl: patch porting to deal with cifti
|
||||
|
||||
07 Nov 2019; François Bissey <frp.bissey@gmail.com> fsl-6.0.2.ebuild:
|
||||
sci-biology/fsl: tcl/tk is needed at build time
|
||||
|
||||
|
44
sci-biology/fsl/files/fsl-6.0.2-no_xmlpp.patch
Normal file
44
sci-biology/fsl/files/fsl-6.0.2-no_xmlpp.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff --git a/src/flameo/Makefile b/src/flameo/Makefile
|
||||
index d22eb965..e967e682 100644
|
||||
--- a/src/flameo/Makefile
|
||||
+++ b/src/flameo/Makefile
|
||||
@@ -2,7 +2,7 @@ include ${FSLCONFDIR}/default.mk
|
||||
|
||||
PROJNAME = flame
|
||||
|
||||
-USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} -I${INC_ZLIB} -DCIFTILIB_USE_XMLPP -I${FSLEXTINC} -I${INC_XML2} -I${INC_XML++} -I${INC_XML++CONF} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio
|
||||
+USRINCFLAGS = -fPIC -I${INC_NEWMAT} -I${INC_PROB} -I${INC_ZLIB} -I${FSLEXTINC} ${CIFTICFLAGS} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio
|
||||
USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_ZLIB}
|
||||
|
||||
UNAME := $(shell uname)
|
||||
@@ -10,7 +10,7 @@ ifeq (${UNAME},Darwin)
|
||||
LIBS = -liconv
|
||||
endif
|
||||
|
||||
-LIBS += -lutils -lnewimage -lmiscmaths -lm -lnewmat -lNewNifti -lcifti -lxml++-2.6 -lxml2 -lboost_filesystem -lboost_system -lznz -lprob -lz
|
||||
+LIBS += -lutils -lnewimage -lmiscmaths -lm -lnewmat -lNewNifti ${CIFTILIBS} -lboost_filesystem -lboost_system -lznz -lprob -lz
|
||||
|
||||
XFILES = flameo
|
||||
|
||||
diff --git a/src/melodic/Makefile b/src/melodic/Makefile
|
||||
index 50666517..0c356a2d 100644
|
||||
--- a/src/melodic/Makefile
|
||||
+++ b/src/melodic/Makefile
|
||||
@@ -7,7 +7,7 @@ OPTFLAGS_alphaev6-dec-osf5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui
|
||||
|
||||
PROJNAME = melodic
|
||||
|
||||
-USRINCFLAGS = -I${INC_NEWMAT} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_ZLIB} -DCIFTILIB_USE_XMLPP -I${FSLEXTINC} -I${INC_XML2} -I${INC_XML++} -I${INC_XML++CONF} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio
|
||||
+USRINCFLAGS = -fPIC -I${INC_NEWMAT} -I${INC_PROB} -I${INC_GD} -I${INC_GDC} -I${INC_PNG} -I${INC_ZLIB} -I${FSLEXTINC} ${CIFTICFLAGS} -I${INC_BOOST} -I${FSLDIR}/include/ciftiio
|
||||
USRLDFLAGS = -L${LIB_NEWMAT} -L${LIB_PROB} -L${LIB_GD} -L${LIB_GDC} -L${LIB_PNG} -L${LIB_ZLIB}
|
||||
|
||||
UNAME := $(shell uname)
|
||||
@@ -15,7 +15,7 @@ ifeq (${UNAME},Darwin)
|
||||
LIBS = -liconv
|
||||
endif
|
||||
|
||||
-LIBS += -lutils -lnewimage -lmiscplot -lmiscpic -lmiscmaths -lNewNifti -lcifti -lxml++-2.6 -lxml2 -lboost_filesystem -lboost_system -lznz -lnewmat -lprob -lm -lgdc -lgd -lpng -lz
|
||||
+LIBS += -lutils -lnewimage -lmiscplot -lmiscpic -lmiscmaths -lNewNifti ${CIFTILIBS} -lboost_filesystem -lboost_system -lznz -lnewmat -lprob -lm -lgdc -lgd -lpng -lz
|
||||
|
||||
TEST_OBJS = test.o
|
||||
|
48
sci-biology/fsl/files/fsl-6.0.2-qstring_compat.patch
Normal file
48
sci-biology/fsl/files/fsl-6.0.2-qstring_compat.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/src/flameo/gsa.cc b/src/flameo/gsa.cc
|
||||
index 70f8f385..16167abe 100644
|
||||
--- a/src/flameo/gsa.cc
|
||||
+++ b/src/flameo/gsa.cc
|
||||
@@ -74,7 +74,7 @@ namespace GSA {
|
||||
sourceType=mode;
|
||||
if ( sourceType.compare("CIFTI") == 0 ) {
|
||||
cifti::CiftiFile inputCifti;
|
||||
- inputCifti.openFile(make_basename(filename)+".nii");
|
||||
+ inputCifti.openFile((make_basename(filename)+".nii").c_str());
|
||||
ciftiExemplar=inputCifti.getCiftiXML();
|
||||
cerr << "ndim " << ciftiExemplar.getNumberOfDimensions() << endl;
|
||||
cerr << "type1 " << ciftiExemplar.getMappingType(0) << endl;
|
||||
@@ -194,7 +194,7 @@ namespace GSA {
|
||||
scalarsMap.setLength(data.Nrows());
|
||||
ciftiExemplar.setMap(0, scalarsMap);
|
||||
CiftiFile outputFile;
|
||||
- outputFile.setWritingFile(make_basename(filename)+extension+".nii");//sets up on-disk writing with default writing version
|
||||
+ outputFile.setWritingFile((make_basename(filename)+extension+".nii").c_str());//sets up on-disk writing with default writing version
|
||||
outputFile.setCiftiXML(ciftiExemplar,false);
|
||||
vector<float> scratchRow(data.Nrows());//read/write a row at a time
|
||||
for (int64_t row=0;row<data.Ncols();row++) {
|
||||
diff --git a/src/melodic/meldata.cc b/src/melodic/meldata.cc
|
||||
index 1749a459..b76f052d 100644
|
||||
--- a/src/melodic/meldata.cc
|
||||
+++ b/src/melodic/meldata.cc
|
||||
@@ -118,7 +118,7 @@ namespace Melodic{
|
||||
tmpData = RawData.matrix(Mask);
|
||||
memmsg(" after reshape ");
|
||||
} else { //Read in Cifti
|
||||
- inputCifti.openFile(fname+".nii");
|
||||
+ inputCifti.openFile((fname+".nii").c_str());
|
||||
const vector<int64_t>& dims = inputCifti.getDimensions();
|
||||
tmpData.ReSize(dims[0],dims[1]); //swapped compared to cifti
|
||||
vector<float> scratchRow(dims[0]);//read/write a row at a time
|
||||
diff --git a/src/melodic/meldata.h b/src/melodic/meldata.h
|
||||
index 49774003..f5326bdd 100644
|
||||
--- a/src/melodic/meldata.h
|
||||
+++ b/src/melodic/meldata.h
|
||||
@@ -109,7 +109,7 @@ namespace Melodic{
|
||||
message(" " << logger.appendDir(fname) << endl);
|
||||
} else { //Process CIFTI save ICs as float
|
||||
cifti::CiftiFile outputFile;
|
||||
- outputFile.setWritingFile(logger.appendDir(fname)+".nii");//sets up on-disk writing with default writing version
|
||||
+ outputFile.setWritingFile((logger.appendDir(fname)+".nii").c_str());//sets up on-disk writing with default writing version
|
||||
cifti::CiftiXML xml(inputCifti.getCiftiXML());
|
||||
cifti::CiftiScalarsMap scalarsMap;
|
||||
std::vector<char> foo = xml.writeXMLToVector();
|
@ -33,11 +33,11 @@ UPSTREAM_FSLDIR="/usr/share/fsl"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}"-6.0.2-setup.patch
|
||||
#"${FILESDIR}/${PN}"-5.0.11-no_xmlpp.patch
|
||||
"${FILESDIR}/${PN}"-6.0.2-no_xmlpp.patch
|
||||
"${FILESDIR}/${PN}"-5.0.11-niftiio_var_fix.patch
|
||||
"${FILESDIR}/${PN}"-5.0.11-ifstream_use.patch
|
||||
"${FILESDIR}/${PN}"-5.0.11-fslsurface_parallel_make.patch
|
||||
#"${FILESDIR}/${PN}"-5.0.11-qstring_compat.patch
|
||||
"${FILESDIR}/${PN}"-6.0.2-qstring_compat.patch
|
||||
"${FILESDIR}/${PN}"-5.0.9-headers.patch
|
||||
#"${FILESDIR}/${PN}"-5.0.9-fsldir_redux.patch
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user