Bug 283368 - lang/ghc: remove unused DOCS_BUILD_DEPENDS=xetex
Summary: lang/ghc: remove unused DOCS_BUILD_DEPENDS=xetex
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-haskell (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-16 20:43 UTC by Siva Mahadevan
Modified: 2024-12-21 18:55 UTC (History)
4 users (show)

See Also:
arrowd: maintainer-feedback+


Attachments
[PATCH] lang/ghc: remove unused DOCS_BUILD_DEPENDS=xetex (1.29 KB, patch)
2024-12-16 20:43 UTC, Siva Mahadevan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Siva Mahadevan 2024-12-16 20:43:50 UTC
Created attachment 255899 [details]
[PATCH] lang/ghc: remove unused DOCS_BUILD_DEPENDS=xetex

lang/ghc currently does not even package its built HTML and PDF docs, so there is no point in building them. Furthermore, users can still generally view PDF docs using their web browser pointing to upstream PDF URLs at haskell.org.

In order to build the PDF docs, it BUILD_DEPENDS on print/tex-xetex, which pulls GBs worth of dependencies and takes quite a long time to build. This patch removes the essentially "unused" dependency on print/tex-xetex and saves on this time and storage cost.
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2024-12-17 18:40:48 UTC
> lang/ghc currently does not even package its built HTML and PDF docs, so there is no point in building them.

It doesn't seem to be true:

$ pkg info -l ghc | grep pdf
        /usr/local/share/doc/ghc/Haddock.pdf
        /usr/local/share/doc/ghc/html/users_guide/_static/logo.pdf
        /usr/local/share/doc/ghc/html/users_guide/_static/prof_scc.pdf
        /usr/local/share/doc/ghc/users_guide.pdf

$ pkg info -l ghc | grep html | wc -l
    5069
Comment 2 Siva Mahadevan 2024-12-18 14:51:37 UTC
Ah that's my mistake, I looked through the pkg-plists, Makefiles, and patch files, and found no mention of PDF documentation being packaged.

I'm fine with the HTML documentation being built because:
* it's very easy to read it on both graphical and non-graphical freebsd systems
* as plaintext, it's lightweight
* it doesn't pull in any other dependencies except Sphinx

The PDF documentation is essentially unreadable on non-graphical freebsd systems, which are (in my understanding) the majority of the freebsd market share. Yet it pulls in quite heavyweight ports just to build something that is already mostly available online (to someone who is able to view it with a graphical browser/PDF viewer anyway).

For the sake of the general/majority consumer of lang/ghc, could we stop building PDF documentation, but keep HTML documentation as-is?
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-12-19 17:18:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0e32e26d3800536e3c065ff45c6342ff4db1ad37

commit 0e32e26d3800536e3c065ff45c6342ff4db1ad37
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2024-12-19 17:14:27 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-12-19 17:17:45 +0000

    lang/ghc: Do not build PDF docs to avoid a heavy dependency on xetex

    PR:             283368

 lang/ghc/Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
Comment 4 Konstantin Belousov freebsd_committer freebsd_triage 2024-12-19 18:12:06 UTC
Can we please still have an option to build pdf?
Or a separate port with pdf docs.
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2024-12-19 18:35:03 UTC
I can chase this goal, if there is a demand. The same information is available in the HTML form, so I wonder when PDF is really needed. An user that has a PDF viewer, but not a browser?
Comment 6 Konstantin Belousov freebsd_committer freebsd_triage 2024-12-19 18:38:52 UTC
(In reply to Gleb Popov from comment #5)
No, a user that much prefers pdf reader than the browser.

E.g. for me, a bunch of html pages is much less convenient to read than
properly formatted print-ready doc (be it pdf, ps, dvi, or any other high
quality page description language).
Comment 7 Gleb Popov freebsd_committer freebsd_triage 2024-12-19 18:40:38 UTC
I will look into adding the PDFDOCS option then.
Comment 8 Konstantin Belousov freebsd_committer freebsd_triage 2024-12-19 18:52:02 UTC
(In reply to Gleb Popov from comment #7)
Thank you
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-12-21 12:31:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=344cf9384c54007933590e02c6a9758615dbb5e4

commit 344cf9384c54007933590e02c6a9758615dbb5e4
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2024-12-21 12:29:54 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-12-21 12:30:53 +0000

    lang/ghc: Introduce PDFDOCS option.

    PR:             283368

 lang/ghc/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Comment 10 Älven 2024-12-21 12:35:27 UTC
Thank you for your efforts for keeping PDF documentation.
I also like and use it in general.
Comment 11 Konstantin Belousov freebsd_committer freebsd_triage 2024-12-21 18:55:06 UTC
(In reply to commit-hook from comment #9)
Thanks from me as well.