Bug 237615 - textproc/groff: Fails to build with URWFONTS=OFF
Summary: textproc/groff: Fails to build with URWFONTS=OFF
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-27 23:48 UTC by fullermd
Modified: 2019-05-22 09:39 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bapt)
koobs: merge-quarterly-


Attachments
Tell configure more directly that there's no gs (566 bytes, patch)
2019-04-27 23:48 UTC, fullermd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fullermd 2019-04-27 23:48:35 UTC
Created attachment 204075 [details]
Tell configure more directly that there's no gs

Last few changes seem to have broken build when URWFONTS=OFF and there's no gs around:

   pdfroff: installation problem: cannot find GhostScript interpreter

   *** FATAL INSTALLATION ERROR ***

   'pdfroff' requires a GhostScript interpreter to convert PostScript to PDF.
   Since you do not appear to have one installed, 'pdfroff' connot continue.

It looks like the configure script needs to be told more strongly to not
expect to find gs around; attached patch seems to work right.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-22 09:01:40 UTC
Just got bitten by this:

/bin/mkdir -p `dirname contrib/pdfmark/pdfmark.pdf` \
&& GROFF_TMPDIR=. GROFF_COMMAND_PREFIX= GROFF_BIN_DIR="" GROFF_BIN_PATH="/usr/home/koobs/repos/freebsd/ports/textproc/groff/work/groff-1.22.4" ./pdfroff --keep-temporary-files -F/usr/home/koobs/repos/freebsd/ports/textproc/groff/work/groff-1.22.4/font -F/usr/home/koobs/repos/freebsd/ports/textproc/groff/work/groff-1.22.4/font -M/usr/home/koobs/repos/freebsd/ports/textproc/groff/work/groff-1.22.4/tmac -M/usr/home/koobs/repos/freebsd/ports/textproc/groff/work/groff-1.22.4/tmac -M./contrib/pdfmark -dpaper=letter -P-pletter -mspdf --stylesheet=./contrib/pdfmark/cover.ms \
     ./contrib/pdfmark/pdfmark.ms >contrib/pdfmark/pdfmark.pdf
pdfroff: installation problem: cannot find GhostScript interpreter

*** FATAL INSTALLATION ERROR ***

'pdfroff' requires a GhostScript interpreter to convert PostScript to PDF.
Since you do not appear to have one installed, 'pdfroff' connot continue.

gmake[6]: *** [Makefile:11673: contrib/pdfmark/pdfmark.pdf] Error 1
gmake[6]: Leaving directory '/usr/home/koobs/repos/freebsd/ports/textproc/groff/work/groff-1.22.4'
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-22 09:10:36 UTC
Confirming attachment 204075 [details] allows groff to build, but packaging fails later:

freebsd/ports/textproc/groff/work/stage/usr/local/share/doc/groff-1.22.4/examples/mom/letter.pdf:No such file or directory
freebsd/ports/textproc/groff/work/stage/usr/local/share/doc/groff-1.22.4/examples/mom/mom-pdf.pdf:No such file or directory
freebsd/ports/textproc/groff/work/stage/usr/local/share/doc/groff-1.22.4/examples/mom/sample_docs.pdf:No such file or directory
freebsd/ports/textproc/groff/work/stage/usr/local/share/doc/groff-1.22.4/examples/mom/typesetting.pdf:No such file or directory
freebsd/ports/textproc/groff/work/stage/usr/local/share/doc/groff-1.22.4/pdf/mom-pdf.pdf:No such file or directory
freebsd/ports/textproc/groff/work/stage/usr/local/share/doc/groff-1.22.4/pdf/pdfmark.pdf:No such file or directory

pkg-plist adjustments required as these appear to only conditionally be built when URWFONTS fonts is enabled (ghostscript is installed)
Comment 3 commit-hook freebsd_committer 2019-05-22 09:35:13 UTC
A commit references this bug:

Author: koobs
Date: Wed May 22 09:34:51 UTC 2019
New revision: 502263
URL: https://svnweb.freebsd.org/changeset/ports/502263

Log:
  textproc/groff: Fix build/packaging with URWFONTS disabled

  With URWFONTS disabled, the groff build fails:

  pdfroff: installation problem: cannot find GhostScript interpreter

  *** FATAL INSTALLATION ERROR ***

  'pdfroff' requires a GhostScript interpreter to convert PostScript to PDF.
  Since you do not appear to have one installed, 'pdfroff' connot continue.

  This change provides configure with a more explicit argument to disable
  ghostscript, vs the CONFIGURE_ENV method [1] introduced in ports r499077
  after ports r499075 introduced the option.

  Update pkg-plist to mark files not conditional on this option.

  PR:		237615
  Submitted by:	<fullermd over-yonder net> [1]
  Approved by:	portmgr (blanket: build fix, just fix it)
  MFH:		no (not affected)

Changes:
  head/textproc/groff/Makefile
  head/textproc/groff/pkg-plist
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-22 09:37:57 UTC
I noticed a test error during QA:

====> Running Q/A tests (stage-qa)
Error: /usr/local/bin/preconv is linked to /usr/local/lib/libiconv.so.2 from converters/libiconv but it is not declared as a dependency
Warning: you need USES+=iconv, USES+=iconv:wchar_t, or USES+=iconv:translit depending on needs

I didn't address this as I am not familiar with the package to that degree, nor the caveats/implications of the changes suggested.

These can be addressed separately
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-22 09:39:25 UTC
Thank you for your report!