summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-04-06 03:05:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-10 23:00:43 +0100
commit9356d02da0f761d6694c39224c481cf8850d1469 (patch)
tree0d76cd9062d5f9a52eb33ee5ff131f491ef0f36d /meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch
parent75001927cdde5dfb0e78ee2cdf1754e9372c0697 (diff)
downloadpoky-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.patch102
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 @@
1From 5b574542070db286c89b3827e8f15ed4b3b39034 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 6 Apr 2017 01:46:00 -0700
4Subject: [PATCH] replace "perl -w" with "use warnings"
5
6The shebang's max length is usually 128 as defined in
7/usr/include/linux/binfmts.h:
8 #define BINPRM_BUF_SIZE 128
9
10There 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'
12doesn't work:
13
14/usr/bin/env: perl -w: No such file or directory
15
16So replace "perl -w" with "use warnings" to make it work.
17
18Upstream-Status: Pending
19
20Signed-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
28diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl
29index 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';
46diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
47index 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
64diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl
65index 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';
82diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
83index 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--
1012.10.2
102