Bug 231438

Summary: lang/ghc: build failure if print/tex-xetex installed
Product: Ports & Packages Reporter: John Hein <jcfyecrayz>
Component: Individual Port(s)Assignee: Gleb Popov <arrowd>
Status: Closed FIXED    
Severity: Affects Some People CC: arrowd, haskell, hrs, tcberner
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
[patch] disable xelatex until ghc build works with it arrowd: maintainer-approval+

Description John Hein 2018-09-18 00:35:35 UTC
If print/tex-xetex is installed, the lang/ghc build detects xelatex and tries to build some documentation differently (than if xelatex is not detected).

In the output of 'make configure' without xelatex installed, you see this:

   Tools to build Sphinx HTML documentation available: YES
   Tools to build Sphinx PDF documentation available: NO


If xelatex is installed, you see this:

   Tools to build Sphinx HTML documentation available: YES
   Tools to build Sphinx PDF documentation available: YES


Later during the build if xelatex was detected, it tries to do this:

cd docs/users_guide/build-pdf/users_guide ; xelatex -halt-on-error users_guide.tex

That fails after a bit with:

================================

This is XeTeX, Version 3.14159265-2.6-0.99992 (Web2C 2015) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./users_guide.tex
LaTeX2e <2015/01/01> patch level 2
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(./sphinxmanual.cls
Document Class: sphinxmanual 2017/03/26 v1.6 Document class (Sphinx manual)
(/usr/local/share/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/share/texmf-dist/tex/latex/base/size10.clo)))
(/usr/local/share/texmf-dist/tex/latex/cmap/cmap.sty

Package cmap Warning: pdftex not detected - exiting.

) (/usr/local/share/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/share/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/share/texmf-dist/tex/latex/amsmath/amsmath.sty
  .
  .
  .
(/usr/local/share/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/local/share/texmf-dist/tex/latex/base/fontenc.sty
(/usr/loc/share/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/loc/share/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/loc/share/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/loc/share/texmf-dist/tex/latex/tipa/t3enc.def
(/usr/loc/share/texmf-dist/tex/latex/euenc/eu1lmss.fd)))
(/usr/loc/share/texmf-dist/tex/latex/fontspec/fontspec.cfg)))kpathsea:make_tex: Invalid fontname `DejaVu Sans', contains ' '


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "DejaVu Sans" cannot be found.  
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.41 \setsansfont{DejaVu Sans}

No pages of output.
Transcript written on users_guide.log.
gmake[2]: *** [docs/users_guide/ghc.mk:17: docs/users_guide/users_guide.pdf] Error 1

================================
Comment 1 John Hein 2018-09-18 00:37:33 UTC
hrs@ CC'd in case he has some insight on this failure from the tex point of view.
Comment 2 John Hein 2018-09-19 20:31:55 UTC
Created attachment 197241 [details]
[patch] disable xelatex until ghc build works with it

Until the build can be fixed with xelatex installed, just disable it at configure time.  This fixes the build.

qa:
 - poudriere ok
 - portlint ok (no new warnings)
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2018-09-20 03:57:39 UTC
The alternative would be to depend on x11-fonts/dejavu, I assume.
Comment 4 John Hein 2018-09-29 19:46:38 UTC
(In reply to Tobias C. Berner from comment #3)
Adding a dependency on dejavu would fix the xelatex failure (confirmed by testing), but the relevant build product (user's guide) is not installed anyway, so it would just increase build time for no benefit.

Someone _could_ add a modification to install the user's guide that gets built as part of this port.  Until then, I think disabling xelatex is the better fix than adding the dejavu dependency.

Thanks for approving the patch, Gleb - we just need a committer now.
Comment 5 Tobias C. Berner freebsd_committer freebsd_triage 2018-09-29 19:50:34 UTC
Looks good to me then :)
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2018-10-01 14:04:52 UTC
Thank you for your patch.
Comment 7 John Hein 2018-12-20 17:28:09 UTC
Ping.
Comment 8 Tobias C. Berner freebsd_committer freebsd_triage 2018-12-20 18:15:34 UTC
(In reply to John Hein from comment #7)
Why are you pinging? It has been fixed since ages:
https://svnweb.freebsd.org/ports?view=revision&revision=481032


mfg Tobias