ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/util/gatherer
(Generate patch)

Comparing deliantra/Deliantra-Client/util/gatherer (file contents):
Revision 1.6 by root, Fri Dec 30 23:43:25 2011 UTC vs.
Revision 1.10 by root, Wed Jan 4 11:41:25 2012 UTC

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
7STRIP="strip" 7STRIP="strip"
8LIBEXT=so 8LIBEXT=so
17 17
18if [ "$(uname -s)" = CYGWIN_NT-5.0 ]; then 18if [ "$(uname -s)" = CYGWIN_NT-5.0 ]; then
19 . ~/.setenv 19 . ~/.setenv
20 20
21 OS=windows 21 OS=windows
22 URLADER=windowx-x86 22 URLADER=windows-x86
23 unset PANGO 23 unset PANGO
24 PERL=/c/perl/bin/perl 24 PERL=/c/perl/bin/perl
25 MAKE=nmake 25 MAKE=nmake
26 SYSLIB=/c/gtk/bin 26 SYSLIB=/c/gtk/bin
27 LIBEXT=dll 27 LIBEXT=dll
71 71
72export EV_EVENTFD=0 72export EV_EVENTFD=0
73export EV_INOTIFY=0 73export EV_INOTIFY=0
74export EV_SIGNALFD=0 74export EV_SIGNALFD=0
75 75
76if 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
97fi
98
99cat <<EOF >"$DIST"/pango.rc 76cat <<EOF >"$DIST"/pango.rc
100[Pango] 77[Pango]
101ModuleFiles = pango.modules 78ModuleFiles = pango.modules
102EOF 79EOF
103 80
105 exec 5>"$DIST"/pango.modules 82 exec 5>"$DIST"/pango.modules
106 pango-querymodules | grep ^/ | while read lib rest; do 83 pango-querymodules | grep ^/ | while read lib rest; do
107 base=$(basename "$lib") 84 base=$(basename "$lib")
108 [ "$base" = pango-basic-x.$LIBEXT ] && continue 85 [ "$base" = pango-basic-x.$LIBEXT ] && continue
109 cp -p "$lib" "$DIST"/. 86 cp -p "$lib" "$DIST"/.
110 echo "$base $rest" >&5 87 echo "./$base $rest" >&5 # using ./ seems to help pango not to rummage around in /usr/lib etc.
111 done 88 done
112) 89)
113 90
114############################################################################# 91#############################################################################
115 92
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
326 patchlibs "$lib" 309 patchlibs "$lib"
327 mv "$lib" "libdeliantra-$stem.dylib" 310 mv "$lib" "libdeliantra-$stem.dylib"
328 done 311 done
329 fi 312 fi
330 313
331 [ "$OS" = linux ] && chrpath -d perl # debian perls have an rpath. really. 314 [ "$OS" = linux ] && chrpath -d perl $(find pm -name "*.so") # debian perls have an rpath, many modules too
332 $STRIP $(find . -name "*.$SO" -o -name "*.$LIBEXT" -o -name "*.$LIB0") perl 315 $STRIP $(find . -name "*.$SO" -o -name "*.$LIBEXT" -o -name "*.$LIB0") perl
316
317 : >timidity.cfg
333) 318)
334 319
335cat >"$DIST".vars <<EOF 320cat >"$DIST".vars <<EOF
336G_URLADER="$URLADER" 321G_URLADER="$URLADER"
337G_OS="$OS" 322G_OS="$OS"
338G_ARCHNAME="$ARCHNAME" 323G_ARCHNAME="$ARCHNAME"
339G_ENVVARS="$GENPACK_ENVVARS" 324G_ENVVARS="$GENPACK_ENVVARS"
340G_ARGS="./perl run" 325G_COMMAND="./perl run"
341EOF 326EOF
342 327

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines