From 6c47a7028f7c72fabc40f417aa41111c28de8a84 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Thu, 4 Mar 2010 18:46:05 -0700 Subject: [PATCH] win32 dependency script to build without syncing --- win32/tools/makedeps.sh | 126 ++++++++++++++++++++++++++-------------- 1 file changed, 83 insertions(+), 43 deletions(-) diff --git a/win32/tools/makedeps.sh b/win32/tools/makedeps.sh index 378272c..f5988b1 100755 --- a/win32/tools/makedeps.sh +++ b/win32/tools/makedeps.sh @@ -1,7 +1,7 @@ #!/bin/bash # Download and cross-compile dependencies for Yoink. This script requires -# bash, wget, unzip, tar, rsync, patch, make, install and sudo. Have fun! +# bash, wget, md5sum, unzip, tar, patch, make and install. Have fun! HOST="i686-mingw32" PREFIX="/usr/$HOST/usr" @@ -16,57 +16,33 @@ function die() exit 1 } -function sync() -{ - # install the files from $DESTDIR to $PREFIX - echo "Installing to $PREFIX..." - sudo rsync -av $DESTDIR/$PREFIX/* $PREFIX/ || die "syncing dependencies" -} - DESTDIR="`pwd`/deps" mkdir -p $DESTDIR rm -f $DESTDIR/README -PACKAGE="zlib123-dll" -cd $DESTDIR -[[ ! -f $PACKAGE.zip ]] && (wget "http://www.zlib.net/$PACKAGE.zip" || die "downloading $PACKAGE") -rm -rf $PACKAGE -unzip -d $PACKAGE $PACKAGE.zip || die "unpackaging $PACKAGE" -cd $PACKAGE -($HOST-dlltool -d lib/zlib.def -l libzdll.a && \ -mkdir -p $DESTDIR/$PREFIX/{lib,include} && \ -install -p -m 0644 include/* $DESTDIR/$PREFIX/include/ && \ -install -p -m 0755 zlib1.dll $DESTDIR/$PREFIX/bin/ && \ -install -p -m 0755 libzdll.a $DESTDIR/$PREFIX/lib/ && \ -cd $DESTDIR/$PREFIX/lib && \ -ln -fs libzdll.a libz.dll.a) || die "installing $PACKAGE" - -PACKAGE="libogg-1.1.4" -cd $DESTDIR -[[ ! -f $PACKAGE.tar.gz ]] && (wget "http://downloads.xiph.org/releases/ogg/$PACKAGE.tar.gz" || die "downloading $PACKAGE") -rm -rf $PACKAGE -tar xzf $PACKAGE.tar.gz || die "unpackaging $PACKAGE" -cd $PACKAGE -./configure --host=$HOST --prefix=$PREFIX || die "configuring $PACKAGE" -make $MAKEOPTS || die "making $PACKAGE" -make DESTDIR=$DESTDIR install || die "installing $PACKAGE" - -# install dependencies thus built thus far -sync PACKAGE="boost_1_42_0" VERSION="1.42.0" cd $DESTDIR [[ ! -f $PACKAGE.tar.bz2 ]] && (wget "http://sourceforge.net/projects/boost/files/boost/$VERSION/$PACKAGE.tar.bz2/download" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +7bf3b4eb841b62ffb0ade2b82218ebe6 boost_1_42_0.tar.bz2 +EOL +) || die "verifying $PACKAGE" rm -rf $PACKAGE tar xjf $PACKAGE.tar.bz2 || die "unpackaging $PACKAGE" (mkdir -p $DESTDIR/$PREFIX/include && \ rm -rf $DESTDIR/$PREFIX/include/boost && \ cp -r $PACKAGE/boost $DESTDIR/$PREFIX/include/boost) || die "installing $PACKAGE" + PACKAGE="SDL-1.2.14" cd $DESTDIR [[ ! -f $PACKAGE.tar.gz ]] && (wget "http://www.libsdl.org/release/$PACKAGE.tar.gz" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +e52086d1b508fa0b76c52ee30b55bec4 SDL-1.2.14.tar.gz +EOL +) || die "verifying $PACKAGE" rm -rf $PACKAGE tar xzf $PACKAGE.tar.gz || die "unpackaging $PACKAGE" cd $PACKAGE @@ -74,19 +50,46 @@ cd $PACKAGE make $MAKEOPTS || die "making $PACKAGE" make DESTDIR=$DESTDIR install || die "installing $PACKAGE" + +PACKAGE="libogg-1.1.4" +cd $DESTDIR +[[ ! -f $PACKAGE.tar.gz ]] && (wget "http://downloads.xiph.org/releases/ogg/$PACKAGE.tar.gz" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +10200ec22543841d9d1c23e0aed4e5e9 libogg-1.1.4.tar.gz +EOL +) || die "verifying $PACKAGE" +rm -rf $PACKAGE +tar xzf $PACKAGE.tar.gz || die "unpackaging $PACKAGE" +cd $PACKAGE +./configure --host=$HOST --prefix=$PREFIX || die "configuring $PACKAGE" +make $MAKEOPTS || die "making $PACKAGE" +make DESTDIR=$DESTDIR install || die "installing $PACKAGE" + + PACKAGE="libvorbis-1.2.3" cd $DESTDIR [[ ! -f $PACKAGE.tar.gz ]] && (wget "http://downloads.xiph.org/releases/vorbis/$PACKAGE.tar.gz" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +5aa77f55c0e0aab8eb8ed982335daac8 libvorbis-1.2.3.tar.gz +EOL +) || die "verifying $PACKAGE" rm -rf $PACKAGE tar xzf $PACKAGE.tar.gz || die "unpackaging $PACKAGE" cd $PACKAGE -./configure --host=$HOST --prefix=$PREFIX || die "configuring $PACKAGE" +./configure --host=$HOST --prefix=$PREFIX \ +CPPFLAGS="-I$DESTDIR/$PREFIX/include" \ +LDFLAGS="-L$DESTDIR/$PREFIX/lib" || die "configuring $PACKAGE" make $MAKEOPTS || die "making $PACKAGE" make DESTDIR=$DESTDIR install || die "installing $PACKAGE" + PACKAGE="openal-soft-1.11.753-bin" cd $DESTDIR [[ ! -f $PACKAGE.zip ]] && (wget "http://kcat.strangesoft.net/$PACKAGE.zip" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +20747ce5ca0f902ae082fef15d7b41a5 openal-soft-1.11.753-bin.zip +EOL +) || die "verifying $PACKAGE" rm -rf $PACKAGE unzip $PACKAGE.zip || die "unpackaging $PACKAGE" cd $PACKAGE @@ -110,19 +113,50 @@ Cflags: -I\${includedir} EOL ) || die "installing $PACKAGE" + +PACKAGE="zlib123-dll" +cd $DESTDIR +[[ ! -f $PACKAGE.zip ]] && (wget "http://www.zlib.net/$PACKAGE.zip" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +cc7fa97f9c19386bb701acc79d0abbca zlib123-dll.zip +EOL +) || die "verifying $PACKAGE" +rm -rf $PACKAGE +unzip -d $PACKAGE $PACKAGE.zip || die "unpackaging $PACKAGE" +cd $PACKAGE +($HOST-dlltool -d lib/zlib.def -l libzdll.a && \ +mkdir -p $DESTDIR/$PREFIX/{lib,include} && \ +install -p -m 0644 include/* $DESTDIR/$PREFIX/include/ && \ +install -p -m 0755 zlib1.dll $DESTDIR/$PREFIX/bin/ && \ +install -p -m 0755 libzdll.a $DESTDIR/$PREFIX/lib/ && \ +cd $DESTDIR/$PREFIX/lib && \ +ln -fs libzdll.a libz.dll.a) || die "installing $PACKAGE" + + PACKAGE="libpng-1.4.1" cd $DESTDIR [[ ! -f $PACKAGE.tar.gz ]] && (wget "http://prdownloads.sourceforge.net/libpng/$PACKAGE.tar.gz?download" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +fa0b2a84733463f90d3ac9f43ccafabc libpng-1.4.1.tar.gz +EOL +) || die "verifying $PACKAGE" rm -rf $PACKAGE tar xzf $PACKAGE.tar.gz || die "unpackaging $PACKAGE" cd $PACKAGE -./configure --host=$HOST --prefix=$PREFIX || die "configuring $PACKAGE" +./configure --host=$HOST --prefix=$PREFIX \ +CPPFLAGS="-I$DESTDIR/$PREFIX/include" \ +LDFLAGS="-L$DESTDIR/$PREFIX/lib" || die "configuring $PACKAGE" make $MAKEOPTS || die "making $PACKAGE" make DESTDIR=$DESTDIR install || die "installing $PACKAGE" + PACKAGE="lua-5.1.4" cd $DESTDIR [[ ! -f $PACKAGE.tar.gz ]] && (wget "http://www.lua.org/ftp/$PACKAGE.tar.gz" || die "downloading $PACKAGE") +(md5sum -c <<"EOL" +d0870f2de55d59c1c8419f36e8fac150 lua-5.1.4.tar.gz +EOL +) || die "verifying $PACKAGE" rm -rf $PACKAGE tar xzf $PACKAGE.tar.gz || die "unpackaging $PACKAGE" cd $PACKAGE @@ -199,6 +233,7 @@ make $MAKEOPTS CC="$HOST-gcc" RANLIB="$HOST-ranlib" mingw || die "making $PACKAG make INSTALL_TOP=$DESTDIR/$PREFIX install || die "installing $PACKAGE" chmod 755 $DESTDIR/$PREFIX/lib/liblua.dll.a + # libopengl32 and libglu32 pc files mkdir -p $DESTDIR/$PREFIX/lib/pkgconfig cat >$DESTDIR/$PREFIX/lib/pkgconfig/gl.pc <README <