diff options
-rw-r--r-- | meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch | 129 | ||||
-rw-r--r-- | meta/recipes-extended/mc/mc_4.8.18.bb | 3 |
2 files changed, 132 insertions, 0 deletions
diff --git a/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch b/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch new file mode 100644 index 0000000000..bf8037cd28 --- /dev/null +++ b/meta/recipes-extended/mc/files/0001-mc-replace-perl-w-with-use-warnings.patch | |||
@@ -0,0 +1,129 @@ | |||
1 | From cdc7c278212ae836eecb4cc9d42c29443cc128a0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Thu, 6 Apr 2017 02:24:28 -0700 | ||
4 | Subject: [PATCH] mc: replace "perl -w" with "use warnings" | ||
5 | |||
6 | The shebang's max length is usually 128 as defined in | ||
7 | /usr/include/linux/binfmts.h: | ||
8 | #define BINPRM_BUF_SIZE 128 | ||
9 | |||
10 | There would be errors when @PERL@ is longer than 128, use | ||
11 | '/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w' | ||
12 | doesn't work: | ||
13 | |||
14 | /usr/bin/env: perl -w: No such file or directory | ||
15 | |||
16 | So replace "perl -w" with "use warnings" to make it work. | ||
17 | |||
18 | The man2hlp.in already has "use warnings;", so just remove '-w' is OK. | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | |||
22 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
23 | --- | ||
24 | src/man2hlp/man2hlp.in | 2 +- | ||
25 | src/vfs/extfs/helpers/a+.in | 4 +++- | ||
26 | src/vfs/extfs/helpers/mailfs.in | 3 ++- | ||
27 | src/vfs/extfs/helpers/patchfs.in | 3 ++- | ||
28 | src/vfs/extfs/helpers/ulib.in | 4 +++- | ||
29 | src/vfs/extfs/helpers/uzip.in | 3 ++- | ||
30 | 6 files changed, 13 insertions(+), 6 deletions(-) | ||
31 | |||
32 | diff --git a/src/man2hlp/man2hlp.in b/src/man2hlp/man2hlp.in | ||
33 | index f095830..558a674 100644 | ||
34 | --- a/src/man2hlp/man2hlp.in | ||
35 | +++ b/src/man2hlp/man2hlp.in | ||
36 | @@ -1,4 +1,4 @@ | ||
37 | -#! @PERL@ -w | ||
38 | +#! @PERL@ | ||
39 | # | ||
40 | # Man page to help file converter | ||
41 | # Copyright (C) 1994, 1995, 1998, 2000, 2001, 2002, 2003, 2004, 2005, | ||
42 | diff --git a/src/vfs/extfs/helpers/a+.in b/src/vfs/extfs/helpers/a+.in | ||
43 | index 579441c..fe446f4 100644 | ||
44 | --- a/src/vfs/extfs/helpers/a+.in | ||
45 | +++ b/src/vfs/extfs/helpers/a+.in | ||
46 | @@ -1,4 +1,4 @@ | ||
47 | -#! @PERL@ -w | ||
48 | +#! @PERL@ | ||
49 | # | ||
50 | # External filesystem for mc, using mtools | ||
51 | # Written Ludek Brukner <lubr@barco.cz>, 1997 | ||
52 | @@ -9,6 +9,8 @@ | ||
53 | |||
54 | # These mtools components must be in PATH for this to work | ||
55 | |||
56 | +use warnings; | ||
57 | + | ||
58 | sub quote { | ||
59 | $_ = shift(@_); | ||
60 | s/([^\w\/.+-])/\\$1/g; | ||
61 | diff --git a/src/vfs/extfs/helpers/mailfs.in b/src/vfs/extfs/helpers/mailfs.in | ||
62 | index e9455be..059f41f 100644 | ||
63 | --- a/src/vfs/extfs/helpers/mailfs.in | ||
64 | +++ b/src/vfs/extfs/helpers/mailfs.in | ||
65 | @@ -1,6 +1,7 @@ | ||
66 | -#! @PERL@ -w | ||
67 | +#! @PERL@ | ||
68 | |||
69 | use bytes; | ||
70 | +use warnings; | ||
71 | |||
72 | # MC extfs for (possibly compressed) Berkeley style mailbox files | ||
73 | # Peter Daum <gator@cs.tu-berlin.de> (Jan 1998, mc-4.1.24) | ||
74 | diff --git a/src/vfs/extfs/helpers/patchfs.in b/src/vfs/extfs/helpers/patchfs.in | ||
75 | index ef407de..3ad4b53 100644 | ||
76 | --- a/src/vfs/extfs/helpers/patchfs.in | ||
77 | +++ b/src/vfs/extfs/helpers/patchfs.in | ||
78 | @@ -1,4 +1,4 @@ | ||
79 | -#! @PERL@ -w | ||
80 | +#! @PERL@ | ||
81 | # | ||
82 | # Written by Adam Byrtek <alpha@debian.org>, 2002 | ||
83 | # Rewritten by David Sterba <dave@jikos.cz>, 2009 | ||
84 | @@ -9,6 +9,7 @@ | ||
85 | |||
86 | use bytes; | ||
87 | use strict; | ||
88 | +use warnings; | ||
89 | use POSIX; | ||
90 | use File::Temp 'tempfile'; | ||
91 | |||
92 | diff --git a/src/vfs/extfs/helpers/ulib.in b/src/vfs/extfs/helpers/ulib.in | ||
93 | index 418611f..82c7ccf 100644 | ||
94 | --- a/src/vfs/extfs/helpers/ulib.in | ||
95 | +++ b/src/vfs/extfs/helpers/ulib.in | ||
96 | @@ -1,9 +1,11 @@ | ||
97 | -#! @PERL@ -w | ||
98 | +#! @PERL@ | ||
99 | # | ||
100 | # VFS to manage the gputils archives. | ||
101 | # Written by Molnár Károly (proton7@freemail.hu) 2012 | ||
102 | # | ||
103 | |||
104 | +use warnings; | ||
105 | + | ||
106 | my %month = ('jan' => '01', 'feb' => '02', 'mar' => '03', | ||
107 | 'apr' => '04', 'may' => '05', 'jun' => '06', | ||
108 | 'jul' => '07', 'aug' => '08', 'sep' => '09', | ||
109 | diff --git a/src/vfs/extfs/helpers/uzip.in b/src/vfs/extfs/helpers/uzip.in | ||
110 | index b1c4f90..c8eb335 100644 | ||
111 | --- a/src/vfs/extfs/helpers/uzip.in | ||
112 | +++ b/src/vfs/extfs/helpers/uzip.in | ||
113 | @@ -1,4 +1,4 @@ | ||
114 | -#! @PERL@ -w | ||
115 | +#! @PERL@ | ||
116 | # | ||
117 | # zip file archive Virtual File System for Midnight Commander | ||
118 | # Version 1.4.0 (2001-08-07). | ||
119 | @@ -9,6 +9,7 @@ | ||
120 | use POSIX; | ||
121 | use File::Basename; | ||
122 | use strict; | ||
123 | +use warnings; | ||
124 | |||
125 | # | ||
126 | # Configuration options | ||
127 | -- | ||
128 | 2.10.2 | ||
129 | |||
diff --git a/meta/recipes-extended/mc/mc_4.8.18.bb b/meta/recipes-extended/mc/mc_4.8.18.bb index 78abb275ba..17f3f73af7 100644 --- a/meta/recipes-extended/mc/mc_4.8.18.bb +++ b/meta/recipes-extended/mc/mc_4.8.18.bb | |||
@@ -7,6 +7,7 @@ DEPENDS = "ncurses glib-2.0 util-linux" | |||
7 | RDEPENDS_${PN} = "ncurses-terminfo" | 7 | RDEPENDS_${PN} = "ncurses-terminfo" |
8 | 8 | ||
9 | SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ | 9 | SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ |
10 | file://0001-mc-replace-perl-w-with-use-warnings.patch \ | ||
10 | " | 11 | " |
11 | SRC_URI[md5sum] = "cc56f0c9abd63c4caa3636bba3a08bfb" | 12 | SRC_URI[md5sum] = "cc56f0c9abd63c4caa3636bba3a08bfb" |
12 | SRC_URI[sha256sum] = "5b591e10dcbea95233434da40cdad4663d360229adf89826576c319667c103cb" | 13 | SRC_URI[sha256sum] = "5b591e10dcbea95233434da40cdad4663d360229adf89826576c319667c103cb" |
@@ -22,6 +23,8 @@ PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," | |||
22 | 23 | ||
23 | EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" | 24 | EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" |
24 | 25 | ||
26 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | ||
27 | |||
25 | do_install_append () { | 28 | do_install_append () { |
26 | sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* | 29 | sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* |
27 | sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* | 30 | sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* |