1 | #!/bin/bash |
1 | #!/bin/bash |
2 | |
2 | |
3 | # this gem of a hack gathers all fiels required by the client for the platform |
3 | # this gem of a hack gathers all files required by the client for the platform |
4 | # by deep magic, it works on osx, linux and windows. on MY osx, linux |
4 | # by deep magic, it works on osx, linux and windows. on MY osx, linux |
5 | # and windows, that is. |
5 | # and windows, that is. |
6 | |
6 | |
7 | STRIP="strip" |
7 | STRIP="strip" |
8 | LIBEXT=so |
8 | LIBEXT=so |
… | |
… | |
70 | #PANGO=1.6.0 |
70 | #PANGO=1.6.0 |
71 | |
71 | |
72 | export EV_EVENTFD=0 |
72 | export EV_EVENTFD=0 |
73 | export EV_INOTIFY=0 |
73 | export EV_INOTIFY=0 |
74 | export EV_SIGNALFD=0 |
74 | export EV_SIGNALFD=0 |
75 | |
|
|
76 | if true; then |
|
|
77 | for mod in deliantra/Deliantra deliantra/Deliantra-Client; do |
|
|
78 | # for mod in common-sense AnyEvent EV JSON-XS deliantra/Deliantra Compress-LZF BDB Guard deliantra/Deliantra-Client; do |
|
|
79 | # for mod in CFPlus; do |
|
|
80 | ( |
|
|
81 | cd /root/src/$mod || exit |
|
|
82 | cvs update -AdP |
|
|
83 | rm -rf blib |
|
|
84 | $PERL Makefile.PL </dev/null >/dev/null |
|
|
85 | $MAKE clean >/dev/null |
|
|
86 | $PERL Makefile.PL </dev/null >/dev/null |
|
|
87 | if ! $MAKE install >log 2>&1; then |
|
|
88 | echo |
|
|
89 | echo error while building $mod |
|
|
90 | cat log |
|
|
91 | exit |
|
|
92 | fi |
|
|
93 | rm -f log |
|
|
94 | $MAKE clean >/dev/null |
|
|
95 | ) || exit |
|
|
96 | done |
|
|
97 | fi |
|
|
98 | |
75 | |
99 | cat <<EOF >"$DIST"/pango.rc |
76 | cat <<EOF >"$DIST"/pango.rc |
100 | [Pango] |
77 | [Pango] |
101 | ModuleFiles = pango.modules |
78 | ModuleFiles = pango.modules |
102 | EOF |
79 | EOF |
… | |
… | |
183 | if (-d $_) { |
160 | if (-d $_) { |
184 | system "rsync", "-aR", $_, "$ENV{DIST}/pm/."; |
161 | system "rsync", "-aR", $_, "$ENV{DIST}/pm/."; |
185 | } else { |
162 | } else { |
186 | File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_; |
163 | File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_; |
187 | File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_" |
164 | File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_" |
188 | or die "$ENV{OSDIST}/pm/$_: $!"; |
165 | or die "$lib/$_ => $ENV{OSDIST}/pm/$_: $!"; |
189 | |
166 | |
190 | if (s/\.pm$//) { |
167 | if (s/\.pm$//) { |
191 | $auto = "auto/$_"; |
168 | $auto = "auto/$_"; |
192 | |
169 | |
193 | for my $glob ("*.'$SO'", "autosplit.ix", "*.al") { |
170 | for my $glob ("*.'$SO'", "autosplit.ix", "*.al") { |
… | |
… | |
281 | rm -f lib"$lib".$LIB0 |
258 | rm -f lib"$lib".$LIB0 |
282 | done |
259 | done |
283 | |
260 | |
284 | if [ "$OS" != windows ]; then |
261 | if [ "$OS" != windows ]; then |
285 | # patch braindamaged pango |
262 | # patch braindamaged pango |
|
|
263 | |
|
|
264 | if [ "$OS" != darwin ]; then |
286 | set libpango-1.0.$LIB0 |
265 | set libpango-1.0.$LIB0 |
287 | perl -pe 's{/u(?=sr/lib(32)?/pango)}{.\x00}g; s{\Q'$PANGO'\E\x00}{y.t.u\x00}g' <"$1" >"$1~" && mv "$1~" "$1" |
266 | perl -pe 's{/u(?=sr/lib(32)?/pango)}{.\x00}g;' <"$1" >"$1~" && mv "$1~" "$1" |
|
|
267 | else |
|
|
268 | set lib*pango-1.0.0.dylib |
|
|
269 | perl -pe 's{/o(?=pt/local/.../pango)}{.\x00}g;' <"$1" >"$1~" && mv "$1~" "$1" |
|
|
270 | fi |
288 | chmod 755 "$1" |
271 | chmod 755 "$1" |
289 | fi |
272 | fi |
290 | |
273 | |
291 | if [ "$OS" = darwin ]; then |
274 | if [ "$OS" = darwin ]; then |
292 | # "dll hell" is most severe on os x, because apple |
275 | # "dll hell" is most severe on os x, because apple |