mitofates: more deps and a patch to make it functional (#8686)
* mitofates: more deps and a patch to make it functional
This commit is contained in:
parent
ecff47538e
commit
1846bc5ed6
2 changed files with 39 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
--- a/bin/modules/DirichletRegulator_fast.pm 2014-10-23 01:59:55.000000000 -0500
|
||||
+++ b/bin/modules/DirichletRegulator_fast.pm 2018-07-11 11:19:07.814358134 -0500
|
||||
@@ -10,9 +10,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use FindBin qw($Bin);
|
||||
-use Inline (Config =>
|
||||
- DIRECTORY => "$Bin/modules/_Inline/",
|
||||
- );
|
||||
+use Inline;
|
||||
use Inline 'C';
|
||||
|
||||
# Sub-routin: DirichletParser
|
|
@ -23,6 +23,7 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import glob
|
||||
|
||||
|
||||
class Mitofates(Package):
|
||||
|
@ -36,7 +37,32 @@ class Mitofates(Package):
|
|||
|
||||
depends_on('libsvm')
|
||||
depends_on('perl', type='run')
|
||||
depends_on('perl-inline-c', type='run')
|
||||
depends_on('perl-perl6-slurp', type='run')
|
||||
depends_on('perl-math-cephes', type='run')
|
||||
|
||||
# The DirichletRegulator_fast.pm sets the perl Inline directory
|
||||
# to be inside the deployed source (which won't be writable by
|
||||
# the end user of site wide deployed software.
|
||||
# Removing that config entry will cause the inline module to auto
|
||||
# create a directory in the user's homedir instead
|
||||
patch('DirichletRegulator_fast.patch')
|
||||
|
||||
def patch(self):
|
||||
perlscripts = FileFilter('MitoFates.pl')
|
||||
perlscripts.filter('#!/usr/bin/perl', '#!/usr/bin/env perl')
|
||||
|
||||
# other perl module files probably should get this filter too
|
||||
with working_dir(join_path(self.stage.source_path, 'bin/modules')):
|
||||
perlmodules = glob.glob('*.pm')
|
||||
filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl', *perlmodules)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree('bin', prefix.bin)
|
||||
install('MitoFates.pl', prefix)
|
||||
chmod = which('chmod')
|
||||
chmod('+x', join_path(prefix, 'MitoFates.pl'))
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
# We want the main MitoFates.pl script in the path
|
||||
run_env.prepend_path('PATH', self.prefix)
|
||||
|
|
Loading…
Reference in a new issue