build-ardour-stack operational on linux VM's

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@12165 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-04 01:19:49 +00:00
parent ecc9b57869
commit a6e95d1e6f

View file

@ -5,7 +5,21 @@ function die () {
exit 1
}
set -e
function fetch_as_is() {
if uname -a | grep --silent arwin ; then
curl -LO $1
else
wget --no-check-certificate $1
fi
}
function fetch_as () {
if uname -a | grep --silent arwin ; then
curl -L -o $1 $2
else
wget --no-check-certificate -O $1 $2
fi
}
clean=
parallel=2
@ -21,8 +35,12 @@ done
if [ $clean ] ; then
# sudo require by python install step
sudo rm -rf `ls -ld * | awk '/^d/ {print $9;}'`
if [ ! -d LRDF ] ; then
echo "This doesn't appear to be your source directory. Don't run --clean here."
exit 1
fi
rm -rf `find -maxdepth 1 -type d | grep -v -e "gtk+" -e "^.$"`
# sudo required because of its use during the python install step
sudo rm -rf $PREFIX
exit 0
fi
@ -32,7 +50,11 @@ mkdir -p $PREFIX
export MAKEFLAGS=-j$parallel
PATH=$PREFIX/bin:$PATH
OSX=
if uname -a | grep --silent arwin ; then
OSX=y
# its OS X! run for the hills !!
@ -55,96 +77,98 @@ else
GLOBAL_LDFLAGS=
fi
set -e
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
if [ ! -f boost_1_49_0.tar.bz2 ] ; then
echo boost
curl -L -o boost_1_49_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.bz2/download
fetch_as boost_1_49_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.bz2/download
fi
if [ ! -f fftw-3.3.1.tar.gz ] ; then
echo fftw
curl -LO http://www.fftw.org/fftw-3.3.1.tar.gz
fetch_as_is http://www.fftw.org/fftw-3.3.1.tar.gz
fi
if [ ! -f libsigc++-2.2.10.tar.xz ] ; then
echo sigc++
curl -LO http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.xz
fetch_as_is http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.10.tar.xz
fi
if [ ! -f glibmm-2.32.0.tar.xz ] ; then
echo glibmm
curl -LO http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.32/glibmm-2.32.0.tar.xz
fetch_as_is http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.32/glibmm-2.32.0.tar.xz
fi
if [ ! -f cairomm-1.10.0.tar.gz ] ; then
echo cairomm
curl -LO http://cairographics.org/releases/cairomm-1.10.0.tar.gz
fetch_as_is http://cairographics.org/releases/cairomm-1.10.0.tar.gz
fi
if [ ! -f pangomm-2.28.4.tar.xz ] ; then
echo pangomm
curl -LO http://ftp.acc.umu.se/pub/gnome/sources/pangomm/2.28/pangomm-2.28.4.tar.xz
fetch_as_is http://ftp.acc.umu.se/pub/gnome/sources/pangomm/2.28/pangomm-2.28.4.tar.xz
fi
if [ ! -f atkmm-2.22.6.tar.xz ] ; then
echo atkmm
curl -LO http://ftp.gnome.org/pub/GNOME/sources/atkmm/2.22/atkmm-2.22.6.tar.xz
fetch_as_is http://ftp.gnome.org/pub/GNOME/sources/atkmm/2.22/atkmm-2.22.6.tar.xz
fi
if [ ! -f gtkmm-2.24.2.tar.xz ] ; then
echo gtkmm
curl -LO http://ftp.acc.umu.se/pub/GNOME/sources/gtkmm/2.24/gtkmm-2.24.2.tar.xz
fetch_as_is http://ftp.acc.umu.se/pub/GNOME/sources/gtkmm/2.24/gtkmm-2.24.2.tar.xz
fi
if [ ! -f libart_lgpl-2.3.21.tar.bz2 ] ; then
echo libart_lgpl
curl -LO http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3/libart_lgpl-2.3.21.tar.bz2
fetch_as_is http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3/libart_lgpl-2.3.21.tar.bz2
fi
if [ ! -f libgnomecanvas-2.30.3.tar.bz2 ] ; then
echo libgnomecanvas
curl -LO http://ftp.gnome.org/pub/gnome/sources/libgnomecanvas/2.30/libgnomecanvas-2.30.3.tar.bz2
fetch_as_is http://ftp.gnome.org/pub/gnome/sources/libgnomecanvas/2.30/libgnomecanvas-2.30.3.tar.bz2
fi
if [ ! -f libgnomecanvasmm-2.26.0.tar.bz2 ] ; then
echo libgnomecanvasmm
curl -LO http://ftp.acc.umu.se/pub/GNOME/sources/libgnomecanvasmm/2.26/libgnomecanvasmm-2.26.0.tar.bz2
fetch_as_is http://ftp.acc.umu.se/pub/GNOME/sources/libgnomecanvasmm/2.26/libgnomecanvasmm-2.26.0.tar.bz2
fi
if [ ! -f liblo-0.26.tar.gz ] ; then
echo liblo
curl -LO http://downloads.sourceforge.net/liblo/liblo-0.26.tar.gz
fetch_as_is http://downloads.sourceforge.net/liblo/liblo-0.26.tar.gz
fi
if [ ! -f raptor2-2.0.6.tar.gz ] ; then
echo raptor
curl -LO http://download.librdf.org/source/raptor2-2.0.6.tar.gz
fetch_as_is http://download.librdf.org/source/raptor2-2.0.6.tar.gz
fi
if [ ! -f rasqal-0.9.28.tar.gz ] ; then
echo rasqal
curl -LO http://download.librdf.org/source/rasqal-0.9.28.tar.gz
fetch_as_is http://download.librdf.org/source/rasqal-0.9.28.tar.gz
fi
if [ ! -f redland-1.0.15.tar.gz ] ; then
echo librdf
curl -LO http://download.librdf.org/source/redland-1.0.15.tar.gz
fetch_as_is http://download.librdf.org/source/redland-1.0.15.tar.gz
fi
if [ ! -f libogg-1.3.0.tar.xz ] ; then
echo libogg
curl -LO http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.xz
fetch_as_is http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.xz
fi
if [ ! -f flac-1.2.1.tar.gz ] ; then
echo flac
curl -LO http://downloads.xiph.org/releases/flac/flac-1.2.1.tar.gz
fetch_as_is http://downloads.xiph.org/releases/flac/flac-1.2.1.tar.gz
fi
if [ ! -f libvorbis-1.3.2.tar.bz2 ] ; then
echo libvorbis
curl -LO http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
fetch_as_is http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
fi
if [ ! -f libsamplerate-0.1.8.tar.gz ] ; then
echo libsamplerate
curl -LO http://www.mega-nerd.com/SRC/libsamplerate-0.1.8.tar.gz
fetch_as_is http://www.mega-nerd.com/SRC/libsamplerate-0.1.8.tar.gz
fi
if [ ! -f libsndfile-1.0.25.tar.gz ] ; then
echo libsndfile
curl -LO http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz
fetch_as_is http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz
fi
if [ ! -f aubio-0.3.2.tar.gz ] ; then
echo aubio
curl -LO http://aubio.org/pub/aubio-0.3.2.tar.gz
fetch_as_is http://aubio.org/pub/aubio-0.3.2.tar.gz
fi
if [ ! -f rdflib-3.2.0.tar.gz ] ; then
echo python rdflib
curl -LO http://rdflib.googlecode.com/files/rdflib-3.2.0.tar.gz
fetch_as_is http://rdflib.googlecode.com/files/rdflib-3.2.0.tar.gz
fi
if [ ! -f setuptools-0.6c11.tar.gz ] ; then
echo python setuptools
@ -161,34 +185,47 @@ fi
if [ ! -f lv2-1.0.0.tar.bz2 ] ; then
echo LV2
curl -LO http://lv2plug.in/spec/lv2-1.0.0.tar.bz2
fetch_as_is http://lv2plug.in/spec/lv2-1.0.0.tar.bz2
fi
if [ ! -f serd-0.14.0.tar.bz2 ] ; then
echo Serd
curl -LO http://download.drobilla.net/serd-0.14.0.tar.bz2
fetch_as_is http://download.drobilla.net/serd-0.14.0.tar.bz2
fi
if [ ! -f sord-0.8.0.tar.bz2 ] ; then
echo Sord
curl -LO http://download.drobilla.net/sord-0.8.0.tar.bz2
fetch_as_is http://download.drobilla.net/sord-0.8.0.tar.bz2
fi
if [ ! -f sratom-0.2.0.tar.bz2 ] ; then
echo Sratom
curl -LO http://download.drobilla.net/sratom-0.2.0.tar.bz2
fetch_as_is http://download.drobilla.net/sratom-0.2.0.tar.bz2
fi
if [ ! -f lilv-0.14.2.tar.bz2 ] ; then
echo Lilv
curl -LO http://download.drobilla.net/lilv-0.14.2.tar.bz2
fetch_as_is http://download.drobilla.net/lilv-0.14.2.tar.bz2
fi
if [ ! -f suil-0.6.0.tar.bz2 ] ; then
echo Suil
curl -LO http://download.drobilla.net/suil-0.6.0.tar.bz2
fetch_as_is http://download.drobilla.net/suil-0.6.0.tar.bz2
fi
if [ ! -f openssl-1.0.1b.tar.gz ] ; then
echo Suil
fetch_as_is http://www.openssl.org/source/openssl-1.0.1b.tar.gz
fi
if [ ! -f curl-7.25.0.tar.bz2 ] ; then
echo Suil
fetch_as_is http://curl.haxx.se/download/curl-7.25.0.tar.bz2
fi
tar xf boost_1_49_0.tar.bz2 && \
(set -e && cd boost_1_49_0 && ./bootstrap.sh --prefix=$PREFIX --with-libraries=exception && ./b2 && ./b2 install) || die "boost build failed"
tar xf openssl-1.0.1b.tar.gz && \
(set -e && cd openssl-1.0.1b && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./config --prefix=$PREFIX shared threads no-sse2 && MAKEFLAGS= make && make install) || die "opensl build failed"
tar xf curl-7.25.0.tar.bz2 && \
(set -e && cd curl-7.25.0 && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && make install) || die "curl build failed"
tar xf fftw-3.3.1.tar.gz && \
(set -e && cd fftw-3.3.1 && ./configure --prefix=$PREFIX && make && make install && make clean && ./configure --prefix=$PREFIX --enable-single && make && make install) || die "fftw build failed"
(set -e && cd fftw-3.3.1 && ./configure --prefix=$PREFIX --enable-shared && make && make install && make clean && ./configure --prefix=$PREFIX --enable-shared --enable-single && make && make install) || die "fftw build failed"
tar xf libsigc++-2.2.10.tar.xz && \
(set -e && cd libsigc++-2.2.10 && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && make install) || die "sigc++ build failed"
@ -227,23 +264,44 @@ tar xf libogg-1.3.0.tar.xz && \
(set -e && cd libogg-1.3.0 && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && make install) || die "ogg build failed"
# FLAC will not build correctly on OS X Lion with asm optimization enabled, so lets at least force SSE
tar xf flac-1.2.1.tar.gz && \
(set -e && cd flac-1.2.1 && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-asm-optimizations --enable-sse --disable-debug && make && make install) || die "flac build failed"
if [ x$OSX != x ] ; then
tar xf flac-1.2.1.tar.gz && \
(set -e && cd flac-1.2.1 && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-cpplibs --disable-asm-optimizations --enable-sse --disable-debug && make && make install) || die "flac build failed"
else
tar xf flac-1.2.1.tar.gz && \
(set -e && cd flac-1.2.1 && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-cpplibs --disable-debug && make && make install) || die "flac build failed"
fi
tar xf libvorbis-1.3.2.tar.bz2 && \
(set -e && cd libvorbis-1.3.2 && CXXFLAGS="$GLOBAL_CFLAGS" CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && make install) || die "vorbis build failed"
# sndfile-play incorrectly includes <Carbon.h> which no longer works on Lion
tar xf libsndfile-1.0.25.tar.gz && \
(set -e && cd libsndfile-1.0.25 && CFLAGS="$GLOBAL_CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-silent-rules && make && make install) || die "sndfile build failed"
# samplerate incorrectly includes <Carbon.h> which no longer works on Lion
if [ x$OSX != x ] ; then
# sndfile-play incorrectly includes <Carbon.h> which no longer works on Lion
tar xf libsndfile-1.0.25.tar.gz && \
(set -e && cd libsndfile-1.0.25 && CFLAGS="$GLOBAL_CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-silent-rules && make && make install) || die "sndfile build failed"
# samplerate incorrectly includes <Carbon.h> which no longer works on Lion
tar xf libsamplerate-0.1.8.tar.gz && \
(set -e && cd libsamplerate-0.1.8 && CFLAGS="$GLOBAL_CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && make install) || die "samplerate build failed"
else
tar xf libsndfile-1.0.25.tar.gz && \
(set -e && cd libsndfile-1.0.25 && CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX --disable-silent-rules && make && make install) || die "sndfile build failed"
tar xf libsamplerate-0.1.8.tar.gz && \
(set -e && cd libsamplerate-0.1.8 && CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && make install) || die "samplerate build failed"
fi
# aubio has an old version of install.sh which can exit with an error during parallel make install
# it also doesn't use pkg-config to test for FFTW3, sigh.
remove_fftw3_h=
if [ ! -f /usr/include/fftw3.h ] ; then
remove_fftw3_h=y
sudo ln -s $PREFIX/include/fftw3.h /usr/include
fi
tar xf aubio-0.3.2.tar.gz
(set -e && cd aubio-0.3.2 && sed '/no-long-double/d' < ./configure > ./configure.XXX && mv ./configure.XXX ./configure && chmod +x ./configure && CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && MAKEFLAGS=-j1 make install) || die "aubio build failed"
(set -e && cd aubio-0.3.2 && sed '/no-long-double/d' < ./configure > ./configure.XXX && mv ./configure.XXX ./configure && chmod +x ./configure && \
CFLAGS="$GLOBAL_CFLAGS -I$PREFIX" LDFLAGS="$GLOBAL_LDFLAGS" ./configure --prefix=$PREFIX && make && MAKEFLAGS=-j1 make install) || die "aubio build failed"
if [ x$remove_fftw3_h != x ] ; then
rm /usr/include/fftw3.h
fi
# these python lib wants to install to a system-wide location
tar xf rdflib-3.2.0.tar.gz && \
@ -255,7 +313,7 @@ tar xf isodate-0.4.0.tar.gz && \
(set -e && cd LRDF && \
sed 's/glibtoolize/libtoolize/g' < autogen.sh > ag.sh && mv ag.sh autogen.sh && \
CFLAGS="$GLOBAL_CFLAGS" LDFLAGS="$GLOBAL_LDFLAGS" sh ./autogen.sh --prefix=$PREFIX && make && make install) || die "LRDF build failed"
CFLAGS="$GLOBAL_CFLAGS -I$PREFIX/include" LDFLAGS="$GLOBAL_LDFLAGS" sh ./autogen.sh --prefix=$PREFIX && make && make install) || die "LRDF build failed"
tar xf lv2-1.0.0.tar.bz2 && \
(set -e && cd lv2-1.0.0 && unset MACOSX_DEPLOYMENT_TARGET && ./waf configure --prefix=$PREFIX --copy-headers && ./waf build && sudo ./waf install) || die "LV2 build failed"