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.9 by root, Wed Jan 4 11:23:23 2012 UTC vs.
Revision 1.14 by root, Fri Jan 27 23:13:38 2012 UTC

10SO=so 10SO=so
11SYSLIB=/usr/lib 11SYSLIB=/usr/lib
12MAKE=make 12MAKE=make
13ARCHNAME=x86 13ARCHNAME=x86
14GENPACK_ENVVARS="LD_LIBRARY_PATH=." 14GENPACK_ENVVARS="LD_LIBRARY_PATH=."
15EXTRA_EXTRACT=
15 16
16umask 022 17umask 022
17 18
18if [ "$(uname -s)" = CYGWIN_NT-5.0 ]; then 19if [ "$(uname -s)" = CYGWIN_NT-5.0 ]; then
19 . ~/.setenv 20 . ~/.setenv
26 SYSLIB=/c/gtk/bin 27 SYSLIB=/c/gtk/bin
27 LIBEXT=dll 28 LIBEXT=dll
28 LIB0=dll 29 LIB0=dll
29 SO=dll 30 SO=dll
30 STRIP=":" # stripping the perl library kills it, and apparently, everythignis always stripped 31 STRIP=":" # stripping the perl library kills it, and apparently, everythignis always stripped
32 EXTRA_EXTRACT="-MWin32::GUI::SplashScreen"
31 33
32 # fontconfig apparently ignores env vars and always looks at ./etc/fonts/fonts.conf, 34 # fontconfig apparently ignores env vars and always looks at ./etc/fonts/fonts.conf,
33 # but only if . isn't actually called bin or lib. hope for the best. 35 # but only if . isn't actually called bin or lib. hope for the best.
34 GENPACK_ENVVARS="FONTCONFIG_PATH=pm/Deliantra/Client/private/resources/fonts FONTCONFIG_FILE=fonts.conf" 36 GENPACK_ENVVARS="FONTCONFIG_PATH=pm/Deliantra/Client/private/resources/fonts FONTCONFIG_FILE=fonts.conf"
35 37
59 PANGO=1.5.0 61 PANGO=1.5.0
60 PERL=/usr/bin/perl 62 PERL=/usr/bin/perl
61 ARCHNAME=amd64 63 ARCHNAME=amd64
62fi 64fi
63 65
64export DIST="$(pwd)/dist/$OS-$ARCHNAME" 66DISTf="dist/$OS-$ARCHNAME"
67export DIST="$(pwd)/$DISTf"
65 68
66rm -rf "$DIST" 69eval $("$PERL" -V:sitebinexp:)
67mkdir -p "$DIST"
68 70
69#PERL=/opt/perl 71"$PERL" "$sitebinexp"/perl-libextractor --exedir . --dlldir . --bindir pm/bin --libdir pm \
70#PANGO=1.6.0 72 --perl --core-support --script deliantra $EXTRA_EXTRACT \
71 73 --runtime-only \
72export EV_EVENTFD=0 74 --copy "$DISTf"
73export EV_INOTIFY=0
74export EV_SIGNALFD=0
75 75
76cat <<EOF >"$DIST"/pango.rc 76cat <<EOF >"$DIST"/pango.rc
77[Pango] 77[Pango]
78ModuleFiles = pango.modules 78ModuleFiles = pango.modules
79EOF 79EOF
95eval $($PERL -V:sitebinexp -V:sitearchexp -V:sitelib -V:vendorarchexp -V:vendorlibexp -V:archlibexp -V:privlibexp) 95eval $($PERL -V:sitebinexp -V:sitearchexp -V:sitelib -V:vendorarchexp -V:vendorlibexp -V:archlibexp -V:privlibexp)
96 96
97mkdir -p "$DIST"/pm/bin 97mkdir -p "$DIST"/pm/bin
98cp "$sitebinexp"/deliantra "$DIST"/pm/bin/ 98cp "$sitebinexp"/deliantra "$DIST"/pm/bin/
99cp -p util/run "$DIST" 99cp -p util/run "$DIST"
100
101(
102 exec <util/modules.dep
103
104# while read type name; do
105# if [ "$type" = d ]; then
106# # not implemented
107# dir=$(echo "$name" | sed -e s%::%/%g)
108# for lib in "$sitearchexp" "$sitelib" "$vendorarchexp" "$vendorlibexp" "$archlibexp" "$privlibexp"; do
109# if [ -e "$lib/auto/$dir/.packlist" ]; then
110# cat "$lib/auto/$dir/.packlist"
111# fi
112# echo "x $lib $dir"
113# done
114# elif [ $type = m ]; then
115# :
116# else
117# echo "unknown type $type ($name)"
118# exit 1
119# fi
120# done
121 mkdir -p "$DIST"/pm
122
123 export OSDIST="$DIST"
124 [ "$OS" = windows ] && OSDIST=$(cygpath -w "$OSDIST")
125
126 $PERL -e '
127 use Config;
128 use File::Glob qw(:glob);
129 use File::Copy;
130 use File::Path;
131 use File::Basename;
132
133 my @path = do {
134 my %seen;
135 grep !$seen{$_}++, grep length, map $Config{$_}, qw(
136 sitearchexp
137 sitelib
138 vendorarchexp
139 vendorlibexp
140 archlibexp
141 privlibexp
142 )
143 };
144
145 while (<>) {
146 s/\015?\012$//;
147 next if /^(#|$)/;
148 s/\.dynob$/.'$SO'/;
149
150 my $found;
151 for my $lib (@path) {
152 chdir $lib || next;
153
154 my @glob = File::Glob::bsd_glob $_, 0; # explicit 0 needed
155
156 if (@glob) {
157 ++$found;
158
159 for (@glob) {
160 if (-d $_) {
161 system "rsync", "-aR", $_, "$ENV{DIST}/pm/.";
162 } else {
163 File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_;
164 File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_"
165 or die "$ENV{OSDIST}/pm/$_: $!";
166
167 if (s/\.pm$//) {
168 $auto = "auto/$_";
169
170 for my $glob ("*.'$SO'", "autosplit.ix", "*.al") {
171 for (bsd_glob "$auto/$glob", 0) {
172 File::Path::mkpath "$ENV{OSDIST}/pm/" . dirname $_;
173 File::Copy::syscopy "$_", "$ENV{OSDIST}/pm/$_";
174 }
175 }
176 }
177 }
178 }
179
180 last;
181 }
182 }
183
184 warn "$_: not found\n"
185 unless $found;
186 }
187 '
188) || exit
189 100
190############################################################################# 101#############################################################################
191 102
192if [ "$OS" = windows ]; then 103if [ "$OS" = windows ]; then
193 libdeps() { 104 libdeps() {
225} 136}
226 137
227( 138(
228 cd "$DIST" 139 cd "$DIST"
229 140
230 cp -p "$PERL" .
231
232 if [ "$OS" = windows ]; then 141 if [ "$OS" = windows ]; then
233 cp -p $SYSLIB/libvorbisfile-3.dll $SYSLIB/mikmod.dll $SYSLIB/libpng12-0.dll . 142 cp -p $SYSLIB/libvorbisfile-3.dll $SYSLIB/mikmod.dll $SYSLIB/libpng12-0.dll .
234 cp /root/src/CFPlus/util/splash.bmp . 143 cp /root/src/CFPlus/util/splash.bmp .
235 chmod -R u+rwX pm/auto 144 chmod -R u+rwX pm/auto
236 145
259 done 168 done
260 169
261 if [ "$OS" != windows ]; then 170 if [ "$OS" != windows ]; then
262 # patch braindamaged pango 171 # patch braindamaged pango
263 172
264 if [ "$OS" = darwin ]; then 173 if [ "$OS" != darwin ]; then
265 set libdeliantra-pango-1.0.0.dylib 174 set libpango-1.0.$LIB0
266 perl -pe 's{/o(?opt/local/.../pango)}{.\x00}g; s{\Q'$PANGO'\E\x00}{y.t.u\x00}g' <"$1" >"$1~" && mv "$1~" "$1" 175 perl -pe 's{/u(?=sr/lib(32)?/pango)}{.\x00}g;' <"$1" >"$1~" && mv "$1~" "$1"
267 else 176 else
268 set libpango-1.0.$LIB0 177 set lib*pango-1.0.0.dylib
269 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" 178 perl -pe 's{/o(?=pt/local/.../pango)}{.\x00}g;' <"$1" >"$1~" && mv "$1~" "$1"
270 fi 179 fi
271 chmod 755 "$1" 180 chmod 755 "$1"
272 fi 181 fi
273 182
274 if [ "$OS" = darwin ]; then 183 if [ "$OS" = darwin ]; then

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines