ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/Deliantra-Client/makebin.linux
Revision: 1.19
Committed: Tue Sep 30 03:05:07 2008 UTC (15 years, 9 months ago) by root
Branch: MAIN
CVS Tags: rel-2_0, rel-0_9977, rel-0_9978
Changes since 1.18: +42 -3 lines
Log Message:
*** empty log message ***

File Contents

# Content
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 #pangoversion;root/pangoversion
29 cat <<EOF
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 pango-1.0.so.0;shlib/i486-linux-gnu-thread-multi/libpango-1.0.so.0
37 docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst
38 EOF
39
40 cat <<EOF >pango.rc
41 [Pango]
42 ModuleFiles = pango.modules
43 EOF
44 echo "pango.rc;root/pango.rc"
45
46 cat >fonts.conf <<EOF
47 <?xml version="1.0"?>
48 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
49 <fontconfig>
50
51 <match target="pattern"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="family" mode="assign"> <string>monospace</string> </edit> </match>
52
53 <match target="pattern"> <test qual="any" name="family"> <string>sans serif</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match>
54
55 <match target="pattern"> <test qual="any" name="family"> <string>sans</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match>
56
57 <cachedir>fontconfig-cache</cachedir>
58
59 <config>
60 <blank>
61 <int>0x0020</int><int>0x00A0</int><int>0x00AD</int><int>0x034F</int><int>0x0600</int><int>0x0601</int><int>0x0602</int><int>0x0603</int><int>0x06DD</int><int>0x070F</int><int>0x115F</int><int>0x1160</int><int>0x1680</int><int>0x17B4</int><int>0x17B5</int><int>0x180E</int><int>0x2000</int><int>0x2001</int><int>0x2002</int><int>0x2003</int><int>0x2004</int><int>0x2005</int><int>0x2006</int><int>0x2007</int><int>0x2008</int><int>0x2009</int><int>0x200A</int><int>0x200B</int><int>0x200C</int><int>0x200D</int><int>0x200E</int><int>0x200F</int><int>0x2028</int><int>0x2029</int><int>0x202A</int><int>0x202B</int><int>0x202C</int><int>0x202D</int><int>0x202E</int><int>0x202F</int><int>0x205F</int><int>0x2060</int><int>0x2061</int><int>0x2062</int><int>0x2063</int><int>0x206A</int><int>0x206B</int><int>0x206C</int><int>0x206D</int><int>0x206E</int><int>0x206F</int><int>0x2800</int><int>0x3000</int><int>0x3164</int><int>0xFEFF</int><int>0xFFA0</int><int>0xFFF9</int><int>0xFFFA</int><int>0xFFFB</int>
62 </blank>
63 </config>
64
65 </fontconfig>
66 EOF
67 echo "fonts.conf;root/fonts.conf"
68
69 (
70 cat /usr/lib/pango/$PANGO/module-files.d/* | grep ^/usr | while read so rest; do
71 base=$(basename "$so")
72 echo "$so;root/$base"
73 echo "$base $rest" >&5
74 done
75 ) 5>pango.modules
76 echo "pango.modules;root/pango.modules"
77
78 perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST
79
80 ) >addlist
81
82 trap "rm addlist pangoversion pango-1.0.so.0 fonts.conf" 0
83
84 $PERL/bin/perl Makefile.PL
85 make clean
86 $PERL/bin/perl Makefile.PL
87 make install || exit
88
89 wait
90
91 LD_LIBRARY_PATH=/lib:/usr/lib \
92 $PERL/bin/pp -C -I /root/src/Deliantra \
93 -M AnyEvent::Impl::EV \
94 -M attributes \
95 -a "blib/arch/auto/Deliantra/Client/Client.so;lib/auto/Deliantra/Client/Client.so" \
96 -l db-4.6 \
97 -l glib-2.0 -l gobject-2.0 -l gmodule-2.0 \
98 -l pangoft2-1.0 \
99 -l SDL -l asound \
100 -l SDL_mixer -l vorbisfile -l vorbis -l ogg -l smpeg -l stdc++ \
101 -l SDL_image -l png12 -l z \
102 -o deliantra-gnu-linux-x86 -A addlist bin/deliantra || exit
103
104 make clean
105
106 tar cf deliantra-gnu-linux-x86.tar deliantra-gnu-linux-x86
107 gzip -9vf deliantra-gnu-linux-x86.tar
108 todata deliantra-gnu-linux-x86.tar.gz
109