summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Darwin <bcdarwin@gmail.com>2022-02-11 03:30:36 -0500
committerGitHub <noreply@github.com>2022-02-11 09:30:36 +0100
commit4c396d2cee31edb1a2a3620a42ba2e9f5e9090bc (patch)
tree3a8c9ba1ab8bef094f5c0d381f83748c569280d1
parentc80c92aa39498dc3b204710fbc464fd0f9e8dc76 (diff)
downloadspack-4c396d2cee31edb1a2a3620a42ba2e9f5e9090bc.tar.gz
spack-4c396d2cee31edb1a2a3620a42ba2e9f5e9090bc.tar.bz2
spack-4c396d2cee31edb1a2a3620a42ba2e9f5e9090bc.tar.xz
spack-4c396d2cee31edb1a2a3620a42ba2e9f5e9090bc.zip
minc-toolkit: fix perl dependencies (#28868)
-rw-r--r--var/spack/repos/builtin/packages/minc-toolkit/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl-mni-perllib/no-stdin.patch13
-rw-r--r--var/spack/repos/builtin/packages/perl-mni-perllib/package.py20
3 files changed, 40 insertions, 1 deletions
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'))