media-sound/twolame: Fix tests with recent perl, bug #605726.
authorAlexis Ballier <aballier@gentoo.org>
Mon, 19 Jun 2017 11:49:28 +0000 (13:49 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 19 Jun 2017 11:49:36 +0000 (13:49 +0200)
Patch by  Kent Fredric.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

media-sound/twolame/files/0.3.13-perl-tests.patch [new file with mode: 0644]
media-sound/twolame/twolame-0.3.13-r2.ebuild

diff --git a/media-sound/twolame/files/0.3.13-perl-tests.patch b/media-sound/twolame/files/0.3.13-perl-tests.patch
new file mode 100644 (file)
index 0000000..5ec5b66
--- /dev/null
@@ -0,0 +1,32 @@
+From 11a5ecb89de1e61b016f3d7f358b09a4e611f1ad Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentfredric@gmail.com>
+Date: Tue, 17 Jan 2017 12:18:10 +1300
+Subject: [PATCH] tests/test.pl: stat the right file
+
+stat(@_) is effectively stat scalar @_
+
+becasue "stat" has a signature of "$" which coerces arrays to
+scalars, which here, returns the length of the array.
+
+This is going to be number 1, instead of the desired argument,
+     the filename.
+---
+ tests/test.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test.pl b/tests/test.pl
+index 658eadf..5513d6e 100755
+--- a/tests/test.pl
++++ b/tests/test.pl
+@@ -185,7 +185,7 @@ sub input_filepath {
+ }
+ 
+ sub filesize {
+-  return (stat(@_))[7];
++  return (stat($_[0]))[7];
+ }
+ 
+ sub md5_file {
+-- 
+2.11.0
+
index 31fcf8be8d30fce51c9de428b216440c8a6a9ccf..6ce14c44ee50c4f129ff9ca082ab33fa9ce530c2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -20,6 +20,8 @@ RDEPEND=">=media-libs/libsndfile-1.0.25[${MULTILIB_USEDEP}]
 DEPEND="${RDEPEND}
        virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/${PV}-perl-tests.patch" )
+
 src_prepare() {
        sed -i -e '/CFLAGS/s:-O3::' configure || die
        # remove -Werror, bug 493940