]> Dogcows Code - chaz/yoink/commitdiff
win32 dependency script to build without syncing
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Fri, 5 Mar 2010 01:46:05 +0000 (18:46 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Fri, 5 Mar 2010 01:46:05 +0000 (18:46 -0700)
win32/tools/makedeps.sh

index 378272ca1dfe07b1bdb5de63d28f9d6325c8a35d..f5988b1f3d195eca086fc69e3975094ace9eae70 100755 (executable)
@@ -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 <<EOL
@@ -228,27 +263,32 @@ Libs: -L\${libdir} -lglu32
 Cflags: -I\${includedir} 
 EOL
 
-sync
 
 cd $DESTDIR/$PREFIX
 cat >README <<EOL
 
 Yoink Win32 Dependencies
-Created `date`
+Created `date +"%d %b %Y"`
+
+These dependencies were generated automatically by makedeps.sh, a script
+available in the Yoink repository.  You should find here all the header
+files, DLL's, implibs, and pkgconfig files required to build Yoink that are
+not provided with the standard mingw32 toolchain.  Yoink itself can be
+built with mingw32 and these installed dependencies like this:
 
-These dependencies were generated automatically by makedeps.sh available in
-the Yoink repository.  You should find here all the header files, DLL's,
-implibs, and pkgconfig files required to build Yoink that are not provided
-with the standard mingw32 toolchain.
+./configure --host=$HOST --prefix=$PREFIX \\
+            PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
+make && make package
 
 These files are licensed such that their general distribution under
 reasonable conditions is allowable.  The copyrights of these binaries go to
 their various respective owners.  Look up the specific library for specific
-terms and conditions, or see the COPYING file in the Yoink package.
+terms and conditions, or see the file COPYING in the Yoink package.
 
 EOL
 tar cjf deps.tar.bz2 * || die "archiving dependencies"
 mv deps.tar.bz2 $DESTDIR/..
 
 echo "Done!"
+echo "The dependencies are packed into the archive deps.tar.bz2."
 
This page took 0.026902 seconds and 4 git commands to generate.