parent
f9699fd3ff
commit
4b41d56bc3
3 changed files with 110 additions and 1 deletions
107
var/spack/repos/builtin/packages/bart/bart_path-0.6.00.patch
Normal file
107
var/spack/repos/builtin/packages/bart/bart_path-0.6.00.patch
Normal file
|
@ -0,0 +1,107 @@
|
|||
diff -ru a/matlab/bart.m b/matlab/bart.m
|
||||
--- a/matlab/bart.m 2020-09-17 12:25:18.371980782 -0500
|
||||
+++ b/matlab/bart.m 2020-09-17 12:26:49.859905950 -0500
|
||||
@@ -28,7 +28,7 @@
|
||||
end
|
||||
|
||||
% Check bart toolbox path
|
||||
- bart_path = getenv('TOOLBOX_PATH');
|
||||
+ bart_path = [getenv('TOOLBOX_PATH') '/bin'];
|
||||
isWSL = false;
|
||||
if isempty(bart_path)
|
||||
if exist('/usr/local/bin/bart', 'file')
|
||||
diff -ru a/python/bart.py b/python/bart.py
|
||||
--- a/python/bart.py 2020-09-17 12:25:18.371980782 -0500
|
||||
+++ b/python/bart.py 2020-09-17 12:27:34.161869637 -0500
|
||||
@@ -19,7 +19,7 @@
|
||||
return None
|
||||
|
||||
try:
|
||||
- bart_path = os.environ['TOOLBOX_PATH'] + '/bart '
|
||||
+ bart_path = os.environ['TOOLBOX_PATH'] + '/bin '
|
||||
except:
|
||||
bart_path = None
|
||||
isWSL = False
|
||||
diff -ru a/scripts/espirit_econ.sh b/scripts/espirit_econ.sh
|
||||
--- a/scripts/espirit_econ.sh 2020-09-17 12:25:18.370980783 -0500
|
||||
+++ b/scripts/espirit_econ.sh 2020-09-17 12:29:14.464787254 -0500
|
||||
@@ -56,8 +56,6 @@
|
||||
fi
|
||||
|
||||
|
||||
-export PATH=$TOOLBOX_PATH:$PATH
|
||||
-
|
||||
input=$(readlink -f "$1")
|
||||
output=$(readlink -f "$2")
|
||||
|
||||
@@ -67,7 +65,7 @@
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-if [ ! -e $TOOLBOX_PATH/bart ] ; then
|
||||
+if [ ! -e $TOOLBOX_PATH/bin/bart ] ; then
|
||||
echo "\$TOOLBOX_PATH is not set correctly!" >&2
|
||||
exit 1
|
||||
fi
|
||||
diff -ru a/scripts/grasp.sh b/scripts/grasp.sh
|
||||
--- a/scripts/grasp.sh 2020-09-17 12:25:18.370980783 -0500
|
||||
+++ b/scripts/grasp.sh 2020-09-17 12:29:56.699752498 -0500
|
||||
@@ -90,8 +90,6 @@
|
||||
fi
|
||||
|
||||
|
||||
-export PATH=$TOOLBOX_PATH:$PATH
|
||||
-
|
||||
input=$(readlink -f "$1")
|
||||
output=$(readlink -f "$2")
|
||||
|
||||
@@ -101,7 +99,7 @@
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-if [ ! -e $TOOLBOX_PATH/bart ] ; then
|
||||
+if [ ! -e $TOOLBOX_PATH/bin/bart ] ; then
|
||||
echo "\$TOOLBOX_PATH is not set correctly!" >&2
|
||||
exit 1
|
||||
fi
|
||||
diff -ru a/scripts/octview.m b/scripts/octview.m
|
||||
--- a/scripts/octview.m 2020-09-17 12:25:18.370980783 -0500
|
||||
+++ b/scripts/octview.m 2020-09-17 12:30:45.414712364 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/octave -qf
|
||||
|
||||
-addpath(strcat(getenv("TOOLBOX_PATH"), "/matlab"));
|
||||
+addpath(strcat(getenv("TOOLBOX_PATH"), "/bin", "/matlab"));
|
||||
arg_list = argv();
|
||||
|
||||
|
||||
diff -ru a/scripts/profile.sh b/scripts/profile.sh
|
||||
--- a/scripts/profile.sh 2020-09-17 12:25:18.370980783 -0500
|
||||
+++ b/scripts/profile.sh 2020-09-17 12:31:53.517656180 -0500
|
||||
@@ -45,7 +45,7 @@
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-if [ ! -e $TOOLBOX_PATH/bart ] ; then
|
||||
+if [ ! -e $TOOLBOX_PATH/bin/bart ] ; then
|
||||
echo "\$TOOLBOX_PATH is not set correctly!" >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -57,7 +57,7 @@
|
||||
cd $WORKDIR
|
||||
|
||||
|
||||
-nm --defined-only $TOOLBOX_PATH/bart | cut -c11-16,19- | sort > bart.syms
|
||||
+nm --defined-only $TOOLBOX_PATH/bin/bart | cut -c11-16,19- | sort > bart.syms
|
||||
|
||||
|
||||
cat $in | grep "^TRACE" \
|
||||
diff -ru a/startup.m b/startup.m
|
||||
--- a/startup.m 2020-09-17 12:25:18.343980805 -0500
|
||||
+++ b/startup.m 2020-09-17 12:34:28.968538214 -0500
|
||||
@@ -1,4 +1,3 @@
|
||||
% set Matlab path and TOOLBOX_PATH environment variable
|
||||
-addpath(fullfile(pwd, 'matlab'));
|
||||
-setenv('TOOLBOX_PATH', pwd);
|
||||
+addpath(fullfile(getenv('TOOLBOX_PATH'), 'matlab'));
|
||||
|
|
@ -12,6 +12,7 @@ class Bart(MakefilePackage, CudaPackage):
|
|||
homepage = "https://mrirecon.github.io/bart/"
|
||||
url = "https://github.com/mrirecon/bart/archive/v0.5.00.tar.gz"
|
||||
|
||||
version('0.6.00', sha256='dbbd33d1e3ed3324fe21f90a3b62cb51765fe369f21df100b46a32004928f18d')
|
||||
version('0.5.00', sha256='30eedcda0f0ef3808157542e0d67df5be49ee41e4f41487af5c850632788f643')
|
||||
|
||||
# patch to fix build with MKL
|
||||
|
@ -23,7 +24,8 @@ class Bart(MakefilePackage, CudaPackage):
|
|||
patch('Makefile.patch')
|
||||
|
||||
# patch to set path to bart
|
||||
patch('bart_path.patch')
|
||||
patch('bart_path-0.5.00.patch', when='@0.5.00')
|
||||
patch('bart_path-0.6.00.patch', when='@0.6.00')
|
||||
|
||||
depends_on('libpng')
|
||||
depends_on('fftw')
|
||||
|
|
Loading…
Reference in a new issue