git: f9566b80622d - main - editors/emacs: Fix native compilation with canna flavor

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Tue, 25 Aug 2026 05:29:34 UTC
The branch main has been updated by jrm:

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

commit f9566b80622d676208b0f0c5b4ed6f286ce37b10
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2026-08-25 05:07:52 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2026-08-25 05:23:52 +0000

    editors/emacs: Fix native compilation with canna flavor
    
    isearch-ext.el is a file that comes with the canna patch.  Because it is
    preloaded, it was native-compiled during the bootstrap stage.  This
    caused the native-lisp directory to be created, which in turn meant AOT
    for all other elisp was silently skipped.
    
    Fix this by adding isearch-ext to native-comp-bootstrap-deny-list, so it
    is native-compiled later along with the rest of the elisp.
    
    Sponsored by:   The FreeBSD Foundation
---
 editors/emacs/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index ad2ffdaebfbd..058e2853013a 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	emacs
 DISTVERSION=	31.1
+PORTREVISION=	1
 PORTEPOCH=	3
 CATEGORIES=	editors
 MASTER_SITES=	GNU
@@ -43,6 +44,10 @@ CONFIGURE_ARGS=		--disable-build-details \
 			--without-selinux
 .if ${FLAVOR:U} == canna
 CONFIGURE_ARGS+=	--with-canna
+# isearch-ext.el is a file that comes with the canna patch.  Native compiling it
+# during bootstrap creates the native-lisp directory early on in the build, and
+# that causes AOT to be silently skipped.
+MAKE_ARGS+=		BYTE_COMPILE_EXTRA_FLAGS="--eval '(setq native-comp-bootstrap-deny-list (list \"isearch-ext\"))'"
 .elif ${FLAVOR:U} == nox
 CONFIGURE_ARGS+=	--with-sound=no \
 			--with-x-toolkit=no \