Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/autoconf/, sys-devel/autoconf/files/
Date: Sun, 01 Aug 2021 19:44:39
Message-Id: 1627847064.a27bb196930c2b32f3f24956d902c2849d27d20b.dilfridge@gentoo
1 commit: a27bb196930c2b32f3f24956d902c2849d27d20b
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 1 19:44:14 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 1 19:44:24 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a27bb196
7
8 sys-devel/autoconf: use Time::HiRes functions, bug 782985
9
10 While this solution is perfect for Gentoo, it may not be upstreamable
11 (since Time::HiRes was introduced in Perl 5.8 and autoconf upstream
12 insists on supporting Perl 5.6).
13
14 Bug: https://bugs.gentoo.org/782985
15 Package-Manager: Portage-3.0.20, Repoman-3.0.3
16 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
17
18 sys-devel/autoconf/autoconf-2.71.ebuild | 2 +
19 sys-devel/autoconf/files/autoconf-2.71-time.patch | 49 +++++++++++++++++++++++
20 2 files changed, 51 insertions(+)
21
22 diff --git a/sys-devel/autoconf/autoconf-2.71.ebuild b/sys-devel/autoconf/autoconf-2.71.ebuild
23 index 3405416d23c..b142fa3470f 100644
24 --- a/sys-devel/autoconf/autoconf-2.71.ebuild
25 +++ b/sys-devel/autoconf/autoconf-2.71.ebuild
26 @@ -37,6 +37,8 @@ RDEPEND="${BDEPEND}
27 [[ ${PV} == "9999" ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
28 PDEPEND="emacs? ( app-emacs/autoconf-mode )"
29
30 +PATCHES=( "${FILESDIR}/${P}-time.patch" )
31 +
32 src_prepare() {
33 # usr/bin/libtool is provided by binutils-apple, need gnu libtool
34 if [[ ${CHOST} == *-darwin* ]] ; then
35
36 diff --git a/sys-devel/autoconf/files/autoconf-2.71-time.patch b/sys-devel/autoconf/files/autoconf-2.71-time.patch
37 new file mode 100644
38 index 00000000000..8ecfe10f40a
39 --- /dev/null
40 +++ b/sys-devel/autoconf/files/autoconf-2.71-time.patch
41 @@ -0,0 +1,49 @@
42 +From e194b3c7e00429612a9d40e78ea571687fd25b91 Mon Sep 17 00:00:00 2001
43 +From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@g.o>
44 +Date: Sun, 1 Aug 2021 19:07:48 +0200
45 +Subject: [PATCH] Use stat from Time::HiRes (instead of File::stat)
46 +MIME-Version: 1.0
47 +Content-Type: text/plain; charset=UTF-8
48 +Content-Transfer-Encoding: 8bit
49 +
50 +Signed-off-by: Andreas K. Hüttel <dilfridge@g.o>
51 +---
52 + lib/Autom4te/FileUtils.pm | 9 +++++----
53 + 1 file changed, 5 insertions(+), 4 deletions(-)
54 +
55 +diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
56 +index a182031b..27a5fd91 100644
57 +--- a/lib/Autom4te/FileUtils.pm
58 ++++ b/lib/Autom4te/FileUtils.pm
59 +@@ -34,12 +34,12 @@ This perl module provides various general purpose file handling functions.
60 +
61 + =cut
62 +
63 +-use 5.006;
64 ++use 5.008;
65 + use strict;
66 + use warnings FATAL => 'all';
67 +
68 + use Exporter;
69 +-use File::stat;
70 ++use Time::HiRes qw(stat);
71 + use IO::File;
72 +
73 + use Autom4te::Channels;
74 +@@ -115,10 +115,11 @@ sub mtime ($)
75 + return 0
76 + if $file eq '-' || ! -f $file;
77 +
78 +- my $stat = stat ($file)
79 ++ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
80 ++ $atime,$mtime,$ctime,$blksize,$blocks) = stat ($file)
81 + or fatal "cannot stat $file: $!";
82 +
83 +- return $stat->mtime;
84 ++ return $mtime;
85 + }
86 +
87 +
88 +--
89 +2.31.1
90 +