commit:     1e426bc7311ebc80bc5e3e556a23d81b41705fa4
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 19 17:55:30 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Aug 19 17:57:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e426bc7

app-editors/emacs: Enable NATIVE_FULL_AOT=1 with USE=jit

Unfortunately, upstream doesn't provide any configure option for this.
Work around it by setting the environment variable.

Bug: https://bugs.gentoo.org/808522
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/emacs/{emacs-28.1.91.ebuild => emacs-28.1-r3.ebuild}   | 7 +++++--
 .../emacs/{emacs-28.1.91.ebuild => emacs-28.1.91-r1.ebuild}        | 3 +++
 app-editors/emacs/emacs-28.1.9999.ebuild                           | 3 +++
 app-editors/emacs/emacs-29.0.9999.ebuild                           | 3 +++
 4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/app-editors/emacs/emacs-28.1.91.ebuild 
b/app-editors/emacs/emacs-28.1-r3.ebuild
similarity index 98%
copy from app-editors/emacs/emacs-28.1.91.ebuild
copy to app-editors/emacs/emacs-28.1-r3.ebuild
index 52d3b54aba86..20c5afe8a337 100644
--- a/app-editors/emacs/emacs-28.1.91.ebuild
+++ b/app-editors/emacs/emacs-28.1-r3.ebuild
@@ -32,7 +32,7 @@ else
                
SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz";
        fi
        # Patchset from proj/emacs-patches.git
-       SRC_URI+=" 
https://dev.gentoo.org/~ulm/emacs/${PN}-28.1-patches-1.tar.xz";
+       SRC_URI+=" https://dev.gentoo.org/~ulm/emacs/${P}-patches-1.tar.xz";
        PATCHES=("${WORKDIR}/patch")
        SLOT="${PV%%.*}"
        [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
@@ -141,7 +141,7 @@ SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
 
 src_prepare() {
        if [[ ${PV##*.} = 9999 ]]; then
-               FULL_VERSION=$(sed -n 
's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\1/p' \
+               FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ 
\t,)]*\).*/\1/p' \
                        configure.ac)
                [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs 
version"
                einfo "Emacs branch: ${EGIT_BRANCH}"
@@ -152,6 +152,9 @@ src_prepare() {
        fi
 
        if use jit; then
+               export NATIVE_FULL_AOT=1
+               find lisp -type f -name "*.elc" -delete || die
+
                # These files ignore LDFLAGS. We assign the variable here, 
because
                # for live ebuilds FULL_VERSION doesn't exist in global scope
                
QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*"

diff --git a/app-editors/emacs/emacs-28.1.91.ebuild 
b/app-editors/emacs/emacs-28.1.91-r1.ebuild
similarity index 99%
rename from app-editors/emacs/emacs-28.1.91.ebuild
rename to app-editors/emacs/emacs-28.1.91-r1.ebuild
index 52d3b54aba86..f40d3160db81 100644
--- a/app-editors/emacs/emacs-28.1.91.ebuild
+++ b/app-editors/emacs/emacs-28.1.91-r1.ebuild
@@ -152,6 +152,9 @@ src_prepare() {
        fi
 
        if use jit; then
+               export NATIVE_FULL_AOT=1
+               find lisp -type f -name "*.elc" -delete || die
+
                # These files ignore LDFLAGS. We assign the variable here, 
because
                # for live ebuilds FULL_VERSION doesn't exist in global scope
                
QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*"

diff --git a/app-editors/emacs/emacs-28.1.9999.ebuild 
b/app-editors/emacs/emacs-28.1.9999.ebuild
index ce9357f531fc..9dde01902de3 100644
--- a/app-editors/emacs/emacs-28.1.9999.ebuild
+++ b/app-editors/emacs/emacs-28.1.9999.ebuild
@@ -149,6 +149,9 @@ src_prepare() {
        fi
 
        if use jit; then
+               export NATIVE_FULL_AOT=1
+               find lisp -type f -name "*.elc" -delete || die
+
                # These files ignore LDFLAGS. We assign the variable here, 
because
                # for live ebuilds FULL_VERSION doesn't exist in global scope
                
QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*"

diff --git a/app-editors/emacs/emacs-29.0.9999.ebuild 
b/app-editors/emacs/emacs-29.0.9999.ebuild
index 0fde98bc4137..c533ab2a5a6e 100644
--- a/app-editors/emacs/emacs-29.0.9999.ebuild
+++ b/app-editors/emacs/emacs-29.0.9999.ebuild
@@ -171,6 +171,9 @@ src_prepare() {
        fi
 
        if use jit; then
+               export NATIVE_FULL_AOT=1
+               find lisp -type f -name "*.elc" -delete || die
+
                # These files ignore LDFLAGS. We assign the variable here, 
because
                # for live ebuilds FULL_VERSION doesn't exist in global scope
                
QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*"

Reply via email to