Bug 274570 - editors/emacs: Remove USES=makeinfo
Summary: editors/emacs: Remove USES=makeinfo
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: emacs@FreeBSD.org (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-19 00:25 UTC by Muhammad Moinur Rahman
Modified: 2023-11-02 15:40 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (emacs)


Attachments
Remove makeinfo (795 bytes, patch)
2023-10-19 00:25 UTC, Muhammad Moinur Rahman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-10-19 00:25:59 UTC
Created attachment 245718 [details]
Remove makeinfo

The port has USES=makeinfo which helps to build the info files but the distfile ships with pre built info files in ${WRKSRC}/info hence makeinfo is not a hard requirement for the building of emacs itself. And the build time error can easily be avoided with BINARY_ALIAS to makeinfo.

As we are utilizing the default info files instead of the generated info hence bumping PORTREVISION.
Comment 1 Joseph Mingrone freebsd_committer freebsd_triage 2023-10-19 03:03:33 UTC
There used to be a configure knob, --without-makeinfo, but it was removed a few years ago.  There was some discussion at

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46837.

On my build server, before this change, the build took 00:01:47.
With this change, it took 00:01:45.
With this change and adding ALL_TARGET=lisp, it still takes 00:01:45.

I only had time tonight to take a quick look at the logs, but I don't think we are rebuilding all the info files.  I see lots of: 

gmake[2]: Nothing to be done for 'info'.
Comment 2 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-10-19 06:53:50 UTC
(In reply to Joseph Mingrone from comment #1)
There is actually more to that build time specially dependencies.

If you wan to build emacs@nox without any all DEFAULT options there are in total 78 pkgs built. And then if I add the following in the make.conf:

editors_emacs_UNSET+=ACL GNUTLS JSON MAILUTILS MODULES SOURCES SQLITE3 THREADS TREESITTER XML KQUEUE
math_gmp_UNSET+=    INFO
OPTIONS_UNSET+=NLS

It goes to 13 and if this patch is applied it goes to 6. :)

Building vim without any options goes to 4. :)

Don't ask about neovim.
Comment 3 Joseph Mingrone freebsd_committer freebsd_triage 2023-10-19 12:38:01 UTC
(In reply to Muhammad Moinur Rahman from comment #2)

I get it.  Starting from scratch, you have to build fewer dependencies.  It's nice to save some cycles, time, and energy.  I just want to be clear about (and make sure it's clear to others on emacs@), the costs and benefits.

A potential cost to tricking the build into thinking we have makeinfo installed is that we scratch our heads for a bit if/when something breaks in the future.  
Still, I think it's fine, and I'm good with this change going in.  Let's give it a few days to see if any others from emacs@ have thoughts.

Joe

Here's a somewhat off-topic tidbit about light emacs installations: With all options turned off, emacs-nox only has two runtime dependencies.

root@15amd64-default:~ # pkg info -d emacs-nox
emacs-nox-29.1,3:
        indexinfo-0.3.1
        gmp-6.3.0
Comment 4 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-10-19 12:41:33 UTC
I can also add another OPTION INFO which will either build the INFO files with makeinfo or use the ones the distfile has.
Comment 5 Joseph Mingrone freebsd_committer freebsd_triage 2023-10-19 12:48:32 UTC
(In reply to Muhammad Moinur Rahman from comment #4)

I would prefer not to add another OPTION because

- it grows the diff against editors/emacs-devel (keeping the two ports as similar as possible reduces the maintenance burden)
- it's another option where bugs can hide if we don't test the untestable total number of option combinations.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-11-02 15:39:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=52bc8764cfa78607cbaee6e60307f95697d87e34

commit 52bc8764cfa78607cbaee6e60307f95697d87e34
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-11-02 13:59:48 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-11-02 15:25:07 +0000

    editors/emacs: Remove USES=makeinfo

    The port has USES=makeinfo which helps to build the info files but the
    distfile ships with pre built info files in ${WRKSRC}/info hence
    makeinfo is not a hard requirement for the building of emacs itself. And
    the build time error can easily be avoided with BINARY_ALIAS to
    makeinfo.

    As we are utilizing the default info files instead of the generated info
    hence bumping PORTREVISION.

    PR:             274570
    Approved by:    emacs (jrm)

 editors/emacs/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)