|
1
|
+# Copyright © 2021 Felix Lechner
|
|
2
|
+#
|
|
3
|
+# This program is free software; you can redistribute it and/or modify
|
|
4
|
+# it under the terms of the GNU General Public License as published by
|
|
5
|
+# the Free Software Foundation; either version 2 of the License, or
|
|
6
|
+# (at your option) any later version.
|
|
7
|
+#
|
|
8
|
+# This program is distributed in the hope that it will be useful,
|
|
9
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+# GNU General Public License for more details.
|
|
12
|
+#
|
|
13
|
+# You should have received a copy of the GNU General Public License
|
|
14
|
+# along with this program. If not, you can find it on the World Wide
|
|
15
|
+# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
|
|
16
|
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
|
17
|
+# MA 02110-1301, USA.
|
|
18
|
+
|
|
19
|
+package Lintian::Screen::Autotools::LongLines;
|
|
20
|
+
|
|
21
|
+use v5.20;
|
|
22
|
+use warnings;
|
|
23
|
+use utf8;
|
|
24
|
+
|
|
25
|
+use Moo;
|
|
26
|
+use namespace::clean;
|
|
27
|
+
|
|
28
|
+with 'Lintian::Screen';
|
|
29
|
+
|
|
30
|
+sub suppress {
|
|
31
|
+ my ($self, $processable, $hint) = @_;
|
|
32
|
+
|
|
33
|
+ my $item = $hint->pointer->item;
|
|
34
|
+
|
|
35
|
+ # ./configure script in source root only
|
|
36
|
+ return 1
|
|
37
|
+ if $item->name eq 'configure'
|
|
38
|
+ && ( defined $processable->patched->resolve_path('configure.in')
|
|
39
|
+ || defined $processable->patched->resolve_path('configure.ac'));
|
|
40
|
+
|
|
41
|
+ # Automake's Makefile.in in any folder
|
|
42
|
+ return 1
|
|
43
|
+ if $item->basename eq 'Makefile.in'
|
|
44
|
+ && defined $processable->patched->resolve_path(
|
|
45
|
+ $item->dirname . '/Makefile.am');
|
|
46
|
+
|
|
47
|
+ # any m4 macro as long as ./configure is present
|
|
48
|
+ return 1
|
|
49
|
+ if $item->name =~ m{^ m4/ }x
|
|
50
|
+ && defined $processable->patched->resolve_path('configure');
|
|
51
|
+
|
|
52
|
+ return 0;
|
|
53
|
+}
|
|
54
|
+
|
|
55
|
+1;
|
|
56
|
+
|
|
57
|
+# Local Variables:
|
|
58
|
+# indent-tabs-mode: nil
|
|
59
|
+# cperl-indent-level: 4
|
|
60
|
+# End:
|
|
61
|
+# vim: syntax=perl sw=4 sts=4 sr et
|