Browse Source

Continue work on build scripts

tags/1.9.8
falkTX 6 years ago
parent
commit
29b8674fde
2 changed files with 55 additions and 38 deletions
  1. +23
    -8
      data/linux/build-all.sh
  2. +32
    -30
      data/linux/build-deps.sh

+ 23
- 8
data/linux/build-all.sh View File

@@ -145,17 +145,19 @@ unset LC_TIME

set -e

${CHROOT_CARLA_DIR}/data/linux/build-deps.sh
${CHROOT_CARLA_DIR}/data/linux/build-deps.sh ${ARCH}

if [ ! -f /tmp/setup-repo-packages-extra4 ]; then
if [ ! -f /tmp/setup-repo-packages-extra ]; then
apt-get install --no-install-recommends libasound2-dev libx11-dev
apt-get install --no-install-recommends libgtk2.0-dev libqt4-dev
apt-get install --no-install-recommends pyqt4-dev-tools python3-pyqt4.qtopengl python3-liblo python3-rdflib
touch /tmp/setup-repo-packages-extra4
if [ x"${ARCH}" != x"32" ]; then
apt-get install g++-4.8-multilib ia32-libs
fi
apt-get clean
touch /tmp/setup-repo-packages-extra
fi

# libgtk-3-dev

EOF

}
@@ -184,15 +186,28 @@ export LANG=C
export LC_ALL=C
unset LC_TIME

set -e

export RCC_QT4=/usr/bin/rcc
${CHROOT_CARLA_DIR}/data/linux/build${ARCH}.sh
export LINUX="true"

cd ${CHROOT_CARLA_DIR}
make EXTERNAL_PLUGINS=false ${MAKE_ARGS}

if [ x"${ARCH}" != x"32" ]; then
export CFLAGS="-I${TARGETDIR}/carla32/include -m32"
export CXXFLAGS=${CFLAGS}
export LDFLAGS="-L${TARGETDIR}/carla32/lib -m32"
export PKG_CONFIG_PATH=${TARGETDIR}/carla32/lib/pkgconfig
make posix32 ${MAKE_ARGS}
fi

EOF

}

# export ARCH=32
# chroot_build_deps
export ARCH=32
chroot_build_carla

export ARCH=64
chroot_build_carla


+ 32
- 30
data/linux/build-deps.sh View File

@@ -27,7 +27,7 @@ source common.env
cleanup()
{

rm -rf $TARGETDIR/carla32/ $TARGETDIR/carla64/
rm -rf ${TARGETDIR}/carla32/ ${TARGETDIR}/carla64/
rm -rf file-*
rm -rf flac-*
rm -rf fltk-*
@@ -52,16 +52,16 @@ build_base()
export CC=gcc
export CXX=g++

export PREFIX=$TARGETDIR/carla$ARCH
export PATH=$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
export PREFIX=${TARGETDIR}/carla${ARCH}
export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig

export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fvisibility=hidden -fdata-sections -ffunction-sections"
export CFLAGS="$CFLAGS -fPIC -DPIC -DNDEBUG -I$PREFIX/include"
export CXXFLAGS="$CFLAGS -fvisibility-inlines-hidden"
export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m${ARCH}"
export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"

export LDFLAGS="-fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed -Wl,--strip-all"
export LDFLAGS="$LDFLAGS -L$PREFIX/lib"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -m${ARCH}"

# ---------------------------------------------------------------------------------------------------------------------
# pkgconfig
@@ -74,7 +74,7 @@ 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
./configure --enable-indirect-deps --with-internal-glib --with-pc-path=$PKG_CONFIG_PATH --prefix=${PREFIX}
make ${MAKE_ARGS}
make install
touch build-done
@@ -92,7 +92,7 @@ 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 \
./configure --enable-static --disable-shared --prefix=${PREFIX} \
--enable-threads \
--disable-examples --disable-tools
make ${MAKE_ARGS}
@@ -117,7 +117,7 @@ fi

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

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

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

if [ ! -f libvorbis-${LIBVORBIS_VERSION}/build-done ]; then
cd libvorbis-${LIBVORBIS_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX
./configure --enable-static --disable-shared --prefix=${PREFIX}
make ${MAKE_ARGS}
make install
touch build-done
@@ -186,7 +186,7 @@ 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 \
./configure --enable-static --disable-shared --prefix=${PREFIX} \
--disable-cpplibs
make ${MAKE_ARGS}
make install
@@ -204,7 +204,7 @@ fi

if [ ! -f libsndfile-${LIBSNDFILE_VERSION}/build-done ]; then
cd libsndfile-${LIBSNDFILE_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX \
./configure --enable-static --disable-shared --prefix=${PREFIX} \
--disable-full-suite --disable-alsa --disable-sqlite
make ${MAKE_ARGS}
make install
@@ -226,7 +226,7 @@ if [ ! -f libgig-${LIBGIG_VERSION}/build-done ]; then
patch -p1 -i ../patches/libgig_fix-build.patch
touch patched
fi
./configure --enable-static --disable-shared --prefix=$PREFIX
./configure --enable-static --disable-shared --prefix=${PREFIX}
make ${MAKE_ARGS}
make install
touch build-done
@@ -251,14 +251,14 @@ if [ ! -f linuxsampler-${LINUXSAMPLER_VERSION}/build-done ]; then
rm -f configure
make -f Makefile.svn configure
./configure \
--enable-static --disable-shared --prefix=$PREFIX \
--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
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
@@ -266,18 +266,18 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# glib

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

if [ ! -f $PREFIX/lib/pkgconfig/glib-2.0.pc ]; then
if [ ! -f ${PREFIX}/lib/pkgconfig/glib-2.0.pc ]; then
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/
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/
cp /usr/lib/pkgconfig/glib-2.0.pc ${PREFIX}/lib/pkgconfig/
cp /usr/lib/pkgconfig/gthread-2.0.pc ${PREFIX}/lib/pkgconfig/
fi
fi

@@ -291,7 +291,7 @@ fi

if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
cd fluidsynth-${FLUIDSYNTH_VERSION}
./configure --enable-static --disable-shared --prefix=$PREFIX \
./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 \
@@ -299,7 +299,7 @@ if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
--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
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
@@ -312,7 +312,9 @@ fi
export ARCH=32
build_base

export ARCH=64
build_base
if [ x"${1}" != x"32" ]; then
export ARCH=64
build_base
fi

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

Loading…
Cancel
Save