1 |
#!/bin/bash |
2 |
|
3 |
# Convert a gtk2-perl program to a standalone linux binary |
4 |
|
5 |
EV_EVENTFD= |
6 |
PERL=/usr |
7 |
PERLLIB=/usr/lib/perl5/ |
8 |
PANGO=1.5.0 |
9 |
#PERL=/opt/perl |
10 |
#PERLLIB=/opt/perl/lib/perl5/ |
11 |
#PANGO=1.6.0 |
12 |
|
13 |
for mod in AnyEvent EV JSON-XS Deliantra Compress-LZF BDB; do |
14 |
( |
15 |
cd /root/src/$mod |
16 |
$PERL/bin/perl Makefile.PL </dev/null |
17 |
make clean |
18 |
$PERL/bin/perl Makefile.PL </dev/null |
19 |
make install || exit |
20 |
make clean |
21 |
) |
22 |
done |
23 |
|
24 |
( |
25 |
# patch braindamaged pango |
26 |
perl -pe 's{/u(?=sr/lib(32)?/pango)}{/\x00}g; s{\Q'$PANGO'\E\x00}{y.t.u\x00}g' </usr/lib/libpango-1.0.so.0 >pango-1.0.so.0 |
27 |
printf "%s" "$PANGO" >pangoversion |
28 |
cat <<EOF |
29 |
pangoversion;root/pangoversion |
30 |
pango-1.0.so.0;shlib/i486-linux-gnu-thread-multi/libpango-1.0.so.0 |
31 |
/usr/lib/libglib-2.0.so.0;shlib/i486-linux-gnu-thread-multi/libglib-2.0.so.0 |
32 |
/usr/lib/libstdc++.so.6;shlib/i486-linux-gnu-thread-multi/libstdc++.so.6 |
33 |
/usr/lib/libaudio.so.2;shlib/i486-linux-gnu-thread-multi/libaudio.so.2 |
34 |
/lib/libgcc_s.so.1;shlib/i486-linux-gnu-thread-multi/libgcc_s.so.1 |
35 |
/usr/lib/pango/$PANGO;root/usr/lib/pango/$PANGO |
36 |
docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst |
37 |
EOF |
38 |
|
39 |
perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST |
40 |
|
41 |
) >addlist |
42 |
|
43 |
trap "rm addlist pangoversion pango-1.0.so.0" 0 |
44 |
|
45 |
$PERL/bin/perl Makefile.PL |
46 |
make clean |
47 |
$PERL/bin/perl Makefile.PL |
48 |
make install || exit |
49 |
|
50 |
wait |
51 |
|
52 |
LD_LIBRARY_PATH=/lib:/usr/lib \ |
53 |
$PERL/bin/pp -C -I /root/src/Deliantra \ |
54 |
-M AnyEvent::Impl::EV \ |
55 |
-M attributes \ |
56 |
-a "blib/arch/auto/Deliantra/Client/Client.so;lib/auto/Deliantra/Client/Client.so" \ |
57 |
-l db-4.6 \ |
58 |
-l glib-2.0 -l gobject-2.0 -l gmodule-2.0 \ |
59 |
-l pangoft2-1.0 \ |
60 |
-l SDL -l asound \ |
61 |
-l SDL_mixer -l vorbisfile -l vorbis -l ogg -l smpeg -l stdc++ \ |
62 |
-l SDL_image -l png12 -l z \ |
63 |
-o deliantra-gnu-linux-x86.bin -A addlist bin/deliantra || exit |
64 |
|
65 |
make clean |
66 |
|
67 |
todata deliantra-gnu-linux-x86.bin |
68 |
|