Update mac build scripts to build universal binaries

This commit is contained in:
Ron Pedde 2007-01-02 04:31:57 +00:00
parent 8ed6bbf22d
commit e702657f67
2 changed files with 35 additions and 10 deletions

View File

@ -28,6 +28,10 @@ if [ ! -f mt-daapd-svn-${SVNVERSION}.tar.gz ]; then
exit exit
fi fi
rm -rf .build
mkdir -p .build/ppc
mkdir -p .build/intel
tar -xvzf mt-daapd-svn-${SVNVERSION}.tar.gz tar -xvzf mt-daapd-svn-${SVNVERSION}.tar.gz
pushd mt-daapd-svn-${SVNVERSION} pushd mt-daapd-svn-${SVNVERSION}
./configure --enable-static --with-static-libs=/sw/lib --enable-sqlite --with-id3tag=/sw ./configure --enable-static --with-static-libs=/sw/lib --enable-sqlite --with-id3tag=/sw
@ -35,18 +39,37 @@ check_error $? "Configure error"
make make
check_error $? "Compile error" check_error $? "Compile error"
popd popd
BUILDDIR=mt-daapd-svn-${SVNVERSION}/src BUILDDIR=mt-daapd-svn-${SVNVERSION}/src
rm -rf .build
mkdir -p .build/ppc
cp $BUILDDIR/mt-daapd .build/ppc cp $BUILDDIR/mt-daapd .build/ppc
cp $BUILDDIR/wavstreamer .build/ppc cp $BUILDDIR/wavstreamer .build/ppc
cp $BUILDDIR/plugins/.libs/*so .build/ppc cp $BUILDDIR/plugins/.libs/*so .build/ppc
# now make the intel version
pushd mt-daapd-svn-${SVNVERSION}
make clean
CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386" LDFLAGS="-arch i386" ac_cv_func_setpgrp_void=no ./configure --disable-dependency-tracking --enable-static --with-static-libs=/sw-x86/lib --enable-sqlite --with-id3tag=/sw-x86 --host=i686-apple-darwin8.8.0
check_error $? "Configure error"
make
check_error $? "Compile error"
popd
BUILDDIR=mt-daapd-svn-${SVNVERSION}/src
cp $BUILDDIR/mt-daapd .build/intel
cp $BUILDDIR/wavstreamer .build/intel
cp $BUILDDIR/plugins/.libs/*so .build/intel
rm -rf mt-daapd-svn-${SVNVERSION} rm -rf mt-daapd-svn-${SVNVERSION}
ALAC_VERSION=0.1.1 for f in .build/intel/*; do
f=`basename $f`
lipo -create .build/intel/$f .build/ppc/$f -output .build/$f
done
ALAC_VERSION=0.1.3
if [ ! -x alac_decoder/alac ]; then if [ ! -x alac_decoder/alac ]; then
wget http://craz.net/programs/itunes/files/alac_decoder-${ALAC_VERSION}.tar.gz wget http://craz.net/programs/itunes/files/alac_decoder-${ALAC_VERSION}.tar.gz
@ -56,7 +79,9 @@ if [ ! -x alac_decoder/alac ]; then
check_error $? "error decompressing alac decoder" check_error $? "error decompressing alac decoder"
pushd alac_decoder pushd alac_decoder
make patch -p0 < ../alac_decoder.patch
CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" make
check_error $? "Could not compile alac decoder" check_error $? "Could not compile alac decoder"
popd popd
@ -67,5 +92,5 @@ if [ ! -x alac_decoder/alac ]; then
exit 1 exit 1
fi fi
cp alac_decoder/alac .build/ppc cp alac_decoder/alac .build

View File

@ -35,10 +35,10 @@ if [ "$BUILD" = "yes" ]; then
mkdir -p "${AR}/lib-js" mkdir -p "${AR}/lib-js"
mkdir -p "${AR}/lib-js/script.aculo.us" mkdir -p "${AR}/lib-js/script.aculo.us"
cp ../.build/ppc/mt-daapd "Firefly Helper/Server/firefly" cp ../.build/mt-daapd "Firefly Helper/Server/firefly"
cp ../.build/ppc/*so "Firefly Helper/Server/Plugins" cp ../.build/*so "Firefly Helper/Server/Plugins"
cp ../.build/ppc/wavstreamer "Firefly Helper/Server" cp ../.build/wavstreamer "Firefly Helper/Server"
cp ../.build/ppc/alac "Firefly Helper/Server" cp ../.build/alac "Firefly Helper/Server"
cp ../admin-root/*.+(html|xml|txt|jar|gif|js|png|jpg|css|ico) "${AR}" cp ../admin-root/*.+(html|xml|txt|jar|gif|js|png|jpg|css|ico) "${AR}"
cp ../admin-root/CREDITS "${AR}" cp ../admin-root/CREDITS "${AR}"
cp ../admin-root/lib-js/*js "${AR}/lib-js" cp ../admin-root/lib-js/*js "${AR}/lib-js"