app-editors/emacs: Disable the sandbox only when dumping.
authorUlrich Müller <ulm@gentoo.org>
Thu, 22 Feb 2018 13:21:05 +0000 (14:21 +0100)
committerUlrich Müller <ulm@gentoo.org>
Sun, 11 Mar 2018 12:02:37 +0000 (13:02 +0100)
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
app-editors/emacs/emacs-23.4-r17.ebuild
app-editors/emacs/emacs-24.5-r5.ebuild

index 8b9d3d2c04e9d3d69247baee35a1c9d8e8c5fded..9b260064e0b83e569c82cb89e8f043c160d3f1d5 100644 (file)
@@ -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}"
index 92884cb78c16ec6a330364616ce0f841f8b13af3..b331aae1a49cc72b0b583e061e5ac27f6afe495d 100644 (file)
@@ -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 () {
index cc5f76a02d4993eada66285cc8249db3881087bf..2668c7388bd9640add2fd937b8b61db963702619 100644 (file)
@@ -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 () {