-
Notifications
You must be signed in to change notification settings - Fork 33
/
MANIFEST.SKIP.PL
executable file
·128 lines (122 loc) · 2.22 KB
/
MANIFEST.SKIP.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/usr/local/bin/nperl -w
use File::Find;
use File::Basename;
my %skip;
my %files;
my %maybe;
sub wanted
{
my $s = $File::Find::name;
$s =~ s#^\./##;
return if $s =~ m#^\.pc/#; # quilt state dir
$files{$s} = 1 if (-f $_);
if (/\.xs$/)
{
$s =~ s#\.xs$#.c#;
$skip{$s} = 1;
}
if ($s =~ m#^((.*)/mTk/.*?)/([^/]+\.[ch])$#x)
{
$maybe{$1}{$3} = $2 unless $_ eq 'Xlib.h';
}
}
find(\&wanted,'.');
foreach my $dir (sort keys %maybe)
{
if (open(INC,"$dir/pTk.inc"))
{
warn "Reading $dir/pTk.inc\n";
my %only;
while (<INC>)
{
$only{$1} = 1 if (/(\S+)/);
}
close(INC);
foreach my $name (keys %{$maybe{$dir}})
{
delete $maybe{$dir}{$name} unless exists $only{$name};
}
}
elsif (open(EXC,"$dir/pTk.exc"))
{
warn "Reading $dir/pTk.exc\n";
while (<EXC>)
{
delete $maybe{$dir}{$1} if /(\S+)/;
}
close(EXC);
}
foreach my $name (sort keys %{$maybe{$dir}})
{
my $wh = $maybe{$dir}{$name};
$skip{"$wh/$name"} = 1;
}
}
chmod(0644,"MANIFEST.SKIP");
open(SKIP,">MANIFEST.SKIP") || die "Cannot open MANIFEST.SKIP:$!";
print SKIP <<'EOF'
\.[oaid]$
\.(bso?|old|bak|bck|base|exp|broke|out|hide|q4|gz|tcl|rtf|orig)$
^\.
/\.
C\+\+/Main$
^appveyor\.yml$
\bcore$
\bConfig.pm$
\bpTk/tkConfig\.h$
\bpTk/(need|canvas_sources)$
\b(pm_to_blib|blibdirs|perl|wedge|efdebug)$
[%~]$
\b(blib|merge|Ilya|Pixmap|patches|pod2)/
\bTix/
tcl\.pm$
\bcore\b
Canvas/diag\.txt$
pod/html$
\bdoc/
Tk.ppd$
\b(ToDo|learn|Pending|Obsolete)/
\b(GNU)?[Mm]akefile(\.aperl)?$
-bug$
\bperlmain\.c$
\btkperl\b
\bHTML/doc\b
\bEvent/Play\b
\bEvent/fe
pod/tkman.ps$
extralibs\.ld
doc/index\.html$
doc/MANFILES$
doc/.*\.htm$
myConfig\.out
\bMYMETA.yml$
\bMYMETA.json$
JPEG/jpeg/testout*
JPEG/jpeg/config\.(log|status)
JPEG/jpeg/([cd]jpeg|jpegtran|(rd|wr)jpgcom)
JPEG/jpeg/Makefile\.PL$
PNG/libpng/Makefile\.PL$
PNG/libpng/pngtest$
PNG/libpng/config.h$
PNG/libpng/config.log$
PNG/libpng/config.status$
PNG/libpng/libpng-config$
PNG/libpng/libpng.pc$
PNG/libpng/libtool$
PNG/libpng/stamp-h1$
PNG/zlib/example$
PNG/zlib/Makefile\.PL$
PNG/zlib/minigzip$
\.todo$
\bswapm$
bin/patchls$
JPEG/jpeg/jconfig.h$
prep_rel$
EOF
;
foreach (sort keys %skip)
{
s#\.#\\.#;
print SKIP "$_\$\n";
}
close(SKIP);