summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch')
-rw-r--r--meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch106
1 files changed, 106 insertions, 0 deletions
diff --git a/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
new file mode 100644
index 0000000000..eda6a40f51
--- /dev/null
+++ b/meta/recipes-extended/groff/files/0001-replace-perl-w-with-use-warnings.patch
@@ -0,0 +1,106 @@
1From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Sat, 11 May 2019 17:03:03 +0800
4Subject: [PATCH 1/2] 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
22Rebase to 1.22.4.
23
24Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
25---
26 font/devpdf/util/BuildFoundries.pl | 3 ++-
27 src/devices/gropdf/gropdf.pl | 3 ++-
28 src/devices/gropdf/pdfmom.pl | 3 ++-
29 src/utils/afmtodit/afmtodit.pl | 3 ++-
30 4 files changed, 8 insertions(+), 4 deletions(-)
31
32diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl
33index f8af826..9584e28 100644
34--- a/font/devpdf/util/BuildFoundries.pl
35+++ b/font/devpdf/util/BuildFoundries.pl
36@@ -1,4 +1,4 @@
37-#!/usr/bin/perl -w
38+#!/usr/bin/perl
39 #
40 # BuildFoundries : Given a Foundry file generate groff and download files
41 # Deri James : Monday 07 Feb 2011
42@@ -22,6 +22,7 @@
43 # along with this program. If not, see <http://www.gnu.org/licenses/>.
44
45 use strict;
46+use warnings;
47
48 (my $progname = $0) =~s @.*/@@;
49 my $where=shift||'';
50diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
51index 2ec52d0..ce5a06f 100644
52--- a/src/devices/gropdf/gropdf.pl
53+++ b/src/devices/gropdf/gropdf.pl
54@@ -1,4 +1,4 @@
55-#!@PERL@ -w
56+#!@PERL@
57 #
58 # gropdf : PDF post processor for groff
59 #
60@@ -21,6 +21,7 @@
61 # along with this program. If not, see <http://www.gnu.org/licenses/>.
62
63 use strict;
64+use warnings;
65 use Getopt::Long qw(:config bundling);
66
67 use constant
68diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl
69index c9b08b2..61124f3 100644
70--- a/src/devices/gropdf/pdfmom.pl
71+++ b/src/devices/gropdf/pdfmom.pl
72@@ -1,4 +1,4 @@
73-#!@PERL@ -w
74+#!@PERL@
75 #
76 # pdfmom : Frontend to run groff -mom to produce PDFs
77 # Deri James : Friday 16 Mar 2012
78@@ -23,6 +23,7 @@
79 # along with this program. If not, see <http://www.gnu.org/licenses/>.
80
81 use strict;
82+use warnings;
83 use File::Temp qw/tempfile/;
84 my @cmd;
85 my $dev='pdf';
86diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
87index 954c58e..81a6c97 100644
88--- a/src/utils/afmtodit/afmtodit.pl
89+++ b/src/utils/afmtodit/afmtodit.pl
90@@ -1,4 +1,4 @@
91-#! /usr/bin/perl -w
92+#! /usr/bin/perl
93 # -*- Perl -*-
94 # Copyright (C) 1989-2018 Free Software Foundation, Inc.
95 # Written by James Clark (jjc@jclark.com)
96@@ -19,6 +19,7 @@
97 # along with this program. If not, see <http://www.gnu.org/licenses/>.
98
99 use strict;
100+use warnings;
101
102 @afmtodit.tables@
103
104--
1052.7.4
106