commit:     f40ffc42c1381cd29aa3b75b5d0c3c1372b175c5
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 22 13:21:05 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 11 12:02:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f40ffc42

app-editors/emacs: Disable the sandbox only when dumping.

Apply this also to slots 18, 23, and 24.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-editors/emacs/emacs-18.59-r11.ebuild | 13 ++++++++++---
 app-editors/emacs/emacs-23.4-r17.ebuild  |  5 +++--
 app-editors/emacs/emacs-24.5-r5.ebuild   |  4 ++--
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/app-editors/emacs/emacs-18.59-r11.ebuild 
b/app-editors/emacs/emacs-18.59-r11.ebuild
index 8b9d3d2c04e..9b260064e0b 100644
--- a/app-editors/emacs/emacs-18.59-r11.ebuild
+++ b/app-editors/emacs/emacs-18.59-r11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -28,6 +28,14 @@ DEPEND="${RDEPEND}
 
 PATCHES="../${P}-linux22x-elf-glibc21.diff ../patch"
 
+src_prepare() {
+       default
+
+       # Do not use the sandbox, or the dumped Emacs will be twice as large
+       sed -i -e 's:\./temacs.*dump:env SANDBOX_ON=0 LD_PRELOAD= &:' \
+               src/ymakefile || die
+}
+
 src_configure() {
        # autoconf? What's autoconf? We are living in 1992. ;-)
        local arch
@@ -70,8 +78,7 @@ src_configure() {
 }
 
 src_compile() {
-       # Do not use the sandbox, or the dumped Emacs will be twice as large
-       export SANDBOX_ON=0
+       addpredict /var/lib/emacs/lock
        emake --jobs=1 \
                CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Demacs" \
                LD="$(tc-getCC) -nostdlib" LDFLAGS="${LDFLAGS}"

diff --git a/app-editors/emacs/emacs-23.4-r17.ebuild 
b/app-editors/emacs/emacs-23.4-r17.ebuild
index 92884cb78c1..b331aae1a49 100644
--- a/app-editors/emacs/emacs-23.4-r17.ebuild
+++ b/app-editors/emacs/emacs-23.4-r17.ebuild
@@ -223,10 +223,11 @@ src_configure() {
 }
 
 src_compile() {
-       export SANDBOX_ON=0                     # for the unbelievers, see Bug 
#131505
+       # Disable sandbox when dumping. For the unbelievers, see bug #131505
        emake CC="$(tc-getCC)" \
                AR="$(tc-getAR) cq" \
-               RANLIB="$(tc-getRANLIB)"
+               RANLIB="$(tc-getRANLIB)" \
+               RUN_TEMACS="env SANDBOX_ON=0 LD_PRELOAD= ./temacs"
 }
 
 src_install () {

diff --git a/app-editors/emacs/emacs-24.5-r5.ebuild 
b/app-editors/emacs/emacs-24.5-r5.ebuild
index cc5f76a02d4..2668c7388bd 100644
--- a/app-editors/emacs/emacs-24.5-r5.ebuild
+++ b/app-editors/emacs/emacs-24.5-r5.ebuild
@@ -224,8 +224,8 @@ src_configure() {
 }
 
 src_compile() {
-       export SANDBOX_ON=0                     # for the unbelievers, see Bug 
#131505
-       emake
+       # Disable sandbox when dumping. For the unbelievers, see bug #131505
+       emake RUN_TEMACS="env SANDBOX_ON=0 LD_PRELOAD= ./temacs"
 }
 
 src_install () {

Reply via email to