1 |
commit: e2931d12fcebf38f2f2e9f60e53603949f016b37 |
2 |
Author: Andrew Wilcox <AWilcox <AT> Wilcox-Tech <DOT> com> |
3 |
AuthorDate: Fri Jan 22 09:02:17 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 22 09:02:17 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2931d12 |
7 |
|
8 |
net-irc/inspircd: patch tmpnam call (bug #560362) |
9 |
|
10 |
POSIX::tmpnam() was deprecated in Perl 5.22 which causes a failure in |
11 |
./configure with various combinations of USE flags enabled on systems |
12 |
with 5.22 installed. |
13 |
|
14 |
.../inspircd-2.0.20-deprecated-tmpnam-560362.patch | 33 ++++++++++++++++++++++ |
15 |
net-irc/inspircd/inspircd-2.0.20.ebuild | 7 +++-- |
16 |
2 files changed, 38 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/net-irc/inspircd/files/inspircd-2.0.20-deprecated-tmpnam-560362.patch b/net-irc/inspircd/files/inspircd-2.0.20-deprecated-tmpnam-560362.patch |
19 |
new file mode 100644 |
20 |
index 0000000..9212841 |
21 |
--- /dev/null |
22 |
+++ b/net-irc/inspircd/files/inspircd-2.0.20-deprecated-tmpnam-560362.patch |
23 |
@@ -0,0 +1,33 @@ |
24 |
+From 79d1a436bb5c7ab40e43130495c455ffc8c682a2 Mon Sep 17 00:00:00 2001 |
25 |
+From: Richard Bradfield <bradfirj@×××××.me> |
26 |
+Date: Wed, 22 Jul 2015 01:18:03 +0100 |
27 |
+Subject: [PATCH] Replace deprecated tmpnam() call |
28 |
+ |
29 |
+From Perl 5.22 onwards, POSIX::tmpnam() has been deprecated (without the |
30 |
+usual 2 year deprecation cycle), using the File::Temp module instead |
31 |
+preserves compatibility while allowing compilation on 5.22 and later. |
32 |
+--- |
33 |
+ make/utilities.pm | 3 ++- |
34 |
+ 1 file changed, 2 insertions(+), 1 deletion(-) |
35 |
+ |
36 |
+diff --git a/make/utilities.pm b/make/utilities.pm |
37 |
+index ae16ce3..baba584 100644 |
38 |
+--- a/make/utilities.pm |
39 |
++++ b/make/utilities.pm |
40 |
+@@ -29,6 +29,7 @@ use warnings FATAL => qw(all); |
41 |
+ |
42 |
+ use Exporter 'import'; |
43 |
+ use POSIX; |
44 |
++use File::Temp; |
45 |
+ use Getopt::Long; |
46 |
+ use Fcntl; |
47 |
+ our @EXPORT = qw(make_rpath pkgconfig_get_include_dirs pkgconfig_get_lib_dirs pkgconfig_check_version translate_functions promptstring); |
48 |
+@@ -404,7 +405,7 @@ sub translate_functions($$) |
49 |
+ my $tmpfile; |
50 |
+ do |
51 |
+ { |
52 |
+- $tmpfile = tmpnam(); |
53 |
++ $tmpfile = File::Temp::tmpnam(); |
54 |
+ } until sysopen(TF, $tmpfile, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0700); |
55 |
+ print "(Created and executed \e[1;32m$tmpfile\e[0m)\n"; |
56 |
+ print TF $1; |
57 |
|
58 |
diff --git a/net-irc/inspircd/inspircd-2.0.20.ebuild b/net-irc/inspircd/inspircd-2.0.20.ebuild |
59 |
index d2ea27a..4ae0ac3 100644 |
60 |
--- a/net-irc/inspircd/inspircd-2.0.20.ebuild |
61 |
+++ b/net-irc/inspircd/inspircd-2.0.20.ebuild |
62 |
@@ -1,4 +1,4 @@ |
63 |
-# Copyright 1999-2015 Gentoo Foundation |
64 |
+# Copyright 1999-2016 Gentoo Foundation |
65 |
# Distributed under the terms of the GNU General Public License v2 |
66 |
# $Id$ |
67 |
|
68 |
@@ -37,7 +37,10 @@ src_prepare() { |
69 |
# Patch the inspircd launcher with the inspircd user |
70 |
sed -i -e "s/@UID@/${PN}/" "${S}/make/template/${PN}" || die |
71 |
|
72 |
- epatch "${FILESDIR}/${P}-fix-path-builds.patch" |
73 |
+ epatch "${FILESDIR}"/${P}-fix-path-builds.patch |
74 |
+ epatch "${FILESDIR}"/${P}-deprecated-tmpnam-560362.patch |
75 |
+ |
76 |
+ epatch_user |
77 |
} |
78 |
|
79 |
src_configure() { |