From 4c396d2cee31edb1a2a3620a42ba2e9f5e9090bc Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Fri, 11 Feb 2022 03:30:36 -0500 Subject: minc-toolkit: fix perl dependencies (#28868) --- .../repos/builtin/packages/minc-toolkit/package.py | 8 +++++++- .../builtin/packages/perl-mni-perllib/no-stdin.patch | 13 +++++++++++++ .../builtin/packages/perl-mni-perllib/package.py | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/perl-mni-perllib/no-stdin.patch create mode 100644 var/spack/repos/builtin/packages/perl-mni-perllib/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/minc-toolkit/package.py b/var/spack/repos/builtin/packages/minc-toolkit/package.py index be63cf6a7f..5dfc62f193 100644 --- a/var/spack/repos/builtin/packages/minc-toolkit/package.py +++ b/var/spack/repos/builtin/packages/minc-toolkit/package.py @@ -21,6 +21,12 @@ class MincToolkit(CMakePackage): description="Build visual tools (Display, register, etc.)") depends_on('perl') + # included Perl packages are not added to the Perl path by default. + # rather than inheriting from both CMakePackage and PerlPackage, + # it seems clean just to add them as dependencies: + depends_on('perl-text-format', type=('build', 'run')) + depends_on('perl-getopt-tabular', type=('build', 'run')) + depends_on('perl-mni-perllib', type=('build', 'run')) depends_on('flex', type='build') depends_on('bison', type='build') depends_on('zlib', type='link') @@ -31,7 +37,7 @@ class MincToolkit(CMakePackage): self.define_from_variant('MT_BUILD_VISUAL_TOOLS', 'visualisation'), # newer ANTs packaged separately "-DMT_BUILD_ANTS=OFF", - # build error; should package newer c3d separately + # newer c3d packaged separately "-DMT_BUILD_C3D=OFF", # should be packaged separately with newer ITK "-DMT_BUILD_ELASTIX=OFF" diff --git a/var/spack/repos/builtin/packages/perl-mni-perllib/no-stdin.patch b/var/spack/repos/builtin/packages/perl-mni-perllib/no-stdin.patch new file mode 100644 index 0000000000..1e9e791257 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-mni-perllib/no-stdin.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.PL b/Makefile.PL +index 9f2039a..12d699c 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -213,7 +213,7 @@ TEXT + } # &MY::postamble + + +-query_subs; ++#query_subs; + + my $f; + WriteMakefile diff --git a/var/spack/repos/builtin/packages/perl-mni-perllib/package.py b/var/spack/repos/builtin/packages/perl-mni-perllib/package.py new file mode 100644 index 0000000000..5c372c52b8 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-mni-perllib/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PerlMniPerllib(PerlPackage): + """MNI Perl Library for scripting long-running scientific computations""" + + homepage = "https://github.com/BIC-MNI/mni-perllib" + git = "https://github.com/BIC-MNI/mni-perllib.git" + + version('develop', commit="170827f5644820b87bcb2b194494c5ebf0928149") + + patch('no-stdin.patch') + + depends_on('perl-getopt-tabular', type=('build', 'run')) + depends_on('perl-text-format', type=('build', 'run')) -- cgit v1.2.3-70-g09d2