git: 8209af7d187b - main - editors/emacs: Add pkg-message to SUB_FILES

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Fri, 04 Apr 2025 20:21:19 UTC
The branch main has been updated by jrm:

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

commit 8209af7d187b6b2c2d4553f575510e4ff39311e7
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2025-03-27 12:53:06 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2025-04-04 20:18:14 +0000

    editors/emacs: Add pkg-message to SUB_FILES
    
    While here, remove old pkg-message and redundancy in
    files/pkg-message.in.
    
    PR:             285674
    Reported by:    martin@lispworks.com
    Differential Revision:  https://reviews.freebsd.org/D49539
---
 editors/emacs/Makefile             |  2 +-
 editors/emacs/files/pkg-message.in | 45 +-------------------------------------
 editors/emacs/pkg-message          | 16 --------------
 3 files changed, 2 insertions(+), 61 deletions(-)

diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index f0f898966bfd..c6a773f1beeb 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -78,7 +78,7 @@ CONFIGURE_ENV=		ac_cv_header_sys_sysinfo_h=no
 CONFLICTS_INSTALL=	emacs-devel emacs-devel-nox
 
 BINARY_ALIAS=	makeinfo=true
-SUB_FILES=	sources.el
+SUB_FILES=	pkg-message sources.el
 SUB_LIST=	EMACS_VER=${DISTVERSION} \
 		NATIVECOMP_COMMENT_END=${NATIVECOMP_COMMENT_END} \
 		NATIVECOMP_COMMENT_START=${NATIVECOMP_COMMENT_START}
diff --git a/editors/emacs/files/pkg-message.in b/editors/emacs/files/pkg-message.in
index 7d67c2378a22..24f92908ca05 100644
--- a/editors/emacs/files/pkg-message.in
+++ b/editors/emacs/files/pkg-message.in
@@ -1,36 +1,6 @@
 [
 %%NATIVECOMP_COMMENT_START%%
-{ type: install
-  message: <<EOM
-Emacs is now built with native compilation enabled by default, which
-requires GCC version 11 or later.  However, it is known that some
-elisp applications don't work correctly when compiled.  You can work
-around any such issues by disabling native compilation using the
-following steps.
-
-1. Add the following lines at the top of your Emacs configuration:
-
-(setq native-comp-deferred-compilation nil
-comp-enable-subr-trampolines nil)
-
-2. Exit emacs
-
-3. rm -rf ~/.emacs.d/eln-cache
-
-4. Start emacs again
-
-Whereas all elisp files included in the Emacs source archive are
-native compiled at build time, 3rd party elisp files (for example,
-from elisp ports/packages) are native compiled at run time. This will
-result in high CPU usage when they are compiled. If this annoys you,
-you can throttle the number of jobs by changing the value of the
-variable 'native-comp-async-jobs-number' in your emacs
-configuration. See the output of `C-h v native-comp-async-jobs-number`
-for details.
-EOM
-}
-{ type: upgrade
-  message: <<EOM
+{ type: [install, upgrade], message: <<EOM
 Emacs is now built with native compilation enabled by default, which
 requires GCC version 11 or later.  However, it is known that some
 elisp applications don't work correctly when compiled.  You can work
@@ -59,17 +29,4 @@ for details.
 EOM
 }
 %%NATIVECOMP_COMMENT_END%%
-{ type: upgrade
-  maximum_version: "28.0.50.20210302,2"
-  message: <<EOM
-If you get the error
-
-    Symbol's value as variable is void: minor-modes
-
-rebuild the offending Emacs packages.
-
-See https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg01164.html
-for details.
-EOM
-}
 ]
diff --git a/editors/emacs/pkg-message b/editors/emacs/pkg-message
deleted file mode 100644
index aa39499dab22..000000000000
--- a/editors/emacs/pkg-message
+++ /dev/null
@@ -1,16 +0,0 @@
-[
- { type: upgrade
-   maximum_version: "27.1,3"
-   message: <<EOM
-  The major version of editors/emacs was bumped from 26 to 27.  To upgrade
-dependent packages, run these commands with superuser privileges:
-
-    # sh
-    # for i in $(pkg query -g %n '*-emacs26*'); do \
-        nn=$(echo "$i" | sed -e 's/emacs26/emacs27/'); \
-        pkg set -yn "$i":"$nn"; \
-      done;
-    # pkg upgrade
-EOM
- }
-]