sys-devel/autogen: respect TMPDIR, bug #704740
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 4 Jan 2020 23:01:52 +0000 (23:01 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 4 Jan 2020 23:02:04 +0000 (23:02 +0000)
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@gentoo.org>
sys-devel/autogen/autogen-5.18.16-r1.ebuild
sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch [new file with mode: 0644]

index ac34681e749f097134a1a03715508a1b2935733b..9949ee08937c7414ae3e713e35d9634fb392f12a 100644 (file)
@@ -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 (file)
index 0000000..792214e
--- /dev/null
@@ -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