Browse Source

Move versions to common file; Always use wget on linux scripts

tags/1.9.8
falkTX 6 years ago
parent
commit
6b362a14a4
3 changed files with 167 additions and 152 deletions
  1. +131
    -141
      data/linux/build-deps.sh
  2. +20
    -11
      data/linux/build64.sh
  3. +16
    -0
      data/linux/common.env

+ 131
- 141
data/linux/build-deps.sh View File

@@ -2,23 +2,6 @@

# apt-get install build-essential libglib2.0-dev uuid-dev

# ---------------------------------------------------------------------------------------------------------------------
# set variables

PKG_CONFIG_VERSION=0.28
LIBLO_VERSION=0.29
ZLIB_VERSION=1.2.11
FILE_VERSION=5.32
LIBOGG_VERSION=1.3.3
LIBVORBIS_VERSION=1.3.5
FLAC_VERSION=1.3.2
LIBSNDFILE_VERSION=1.0.28
LIBGIG_VERSION=4.0.0
LINUXSAMPLER_VERSION=2.0.0
FLUIDSYNTH_VERSION=1.1.6

MAKE_ARGS="-j 8"

# ---------------------------------------------------------------------------------------------------------------------
# stop on error

@@ -29,12 +12,14 @@ set -e

if [ -f Makefile ]; then
cd data/linux
else
cd $(dirname $0)
fi

# ---------------------------------------------------------------------------------------------------------------------
# set target dir
# set variables

TARGETDIR=$HOME/builds
source common.env

# ---------------------------------------------------------------------------------------------------------------------
# function to remove old stuff
@@ -82,38 +67,38 @@ export LDFLAGS="$LDFLAGS -L$PREFIX/lib"
# pkgconfig

if [ ! -d pkg-config-${PKG_CONFIG_VERSION} ]; then
curl -O https://pkg-config.freedesktop.org/releases/pkg-config-${PKG_CONFIG_VERSION}.tar.gz
tar -xf pkg-config-${PKG_CONFIG_VERSION}.tar.gz
wget --no-check-certificate https://pkg-config.freedesktop.org/releases/pkg-config-${PKG_CONFIG_VERSION}.tar.gz
tar -xf pkg-config-${PKG_CONFIG_VERSION}.tar.gz
fi

if [ ! -f pkg-config-${PKG_CONFIG_VERSION}_$ARCH/build-done ]; then
cp -r pkg-config-${PKG_CONFIG_VERSION} pkg-config-${PKG_CONFIG_VERSION}_$ARCH
cd pkg-config-${PKG_CONFIG_VERSION}_$ARCH
./configure --enable-indirect-deps --with-internal-glib --with-pc-path=$PKG_CONFIG_PATH --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cp -r pkg-config-${PKG_CONFIG_VERSION} pkg-config-${PKG_CONFIG_VERSION}_$ARCH
cd pkg-config-${PKG_CONFIG_VERSION}_$ARCH
./configure --enable-indirect-deps --with-internal-glib --with-pc-path=$PKG_CONFIG_PATH --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# liblo

if [ ! -d liblo-${LIBLO_VERSION} ]; then
curl -L http://download.sourceforge.net/liblo/liblo-${LIBLO_VERSION}.tar.gz -o liblo-${LIBLO_VERSION}.tar.gz
tar -xf liblo-${LIBLO_VERSION}.tar.gz
wget --no-check-certificate https://download.sourceforge.net/liblo/liblo-${LIBLO_VERSION}.tar.gz
tar -xf liblo-${LIBLO_VERSION}.tar.gz
fi

if [ ! -f liblo-${LIBLO_VERSION}_$ARCH/build-done ]; then
cp -r liblo-${LIBLO_VERSION} liblo-${LIBLO_VERSION}_$ARCH
cd liblo-${LIBLO_VERSION}_$ARCH
./configure --enable-static --disable-shared --prefix=$PREFIX \
--enable-threads \
--disable-examples --disable-tools
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cp -r liblo-${LIBLO_VERSION} liblo-${LIBLO_VERSION}_$ARCH
cd liblo-${LIBLO_VERSION}_$ARCH
./configure --enable-static --disable-shared --prefix=$PREFIX \
--enable-threads \
--disable-examples --disable-tools
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
@@ -126,192 +111,197 @@ fi
# zlib

if [ ! -d zlib-${ZLIB_VERSION} ]; then
curl -L https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz -o zlib-${ZLIB_VERSION}.tar.gz
tar -xf zlib-${ZLIB_VERSION}.tar.gz
wget --no-check-certificate https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz -O zlib-${ZLIB_VERSION}.tar.gz
tar -xf zlib-${ZLIB_VERSION}.tar.gz
fi

if [ ! -f zlib-${ZLIB_VERSION}/build-done ]; then
cd zlib-${ZLIB_VERSION}
./configure --static --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cd zlib-${ZLIB_VERSION}
./configure --static --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# file/magic

if [ ! -d file-${FILE_VERSION} ]; then
curl -O ftp://ftp.astron.com/pub/file/file-${FILE_VERSION}.tar.gz
tar -xf file-${FILE_VERSION}.tar.gz
wget ftp://ftp.astron.com/pub/file/file-${FILE_VERSION}.tar.gz
tar -xf file-${FILE_VERSION}.tar.gz
fi

if [ ! -f file-${FILE_VERSION}/build-done ]; then
cd file-${FILE_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cd file-${FILE_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# libogg

if [ ! -d libogg-${LIBOGG_VERSION} ]; then
curl -O https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-${LIBOGG_VERSION}.tar.gz
tar -xf libogg-${LIBOGG_VERSION}.tar.gz
wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-${LIBOGG_VERSION}.tar.gz
tar -xf libogg-${LIBOGG_VERSION}.tar.gz
fi

if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then
cd libogg-${LIBOGG_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cd libogg-${LIBOGG_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# libvorbis

if [ ! -d libvorbis-${LIBVORBIS_VERSION} ]; then
wget https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-${LIBVORBIS_VERSION}.tar.gz
tar -xf libvorbis-${LIBVORBIS_VERSION}.tar.gz
wget --no-check-certificate https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-${LIBVORBIS_VERSION}.tar.gz
tar -xf libvorbis-${LIBVORBIS_VERSION}.tar.gz
fi

if [ ! -f libvorbis-${LIBVORBIS_VERSION}/build-done ]; then
cd libvorbis-${LIBVORBIS_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cd libvorbis-${LIBVORBIS_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# flac

if [ ! -d flac-${FLAC_VERSION} ]; then
wget https://svn.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz
tar -xf flac-${FLAC_VERSION}.tar.xz
wget --no-check-certificate https://svn.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz
tar -xf flac-${FLAC_VERSION}.tar.xz
fi

if [ ! -f flac-${FLAC_VERSION}/build-done ]; then
cd flac-${FLAC_VERSION}
chmod +x configure install-sh
./configure --enable-static --disable-shared --prefix=$PREFIX \
--disable-cpplibs
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cd flac-${FLAC_VERSION}
chmod +x configure install-sh
./configure --enable-static --disable-shared --prefix=$PREFIX \
--disable-cpplibs
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# libsndfile

if [ ! -d libsndfile-${LIBSNDFILE_VERSION} ]; then
curl -O http://www.mega-nerd.com/libsndfile/files/libsndfile-${LIBSNDFILE_VERSION}.tar.gz
tar -xf libsndfile-${LIBSNDFILE_VERSION}.tar.gz
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-${LIBSNDFILE_VERSION}.tar.gz
tar -xf libsndfile-${LIBSNDFILE_VERSION}.tar.gz
fi

if [ ! -f libsndfile-${LIBSNDFILE_VERSION}/build-done ]; then
cd libsndfile-${LIBSNDFILE_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX \
--disable-full-suite --disable-alsa --disable-sqlite
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cd libsndfile-${LIBSNDFILE_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX \
--disable-full-suite --disable-alsa --disable-sqlite
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# libgig

if [ ! -d libgig-${LIBGIG_VERSION} ]; then
curl -O http://download.linuxsampler.org/packages/libgig-${LIBGIG_VERSION}.tar.bz2
tar -xf libgig-${LIBGIG_VERSION}.tar.bz2
wget http://download.linuxsampler.org/packages/libgig-${LIBGIG_VERSION}.tar.bz2
tar -xf libgig-${LIBGIG_VERSION}.tar.bz2
fi

if [ ! -f libgig-${LIBGIG_VERSION}/build-done ]; then
cd libgig-${LIBGIG_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../patches/libgig_fix-build.patch
touch patched
fi
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
cd libgig-${LIBGIG_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../patches/libgig_fix-build.patch
touch patched
fi
./configure --enable-static --disable-shared --prefix=$PREFIX
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# linuxsampler

if [ ! -d linuxsampler-${LINUXSAMPLER_VERSION} ]; then
curl -O http://download.linuxsampler.org/packages/linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
tar -xf linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
wget http://download.linuxsampler.org/packages/linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
tar -xf linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
fi

if [ ! -f linuxsampler-${LINUXSAMPLER_VERSION}/build-done ]; then
cd linuxsampler-${LINUXSAMPLER_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../patches/linuxsampler_allow-no-drivers-build.patch
patch -p1 -i ../patches/linuxsampler_disable-ladspa-fx.patch
touch patched
fi
rm configure
make -f Makefile.svn configure
./configure \
--enable-static --disable-shared --prefix=$PREFIX \
--disable-alsa-driver --disable-arts-driver --disable-jack-driver \
--disable-asio-driver --disable-midishare-driver --disable-mmemidi-driver \
--disable-coreaudio-driver --disable-coremidi-driver \
--disable-instruments-db --disable-sf2-engine
make ${MAKE_ARGS}
make install
sed -i -e "s|-llinuxsampler|-llinuxsampler -L$PREFIX/lib/libgig -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm|" $PREFIX/lib/pkgconfig/linuxsampler.pc
touch build-done
cd ..
cd linuxsampler-${LINUXSAMPLER_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../patches/linuxsampler_allow-no-drivers-build.patch
patch -p1 -i ../patches/linuxsampler_disable-ladspa-fx.patch
touch patched
fi
rm -f configure
make -f Makefile.svn configure
./configure \
--enable-static --disable-shared --prefix=$PREFIX \
--disable-alsa-driver --disable-arts-driver --disable-jack-driver \
--disable-asio-driver --disable-midishare-driver --disable-mmemidi-driver \
--disable-coreaudio-driver --disable-coremidi-driver \
--disable-instruments-db --disable-sf2-engine
make ${MAKE_ARGS}
make install
sed -i -e "s|-llinuxsampler|-llinuxsampler -L$PREFIX/lib/libgig -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm|" $PREFIX/lib/pkgconfig/linuxsampler.pc
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# glib

if [ ! -d $PREFIX/include/glib-2.0 ]; then
cp -r /usr/include/glib-2.0 $PREFIX/include/
cp -r /usr/include/glib-2.0 $PREFIX/include/
fi

if [ ! -f $PREFIX/lib/pkgconfig/glib-2.0.pc ]; then
cp /usr/lib/x86_64-linux-gnu/pkgconfig/glib-2.0.pc $PREFIX/lib/pkgconfig/
cp /usr/lib/x86_64-linux-gnu/pkgconfig/gthread-2.0.pc $PREFIX/lib/pkgconfig/
cp /usr/lib/x86_64-linux-gnu/pkgconfig/libpcre.pc $PREFIX/lib/pkgconfig/
if [ -f /usr/lib/x86_64-linux-gnu/pkgconfig/glib-2.0.pc ]; then
cp /usr/lib/x86_64-linux-gnu/pkgconfig/glib-2.0.pc $PREFIX/lib/pkgconfig/
cp /usr/lib/x86_64-linux-gnu/pkgconfig/gthread-2.0.pc $PREFIX/lib/pkgconfig/
cp /usr/lib/x86_64-linux-gnu/pkgconfig/libpcre.pc $PREFIX/lib/pkgconfig/
else
cp /usr/lib/pkgconfig/glib-2.0.pc $PREFIX/lib/pkgconfig/
cp /usr/lib/pkgconfig/gthread-2.0.pc $PREFIX/lib/pkgconfig/
fi
fi

# ---------------------------------------------------------------------------------------------------------------------
# fluidsynth

if [ ! -d fluidsynth-${FLUIDSYNTH_VERSION} ]; then
curl -L http://sourceforge.net/projects/fluidsynth/files/fluidsynth-${FLUIDSYNTH_VERSION}/fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz/download -o fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
tar -xf fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
wget --no-check-certificate https://download.sourceforge.net/fluidsynth/fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
tar -xf fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
fi

if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
cd fluidsynth-${FLUIDSYNTH_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX \
--enable-libsndfile-support \
--disable-dbus-support --disable-aufile-support \
--disable-pulse-support --disable-alsa-support --disable-portaudio-support --disable-oss-support --disable-jack-support \
--disable-coreaudio --disable-coremidi --disable-dart --disable-lash --disable-ladcca \
--without-readline
make ${MAKE_ARGS}
make install
sed -i -e "s|-lfluidsynth|-lfluidsynth -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm|" $PREFIX/lib/pkgconfig/fluidsynth.pc
touch build-done
cd ..
cd fluidsynth-${FLUIDSYNTH_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX \
--enable-libsndfile-support \
--disable-dbus-support --disable-aufile-support \
--disable-pulse-support --disable-alsa-support --disable-portaudio-support --disable-oss-support --disable-jack-support \
--disable-coreaudio --disable-coremidi --disable-dart --disable-lash --disable-ladcca \
--without-readline
make ${MAKE_ARGS}
make install
sed -i -e "s|-lfluidsynth|-lfluidsynth -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm|" $PREFIX/lib/pkgconfig/fluidsynth.pc
touch build-done
cd ..
fi

}


+ 20
- 11
data/linux/build64.sh View File

@@ -1,14 +1,23 @@
#!/bin/bash

# ---------------------------------------------------------------------------------------------------------------------
# stop on error

set -e

MAKE_FLAGS="-j 8 HAVE_FFMPEG=false HAVE_PULSEAUDIO=false EXTERNAL_PLUGINS=false"
# ---------------------------------------------------------------------------------------------------------------------
# cd to correct path

if [ ! -f Makefile ]; then
cd ../..
fi

TARGETDIR=$HOME/builds
# ---------------------------------------------------------------------------------------------------------------------
# set variables

source common.env

MAKE_FLAGS="${MAKE_FLAGS} HAVE_FFMPEG=false HAVE_PULSEAUDIO=false EXTERNAL_PLUGINS=false"

export LINUX="true"
export CC=gcc
@@ -16,24 +25,24 @@ export CXX=g++

unset CPPFLAGS

##############################################################################################
# ---------------------------------------------------------------------------------------------------------------------
# Complete 64bit build

export CFLAGS="-m64"
export CXXFLAGS=$CFLAGS
export CXXFLAGS=${CFLAGS}
export LDFLAGS="-m64"
export PKG_CONFIG_PATH=$TARGETDIR/carla/lib/pkgconfig:$TARGETDIR/carla64/lib/pkgconfig
export PKG_CONFIG_PATH=${TARGETDIR}/carla64/lib/pkgconfig

make $MAKE_FLAGS
make ${MAKE_FLAGS}

##############################################################################################
# ---------------------------------------------------------------------------------------------------------------------
# Build 32bit bridges

export CFLAGS="-m32"
export CXXFLAGS=$CFLAGS
export CXXFLAGS=${CFLAGS}
export LDFLAGS="-m32"
export PKG_CONFIG_PATH=$TARGETDIR/carla32/lib/pkgconfig
export PKG_CONFIG_PATH=${TARGETDIR}/carla32/lib/pkgconfig

make posix32 $MAKE_FLAGS
make posix32 ${MAKE_FLAGS}

##############################################################################################
# ---------------------------------------------------------------------------------------------------------------------

+ 16
- 0
data/linux/common.env View File

@@ -0,0 +1,16 @@
#!/bin/bash

PKG_CONFIG_VERSION=0.28
LIBLO_VERSION=0.29
ZLIB_VERSION=1.2.11
FILE_VERSION=5.32
LIBOGG_VERSION=1.3.3
LIBVORBIS_VERSION=1.3.5
FLAC_VERSION=1.3.2
LIBSNDFILE_VERSION=1.0.28
LIBGIG_VERSION=4.0.0
LINUXSAMPLER_VERSION=2.0.0
FLUIDSYNTH_VERSION=1.1.6

MAKE_ARGS="-j 8"
TARGETDIR=$HOME/builds

Loading…
Cancel
Save