summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2021-02-09 15:54:51 -0600
committerGitHub <noreply@github.com>2021-02-09 13:54:51 -0800
commitd01edbb48e25bf5206baf58eb86a4c7ba73fb658 (patch)
tree4bbc3a443ad2041731514385a6c0f5ed3aab9240 /var
parentf7a9fbc688c8d59d0e89ef4c7fa874a960d15815 (diff)
downloadspack-d01edbb48e25bf5206baf58eb86a4c7ba73fb658.tar.gz
spack-d01edbb48e25bf5206baf58eb86a4c7ba73fb658.tar.bz2
spack-d01edbb48e25bf5206baf58eb86a4c7ba73fb658.tar.xz
spack-d01edbb48e25bf5206baf58eb86a4c7ba73fb658.zip
Fix groff build with long interpeter line (#21549)
This PR fixes the case where groff fails to build if the spack install path is really long. There are a couple of perl scripts that get built, and used, during the build phase that will fail when the perl interpreter line is too long. Filtering the lines will not work because the files don not exist after the configure phase and patching after the build phase is too late. This PR runs the scripts explicitly with the spack perl via the $(PERL) variable in the call to the script.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/groff/BuildFoundries.patch11
-rw-r--r--var/spack/repos/builtin/packages/groff/package.py5
-rw-r--r--var/spack/repos/builtin/packages/groff/pdfmom.patch11
3 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/groff/BuildFoundries.patch b/var/spack/repos/builtin/packages/groff/BuildFoundries.patch
new file mode 100644
index 0000000000..3cc7497bf1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/groff/BuildFoundries.patch
@@ -0,0 +1,11 @@
+--- a/font/devpdf/Makefile.sub 2014-11-04 02:38:35.427521472 -0600
++++ b/font/devpdf/Makefile.sub 2021-02-08 14:28:51.194111775 -0600
+@@ -95,7 +95,7 @@
+ chmod +x util/BuildFoundries
+ echo "# foundry ps name psfile" > $(top_builddir)/font/devpdf/download
+ PATH="$(top_builddir)/src/utils/afmtodit:$(GROFF_PATH_SEPARATOR)$(PATH)" \
+- util/BuildFoundries $(top_builddir)/font/devpdf \
++ $(PERL) util/BuildFoundries $(top_builddir)/font/devpdf \
+ '$(top_srcdir)/font/devps : $(top_builddir)/font/devps' \
+ >> $(top_builddir)/font/devpdf/download
+
diff --git a/var/spack/repos/builtin/packages/groff/package.py b/var/spack/repos/builtin/packages/groff/package.py
index 7faaa1de59..450c4794c0 100644
--- a/var/spack/repos/builtin/packages/groff/package.py
+++ b/var/spack/repos/builtin/packages/groff/package.py
@@ -35,6 +35,11 @@ class Groff(AutotoolsPackage, GNUMirrorPackage):
# patch('gropdf.patch')
parallel = False
+ # The perl interpreter line in scripts might be too long as it has
+ # not been transformed yet. Call scripts with spack perl explicitly.
+ patch('BuildFoundries.patch')
+ patch('pdfmom.patch')
+
def configure_args(self):
args = [
"--without-x"
diff --git a/var/spack/repos/builtin/packages/groff/pdfmom.patch b/var/spack/repos/builtin/packages/groff/pdfmom.patch
new file mode 100644
index 0000000000..b9b90674a5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/groff/pdfmom.patch
@@ -0,0 +1,11 @@
+--- a/contrib/mom/Makefile.sub 2014-11-04 02:38:35.502520534 -0600
++++ b/contrib/mom/Makefile.sub 2021-02-08 14:51:57.131553432 -0600
+@@ -41,7 +41,7 @@
+ GROFF_COMMAND_PREFIX= \
+ GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
+ PDFMOM_BIN_PATH="$(top_builddir)/src/devices/gropdf" \
+- $(PDFMOMBIN) $(FFLAG) $(TFLAG) $(KFLAG)
++ $(PERL) $(PDFMOMBIN) $(FFLAG) $(TFLAG) $(KFLAG)
+
+ MAN7=\
+ groff_mom.n