[med-svn] [SCM] mricron branch, master, updated. upstream/0.20101102.1_dfsg.1-43-g824ac1d
Michael Hanke
michael.hanke at gmail.com
Thu Mar 17 11:48:07 UTC 2011
The following commit has been merged in the master branch:
commit b90371e9240b9efd0c2ba8b1faf896b9a4de2567
Author: Michael Hanke <michael.hanke at gmail.com>
Date: Wed Feb 2 16:23:04 2011 -0500
Make mricron work with Debian's FSL.
diff --git a/debian/mricron.install b/debian/mricron.install
index ee3a9b3..3e8c301 100644
--- a/debian/mricron.install
+++ b/debian/mricron.install
@@ -1,4 +1,5 @@
-mricron usr/bin
+mricron usr/lib/mricron
+debian/wrapper/mricron usr/bin
dcm2nii/dcm2niigui usr/bin
dcm2nii/dcm2nii usr/bin
npm/npm usr/bin
diff --git a/debian/patches/debian_fslbet b/debian/patches/debian_fslbet
new file mode 100644
index 0000000..3527fee
--- /dev/null
+++ b/debian/patches/debian_fslbet
@@ -0,0 +1,52 @@
+Description: Make mricron works with Debian's FSL
+Forwarded: not-needed
+Author: Michael Hanke <michael.hanke at gmail.com>
+--- a/bet.pas
++++ b/bet.pas
+@@ -63,8 +63,11 @@
+ AStringList := TStringList.Create;
+ AProcess.CommandLine := lCmd;
+ {$IFDEF UNIX}
+- AProcess.Environment.Add(gBGImg.FSLDIR);
+- AProcess.Environment.Add(gBGImg.FSLOUTPUTTYPE);
++ // On Debian FSLDIR is set outside mricron
++ //AProcess.Environment.Add(gBGImg.FSLDIR);
++ // and we must not set any environment variable to let the child process
++ // inherit the current environment settings
++ //AProcess.Environment.Add(gBGImg.FSLOUTPUTTYPE);
+
+ //AProcess.Environment.Add('FSLDIR=/usr/local/fsl');
+ //AProcess.Environment.Add('FSLOUTPUTTYPE=NIFTI_GZ');
+@@ -84,18 +87,20 @@
+ lCmd: string;
+ begin
+ result := false;
+- lCmd := extractfilepath(paramstr(0))+'bet';
+- {$IFNDEF Unix}
+- lCmd := lCmd+'.exe';
+- {$ENDIF}
+- if not PathExists (lCmd) then begin
+- lCmd := '/usr/local/fsl/bin/bet_8UI';
+- if not PathExists (lCmd) then begin
+- lCmd := '/usr/local/fsl/bin/bet';
+- if not PathExists (lCmd) then
+- exit;
+- end;
+- end; //no bet in home folder...
++ // On Debian we guarantee that bet is globally available if installed at all
++ lCmd := 'bet';
++ //lCmd := extractfilepath(paramstr(0))+'bet';
++ //{$IFNDEF Unix}
++ //lCmd := lCmd+'.exe';
++ //{$ENDIF}
++ //if not PathExists (lCmd) then begin
++ // lCmd := '/usr/local/fsl/bin/bet_8UI';
++ // if not PathExists (lCmd) then begin
++ // lCmd := '/usr/local/fsl/bin/bet';
++ // if not PathExists (lCmd) then
++ // exit;
++ // end;
++ //end; //no bet in home folder...
+ lCmd := lCmd+' "'+lInFile+'" "'+lOutFile +'" -f '+floattostr(lFrac);
+ BETForm.Memo1.Lines.Add(lCmd);
+ RunCmd(lCmd);
diff --git a/debian/patches/series b/debian/patches/series
index 080d18c..6e89682 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
debian_paths
debian_version
+debian_fslbet
lazarus_compat
diff --git a/debian/wrapper/mricron b/debian/wrapper/mricron
new file mode 100644
index 0000000..a1bfa3c
--- /dev/null
+++ b/debian/wrapper/mricron
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+fslconf=/etc/fsl/fsl.sh
+
+if [ -z "${FSLDIR}" ] && [ -e $fslconf ]; then
+ . $fslconf
+fi
+
+exec /usr/lib/mricron/mricron "$@"
--
Debian packaging of MRIcron
More information about the debian-med-commit
mailing list