lua-54: updated to 5.4.7
[oi-userland.git] / components / runtime / smalltalk / stack-spur / tools / classify.pl
blob12c8e538d3a7374019026d97300812188ef79a57
1 #!/usr/bin/perl
4 # because Squeak has many plugins,
5 # there are also many dependencies
6 # in order to have a small "kernel" package
7 # this script is used
9 # the script "classifies" plugins into currently 3 categories:
10 # - stack-spur-nodisplay (only libc,libm math,libpthread, ksh)
11 # - stack-spur-display-X11 (only x11,xext,xrender)
12 # - stack-spur (ssl,ffi,pulseaudio freetype2,gnome, everything else)
14 # ./classify.pl < sample2.p5m
17 open(NODISPLAY,">>","stack-spur-nodisplay.p5m") || die "Can't open stack-spur-nodisplay.p5m";
19 open(X11,">>","stack-spur-display-X11.p5m") || die "Can't open stack-spur-display-X11.p5m";
21 open(SSL,">>","stack-spur-ssl.p5m") || die "Can't open stack-spur-ssl.p5m";
22 open(VEP,">>","stack-spur-vep.p5m") || die "Can't open stack-spur-vep.p5m";
24 open(REST,">>","stack-spur.p5m") || die "Can't open stack-spur.p5m";
26 while (<>) {
27 if (/^#/) {
28 # ignore lines that start with comment
29 } elsif (/^$/) {
30 # ignore empty lines
31 } elsif (/license /) {
32 # ignore license lines
33 } elsif (/set name=/) {
34 # ignore those lines
35 } elsif (/dir path=/) {
36 # ignore those lines
37 } elsif (/file path=usr\/squeak/) {
38 # ignore those lines
39 } elsif (/file path=/) {
40 if (/Sun/) {
41 # ignore the Sun sound plugin - we use pulseaudio
42 } elsif (/vm-sound-OSS/) {
43 # ignore the OSS sound plugin - we use pulseaudio
44 } elsif (/usr\/bin/) {
45 # don't deal with driver scripts here
46 } elsif (/usr\/doc/) {
47 # don't deal with docs here
48 } elsif (/man1/) {
49 # don't deal with the manpages here
50 } elsif (/squeak$/) {
51 # don't deal with the actual binary here
52 } elsif (/ckformat^/) {
53 # don't deal with the ckformat binary here
54 } elsif (/AioPlugin/) {
55 print NODISPLAY $_;
56 } elsif (/ClipboardExtendedPlugin/) {
57 print X11 $_;
58 } elsif (/FileCopyPlugin/) {
59 print NODISPLAY $_;
60 } elsif (/HostWindowPlugin/) {
61 print X11 $_;
62 } elsif (/ImmX11Plugin/) {
63 print X11 $_;
64 } elsif (/Squeak3D/) {
65 print X11 $_;
66 } elsif (/SqueakSSL/) {
67 print SSL $_;
68 } elsif (/B3DAcceleratorPlugin/) {
69 print X11 $_;
70 } elsif (/UnixOSProcessPlugin/) {
71 print NODISPLAY $_;
72 } elsif (/MD5Plugin/) {
73 print NODISPLAY $_;
74 } elsif (/SHA2Plugin/) {
75 print NODISPLAY $_;
76 } elsif (/DESPlugin/) {
77 print NODISPLAY $_;
78 } elsif (/XDisplayControlPlugin/) {
79 print X11 $_;
80 } elsif (/VectorEnginePlugin/) {
81 print VEP $_;
82 } elsif (/vm-sound-null/) {
83 print NODISPLAY $_;
84 } elsif (/vm-display-null/) {
85 print NODISPLAY $_;
86 } elsif (/vm-display-X11/) {
87 print X11 $_;
88 } elsif (/vm-display-X11/) {
89 print X11 $_;
90 } elsif (/usr\/lib\/squeak/) {
91 print REST $_;
92 } elsif (/usr\/lib\/\$\(MACH64\)\/squeak/) {
93 print REST $_;
94 } else {
95 # unclassified files
96 print $_;
98 } elsif (/inisqueak.1/) {
99 # ignore manpage hardlink
100 } elsif (/hardlink path=/) {
101 # unclassified files
102 print $_;
103 } elsif (/link path=/) {
104 # unclassified files
105 print $_;
106 } else {
107 # unclassified files
108 print $_;