ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/Deliantra-Client/makebin.osx
(Generate patch)

Comparing cf.schmorp.de/Deliantra-Client/makebin.osx (file contents):
Revision 1.19 by root, Sat Apr 24 08:05:16 2010 UTC vs.
Revision 1.20 by root, Mon Dec 26 03:58:12 2011 UTC

1#!/bin/bash 1#!/opt/local/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# port install libsdl +no_x11 libsdl_mixer libsdl_image libvorbis libpng jpeg pango db46 libogg p5-libwww-perl p5-yaml db52
6# port install bash wget
6# need to patch libSDL_image from /opt/local/lib/libjpeg.dylib to ./libjpeg.8.dylib 7# 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/db.h /opt/local/include
8# ln -s db46/libdb.dylib /opt/local/lib 9# ln -s db46/libdb.dylib /opt/local/lib
9# /opt/local/bin/cpan Pod::POM 10# /opt/local/bin/cpan Pod::POM
10 11
11#export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps 12#export MACOSX_DEPLOYMENT_TARGET=10.3 # maybe it helps
12#export MACOSX_DEPLOYMENT_TARGET=10.5 # nope 13#export MACOSX_DEPLOYMENT_TARGET=10.5 # nope
13 14
14cvs update 15cvs update
15 16
16PERL=/opt/local 17PREFIX=/opt/local
17PERLLIB=/usr/lib/perl5 18PERL=$PREFIX
19DB1=4
20DB2=6
21
22ln -sf $PREFIX/include/db$DB1$DB2/db.h $PREFIX/include/db.h
23rm -f $PREFIX/lib/libdb-$DB1.$DB2.dylib
24cp -p $PREFIX/lib/db$DB1$DB2/libdb-$DB1.$DB2.dylib $PREFIX/lib/libdb-$DB1.$DB2.dylib
25
26eval $(perl -V:sitelib)
27PERLLIB=$sitelib
28
29OPTLIBS=(
30 db-4.6
31 glib-2.0.0 gobject-2.0.0 gmodule-2.0.0
32 pango-1.0.0 pangoft2-1.0.0
33 SDL-1.2.0 SDL_mixer-1.2.0 SDL_image-1.2.0
34 vorbisfile vorbis.0 ogg.0
35 png14.14 jpeg.8 tiff.3 z.1
36 fontconfig.1 expat.1 freetype.6 intl.8 iconv.2
37)
38
39declare -A deliantrified
40
41deliantrify_lib() {
42 local lib="$1"
43
44 [ "${deliantrified["$lib"]}" ] && exit 0
45 deliantrified["$lib"]=+
46
47 (
48 cd $PREFIX/lib || exit 69
49 echo "deliantrifying $lib"
50 cp -p lib$lib.dylib libdeliantra-$lib.dylib || exit 68
51 install_name_tool -id libdeliantra-$lib.dylib libdeliantra-$lib.dylib
52 for lib2 in $(otool -L libdeliantra-$lib.dylib | perl -ne 'print "$1\n" if m%'"$PREFIX/lib/lib"'(\S+).dylib%'); do
53 deliantrify_lib "$lib2"
54 install_name_tool -change lib$lib2.dylib libdeliantra-$lib2.dylib libdeliantra-$lib.dylib
55 done
56 ) || exit
57}
58
59# don't ask...
60#for lib in "${OPTLIBS[@]}"; do
61# deliantrify_lib "$lib"
62#done
18 63
19umask 022 64umask 022
20 65
21if true; then 66if true; then
22 for mod in common-sense AnyEvent EV JSON-XS Compress-LZF BDB Guard deliantra/Deliantra; do 67 for mod in common-sense AnyEvent EV JSON-XS Compress-LZF BDB Guard deliantra/Deliantra; do
33 make clean 78 make clean
34 ) || exit 79 ) || exit
35 done 80 done
36fi 81fi
37 82
83exit 0
84
38if true; then 85if true; then
39 86
40( 87(
41 perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST 88 perl -ne '/^(resources\/.*)/ and print "$1;root/Deliantra/Client/private/$1\n"' <MANIFEST
42 89
58 echo "$base $rest" >&5 105 echo "$base $rest" >&5
59 done 106 done
60 ) 5>pango.modules 107 ) 5>pango.modules
61 echo "pango.modules;root/pango.modules" 108 echo "pango.modules;root/pango.modules"
62 109
63 for lib in \ 110 for lib in "${OPTLIBS[@]}"; do
64 db-4.6 \
65 glib-2.0.0 gobject-2.0.0 gmodule-2.0.0 \
66 pango-1.0.0 pangoft2-1.0.0 \
67 SDL-1.2.0 SDL_mixer-1.2.0 SDL_image-1.2.0 \
68 vorbisfile vorbis.0 ogg.0 \
69 png12.0 jpeg.8 tiff.3 z.1 \
70 fontconfig.1 expat.1 freetype.6 intl.8 iconv.2;
71 do
72 echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-multi-2level/lib$lib.dylib" 111 echo "/opt/local/lib/lib$lib.dylib;shlib/darwin-multi-2level/lib$lib.dylib"
73 done 112 done
74 113
75) >addlist 114) >addlist
76 115

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines