ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/Deliantra-Client/makebin.linux
Revision: 1.21
Committed: Fri Dec 26 10:20:07 2008 UTC (15 years, 6 months ago) by root
Branch: MAIN
Changes since 1.20: +4 -2 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/bin/bash
2
3 # ./configure --disable-joystick --disable-cdrom --disable-alsa-shared --disable-esd-shared --disable-arts --disable-nas --disable-diskaudio --disable-dga --disable-video-fbcon --disable-video-directfb --disable-video-svga --disable-timidity
4
5 # Convert a gtk2-perl program to a standalone linux binary
6
7 EV_EVENTFD=
8
9 if [ $(arch) = i686 ]; then
10 PERL=/usr
11 PERLLIB=/usr/lib/perl5/
12 PP=/usr/bin/pp
13 LIBDB=db-4.6
14 ARCHNAME=x86
15 PERLARCH=i486-linux-gnu-thread-multi
16 else
17 PERL=/usr
18 PERLLIB=/usr/lib/perl5/
19 PP=/usr/local/bin/pp
20 LIBDB=db-4.7
21 ARCHNAME=amd64
22 PERLARCH=x86_64-linux-gnu-thread-multi
23 fi
24
25 PANGO=1.5.0
26 #PERL=/opt/perl
27 #PERLLIB=/opt/perl/lib/perl5/
28 #PANGO=1.6.0
29
30 for mod in AnyEvent EV JSON-XS Deliantra Compress-LZF BDB; do
31 (
32 cd /root/src/$mod
33 $PERL/bin/perl Makefile.PL </dev/null
34 make clean
35 $PERL/bin/perl Makefile.PL </dev/null
36 make install || exit
37 make clean
38 )
39 done
40
41 (
42 # # patch braindamaged pango
43 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
44 printf "%s" "$PANGO" >pangoversion
45 #pangoversion;root/pangoversion
46 cat <<EOF
47 pango-1.0.so.0;shlib/$PERLARCH/libpango-1.0.so.0
48 /usr/lib/libglib-2.0.so.0;shlib/$PERLARCH/libglib-2.0.so.0
49 /usr/lib/libstdc++.so.6;shlib/$PERLARCH/libstdc++.so.6
50 /lib/libgcc_s.so.1;shlib/$PERLARCH/libgcc_s.so.1
51 /usr/lib/pango/$PANGO;root/usr/lib/pango/$PANGO
52 pango-1.0.so.0;shlib/$PERLARCH/libpango-1.0.so.0
53 docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst
54 EOF
55
56 cat <<EOF >pango.rc
57 [Pango]
58 ModuleFiles = pango.modules
59 EOF
60 echo "pango.rc;root/pango.rc"
61
62 cat >fonts.conf <<EOF
63 <?xml version="1.0"?>
64 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
65 <fontconfig>
66
67 <match target="pattern"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="family" mode="assign"> <string>monospace</string> </edit> </match>
68
69 <match target="pattern"> <test qual="any" name="family"> <string>sans serif</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match>
70
71 <match target="pattern"> <test qual="any" name="family"> <string>sans</string> </test> <edit name="family" mode="assign"> <string>sans-serif</string> </edit> </match>
72
73 <cachedir>fontconfig-cache</cachedir>
74
75 <config>
76 <blank>
77 <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>
78 </blank>
79 </config>
80
81 </fontconfig>
82 EOF
83 echo "fonts.conf;root/fonts.conf"
84
85 (
86 cat /usr/lib/pango/$PANGO/module-files.d/* | grep ^/usr | while read so rest; do
87 base=$(basename "$so")
88 echo "$so;root/$base"
89 echo "$base $rest" >&5
90 done
91 ) 5>pango.modules
92 echo "pango.modules;root/pango.modules"
93
94 perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST
95
96 ) >addlist
97
98 trap "rm addlist pangoversion pango-1.0.so.0 fonts.conf" 0
99
100 $PERL/bin/perl Makefile.PL
101 make clean
102 $PERL/bin/perl Makefile.PL
103 make install || exit
104
105 wait
106
107 #-l asound -l esd \
108 LD_LIBRARY_PATH=/lib:/usr/lib \
109 $PP -C -I /root/src/Deliantra \
110 -M AnyEvent::Impl::EV \
111 -M attributes \
112 -a "blib/arch/auto/Deliantra/Client/Client.so;lib/auto/Deliantra/Client/Client.so" \
113 -l $LIBDB \
114 -l glib-2.0 -l gobject-2.0 -l gmodule-2.0 \
115 -l pangoft2-1.0 \
116 -l SDL \
117 -l SDL_mixer -l vorbisfile -l vorbis -l ogg -l smpeg -l stdc++ \
118 -l SDL_image -l png12 -l z \
119 -o deliantra-gnu-linux-$ARCHNAME -A addlist bin/deliantra || exit
120
121 make clean
122
123 tar cf deliantra-gnu-linux-$ARCHNAME.tar deliantra-gnu-linux-$ARCHNAME
124 gzip -9vf deliantra-gnu-linux-$ARCHNAME.tar
125 todata deliantra-gnu-linux-$ARCHNAME.tar.gz
126