commit:     5105f322b3ff910d5d0ded2d485d5c33398eaf1c
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  4 23:01:52 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Jan  4 23:02:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5105f322

sys-devel/autogen: respect TMPDIR, bug #704740

Reported-by: Fedja Beader
Fixed-by: Fedja Beader
Closes: https://bugs.gentoo.org/704740
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/autogen/autogen-5.18.16-r1.ebuild        |  3 ++-
 .../files/autogen-5.18.16-respect-TMPDIR.patch     | 29 ++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/sys-devel/autogen/autogen-5.18.16-r1.ebuild 
b/sys-devel/autogen/autogen-5.18.16-r1.ebuild
index ac34681e749..9949ee08937 100644
--- a/sys-devel/autogen/autogen-5.18.16-r1.ebuild
+++ b/sys-devel/autogen/autogen-5.18.16-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -22,6 +22,7 @@ DEPEND="${RDEPEND}"
 PATCHES=(
        "${FILESDIR}"/${PN}-5.18.16-no-werror.patch
        "${FILESDIR}"/${PN}-5.18.16-rpath.patch
+       "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch
 )
 
 src_prepare() {

diff --git a/sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch 
b/sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch
new file mode 100644
index 00000000000..792214e476d
--- /dev/null
+++ b/sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch
@@ -0,0 +1,29 @@
+User ebuild's ${T} instead of /tmp to hide leftover files from ./configure.
+
+'run-ag.sh' does not clean temporary directories after itself and makes
+it hard to implement it cleanly without changing 'run-ag.sh' structure.
+
+Reported-by: Fedja Beader
+Bug: https://bugs.gentoo.org/704740
+--- a/build-aux/run-ag.sh
++++ b/build-aux/run-ag.sh
+@@ -45,7 +45,7 @@ find_exe() {
+   return 0
+ }
+ 
+-STAMP_TEMP_DIR=$(mktemp --suffix=.tdir -d /tmp/run-ag-XXXXXXXX)
++STAMP_TEMP_DIR=$(mktemp --suffix=.tdir -d -t run-ag-XXXXXXXX)
+ exec 9>&2 2>> ${STAMP_TEMP_DIR}/mk-stamps.log
+ VERBOSE=1
+ 
+--- a/config/mk-shdefs.in
++++ b/config/mk-shdefs.in
+@@ -130,7 +130,7 @@
+ 
+ set -x
+ exec 9>&2
+-tmp=$(mktemp --suffix=.tdir -d /tmp/shdefs-XXXXXXXXX)
++tmp=$(mktemp --suffix=.tdir -d -t shdefs-XXXXXXXXX)
+ exec 2>> $tmp/mk-shdef.log
+ init $0 $1
+ mk_config

Reply via email to