Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151679382
D56001.id174369.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
12 KB
Referenced Files
None
Subscribers
None
D56001.id174369.diff
View Options
diff --git a/Mk/Uses/emacs.mk b/Mk/Uses/emacs.mk
--- a/Mk/Uses/emacs.mk
+++ b/Mk/Uses/emacs.mk
@@ -1,49 +1,28 @@
-# Provide support for ports requiring Emacs. This includes flavors with proper
-# dependencies and useful variables.
+# Provide support for ports requiring Emacs.
#
# Feature: emacs
# Usage: USES=emacs or USES=emacs:args
-# Valid ARGS: build, run, noflavors
+# Valid ARGS: build
#
# build Indicates that Emacs is required at build time.
-# run Indicates that Emacs is required at run time.
-# noflavors Prevents flavors. This is implied when there is no run
-# dependency on Emacs.
#
-# If build and run are omitted from the argument list, Emacs will be added to
-# BUILD_DEPENDS and RUN_DEPENDS. EMACS_NO_DEPENDS can be set to prevent both
-# dependencies.
-#
-# Variables, which can be set in make.conf:
-# DEFAULT_VERSIONS+= The default flavor for ports with
-# USES=emacs can be added to DEFAULT_VERSIONS.
-# For example: DEFAULT_VERSIONS+= emacs=nox
-# Valid flavors: full canna nox wayland
-# devel_full devel_nox
-# Flavors specified on the command line take
-# precedence.
-#
-# Variables, which can be set by ports:
-# EMACS_FLAVORS_EXCLUDE: Do NOT build these Emacs flavors.
-# If EMACS_FLAVORS_EXCLUDE is not defined and
-# - there is a run dependency on Emacs
-# - the noflavors argument is not specified
-# then all valid Emacs flavors are assumed.
-#
-# EMACS_NO_DEPENDS: Do NOT add build or run dependencies on Emacs.
-# This will prevent flavors, and no byte code files
-# will be generated as part of the package.
+# If build is omitted from the argument list, Emacs will not be added to
+# BUILD_DEPENDS.
#
# Variables, which can be read by ports:
# EMACS_CMD: Emacs command with full path (e.g. /usr/local/bin/emacs-30.2)
-# EMACS_FLAVOR: Used for dependencies (e.g. BUILD_DEPENDS= dash.el${EMACS_PKGNAMESUFFIX}>0:devel/dash@${EMACS_FLAVOR})
-# EMACS_LIBDIR: Emacs Library directory without ${PREFIX} (e.g. share/emacs)
-# EMACS_LIBDIR_WITH_VER: Library directory without ${PREFIX} including version (e.g. share/emacs/30.2)
+# EMACS_VER: Emacs version (e.g. 30.2)
# EMACS_MAJOR_VER: Emacs major version (e.g. 30)
-# EMACS_PKGNAMESUFFIX: PKGNAMESUFFIX to distinguish Emacs flavors
+# EMACS_LIBDIR: Emacs Library directory without ${PREFIX} (e.g. share/emacs)
# EMACS_SITE_LISPDIR: Emacs site-lisp directory without ${PREFIX} (e.g. share/emacs/site-lisp)
-# EMACS_VER: Emacs version (e.g. 30.2)
-# EMACS_VERSION_SITE_LISPDIR: Include version (e.g. share/emacs/30.2/site-lisp)
+#
+# Note: EMACS_CMD, EMACS_MAJOR_VER, and EMACS_VER are only set if the build
+# argument is supplied.
+#
+# Note: No Emacs runtime dependency is declared here. USES=emacs ports now
+# install only .el source files, avoiding the combinatorial explosion of
+# flavor-specific packages. Native compilation is handled at runtime by the
+# site-wide configuration shipped with editors/emacs and editors/emacs-devel.
#-------------------------------------------------------------------------------
#
# MAINTAINER: emacs@FreeBSD.org
@@ -54,102 +33,29 @@
# Make sure that no dependency or some other environment variable
# pollutes the build/run dependency detection
.undef _EMACS_BUILD_DEP
-.undef _EMACS_RUN_DEP
-.undef _EMACS_NOFLAVORS
_EMACS_ARGS= ${emacs_ARGS:S/,/ /g}
. if ${_EMACS_ARGS:Mbuild}
_EMACS_BUILD_DEP= yes
_EMACS_ARGS:= ${_EMACS_ARGS:Nbuild}
. endif
-. if ${_EMACS_ARGS:Mrun}
-_EMACS_RUN_DEP= yes
-_EMACS_ARGS:= ${_EMACS_ARGS:Nrun}
-. endif
-. if ${_EMACS_ARGS:Mnoflavors}
-_EMACS_NOFLAVORS= yes
-_EMACS_ARGS:= ${_EMACS_ARGS:Nnoflavors}
-. endif
-# If the port does not specify a build or run dependency, and does not define
-# EMACS_NO_DEPENDS, assume both dependencies are required.
-. if !defined(_EMACS_BUILD_DEP) && !defined(_EMACS_RUN_DEP) && \
- !defined(EMACS_NO_DEPENDS)
-_EMACS_BUILD_DEP= yes
-_EMACS_RUN_DEP= yes
-. endif
-
-# Only set FLAVORS when...
-. if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS)
-FLAVORS= full canna nox wayland devel_full devel_nox
-# Sort the default to be first
-. if defined(EMACS_DEFAULT)
-FLAVORS:= ${EMACS_DEFAULT} ${FLAVORS:N${EMACS_DEFAULT}}
-. endif
-. for flavor in ${EMACS_FLAVORS_EXCLUDE}
-FLAVORS:= ${FLAVORS:N${flavor}}
-. endfor
-. endif
-
-# Only set FLAVOR when...
-. if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) && empty(FLAVOR)
-. if defined(EMACS_DEFAULT)
-FLAVOR= ${EMACS_DEFAULT}
-. else
-FLAVOR= ${FLAVORS:[1]}
-. endif # defined(EMACS_DEFAULT)
-. endif # !defined(_EMACS_NOFLAVORS) && defined(_EMACS_RUN_DEP) && empty(FLAVOR)
-
-. if !empty(FLAVOR)
-EMACS_FLAVOR= ${FLAVOR}
-. else
-EMACS_FLAVOR= full
-. endif
-
-. if ${FLAVOR:Mdevel*}
-EMACS_VER= 31.0.50
-EMACS_PORTDIR= editors/emacs-devel
-. else
-EMACS_VER= 30.2
-EMACS_PORTDIR= editors/emacs
-. endif
-
-EMACS_MAJOR_VER= ${EMACS_VER:C/\..*//}
EMACS_LIBDIR= share/emacs
-EMACS_LIBDIR_WITH_VER= share/emacs/${EMACS_VER}
-EMACS_PORT_NAME= emacs${EMACS_MAJOR_VER}
-
-. if ${EMACS_FLAVOR} == "devel_full"
-EMACS_PKGNAMESUFFIX= -emacs_devel
-. elif ${EMACS_FLAVOR} == "devel_nox"
-EMACS_PKGNAMESUFFIX= -emacs_devel_nox
-. elif ${EMACS_FLAVOR} == "full"
-EMACS_PKGNAMESUFFIX=
-. else
-EMACS_PKGNAMESUFFIX= -emacs_${EMACS_FLAVOR}
-. endif
-
-EMACS_CMD= ${PREFIX}/bin/emacs-${EMACS_VER}
EMACS_SITE_LISPDIR= ${EMACS_LIBDIR}/site-lisp
-EMACS_VERSION_SITE_LISPDIR= ${EMACS_LIBDIR_WITH_VER}/site-lisp
. if defined(_EMACS_BUILD_DEP)
-BUILD_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTDIR}@${EMACS_FLAVOR:C/devel_//}
-. endif
-. if defined(_EMACS_RUN_DEP)
-RUN_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTDIR}@${EMACS_FLAVOR:C/devel_//}
+EMACS_CMD= ${PREFIX}/bin/emacs-${EMACS_VER}
+EMACS_MAJOR_VER= ${EMACS_VER:C/\..*//}
+EMACS_VER= 30.2
+MAKE_ARGS+= EMACS=${EMACS_CMD}
+BUILD_DEPENDS+= ${EMACS_CMD}:editors/emacs
. endif
-MAKE_ARGS+= EMACS=${EMACS_CMD}
SCRIPTS_ENV+= EMACS_LIBDIR=${EMACS_LIBDIR} \
EMACS_VER=${EMACS_VER} \
- EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \
- EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR} \
- EMACS_VERSION_SITE_LISPDIR=${EMACS_VERSION_SITE_LISPDIR}
+ EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR}
PLIST_SUB+= EMACS_LIBDIR=${EMACS_LIBDIR} \
EMACS_VER=${EMACS_VER} \
- EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \
- EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR} \
- EMACS_VERSION_SITE_LISPDIR=${EMACS_VERSION_SITE_LISPDIR}
+ EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR}
.endif # _INCLUDE_USES_EMACS_MK
diff --git a/editors/emacs-devel/Makefile b/editors/emacs-devel/Makefile
--- a/editors/emacs-devel/Makefile
+++ b/editors/emacs-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= emacs
DISTVERSION= 31.0.50.20260316
+PORTREVISION= 1
PORTEPOCH= 3
CATEGORIES= editors
PKGNAMESUFFIX= -devel
@@ -63,7 +64,7 @@
CONFLICTS_INSTALL= emacs emacs-canna emacs-nox
-SUB_FILES= pkg-message sources.el
+SUB_FILES= pkg-message site-start.el
SUB_LIST= EMACS_VER=${DISTVERSION:R} \
NATIVECOMP_COMMENT_END=${NATIVECOMP_COMMENT_END} \
NATIVECOMP_COMMENT_START=${NATIVECOMP_COMMENT_START}
@@ -88,9 +89,6 @@
HARFBUZZ JPEG KQUEUE LCMS2 MAILUTILS MODULES \
NATIVECOMP OSS PGTK PNG SCROLLBARS SOURCES \
SQLITE3 SVG THREADS TIFF TREESITTER WEBP XML
-OPTIONS_EXCLUDE_powerpc= NATIVECOMP
-OPTIONS_EXCLUDE_powerpc64= NATIVECOMP
-OPTIONS_EXCLUDE_powerpc64le= NATIVECOMP
OPTIONS_GROUP= GRAPHICS
OPTIONS_GROUP_GRAPHICS= CAIRO GIF JPEG MAGICK PNG SVG TIFF WEBP XPM
OPTIONS_RADIO= FILENOTIFY SOUND X11TOOLKIT
@@ -104,6 +102,9 @@
XIM XPM XWIDGETS
.endif
OPTIONS_EXCLUDE_armv7= NATIVECOMP
+OPTIONS_EXCLUDE_powerpc= NATIVECOMP
+OPTIONS_EXCLUDE_powerpc64= NATIVECOMP
+OPTIONS_EXCLUDE_powerpc64le= NATIVECOMP
OPTIONS_SUB= YES
ACL_DESC= Access control list support
@@ -273,6 +274,7 @@
post-install:
@${RM} -r ${STAGEDIR}${PREFIX}/lib/systemd
@(cd ${STAGEDIR}${PREFIX} && ${FIND} libexec/emacs/${DISTVERSION:R}/${CONFIGURE_TARGET}/ -name emacs-*.pdmp >> ${TMPPLIST})
+ ${INSTALL_DATA} ${WRKDIR}/site-start.el ${STAGEDIR}${DATADIR}/site-lisp/
post-install-MAILUTILS-on:
${LN} -sf ${PREFIX}/bin/movemail \
@@ -287,6 +289,5 @@
post-install-SOURCES-on:
@${MKDIR} ${STAGEDIR}${DATADIR}/${DISTVERSION:R}/src
${INSTALL_DATA} ${WRKSRC}/src/*.[ch] ${STAGEDIR}${DATADIR}/${DISTVERSION:R}/src
- ${INSTALL_DATA} ${WRKDIR}/sources.el ${STAGEDIR}${DATADIR}/${DISTVERSION:R}/site-lisp/site-start.el
.include <bsd.port.mk>
diff --git a/editors/emacs/files/sources.el.in b/editors/emacs-devel/files/site-start.el.in
rename from editors/emacs/files/sources.el.in
rename to editors/emacs-devel/files/site-start.el.in
--- a/editors/emacs/files/sources.el.in
+++ b/editors/emacs-devel/files/site-start.el.in
@@ -4,3 +4,8 @@
(when (string-match (regexp-quote "%%EMACS_VER%%") emacs-version)
(setq find-function-C-source-directory
"%%DATADIR%%/%%EMACS_VER%%/src"))
+
+;; Trigger native compilation of all elisp installed by ports. .eln files are
+;; cached per-user in ~/.emacs.d/eln-cache/.
+(when (native-comp-available-p)
+ (native-compile-async "%%DATADIR%%/site-lisp/" 'recursively))
diff --git a/editors/emacs-devel/pkg-plist b/editors/emacs-devel/pkg-plist
--- a/editors/emacs-devel/pkg-plist
+++ b/editors/emacs-devel/pkg-plist
@@ -4309,7 +4309,6 @@
%%DATADIR%%/%%EMACS_VER%%/lisp/xwidget.elc
%%DATADIR%%/%%EMACS_VER%%/lisp/yank-media.el.gz
%%DATADIR%%/%%EMACS_VER%%/lisp/yank-media.elc
-%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/site-lisp/site-start.el
%%DATADIR%%/%%EMACS_VER%%/site-lisp/subdirs.el
%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/alloc.c
%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/android-asset.h
@@ -4567,6 +4566,7 @@
%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/xwidget.h
%%DATADIR%%/info/elisp_type_hierarchy.jpg
%%DATADIR%%/info/elisp_type_hierarchy.txt
+%%DATADIR%%/site-lisp/site-start.el
%%DATADIR%%/site-lisp/subdirs.el
share/icons/hicolor/128x128/apps/emacs.png
share/icons/hicolor/16x16/apps/emacs.png
diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -1,6 +1,6 @@
PORTNAME= emacs
DISTVERSION= 30.2
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 3
CATEGORIES= editors
MASTER_SITES= GNU
@@ -78,7 +78,7 @@
CONFLICTS_INSTALL= emacs-devel emacs-devel-nox
BINARY_ALIAS= makeinfo=true
-SUB_FILES= pkg-message sources.el
+SUB_FILES= pkg-message site-start.el
SUB_LIST= EMACS_VER=${DISTVERSION} \
NATIVECOMP_COMMENT_END=${NATIVECOMP_COMMENT_END} \
NATIVECOMP_COMMENT_START=${NATIVECOMP_COMMENT_START}
@@ -296,6 +296,7 @@
post-install:
@${RM} -r ${STAGEDIR}${PREFIX}/lib/systemd
@(cd ${STAGEDIR}${PREFIX} && ${FIND} libexec/emacs/${DISTVERSION}/${CONFIGURE_TARGET}/ -name emacs-*.pdmp >> ${TMPPLIST})
+ ${INSTALL_DATA} ${WRKDIR}/site-start.el ${STAGEDIR}${DATADIR}/site-lisp/
post-install-MAILUTILS-on:
${LN} -sf ${PREFIX}/bin/movemail \
@@ -310,6 +311,5 @@
post-install-SOURCES-on:
@${MKDIR} ${STAGEDIR}${DATADIR}/${DISTVERSION}/src
${INSTALL_DATA} ${WRKSRC}/src/*.[ch] ${STAGEDIR}${DATADIR}/${DISTVERSION}/src
- ${INSTALL_DATA} ${WRKDIR}/sources.el ${STAGEDIR}${DATADIR}/${DISTVERSION}/site-lisp/site-start.el
.include <bsd.port.mk>
diff --git a/editors/emacs-devel/files/sources.el.in b/editors/emacs/files/site-start.el.in
rename from editors/emacs-devel/files/sources.el.in
rename to editors/emacs/files/site-start.el.in
--- a/editors/emacs-devel/files/sources.el.in
+++ b/editors/emacs/files/site-start.el.in
@@ -4,3 +4,8 @@
(when (string-match (regexp-quote "%%EMACS_VER%%") emacs-version)
(setq find-function-C-source-directory
"%%DATADIR%%/%%EMACS_VER%%/src"))
+
+;; Trigger native compilation of all elisp installed by ports. .eln files are
+;; cached per-user in ~/.emacs.d/eln-cache/.
+(when (native-comp-available-p)
+ (native-compile-async "%%DATADIR%%/site-lisp/" 'recursively))
diff --git a/editors/emacs/pkg-plist b/editors/emacs/pkg-plist
--- a/editors/emacs/pkg-plist
+++ b/editors/emacs/pkg-plist
@@ -4291,8 +4291,8 @@
%%DATADIR%%/%%EMACS_VER%%/site-lisp/subdirs.el
%%DATADIR%%/info/elisp_type_hierarchy.jpg
%%DATADIR%%/info/elisp_type_hierarchy.txt
+%%DATADIR%%/site-lisp/site-start.el
%%DATADIR%%/site-lisp/subdirs.el
-%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/site-lisp/site-start.el
%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/alloc.c
%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/android-asset.h
%%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/android-emacs.c
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 11:30 PM (14 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31253575
Default Alt Text
D56001.id174369.diff (12 KB)
Attached To
Mode
D56001: Emacs infrastructure: Overhaul
Attached
Detach File
Event Timeline
Log In to Comment