diff options
author | Eric Hameleers <alien@slackware.com> | 2020-09-28 11:03:56 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-09-28 11:03:56 +0000 |
commit | 6ef85b1698999921ec27868c397d3239750ffd75 (patch) | |
tree | 1dbf7baa4b6565a1ab05e078ad56336600415b3f /carla | |
parent | 273f9ab2b595e6ba5ceb285db49262aadcc2493f (diff) | |
download | asb-6ef85b1698999921ec27868c397d3239750ffd75.tar.gz asb-6ef85b1698999921ec27868c397d3239750ffd75.tar.xz |
carla: update to 2.2.0. Use MinGW-w64 and wine to compile Windows VST support
Diffstat (limited to 'carla')
-rwxr-xr-x | carla/build/carla.SlackBuild | 80 |
1 files changed, 54 insertions, 26 deletions
diff --git a/carla/build/carla.SlackBuild b/carla/build/carla.SlackBuild index 5bff3a38..14bf62d4 100755 --- a/carla/build/carla.SlackBuild +++ b/carla/build/carla.SlackBuild @@ -29,10 +29,13 @@ # Descr: audio plugin host # URL: https://kx.studio/Applications:Carla # Build needs: -# Needs: +# Needs: jack2, liblo, python-pyliblo +# MinGW-w64, wine (only if you want to use Windows VST's) # Changelog: -# 2.1.1-1: 30/Jun/2020 by Eric Hameleers <alien@slackware.com> +# 2.1.1-1: 30/jun/2020 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 2.2.0-1: 27/sep/2020 by Eric Hameleers <alien@slackware.com> +# * Update. Add Windows VST host support using MinGW-w64 compiler. # # Run 'sh carla.SlackBuild' to build a Slackware package. # The package (.t?z) and .txt file as well as build logs are created in /tmp . @@ -42,13 +45,26 @@ PRGNAM=carla SRCNAM=Carla -VERSION=${VERSION:-2.1.1} +VERSION=${VERSION:-2.2.0} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j$(nproc) "} TAG=${TAG:-alien} DOCS="INSTALL.md README.md doc/*" +if which i686-w64-mingw32-gcc 2>/dev/null && which winegcc 2>/dev/null ; then + BUILD_WINVST="YES" +else + BUILD_WINVST="NO" + cat <<EOT +** +** If you want to compile support for Carla to act as a Windows VST host, +** please install MinGW-w64 and wine packages first. +** +EOT + sleep 5 +fi + # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -154,9 +170,6 @@ cd ${SRCNAM}-${VERSION} # Fix the 64bit lib dir: sed -i data/carla-single -e '/CARLA_LIBDIR/s/"lib"/"lib${LIBDIRSUFFIX}"/' -# Spoof libmagic.so detection, which is needed to enable external plugin bridge: -sed -i source/Makefile.mk -e 's/HAVE_LIBMAGIC = .*/HAVE_LIBMAGIC=true/' - chown -R root:root . chmod -R u+w,go+r-w,a+rX-st . @@ -167,14 +180,44 @@ export CFLAGS="$SLKCFLAGS" # The 'make features' shows any missing dependencies you'd want to reconsider: touch $OUTPUT/make-${PRGNAM}.log +echo "-- show carla features --" make features \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log -# Compile and install: +# Compile Carla: +echo "-- compile carla --" make $NUMJOBS \ DEFAULT_QT=5 \ PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log + +if [ "$BUILD_WINVST" == "YES" ]; then + # Build the Carla bridges including Windows VST support: + if [ "$ARCH" == "x86_64" ]; then + # The Windows bridges (using MinGW-w64): + echo "-- compile carla windows bridges 64bit --" + CFLAGS="" CPPFLAGS="" CXXFLAGS="" LDFLAGS="" \ + make $NUMJOBS win64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ + 2>&1 | tee $OUTPUT/make-${PRGNAM}_bridges64.log + # The native <-> wine bridges (using Wine): + echo "-- compile carla native <-> wine bridges 64bit --" + make $NUMJOBS wine64 + 2>&1 | tee $OUTPUT/make-${PRGNAM}_wine64.log + fi + # We always compile the 32bit binaries (64bit OS needs multilib of course): + # The Windows bridges (using MinGW-w64): + echo "-- compile carla windows bridges 32bit --" + CFLAGS="" CPPFLAGS="" CXXFLAGS="" LDFLAGS="" \ + make $NUMJOBS win32 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ + 2>&1 | tee $OUTPUT/make-${PRGNAM}_bridges32.log + # The native <-> wine bridges (using Wine): + echo "-- compile carla native <-> wine bridges 32bit --" + make $NUMJOBS wine32 + 2>&1 | tee $OUTPUT/make-${PRGNAM}_wine32.log +fi + +# Finally, install Carla: +echo "-- install carla --" make install DESTDIR=$PKG \ DEFAULT_QT=5 \ PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} \ @@ -215,15 +258,6 @@ if [ -d $PKG/usr/man ]; then for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done fi -# Compress info pages and remove the package's dir file: -if [ -d $PKG/usr/info ]; then - rm -f $PKG/usr/info/dir - gzip -9f $PKG/usr/info/*.info* - # If any info files are present, consider adding this to a doinst.sh - # (replacing XXXXX with whatever files you find): - # chroot . install-info /usr/info/XXXXX.info.gz /usr/info/dir 2> /dev/null -fi - # Strip binaries (if any): find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -231,13 +265,9 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc -if [ -f $SRCDIR/doinst.sh ]; then - cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh -elif [ -f $SRCDIR/doinst.sh.gz ]; then - zcat $SRCDIR/doinst.sh.gz >> $PKG/install/doinst.sh -fi -if [ -f $SRCDIR/slack-required ]; then - cat $SRCDIR/slack-required > $PKG/install/slack-required +cat $SRCDIR/slack-required > $PKG/install/slack-required +if [ "$BUILD_WINVST" == "NO" ]; then + sed -i $PKG/install/slack-required -e "/MinGW-w64/d" -e "/wine/d" fi # Build the package: @@ -247,9 +277,7 @@ cd $OUTPUT md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz}.md5 cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt -if [ -f $PKG/install/slack-required ]; then - cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep -fi +cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep # Restore the original umask: umask ${_UMASK_} |