summaryrefslogtreecommitdiff
path: root/app-editors/emacs/emacs-28.0.9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
commit9c417bacd51da6d8b57fa9f37425161d30d4b95b (patch)
tree47c9d6e4243f39a1f48afd54c969b65b00a5c649 /app-editors/emacs/emacs-28.0.9999.ebuild
parentd934827bf44b7cfcf6711964418148fa60877668 (diff)
gentoo resync : 28.11.2020
Diffstat (limited to 'app-editors/emacs/emacs-28.0.9999.ebuild')
-rw-r--r--app-editors/emacs/emacs-28.0.9999.ebuild57
1 files changed, 42 insertions, 15 deletions
diff --git a/app-editors/emacs/emacs-28.0.9999.ebuild b/app-editors/emacs/emacs-28.0.9999.ebuild
index 9ea17e49b558..e6f3ac9b3448 100644
--- a/app-editors/emacs/emacs-28.0.9999.ebuild
+++ b/app-editors/emacs/emacs-28.0.9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit autotools elisp-common flag-o-matic readme.gentoo-r1
+inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs
if [[ ${PV##*.} = 9999 ]]; then
inherit git-r3
@@ -260,6 +260,17 @@ src_configure() {
fi
fi
+ if tc-is-cross-compiler; then
+ # Configure a CBUILD directory when cross-compiling to make tools
+ mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
+ ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit
+ popd >/dev/null || die
+ # Don't try to execute the binary for dumping during the build
+ myconf+=" --with-dumping=none"
+ else
+ myconf+=" --with-dumping=pdumper"
+ fi
+
econf \
--program-suffix="-${EMACS_SUFFIX}" \
--includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
@@ -269,8 +280,8 @@ src_configure() {
--without-compress-install \
--without-hesiod \
--without-pop \
- --with-dumping=pdumper \
--with-file-notification=$(usev inotify || usev gfile || echo no) \
+ --with-pdumper \
$(use_enable acl) \
$(use_with dbus) \
$(use_with dynamic-loading modules) \
@@ -291,10 +302,19 @@ src_configure() {
${myconf}
}
-#src_compile() {
-# # Disable sandbox when dumping. For the unbelievers, see bug #131505
-# emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
-#}
+src_compile() {
+ if tc-is-cross-compiler; then
+ # Build native tools for compiling lisp etc.
+ emake -C "${S}-build" src
+ emake lib # Cross-compile dependencies first for timestamps
+ # Save native build tools in the cross-directory
+ cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die
+ # Specify the native Emacs to compile lisp
+ emake -C lisp all EMACS="${S}-build/src/emacs"
+ fi
+
+ emake
+}
src_install() {
emake DESTDIR="${D}" NO_BIN_LINK=t BLESSMAIL_TARGET= install
@@ -375,7 +395,7 @@ src_install() {
dodoc README BUGS CONTRIBUTE
- if use aqua; then
+ if use gui && use aqua; then
dodir /Applications/Gentoo
rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app
mv nextstep/Emacs.app \
@@ -390,14 +410,21 @@ src_install() {
it is strongly recommended that you use app-admin/emacs-updater
to rebuild all byte-compiled elisp files of the installed Emacs
packages."
- use gui && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
- Installing media-fonts/font-adobe-{75,100}dpi on the X server's
- machine would satisfy basic Emacs requirements under X11.
- See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
- for how to enable anti-aliased fonts."
- use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in
- \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
- it into /Applications by yourself."
+ if use gui; then
+ DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
+ Installing media-fonts/font-adobe-{75,100}dpi on the X server's
+ machine would satisfy basic Emacs requirements under X11.
+ See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
+ for how to enable anti-aliased fonts."
+ use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in
+ \"${EPREFIX}/Applications/Gentoo\". You may want to copy or
+ symlink it into /Applications by yourself."
+ fi
+ tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write
+ a portable dump file due to being cross-compiled.
+ To create this file at run time, execute the following command:
+ \\n${EMACS_SUFFIX} --batch --eval='(dump-emacs-portable
+ \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'"
readme.gentoo_create_doc
}