1 | #!/bin/bash |
1 | #!/bin/bash |
2 | |
2 | |
3 | # Convert a gtk2-perl program to a standalone OS X binary |
3 | # Convert a gtk2-perl program to a standalone OS X binary |
4 | |
4 | |
|
|
5 | #port install libsdl libsdl_mixer libsdl_image libvorbis libpng jpeg pango db46 libogg p5-libwww-perl p5-yaml |
5 | # need to patch libSDL_image from /opt/local/lib/libjpeg.dylib to ./libjpeg.62.dylib |
6 | # need to patch libSDL_image from /opt/local/lib/libjpeg.dylib to ./libjpeg.8.dylib |
|
|
7 | # ln -s db46/db.h /opt/local/include |
|
|
8 | # ln -s db46/libdb.dylib /opt/local/lib |
|
|
9 | # /opt/local/bin/cpan Pod::POM |
6 | |
10 | |
7 | #export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps |
11 | #export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps |
8 | export MACOSX_DEPLOYMENT_TARGET=10.5 # nope |
12 | #export MACOSX_DEPLOYMENT_TARGET=10.5 # nope |
9 | |
13 | |
10 | cvs update |
14 | cvs update |
11 | |
15 | |
12 | PERL=/opt/local |
16 | PERL=/opt/local |
13 | PERLLIB=/usr/lib/perl5 |
17 | PERLLIB=/usr/lib/perl5 |
14 | |
18 | |
15 | umask 022 |
19 | umask 022 |
16 | |
20 | |
17 | if true; then |
21 | if true; then |
18 | for mod in common-sense AnyEvent EV JSON-XS deliantra/Deliantra Compress-LZF BDB Guard; do |
22 | for mod in common-sense AnyEvent EV JSON-XS Compress-LZF BDB Guard deliantra/Deliantra; do |
19 | ( |
23 | ( |
20 | mkdir -p /root/src/$mod || exit 77 |
24 | mkdir -p /root/src/$mod || exit 77 |
21 | cd /root/src/$mod |
25 | cd /root/src/$mod |
22 | set -x |
26 | set -x |
23 | pwd |
27 | pwd |
24 | rsync -avPessh 10.0.0.1:src/$mod/. . --del |
28 | rsync -avPessh 10.0.0.1:src/$mod/. . --del --exclude "*.tar.gz" --delete-excluded |
25 | $PERL/bin/perl Makefile.PL </dev/null |
29 | $PERL/bin/perl Makefile.PL </dev/null |
26 | make clean |
30 | make clean |
27 | $PERL/bin/perl Makefile.PL </dev/null |
31 | $PERL/bin/perl Makefile.PL </dev/null |
28 | make install || exit |
32 | make install || exit |
29 | make clean |
33 | make clean |
… | |
… | |
37 | perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST |
41 | perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST |
38 | |
42 | |
39 | echo "docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst" |
43 | echo "docwiki.pst;root/Deliantra/Client/private/resources/docwiki.pst" |
40 | |
44 | |
41 | #pangoversion;root/pangoversion |
45 | #pangoversion;root/pangoversion |
42 | #/opt/local/lib/libglib-2.0.so.0;shlib/darwin-2level/libglib-2.0.dylib |
46 | #/opt/local/lib/libglib-2.0.so.0;shlib/darwin-multi-2level/libglib-2.0.dylib |
43 | #/lib/libgcc_s.so.1;shlib/darwin-2level/libgcc_s.so.1 |
47 | #/lib/libgcc_s.so.1;shlib/darwin-multi-2level/libgcc_s.so.1 |
44 | #/opt/local/lib/libstdc++.so.6;shlib/darwin-2level/libstdc++.so.6 |
48 | #/opt/local/lib/libstdc++.so.6;shlib/darwin-multi-2level/libstdc++.so.6 |
45 | #/opt/local/lib/libaudio.so.2;shlib/darwin-2level/libaudio.so.2 |
49 | #/opt/local/lib/libaudio.so.2;shlib/darwin-multi-2level/libaudio.so.2 |
46 | |
50 | |
47 | ( echo "[Pango]"; echo "ModuleFiles = pango.modules" ) > pango.rc |
51 | ( echo "[Pango]"; echo "ModuleFiles = pango.modules" ) > pango.rc |
48 | echo "pango.rc;root/pango.rc" |
52 | echo "pango.rc;root/pango.rc" |
49 | |
53 | |
50 | ( |
54 | ( |
… | |
… | |
60 | db-4.6 \ |
64 | db-4.6 \ |
61 | glib-2.0.0 gobject-2.0.0 gmodule-2.0.0 \ |
65 | glib-2.0.0 gobject-2.0.0 gmodule-2.0.0 \ |
62 | pango-1.0.0 pangoft2-1.0.0 \ |
66 | pango-1.0.0 pangoft2-1.0.0 \ |
63 | SDL-1.2.0 SDL_mixer-1.2.0 SDL_image-1.2.0 \ |
67 | SDL-1.2.0 SDL_mixer-1.2.0 SDL_image-1.2.0 \ |
64 | vorbisfile vorbis.0 ogg.0 \ |
68 | vorbisfile vorbis.0 ogg.0 \ |
65 | png12 jpeg.62 z.1 \ |
69 | png12.0 jpeg.8 tiff.3 z.1 \ |
66 | fontconfig.1 expat.1 freetype.6 intl.8 iconv.2; |
70 | fontconfig.1 expat.1 freetype.6 intl.8 iconv.2; |
67 | do |
71 | do |
68 | echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-2level/lib$lib.dylib" |
72 | echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-multi-2level/lib$lib.dylib" |
69 | done |
73 | done |
70 | |
74 | |
71 | ) >addlist |
75 | ) >addlist |
72 | |
76 | |
73 | #cat pango.modules;exit |
77 | #cat pango.modules;exit |
74 | |
78 | |
75 | trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 |
79 | trap "rm -f addlist pango.rc pango.modules fonts.conf" 0 |
76 | |
|
|
77 | cd /root/src/deliantra/Deliantra-Client |
|
|
78 | |
80 | |
79 | $PERL/bin/perl Makefile.PL |
81 | $PERL/bin/perl Makefile.PL |
80 | make clean |
82 | make clean |
81 | $PERL/bin/perl Makefile.PL |
83 | $PERL/bin/perl Makefile.PL |
82 | make install || exit |
84 | make install || exit |
… | |
… | |
138 | <key>LSMinimumSystemVersion</key> |
140 | <key>LSMinimumSystemVersion</key> |
139 | <string>10.5</string> |
141 | <string>10.5</string> |
140 | <key>NSAppleScriptEnabled</key> |
142 | <key>NSAppleScriptEnabled</key> |
141 | <false/> |
143 | <false/> |
142 | <key>NSHumanReadableCopyright</key> |
144 | <key>NSHumanReadableCopyright</key> |
143 | <string>Deliantra MORPG Client - Copyright 2008 The Deliantra Team</string> |
145 | <string>Deliantra MORPG Client - Copyright 2008,2009 The Deliantra Team</string> |
144 | </dict> |
146 | </dict> |
145 | </plist> |
147 | </plist> |
146 | EOF |
148 | EOF |
147 | |
149 | |
148 | rm -rf dmg |
150 | rm -rf dmg |