6 SDKFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
8 LIBS_TAR_DIR="`pwd`/libs"
9 LIBS_DEST_DIR="$BUILD_DIR/libs"
10 LIBS_INST_DIR="$LIBS_DEST_DIR/inst"
11 LIBS_SRC_DIR="$LIBS_DEST_DIR/src"
13 TAR_LIBXML2="$LIBS_TAR_DIR/libxml2-2.6.17.tar.gz"
14 TAR_LIBXSLT="$LIBS_TAR_DIR/libxslt-1.1.12.tar.gz"
15 TAR_EXPAT="$LIBS_TAR_DIR/expat-2005-01-28.tar.gz"
16 TAR_SABLOT="$LIBS_TAR_DIR/Sablot-1.0.2.tar.gz"
18 echo $LIBS_TAR_DIR / $LIBS_DEST_DIR / $LIBS_INST_DIR / $LIBS_BUILD_DIR
20 [ -e "$LIBS_TAR_DIR" ] || exit 1
21 [ -e "$LIBS_DEST_DIR" ] || mkdir -p "$LIBS_DEST_DIR" || exit 1
22 [ -e "$LIBS_INST_DIR" ] || mkdir -p "$LIBS_INST_DIR" || exit 1
23 [ -e "$LIBS_SRC_DIR" ] || mkdir -p "$LIBS_SRC_DIR" || exit 1
29 LIB="$LIBS_DEST_DIR/libxml2.dylib"
30 if [ ! -e "$LIB" ]; then
32 for arch in i386 ppc; do
34 echo building "$LIB-$arch"
37 tar -xzf "$TAR_LIBXML2"
40 CC="gcc $SDKFLAGS --host=$arch -arch $arch" ./configure --without-python --prefix="$LIBS_INST_DIR-$arch"
45 lipo -create "$LIBS_INST_DIR-ppc/lib/libxml2.dylib" "$LIBS_INST_DIR-i386/lib/libxml2.dylib" -output "$LIB"
46 perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
48 #cp "$LIBS_INST_DIR/lib/libxml2.dylib" "$LIB"
55 LIB="$LIBS_DEST_DIR/libxslt.dylib"
56 if [ ! -e "$LIB" ]; then
58 for arch in i386 ppc; do
60 echo building "$LIB-$arch"
63 tar -xzf "$TAR_LIBXSLT"
66 CC="gcc $SDKFLAGS -arch $arch" ./configure --prefix="$LIBS_INST_DIR-$arch" --with-libxml-prefix="$LIBS_INST_DIR-$arch"
71 lipo -create "$LIBS_INST_DIR-ppc/lib/libxslt.dylib" "$LIBS_INST_DIR-i386/lib/libxslt.dylib" -output "$LIB"
72 perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
74 lipo -create "$LIBS_INST_DIR-ppc/lib/libexslt.dylib" "$LIBS_INST_DIR-i386/lib/libexslt.dylib" -output "$LIBS_DEST_DIR/libexslt.dylib"
75 perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIBS_DEST_DIR/libexslt.dylib" "$BUILD_DIR"
83 LIB="$LIBS_DEST_DIR/libexpat.dylib"
84 if [ ! -e "$LIB" ]; then
86 for arch in i386 ppc; do
88 echo building "$LIB-$arch"
94 CC="gcc $SDKFLAGS -arch $arch" ./configure --prefix="$LIBS_INST_DIR-$arch"
95 INSTALL_ROOT="/" make -e install
99 #cp "$LIBS_INST_DIR/lib/libexpat.dylib" "$LIB"
100 lipo -create "$LIBS_INST_DIR-ppc/lib/libexpat.dylib" "$LIBS_INST_DIR-i386/lib/libexpat.dylib" -output "$LIB"
101 perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
107 LIB="$LIBS_DEST_DIR/libSablot.dylib"
108 if [ ! -e "$LIB" ]; then
110 for arch in i386 ppc; do
112 echo building "$LIB-$arch"
115 tar -xzf "$TAR_SABLOT"
119 CXX="g++ $SDKFLAGS -arch $arch" ./configure --disable-adding-meta --with-expat="$LIBS_INST_DIR-$arch" --prefix="$LIBS_INST_DIR-$arch"
123 #cp "$LIBS_INST_DIR/lib/libSablot.dylib" "$LIB"
124 lipo -create "$LIBS_INST_DIR-ppc/lib/libSablot.dylib" "$LIBS_INST_DIR-i386/lib/libSablot.dylib" -output "$LIB"
125 perl "$LIBS_TAR_DIR/fix_install_paths.pl" "$LIB" "$BUILD_DIR"
133 GNUSTYLEPREFIX=$TARGET_BUILD_DIR/libxml2-gnustyle
134 ICONVPREFIX=$TARGET_BUILD_DIR/libiconv-gnustyle
136 # make sure things match our expectations
138 if [ ! -d $SUBDIR ]; then
139 echo no $SUBDIR dir in current dir `pwd`, cannot continue!
144 if [ x$ACTION = "xclean" ]; then
147 rm -rf $GNUSTYLEPREFIX
151 elif [ x$ACTION = "x" ]; then
157 if [ ! -f Makefile ]; then
159 echo no Makefile, running configure
161 ./configure --prefix=$GNUSTYLEPREFIX --without-python --with-iconv=$ICONVPREFIX
166 if [ ! -d $GNUSTYLEPREFIX ]; then