git: 8882913727d6 - main - Emacs ports: Build using GCC when NATIVECOMP is on

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Sun, 06 Nov 2022 15:23:37 UTC
The branch main has been updated by jrm:

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

commit 8882913727d63c2323555bedb6f9c20bd4007ab2
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2022-11-05 03:01:05 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2022-11-06 15:22:02 +0000

    Emacs ports: Build using GCC when NATIVECOMP is on
    
    In order to allow concurrent installation, the GCC ports, as of 0338e04,
    moved some header files to internal locations.  Emacs built with
    NATIVECOMP requires GCC jit libraries.  Rather than patching Emacs to
    search in those internal locations, build Emacs with GCC when NATIVECOMP
    is turned on.
    
    PR:             257060
    Tested by:      jcfyecrayz@liamekaens.com, yasu
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D37275
---
 editors/emacs-devel/Makefile | 8 ++------
 editors/emacs/Makefile       | 8 ++------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/editors/emacs-devel/Makefile b/editors/emacs-devel/Makefile
index 24a14c21c8d0..6eb710e2eda0 100644
--- a/editors/emacs-devel/Makefile
+++ b/editors/emacs-devel/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	emacs
 DISTVERSION=	29.0.50.20221031
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	editors
 PKGNAMESUFFIX=	-devel
@@ -171,10 +172,9 @@ MAILUTILS_CONFIGURE_WITH=	mailutils
 MAILUTILS_CONFIGURE_ENV_OFF=	ac_cv_lib_lockfile_maillock=no \
 				ac_cv_prog_liblockfile=no
 MODULES_CONFIGURE_WITH=		modules
-NATIVECOMP_LIB_DEPENDS=		libgccjit.so:lang/${_GCC_PORT}
+NATIVECOMP_USE=			GCC=11+
 NATIVECOMP_CONFIGURE_WITH=	native-compilation
 NATIVECOMP_MAKE_ARGS=		NATIVE_FULL_AOT=1
-NATIVECOMP_LDFLAGS=		-L${LOCALBASE}/lib/${_GCC_PORT}
 OSS_CONFIGURE_ON=		--with-sound=oss
 OTF_LIB_DEPENDS=		libotf.so:print/libotf
 OTF_CONFIGURE_WITH=		libotf
@@ -230,10 +230,6 @@ NATIVECOMP_COMMENT_END=		'*/'
 NATIVECOMP_COMMENT_START=	'/*'
 .endif
 
-.if ${PORT_OPTIONS:MNATIVECOMP} && !defined(_GCC_PORT_CHOSEN)
-_GCC_PORT!=	${BSDMAKE} -V_GCC_PORT USE_GCC=11+ _GCC_PORT_CHOSEN=yes
-.endif
-
 .if ${FLAVOR:U} != nox
 USES+=		desktop-file-utils gnome
 .if !${PORT_OPTIONS:MPGTK}
diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index 74dde03bc798..816a4427d472 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	emacs
 DISTVERSION=	28.2
+PORTREVISION=	1
 PORTEPOCH=	3
 CATEGORIES=	editors
 MASTER_SITES=	GNU
@@ -182,10 +183,9 @@ MAILUTILS_CONFIGURE_ENV_OFF=	ac_cv_lib_lockfile_maillock=no \
 MODULES_CONFIGURE_WITH=		modules
 MOTIF_USES=			motif
 MOTIF_CONFIGURE_ON=		--with-x-toolkit=motif
-NATIVECOMP_LIB_DEPENDS=		libgccjit.so:lang/${_GCC_PORT}
+NATIVECOMP_USE=			GCC=11+
 NATIVECOMP_CONFIGURE_WITH=	native-compilation
 NATIVECOMP_MAKE_ARGS=		NATIVE_FULL_AOT=1
-NATIVECOMP_LDFLAGS=		-L${LOCALBASE}/lib/${_GCC_PORT}
 OSS_CONFIGURE_ON=		--with-sound=oss
 OTF_IMPLIES=			XFT
 OTF_LIB_DEPENDS=		libotf.so:print/libotf
@@ -226,10 +226,6 @@ XWIDGETS_CONFIGURE_WITH=	xwidgets
 
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MNATIVECOMP} && !defined(_GCC_PORT_CHOSEN)
-_GCC_PORT!=	${BSDMAKE} -V_GCC_PORT USE_GCC=11+ _GCC_PORT_CHOSEN=yes
-.endif
-
 .if !${PORT_OPTIONS:MGTK2} && !${PORT_OPTIONS:MGTK3} && !${PORT_OPTIONS:MMOTIF} && \
 	!${PORT_OPTIONS:MXAW} && !${PORT_OPTIONS:MXAW3D}
 CONFIGURE_ARGS+=	--with-x-toolkit=no