From 349bd21db5b68cbd0e6579c05b65ae879d7c6eb7 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 13 Feb 2017 18:44:16 +0100 Subject: [PATCH 1/1] build_mingw32.sh: build tarball for mingw64 --- build_mingw64.sh | 52 +++++++++++++++++++++++++++++++++++++++++++++ scripts/get_deps_mingw64.sh | 20 +++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100755 build_mingw64.sh create mode 100755 scripts/get_deps_mingw64.sh diff --git a/build_mingw64.sh b/build_mingw64.sh new file mode 100755 index 0000000..6c1b721 --- /dev/null +++ b/build_mingw64.sh @@ -0,0 +1,52 @@ +#! /bin/sh + +# cross compile vamp-aubio-plugins using mingw32 toolchain + +. $PWD/VERSION +VAMP_AUBIO_VERSION=$VAMP_AUBIO_MAJOR_VERSION.$VAMP_AUBIO_MINOR_VERSION.$VAMP_AUBIO_PATCH_VERSION$VAMP_AUBIO_VERSION_STATUS + +set -e +set -x + +if [ "$1" = 'dist' ] +then + rm -rf contrib/ +fi + +export CFLAGS="-Os" +#export CC="i586-mingw32msvc-gcc" +#export CXX="i586-mingw32msvc-g++" +export CC="x86_64-w64-mingw32-gcc" +export CXX="x86_64-w64-mingw32-g++" +export STRIP="x86_64-w64-mingw32-strip" +export WAFOPTS="--with-target-platform=win64 --disable-sndfile --disable-samplerate --disable-jack --disable-avcodec --notests" + +# get waf +./scripts/get_waf.sh + +# fetch Vamp SDK +./scripts/get_deps_mingw64.sh + +# fetch and build aubio +./scripts/get_aubio.sh + +# configure and build plugin +./waf configure + +./waf build -v + +# system-wide installation +#./waf install --destdir=dist-win + +if [ "$1" = 'dist' ] +then + DESTDIR=vamp-aubio-plugins-$VAMP_AUBIO_VERSION-win64 + rm -rf $DESTDIR $DESTDIR.zip + mkdir $DESTDIR + cp -prv contrib/aubio*/README.md $DESTDIR/README.aubio.md + cp -prv README.md $DESTDIR + cp -prv build/vamp-aubio.dll $DESTDIR + $STRIP $DESTDIR/vamp-aubio.dll + cp -prv vamp-aubio.cat vamp-aubio.n3 $DESTDIR + zip -r $DESTDIR.zip $DESTDIR +fi diff --git a/scripts/get_deps_mingw64.sh b/scripts/get_deps_mingw64.sh new file mode 100755 index 0000000..ff189a1 --- /dev/null +++ b/scripts/get_deps_mingw64.sh @@ -0,0 +1,20 @@ +#! /bin/bash + + +source scripts/resources + +#rm -rf contrib/ +mkdir -p contrib/ + +pushd contrib + +for p in $VAMP_PLUGIN_SDK #$VAMP_PLUGIN_SDK_MINGW +do + fetch $p +done + +pushd vamp-plugin-sdk-2.6 +make -f build/Makefile.mingw64 +popd + +popd -- 2.11.0