diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2017-04-06 03:05:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-10 23:00:43 +0100 |
commit | 9356d02da0f761d6694c39224c481cf8850d1469 (patch) | |
tree | 0d76cd9062d5f9a52eb33ee5ff131f491ef0f36d /meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch | |
parent | 75001927cdde5dfb0e78ee2cdf1754e9372c0697 (diff) | |
download | poky-9356d02da0f761d6694c39224c481cf8850d1469.tar.gz |
groff: replace "perl -w" with "use warnings"
The shebang's max length is usually 128 as defined in
/usr/include/linux/binfmts.h:
#define BINPRM_BUF_SIZE 128
There would be errors when @PERL@ (hostools/perl) is longer than 128,
use '/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w'
doesn't work:
/usr/bin/env: perl -w: No such file or directory
So replace "perl -w" with "use warnings" to make it work.
(From OE-Core rev: f3408bcf9d2710b07f5825683931e28571de130c)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch')
-rw-r--r-- | meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch b/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch new file mode 100644 index 0000000000..f1db5b0653 --- /dev/null +++ b/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From 5b574542070db286c89b3827e8f15ed4b3b39034 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Thu, 6 Apr 2017 01:46:00 -0700 | ||
4 | Subject: [PATCH] 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 | Upstream-Status: Pending | ||
19 | |||
20 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
21 | --- | ||
22 | font/devpdf/util/BuildFoundries.pl | 3 ++- | ||
23 | src/devices/gropdf/gropdf.pl | 3 ++- | ||
24 | src/devices/gropdf/pdfmom.pl | 3 ++- | ||
25 | src/utils/afmtodit/afmtodit.pl | 3 ++- | ||
26 | 4 files changed, 8 insertions(+), 4 deletions(-) | ||
27 | |||
28 | diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl | ||
29 | index 39f2f0d..a2bfd8e 100644 | ||
30 | --- a/font/devpdf/util/BuildFoundries.pl | ||
31 | +++ b/font/devpdf/util/BuildFoundries.pl | ||
32 | @@ -1,4 +1,4 @@ | ||
33 | -#!/usr/bin/perl -w | ||
34 | +#!/usr/bin/perl | ||
35 | # | ||
36 | # BuildFoundries : Given a Foundry file generate groff and download files | ||
37 | # Deri James : Monday 07 Feb 2011 | ||
38 | @@ -22,6 +22,7 @@ | ||
39 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
40 | |||
41 | use strict; | ||
42 | +use warnings; | ||
43 | |||
44 | my $where=shift||''; | ||
45 | my $devps=shift||'../devps'; | ||
46 | diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl | ||
47 | index 035d123..b933b32 100644 | ||
48 | --- a/src/devices/gropdf/gropdf.pl | ||
49 | +++ b/src/devices/gropdf/gropdf.pl | ||
50 | @@ -1,4 +1,4 @@ | ||
51 | -#!@PERL@ -w | ||
52 | +#!@PERL@ | ||
53 | # | ||
54 | # gropdf : PDF post processor for groff | ||
55 | # | ||
56 | @@ -21,6 +21,7 @@ | ||
57 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
58 | |||
59 | use strict; | ||
60 | +use warnings; | ||
61 | use Getopt::Long qw(:config bundling); | ||
62 | use Compress::Zlib; | ||
63 | |||
64 | diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl | ||
65 | index beec820..4b46ea4 100644 | ||
66 | --- a/src/devices/gropdf/pdfmom.pl | ||
67 | +++ b/src/devices/gropdf/pdfmom.pl | ||
68 | @@ -1,4 +1,4 @@ | ||
69 | -#!@PERL@ -w | ||
70 | +#!@PERL@ | ||
71 | # | ||
72 | # pdfmom : Frontend to run groff -mom to produce PDFs | ||
73 | # Deri James : Friday 16 Mar 2012 | ||
74 | @@ -24,6 +24,7 @@ | ||
75 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
76 | |||
77 | use strict; | ||
78 | +use warnings; | ||
79 | use File::Temp qw/tempfile/; | ||
80 | my @cmd; | ||
81 | my $dev='pdf'; | ||
82 | diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl | ||
83 | index 4f2ce83..5c078ff 100644 | ||
84 | --- a/src/utils/afmtodit/afmtodit.pl | ||
85 | +++ b/src/utils/afmtodit/afmtodit.pl | ||
86 | @@ -1,4 +1,4 @@ | ||
87 | -#! /usr/bin/perl -w | ||
88 | +#! /usr/bin/perl | ||
89 | # -*- Perl -*- | ||
90 | # Copyright (C) 1989-2014 Free Software Foundation, Inc. | ||
91 | # Written by James Clark (jjc@jclark.com) | ||
92 | @@ -19,6 +19,7 @@ | ||
93 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
94 | |||
95 | use strict; | ||
96 | +use warnings; | ||
97 | |||
98 | @afmtodit.tables@ | ||
99 | |||
100 | -- | ||
101 | 2.10.2 | ||
102 | |||