Browse Source

Remove old macOS data files

tags/v2.3.0-RC1
falkTX 3 years ago
parent
commit
140d9480bc
11 changed files with 0 additions and 1715 deletions
  1. +0
    -633
      data/macos/build-deps-new.sh
  2. +0
    -584
      data/macos/build-deps.sh
  3. +0
    -338
      data/macos/build.sh
  4. +0
    -51
      data/macos/common.env
  5. +0
    -39
      data/macos/env.sh
  6. +0
    -25
      data/macos/generate-vst-bundles.sh
  7. +0
    -19
      data/macos/mac-build-test.sh
  8. +0
    -24
      data/macos/plugin.vst/Contents/Info.plist
  9. +0
    -1
      data/macos/plugin.vst/Contents/MacOS/deleteme
  10. +0
    -1
      data/macos/plugin.vst/Contents/PkgInfo
  11. +0
    -0
      data/macos/plugin.vst/Contents/Resources/empty.lproj

+ 0
- 633
data/macos/build-deps-new.sh View File

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

# NOTE: You need the following packages installed via MacPorts:
# automake, autoconf, cmake, libtool, p7zip, pkgconfig, aria2

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

set -e

# ---------------------------------------------------------------------------------------------------------------------
# cd to correct path

if [ -f Makefile ]; then
cd data/macos
fi

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

export DEPS_NEW=1
source common.env

# ---------------------------------------------------------------------------------------------------------------------
# function to remove old stuff

cleanup()
{

rm -rf $TARGETDIR/carla/ $TARGETDIR/carla32/ $TARGETDIR/carla64/
rm -rf cx_Freeze-*
rm -rf Python-*
rm -rf PyQt-*
rm -rf PyQt5_*
rm -rf file-*
rm -rf flac-*
rm -rf fltk-*
rm -rf fluidsynth-*
rm -rf fftw-*
rm -rf gettext-*
rm -rf glib-*
rm -rf libffi-*
rm -rf liblo-*
rm -rf libogg-*
rm -rf libsndfile-*
rm -rf libvorbis-*
rm -rf mxml-*
rm -rf pkg-config-*
rm -rf pyliblo-*
rm -rf qtbase-*
rm -rf qtmacextras-*
rm -rf qtsvg-*
rm -rf sip-*
rm -rf zlib-*
rm -rf PaxHeaders.*

}

# ---------------------------------------------------------------------------------------------------------------------
# function to build base libs

build_base()
{

export CC=clang
export CXX=clang++

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 -fvisibility=hidden -fdata-sections -ffunction-sections"
export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -mmacosx-version-min=10.12"

export LDFLAGS="-fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -stdlib=libc++"

if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
export CFLAGS="${CFLAGS} -arch x86_64 -arch arm64 -Wno-unused-command-line-argument"
export LDFLAGS="${LDFLAGS} -arch x86_64 -arch arm64"
else
export CFLAGS="${CFLAGS} -mfpmath=sse -m${ARCH}"
export LDFLAGS="${LDFLAGS} -m${ARCH}"
fi

export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -std=gnu++11 -stdlib=libc++"

# ---------------------------------------------------------------------------------------------------------------------
# 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
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 ..
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
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 ..
fi

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

if [ x"${ARCH}" = x"32" ]; then
return
fi

# ---------------------------------------------------------------------------------------------------------------------
# zlib

if [ ! -d zlib-${ZLIB_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/madler/zlib/archive/v${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 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
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 ..
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
fi

if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then
cd libogg-${LIBOGG_VERSION}
sed -i -e 's/__MACH__/__MACH_SKIP__/' include/ogg/os_types.h
./configure --enable-static --disable-shared --prefix=${PREFIX}
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

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

if [ ! -d libvorbis-${LIBVORBIS_VERSION} ]; then
curl -O 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 ..
fi

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

if [ ! -d flac-${FLAC_VERSION} ]; then
curl -O https://ftp.osuosl.org/pub/xiph/releases/flac/flac-${FLAC_VERSION}.tar.xz
/opt/local/bin/7z x flac-${FLAC_VERSION}.tar.xz
/opt/local/bin/7z x flac-${FLAC_VERSION}.tar
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 ..
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
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 ..
fi

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

if [ ! -d glib-${GLIB_VERSION} ]; then
/opt/local/bin/aria2c http://caesar.ftp.acc.umu.se/pub/GNOME/sources/glib/${GLIB_MVERSION}/glib-${GLIB_VERSION}.tar.xz
/opt/local/bin/7z x glib-${GLIB_VERSION}.tar.xz
/opt/local/bin/7z x glib-${GLIB_VERSION}.tar
fi

if [ ! -f glib-${GLIB_VERSION}/build-done ]; then
cd glib-${GLIB_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../../patches/glib_skip-gettext.patch
rm m4macros/glib-gettext.m4
touch patched
fi
chmod +x autogen.sh configure install-sh
env PATH=/opt/local/bin:$PATH ./autogen.sh
env PATH=/opt/local/bin:$PATH LDFLAGS="-L${PREFIX}/lib -m${ARCH}" \
./configure --enable-static --disable-shared --prefix=${PREFIX}
env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS} -k || true
touch gio/gio-querymodules gio/glib-compile-resources gio/gsettings gio/gdbus gio/gresource gio/gapplication
touch gobject/gobject-query tests/gobject/performance tests/gobject/performance-threaded
env PATH=/opt/local/bin:$PATH make
touch ${PREFIX}/bin/gtester-report
env PATH=/opt/local/bin:$PATH make install
touch build-done
cd ..
fi

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

if [ ! -d fluidsynth-${FLUIDSYNTH_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/FluidSynth/fluidsynth/archive/v${FLUIDSYNTH_VERSION}.tar.gz
tar -xf fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
fi

if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
cd fluidsynth-${FLUIDSYNTH_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../../patches/fluidsynth-skip-drivers-build.patch
touch patched
fi
sed -i -e 's/_init_lib_suffix "64"/_init_lib_suffix ""/' CMakeLists.txt
/opt/local/bin/cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=OFF \
-Denable-debug=OFF -Denable-profiling=OFF -Denable-ladspa=OFF -Denable-fpe-check=OFF -Denable-portaudio=OFF \
-Denable-trap-on-fpe=OFF -Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF \
-Denable-midishare=OFF -Denable-oss=OFF -Denable-pulseaudio=OFF -Denable-readline=OFF -Denable-ladcca=OFF \
-Denable-lash=OFF -Denable-alsa=OFF -Denable-coreaudio=OFF -Denable-coremidi=OFF -Denable-framework=OFF \
-Denable-floats=ON
make ${MAKE_ARGS} -k || true
touch src/fluidsynth
make
make install
sed -i -e "s|-lfluidsynth|-lfluidsynth -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm -liconv|" ${PREFIX}/lib/pkgconfig/fluidsynth.pc
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# mxml

if [ ! -d mxml-${MXML_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz
tar -xf mxml-${MXML_VERSION}.tar.gz
fi

if [ ! -f mxml-${MXML_VERSION}/build-done ]; then
cd mxml-${MXML_VERSION}
./configure --disable-shared --prefix=${PREFIX}
make libmxml.a
cp *.a ${PREFIX}/lib/
cp *.pc ${PREFIX}/lib/pkgconfig/
cp mxml.h ${PREFIX}/include/
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# fftw3 (needs to be last as it modifies C[XX]FLAGS)

if [ ! -d fftw-${FFTW3_VERSION} ]; then
curl -O http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz
tar -xf fftw-${FFTW3_VERSION}.tar.gz
fi

if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then
export CFLAGS="${CFLAGS} -ffast-math"
export CXXFLAGS="${CXXFLAGS} -ffast-math"
cd fftw-${FFTW3_VERSION}
if [ "${MACOS_UNIVERSAL}" -eq 0 ]; then
FFTW_EXTRAFLAGS="--enable-sse2"
fi
./configure --enable-static ${FFTW_EXTRAFLAGS} --disable-shared --disable-debug --prefix=${PREFIX}
make
make install
make clean
if [ "${MACOS_UNIVERSAL}" -eq 0 ]; then
FFTW_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-sse"
fi
./configure --enable-static ${FFTW_EXTRAFLAGS} --enable-single --disable-shared --disable-debug --prefix=${PREFIX}
make
make install
make clean
touch build-done
cd ..
fi

}

# ---------------------------------------------------------------------------------------------------------------------
# build base libs

# cleanup

if [ $(clang -v 2>&1 | grep version | cut -d' ' -f4 | cut -d'.' -f1) -lt 11 ]; then
export ARCH=32
build_base
fi

export ARCH=64
build_base

# ---------------------------------------------------------------------------------------------------------------------
# set flags for qt stuff

export PREFIX=${TARGETDIR}/carla
export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config

export CFLAGS="-O3 -mtune=generic -msse -msse2 -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -mmacosx-version-min=10.12"
export LDFLAGS="-L${PREFIX}/lib -stdlib=libc++"

if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
export CFLAGS="${CFLAGS} -arch x86_64 -arch arm64 -Wno-unused-command-line-argument"
export LDFLAGS="${LDFLAGS} -arch x86_64 -arch arm64"
else
export CFLAGS="${CFLAGS} -mfpmath=sse -m${ARCH}"
export LDFLAGS="${LDFLAGS} -m${ARCH}"
fi

export CXXFLAGS="${CFLAGS} -std=gnu++11 -stdlib=libc++"

export MAKE=/usr/bin/make

# ---------------------------------------------------------------------------------------------------------------------
# qt5-base download

if [ ! -d qtbase-everywhere-src-${QT5_VERSION} ]; then
curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtbase-everywhere-src-${QT5_VERSION}.tar.xz -o qtbase-everywhere-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtbase-everywhere-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtbase-everywhere-src-${QT5_VERSION}.tar
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-base (64bit, shared, framework)

if [ ! -f qtbase-everywhere-src-${QT5_VERSION}/build-done ]; then
cd qtbase-everywhere-src-${QT5_VERSION}
if [ ! -f configured ]; then
sed -i -e "s/QT_MAC_SDK_VERSION_MIN = 10.13/QT_MAC_SDK_VERSION_MIN = 10.12/" mkspecs/common/macx.conf
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
sed -i -e "s/QMAKE_APPLE_DEVICE_ARCHS = x86_64/QMAKE_APPLE_DEVICE_ARCHS = arm64 x86_64/" mkspecs/common/macx.conf
QT5_EXTRAFLAGS="-no-sse2"
else
QT5_EXTRAFLAGS="-sse2"
fi
chmod +x configure
./configure -release -shared -opensource -confirm-license -platform macx-clang -framework \
-prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
-pkg-config -force-pkg-config -strip \
${QT5_EXTRAFLAGS} -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-avx512 \
-no-mips_dsp -no-mips_dspr2 \
-no-pch -pkg-config \
-make libs -make tools \
-nomake examples -nomake tests \
-no-compile-examples \
-gui -widgets \
-no-dbus \
-no-glib -qt-pcre \
-no-journald -no-syslog -no-slog2 \
-no-openssl -no-securetransport -no-sctp -no-libproxy \
-no-cups -no-fontconfig -qt-freetype -no-harfbuzz -no-gtk -opengl desktop -qpa cocoa \
-no-directfb -no-eglfs -no-xcb -no-xcb-xlib \
-no-evdev -no-libinput -no-mtdev \
-no-gif -no-ico -qt-libpng -qt-libjpeg \
-qt-sqlite
touch configured
fi
make ${MAKE_ARGS}
make install
ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-mac-extras

if [ ! -d qtmacextras-everywhere-src-${QT5_VERSION} ]; then
curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtmacextras-everywhere-src-${QT5_VERSION}.tar.xz -o qtmacextras-everywhere-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtmacextras-everywhere-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtmacextras-everywhere-src-${QT5_VERSION}.tar
fi

if [ ! -f qtmacextras-everywhere-src-${QT5_VERSION}/build-done ]; then
cd qtmacextras-everywhere-src-${QT5_VERSION}
qmake
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-svg

if [ ! -d qtsvg-everywhere-src-${QT5_VERSION} ]; then
curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtsvg-everywhere-src-${QT5_VERSION}.tar.xz -o qtsvg-everywhere-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtsvg-everywhere-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtsvg-everywhere-src-${QT5_VERSION}.tar
fi

if [ ! -f qtsvg-everywhere-src-${QT5_VERSION}/build-done ]; then
cd qtsvg-everywhere-src-${QT5_VERSION}
qmake
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# python

if [ ! -d Python-${PYTHON_VERSION} ]; then
/opt/local/bin/aria2c https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
tar -xf Python-${PYTHON_VERSION}.tgz
fi

if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
cd Python-${PYTHON_VERSION}
if [ "${MACOS_UNIVERSAL}" -ne 1 ]; then
sed -i -e "s/#zlib zlibmodule.c/zlib zlibmodule.c/" Modules/Setup.dist
fi
./configure --prefix=${PREFIX} ${PYTHON_EXTRAFLAGS} --enable-optimizations --enable-shared
make
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# sip

if [ ! -d sip-${SIP_VERSION} ]; then
/opt/local/bin/aria2c https://files.kde.org/krita/build/dependencies/sip-${SIP_VERSION}.tar.gz
tar -xf sip-${SIP_VERSION}.tar.gz
fi

if [ ! -f sip-${SIP_VERSION}/build-done ]; then
cd sip-${SIP_VERSION}
python3 configure.py --sip-module PyQt5.sip
make ${MAKE_ARGS} CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}"
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# pyqt5

if [ ! -d PyQt5_gpl-${PYQT5_VERSION} ]; then
/opt/local/bin/aria2c https://files.kde.org/krita/build/dependencies/PyQt5_gpl-${PYQT5_VERSION}.tar.gz
tar -xf PyQt5_gpl-${PYQT5_VERSION}.tar.gz
fi

if [ ! -f PyQt5_gpl-${PYQT5_VERSION}/build-done ]; then
cd PyQt5_gpl-${PYQT5_VERSION}
python3 configure.py --concatenate --confirm-license -c
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# pyliblo

if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then
/opt/local/bin/aria2c http://das.nasophon.de/download/pyliblo-${PYLIBLO_VERSION}.tar.gz
tar -xf pyliblo-${PYLIBLO_VERSION}.tar.gz
fi

if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then
cd pyliblo-${PYLIBLO_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../../patches/pyliblo-python3.7.patch
touch patched
fi
env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# setuptools-scm

if [ ! -d setuptools_scm-${SETUPTOOLS_SCM_VERSION} ]; then
/opt/local/bin/aria2c https://files.pythonhosted.org/packages/ed/b6/979bfa7b81878b2b4475dde092aac517e7f25dd33661796ec35664907b31/setuptools_scm-${SETUPTOOLS_SCM_VERSION}.tar.gz
tar -xf setuptools_scm-${SETUPTOOLS_SCM_VERSION}.tar.gz
fi

if [ ! -f setuptools_scm-${SETUPTOOLS_SCM_VERSION}/build-done ]; then
cd setuptools_scm-${SETUPTOOLS_SCM_VERSION}
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# toml

if [ ! -d toml-${TOML_VERSION} ]; then
/opt/local/bin/aria2c https://files.pythonhosted.org/packages/be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-${TOML_VERSION}.tar.gz
tar -xf toml-${TOML_VERSION}.tar.gz
fi

if [ ! -f toml-${TOML_VERSION}/build-done ]; then
cd toml-${TOML_VERSION}
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# zipp

if [ ! -d zipp-${ZIPP_VERSION} ]; then
/opt/local/bin/aria2c https://files.pythonhosted.org/packages/ce/b0/757db659e8b91cb3ea47d90350d7735817fe1df36086afc77c1c4610d559/zipp-${ZIPP_VERSION}.tar.gz
tar -xf zipp-${ZIPP_VERSION}.tar.gz
fi

if [ ! -f zipp-${ZIPP_VERSION}/build-done ]; then
cd zipp-${ZIPP_VERSION}
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# importlib_metadata

if [ ! -d importlib_metadata-${IMPORTLIB_METADATA_VERSION} ]; then
/opt/local/bin/aria2c https://files.pythonhosted.org/packages/3f/a8/16dc098b0addd1c20719c18a86e985be851b3ec1e103e703297169bb22cc/importlib_metadata-${IMPORTLIB_METADATA_VERSION}.tar.gz
tar -xf importlib_metadata-${IMPORTLIB_METADATA_VERSION}.tar.gz
fi

if [ ! -f importlib_metadata-${IMPORTLIB_METADATA_VERSION}/build-done ]; then
cd importlib_metadata-${IMPORTLIB_METADATA_VERSION}
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# cxfreeze

if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz
tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
fi

if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
cd cx_Freeze-${CXFREEZE_VERSION}
sed -i -e 's/, use_builtin_types=False//' cx_Freeze/macdist.py
sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
sed -i -e 's/extra_postargs=extraArgs,/extra_postargs=extraArgs+os.getenv("LDFLAGS").split(),/' setup.py
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

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

+ 0
- 584
data/macos/build-deps.sh View File

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

# NOTE: You need the following packages installed via MacPorts:
# automake, autoconf, cmake, libtool, p7zip, pkgconfig, aria2

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

set -e

# ---------------------------------------------------------------------------------------------------------------------
# cd to correct path

if [ -f Makefile ]; then
cd data/macos
fi

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

source common.env

# ---------------------------------------------------------------------------------------------------------------------
# function to remove old stuff

cleanup()
{

rm -rf $TARGETDIR/carla/ $TARGETDIR/carla32/ $TARGETDIR/carla64/
rm -rf cx_Freeze-*
rm -rf Python-*
rm -rf PyQt-*
rm -rf PyQt5_*
rm -rf file-*
rm -rf flac-*
rm -rf fltk-*
rm -rf fluidsynth-*
rm -rf fftw-*
rm -rf gettext-*
rm -rf glib-*
rm -rf libffi-*
rm -rf liblo-*
rm -rf libogg-*
rm -rf libsndfile-*
rm -rf libvorbis-*
rm -rf mxml-*
rm -rf pkg-config-*
rm -rf pyliblo-*
rm -rf qtbase-*
rm -rf qtmacextras-*
rm -rf qtsvg-*
rm -rf sip-*
rm -rf zlib-*
rm -rf PaxHeaders.*

}

# ---------------------------------------------------------------------------------------------------------------------
# function to build base libs

build_base()
{

export CC=clang
export CXX=clang++

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 -m${ARCH} -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -stdlib=libc++"

export LDFLAGS="-fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -m${ARCH} -stdlib=libc++"

# ---------------------------------------------------------------------------------------------------------------------
# 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
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 ..
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
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 ..
fi

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

if [ x"${ARCH}" = x"32" ]; then
return
fi

# ---------------------------------------------------------------------------------------------------------------------
# zlib

if [ ! -d zlib-${ZLIB_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/madler/zlib/archive/v${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 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
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 ..
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
fi

if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then
cd libogg-${LIBOGG_VERSION}
sed -i -e 's/__MACH__/__MACH_SKIP__/' include/ogg/os_types.h
./configure --enable-static --disable-shared --prefix=${PREFIX}
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

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

if [ ! -d libvorbis-${LIBVORBIS_VERSION} ]; then
curl -O 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 ..
fi

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

if [ ! -d flac-${FLAC_VERSION} ]; then
curl -O https://ftp.osuosl.org/pub/xiph/releases/flac/flac-${FLAC_VERSION}.tar.xz
/opt/local/bin/7z x flac-${FLAC_VERSION}.tar.xz
/opt/local/bin/7z x flac-${FLAC_VERSION}.tar
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 ..
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
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 ..
fi

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

if [ ! -d glib-${GLIB_VERSION} ]; then
/opt/local/bin/aria2c http://caesar.ftp.acc.umu.se/pub/GNOME/sources/glib/${GLIB_MVERSION}/glib-${GLIB_VERSION}.tar.xz
/opt/local/bin/7z x glib-${GLIB_VERSION}.tar.xz
/opt/local/bin/7z x glib-${GLIB_VERSION}.tar
fi

if [ ! -f glib-${GLIB_VERSION}/build-done ]; then
cd glib-${GLIB_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../../patches/glib_skip-gettext.patch
rm m4macros/glib-gettext.m4
touch patched
fi
chmod +x autogen.sh configure install-sh
env PATH=/opt/local/bin:$PATH ./autogen.sh
env PATH=/opt/local/bin:$PATH LDFLAGS="-L${PREFIX}/lib -m${ARCH}" \
./configure --enable-static --disable-shared --prefix=${PREFIX}
env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS} -k || true
touch gio/gio-querymodules gio/glib-compile-resources gio/gsettings gio/gdbus gio/gresource gio/gapplication
touch gobject/gobject-query tests/gobject/performance tests/gobject/performance-threaded
env PATH=/opt/local/bin:$PATH make
touch ${PREFIX}/bin/gtester-report
env PATH=/opt/local/bin:$PATH make install
touch build-done
cd ..
fi

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

if [ ! -d fluidsynth-${FLUIDSYNTH_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/FluidSynth/fluidsynth/archive/v${FLUIDSYNTH_VERSION}.tar.gz
tar -xf fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
fi

if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
cd fluidsynth-${FLUIDSYNTH_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../../patches/fluidsynth-skip-drivers-build.patch
touch patched
fi
sed -i -e 's/_init_lib_suffix "64"/_init_lib_suffix ""/' CMakeLists.txt
/opt/local/bin/cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=OFF \
-Denable-debug=OFF -Denable-profiling=OFF -Denable-ladspa=OFF -Denable-fpe-check=OFF -Denable-portaudio=OFF \
-Denable-trap-on-fpe=OFF -Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF \
-Denable-midishare=OFF -Denable-oss=OFF -Denable-pulseaudio=OFF -Denable-readline=OFF -Denable-ladcca=OFF \
-Denable-lash=OFF -Denable-alsa=OFF -Denable-coreaudio=OFF -Denable-coremidi=OFF -Denable-framework=OFF \
-Denable-floats=ON
make ${MAKE_ARGS} -k || true
touch src/fluidsynth
make
make install
sed -i -e "s|-lfluidsynth|-lfluidsynth -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm -liconv|" ${PREFIX}/lib/pkgconfig/fluidsynth.pc
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# mxml

if [ ! -d mxml-${MXML_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz
tar -xf mxml-${MXML_VERSION}.tar.gz
fi

if [ ! -f mxml-${MXML_VERSION}/build-done ]; then
cd mxml-${MXML_VERSION}
./configure --disable-shared --prefix=${PREFIX}
make libmxml.a
cp *.a ${PREFIX}/lib/
cp *.pc ${PREFIX}/lib/pkgconfig/
cp mxml.h ${PREFIX}/include/
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# fftw3 (needs to be last as it modifies C[XX]FLAGS)

if [ ! -d fftw-${FFTW3_VERSION} ]; then
curl -O http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz
tar -xf fftw-${FFTW3_VERSION}.tar.gz
fi

if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then
export CFLAGS="${CFLAGS} -ffast-math"
export CXXFLAGS="${CXXFLAGS} -ffast-math"
cd fftw-${FFTW3_VERSION}
./configure --enable-static --enable-sse2 --disable-shared --disable-debug --prefix=${PREFIX}
make
make install
make clean
./configure --enable-static --enable-sse --enable-sse2 --enable-single --disable-shared --disable-debug --prefix=${PREFIX}
make
make install
make clean
touch build-done
cd ..
fi

}

# ---------------------------------------------------------------------------------------------------------------------
# build base libs

# cleanup

export ARCH=32
build_base

export ARCH=64
build_base

# ---------------------------------------------------------------------------------------------------------------------
# set flags for qt stuff

export PREFIX=${TARGETDIR}/carla
export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config

export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64 -mmacosx-version-min=10.8"
export CXXFLAGS="${CFLAGS} -std=gnu++11 -stdlib=libc++"
export LDFLAGS="-L${PREFIX}/lib -m64 -stdlib=libc++"

export MAKE=/usr/bin/make

# ---------------------------------------------------------------------------------------------------------------------
# qt5-base download

if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then
curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtbase-opensource-src-${QT5_VERSION}.tar.xz -o qtbase-opensource-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-base (64bit, shared, framework)

if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then
cd qtbase-opensource-src-${QT5_VERSION}
if [ ! -f configured ]; then
if [ ! -f carla-patched ]; then
#sed -i -e "s|PNG_WARNINGS_SUPPORTED|PNG_WARNINGS_NOT_SUPPORTED|" src/3rdparty/libpng/pnglibconf.h
#sed -i -e "s|AWK=.*|AWK=/opt/local/bin/gawk|" configure
#sed -i -e "s|/usr/bin/xcrun -find xcrun|true|" configure
#sed -i -e "s|/usr/bin/xcrun -find xcrun|echo hello|" mkspecs/features/mac/default_pre.prf
#patch -p1 -i ../../patches/qt55-newosx-fix.patch
#patch -p1 -i ../../patches/qt56-cpp98-compat.patch
patch -p1 -i ../../patches/qt59-osx10.8-compat.patch
patch -p1 -i ../../patches/qt59-osx10.8-compat2.patch
patch -p1 -i ../../patches/qt59-osx10.8-compat3.patch
sed -i -e "s/10.10/10.8/" mkspecs/macx-clang/qmake.conf
sed -i -e "s/ --sdk \$sdk / /" configure
sed -i -e "s/ --sdk \$\$sdk / /" mkspecs/features/mac/sdk.prf
touch carla-patched
fi

QT55_ARGS="./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang -framework \
-prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
-qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -opengl desktop -qpa cocoa \
-no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \
-no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
-no-cups -no-dbus -no-evdev -no-fontconfig -no-harfbuzz -no-gif -no-glib -no-nis -no-openssl -no-pch -no-sql-ibase -no-sql-odbc \
-no-audio-backend -no-qml-debug -no-separate-debug-info -no-use-gold-linker \
-no-compile-examples -nomake examples -nomake tests -make libs -make tools
"

QT56_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
-release -optimized-tools -opensource -confirm-license -c++std c++98 -no-qml-debug -platform macx-clang \
-no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
-pkg-config -force-pkg-config \
-no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-freetype \
-no-openssl -no-libproxy \
-qt-pcre -no-xcb -no-xkbcommon-x11 -no-xkbcommon-evdev -no-xinput2 -no-xcb-xlib -no-glib \
-no-pulseaudio -no-alsa -no-gtkstyle \
-make libs -make tools \
-nomake examples -nomake tests \
-no-compile-examples \
-no-cups -no-iconv -no-evdev -no-icu -no-fontconfig \
-no-dbus -no-xcb -no-eglfs -no-kms -no-gbm -no-directfb -no-linuxfb \
-qpa cocoa -opengl desktop -framework \
-no-audio-backend -no-pch
"

QT59_ARGS="./configure -silent -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
-opensource -confirm-license -release -strip -shared -platform macx-clang \
-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-avx512 \
-no-mips_dsp -no-mips_dspr2 \
-no-pch -pkg-config -force-pkg-config \
-make libs -make tools \
-nomake examples -nomake tests \
-no-compile-examples \
-gui -widgets \
-no-dbus \
-no-glib -qt-pcre \
-no-journald -no-syslog -no-slog2 \
-no-openssl -no-securetransport -no-sctp -no-libproxy \
-no-cups -no-fontconfig -qt-freetype -no-harfbuzz -no-gtk -opengl desktop -qpa cocoa -no-xcb-xlib \
-no-directfb -no-eglfs -no-xcb \
-no-evdev -no-libinput -no-mtdev -no-xinput2 -no-xkbcommon-x11 -no-xkbcommon-evdev \
-no-gif -no-ico -qt-libpng -qt-libjpeg \
-qt-sqlite
"

chmod +x configure
${QT59_ARGS}
#chmod -R 777 config.tests/unix/
touch configured
fi
make ${MAKE_ARGS}
make install
ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
#sed -i -e "s/ -lqtpcre/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
#sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-mac-extras

if [ ! -d qtmacextras-opensource-src-${QT5_VERSION} ]; then
curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtmacextras-opensource-src-${QT5_VERSION}.tar.xz -o qtmacextras-opensource-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar
fi

if [ ! -f qtmacextras-opensource-src-${QT5_VERSION}/build-done ]; then
cd qtmacextras-opensource-src-${QT5_VERSION}
qmake
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# qt5-svg

if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then
curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtsvg-opensource-src-${QT5_VERSION}.tar.xz -o qtsvg-opensource-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar.xz
/opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar
fi

if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then
cd qtsvg-opensource-src-${QT5_VERSION}
qmake
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# python

if [ ! -d Python-${PYTHON_VERSION} ]; then
/opt/local/bin/aria2c https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
tar -xf Python-${PYTHON_VERSION}.tgz
fi

if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
cd Python-${PYTHON_VERSION}
sed -i -e "s/#zlib zlibmodule.c/zlib zlibmodule.c/" Modules/Setup.dist
./configure --prefix=${PREFIX} --enable-shared
make
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# sip

if [ ! -d sip-${SIP_VERSION} ]; then
/opt/local/bin/aria2c http://sourceforge.net/projects/pyqt/files/sip/sip-${SIP_VERSION}/sip-${SIP_VERSION}.tar.gz
tar -xf sip-${SIP_VERSION}.tar.gz
fi

if [ ! -f sip-${SIP_VERSION}/build-done ]; then
cd sip-${SIP_VERSION}
python3 configure.py # --sip-module PyQt5.sip
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# pyqt5

if [ ! -d PyQt5_gpl-${PYQT5_VERSION} ]; then
/opt/local/bin/aria2c http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-${PYQT5_VERSION}/PyQt5_gpl-${PYQT5_VERSION}.tar.gz
tar -xf PyQt5_gpl-${PYQT5_VERSION}.tar.gz
fi

if [ ! -f PyQt5_gpl-${PYQT5_VERSION}/build-done ]; then
cd PyQt5_gpl-${PYQT5_VERSION}
python3 configure.py --concatenate --confirm-license -c
make ${MAKE_ARGS}
make install
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# pyliblo

if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then
/opt/local/bin/aria2c http://das.nasophon.de/download/pyliblo-${PYLIBLO_VERSION}.tar.gz
tar -xf pyliblo-${PYLIBLO_VERSION}.tar.gz
fi

if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then
cd pyliblo-${PYLIBLO_VERSION}
if [ ! -f patched ]; then
patch -p1 -i ../../patches/pyliblo-python3.7.patch
touch patched
fi
env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

# ---------------------------------------------------------------------------------------------------------------------
# cxfreeze

if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
/opt/local/bin/aria2c https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz
tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
fi

if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
cd cx_Freeze-${CXFREEZE_VERSION}
#sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
python3 setup.py build
python3 setup.py install --prefix=${PREFIX}
touch build-done
cd ..
fi

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

+ 0
- 338
data/macos/build.sh View File

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

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

set -e

VERSION="2.3.0-alpha3"

# ------------------------------------------------------------------------------------
# cd to correct path

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

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

source data/macos/common.env

if [ $(uname -r | cut -d '.' -f 1) -lt 16 ]; then
export MACOS_VERSION_MIN="10.8"
PKG_SUFFIX="intel-10.8"
else
export MACOS_VERSION_MIN="10.12"
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
PKG_SUFFIX="universal"
else
PKG_SUFFIX="intel-10.12"
fi
fi

PKG_FOLDER="Carla_${VERSION}-macOS-${PKG_SUFFIX}"

export MACOS="true"
export USING_JUCE="true"

export CC=clang
export CXX=clang++

unset CPPFLAGS

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

export CFLAGS="-I${TARGETDIR}/carla64/include -mmacosx-version-min=${MACOS_VERSION_MIN}"
export CFLAGS="${CFLAGS} -mtune=generic -msse -msse2"
export LDFLAGS="-L${TARGETDIR}/carla64/lib -mmacosx-version-min=${MACOS_VERSION_MIN} -stdlib=libc++"

if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
export CFLAGS="${CFLAGS} -arch x86_64 -arch arm64"
export LDFLAGS="${LDFLAGS} -arch x86_64 -arch arm64"
else
export CFLAGS="${CFLAGS} -m${ARCH}"
export LDFLAGS="${LDFLAGS} -m${ARCH}"
fi

export CXXFLAGS="${CFLAGS} -stdlib=libc++ -Wno-unknown-pragmas -Wno-unused-private-field -Werror=auto-var-id"

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

export MOC_QT5=moc
export RCC_QT5=rcc
export UIC_QT5=uic

make USING_JUCE=${USING_JUCE} USING_JUCE_AUDIO_DEVICES=${USING_JUCE} ${MAKE_ARGS}

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

if [ $(clang -v 2>&1 | grep version | cut -d' ' -f4 | cut -d'.' -f1) -lt 11 ]; then

export CFLAGS="-I${TARGETDIR}/carla32/include -m32 -mmacosx-version-min=${MACOS_VERSION_MIN}"
export CXXFLAGS="${CFLAGS} -stdlib=libc++ -Wno-unknown-pragmas -Wno-unused-private-field -Werror=auto-var-id"
export LDFLAGS="-L${TARGETDIR}/carla32/lib -m32 -mmacosx-version-min=${MACOS_VERSION_MIN} -stdlib=libc++"

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

make USING_JUCE=${USING_JUCE} posix32 ${MAKE_ARGS}

fi

##############################################################################################
# Build Mac App

export PATH=${TARGETDIR}/carla/bin:${TARGETDIR}/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PYTHONPATH=$(pwd)/source/frontend
unset CFLAGS
unset CXXFLAGS
unset LDLAGS
unset PKG_CONFIG_PATH

rm -rf ./build/Carla
rm -rf ./build/CarlaControl
rm -rf ./build/Carla.app
rm -rf ./build/CarlaControl.app
rm -rf ./build/exe.*
rm -rf ./build/*.lv2
rm -rf ./build/*.vst

cp ./source/frontend/carla ./source/frontend/Carla.pyw
cp ./source/frontend/carla-control ./source/frontend/Carla-Control.pyw
cp ./source/frontend/carla-plugin ./source/frontend/carla-plugin.pyw
cp ./source/frontend/bigmeter-ui ./source/frontend/bigmeter-ui.pyw
cp ./source/frontend/midipattern-ui ./source/frontend/midipattern-ui.pyw
cp ./source/frontend/notes-ui ./source/frontend/notes-ui.pyw
cp ./source/frontend/xycontroller-ui ./source/frontend/xycontroller-ui.pyw
env SCRIPT_NAME=Carla python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
env SCRIPT_NAME=Carla-Control python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla-Control
env SCRIPT_NAME=carla-plugin python3 ./data/macos/bundle.py bdist_mac --bundle-name=carla-plugin
env SCRIPT_NAME=bigmeter-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=bigmeter-ui
env SCRIPT_NAME=midipattern-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=midipattern-ui
env SCRIPT_NAME=notes-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=notes-ui
env SCRIPT_NAME=xycontroller-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=xycontroller-ui
rm ./source/frontend/*.pyw

mkdir -p build/Carla.app/Contents/MacOS/resources
mkdir -p build/Carla.app/Contents/MacOS/styles
mkdir -p build/Carla-Control.app/Contents/MacOS/styles

cp bin/*carla*.dylib build/Carla.app/Contents/MacOS/
cp bin/carla-bridge-* build/Carla.app/Contents/MacOS/
cp bin/carla-discovery-* build/Carla.app/Contents/MacOS/
cp bin/styles/* build/Carla.app/Contents/MacOS/styles/

cp bin/*utils.dylib build/Carla-Control.app/Contents/MacOS/
cp bin/styles/* build/Carla-Control.app/Contents/MacOS/styles/

rm -f build/Carla.app/Contents/MacOS/carla-bridge-lv2-modgui
rm -f build/Carla.app/Contents/MacOS/carla-bridge-lv2-qt5

find build/ -type f -name "*.py" -delete
find build/ -type f -name "*.pyi" -delete
find build/ -type f -name "pylupdate.so" -delete
find build/ -type f -name "pyrcc.so" -delete
find build/ -type f -name "QtMacExtras*" -delete
find build/ -type f -name "QtNetwork*" -delete
find build/ -type f -name "QtSql*" -delete
find build/ -type f -name "QtTest*" -delete
find build/ -type f -name "QtXml*" -delete
if [ "${MACOS_VERSION_MIN}" != "10.12" ]; then
find build/ -type f -name "*.pyc" -delete
fi
rm -rf build/Carla.app/Contents/MacOS/lib/PyQt5/uic
rm -rf build/Carla.app/Contents/MacOS/resources/__pycache__
rm -rf build/Carla.app/Contents/MacOS/resources/patchcanvas
rm -rf build/Carla.app/Contents/MacOS/resources/widgets
rm -rf build/Carla.app/Contents/MacOS/resources/zynaddsubfx
rm -rf build/Carla-Control.app/Contents/MacOS/resources/__pycache__

# missed by cx-freeze
mkdir build/Carla.app/Contents/MacOS/iconengines
mkdir build/Carla-Control.app/Contents/MacOS/iconengines
cp ${TARGETDIR}/carla/lib/qt5/plugins/iconengines/libqsvgicon.dylib build/Carla.app/Contents/MacOS/iconengines/
cp ${TARGETDIR}/carla/lib/qt5/plugins/iconengines/libqsvgicon.dylib build/Carla-Control.app/Contents/MacOS/iconengines/
if [ "${MACOS_VERSION_MIN}" = "10.12" ]; then
mkdir build/Carla.app/Contents/MacOS/imageformats
mkdir build/Carla-Control.app/Contents/MacOS/imageformats
mkdir build/Carla.app/Contents/MacOS/platforms
mkdir build/Carla-Control.app/Contents/MacOS/platforms
cp ${TARGETDIR}/carla/lib/qt5/plugins/imageformats/libq{jpeg,svg}.dylib build/Carla.app/Contents/MacOS/imageformats/
cp ${TARGETDIR}/carla/lib/qt5/plugins/imageformats/libq{jpeg,svg}.dylib build/Carla-Control.app/Contents/MacOS/imageformats/
cp ${TARGETDIR}/carla/lib/qt5/plugins/platforms/libq{cocoa,minimal,offscreen}.dylib build/Carla.app/Contents/MacOS/platforms/
cp ${TARGETDIR}/carla/lib/qt5/plugins/platforms/libq{cocoa,minimal,offscreen}.dylib build/Carla-Control.app/Contents/MacOS/platforms/
fi

# continuing...
cd build/Carla.app/Contents/MacOS
for f in `find . -type f | grep -e Q -e libq -e carlastyle.dylib`; do
if [ "${MACOS_VERSION_MIN}" = "10.12" ] && (echo "$f" | grep -q pyc); then continue; fi
install_name_tool -change "@rpath/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore $f
install_name_tool -change "@rpath/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui $f
install_name_tool -change "@rpath/QtOpenGL.framework/Versions/5/QtOpenGL" @executable_path/QtOpenGL $f
install_name_tool -change "@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport" @executable_path/QtPrintSupport $f
install_name_tool -change "@rpath/QtSvg.framework/Versions/5/QtSvg" @executable_path/QtSvg $f
install_name_tool -change "@rpath/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets $f
install_name_tool -change "@rpath/QtMacExtras.framework/Versions/5/QtMacExtras" @executable_path/QtMacExtras $f
done
if [ "${MACOS_VERSION_MIN}" = "10.12" ]; then
cp ${TARGETDIR}/carla/lib/QtCore.framework/Versions/5/QtCore .
cp ${TARGETDIR}/carla/lib/QtGui.framework/Versions/5/QtGui .
cp ${TARGETDIR}/carla/lib/QtOpenGL.framework/Versions/5/QtOpenGL .
cp ${TARGETDIR}/carla/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport .
cp ${TARGETDIR}/carla/lib/QtSvg.framework/Versions/5/QtSvg .
cp ${TARGETDIR}/carla/lib/QtWidgets.framework/Versions/5/QtWidgets .
cp ${TARGETDIR}/carla/lib/QtMacExtras.framework/Versions/5/QtMacExtras .
fi
cd ../../../..

cd build/Carla-Control.app/Contents/MacOS
for f in `find . -type f | grep -e Q -e libq -e carlastyle.dylib`; do
if [ "${MACOS_VERSION_MIN}" = "10.12" ] && (echo "$f" | grep -q pyc); then continue; fi
install_name_tool -change "@rpath/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore $f
install_name_tool -change "@rpath/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui $f
install_name_tool -change "@rpath/QtOpenGL.framework/Versions/5/QtOpenGL" @executable_path/QtOpenGL $f
install_name_tool -change "@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport" @executable_path/QtPrintSupport $f
install_name_tool -change "@rpath/QtSvg.framework/Versions/5/QtSvg" @executable_path/QtSvg $f
install_name_tool -change "@rpath/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets $f
install_name_tool -change "@rpath/QtMacExtras.framework/Versions/5/QtMacExtras" @executable_path/QtMacExtras $f
done
if [ "${MACOS_VERSION_MIN}" = "10.12" ]; then
cp ${TARGETDIR}/carla/lib/QtCore.framework/Versions/5/QtCore .
cp ${TARGETDIR}/carla/lib/QtGui.framework/Versions/5/QtGui .
cp ${TARGETDIR}/carla/lib/QtOpenGL.framework/Versions/5/QtOpenGL .
cp ${TARGETDIR}/carla/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport .
cp ${TARGETDIR}/carla/lib/QtSvg.framework/Versions/5/QtSvg .
cp ${TARGETDIR}/carla/lib/QtWidgets.framework/Versions/5/QtWidgets .
cp ${TARGETDIR}/carla/lib/QtMacExtras.framework/Versions/5/QtMacExtras .
fi
cd ../../../..

mv build/carla-plugin.app/Contents/MacOS/carla-plugin build/Carla.app/Contents/MacOS/resources/
mv build/bigmeter-ui.app/Contents/MacOS/bigmeter-ui build/Carla.app/Contents/MacOS/resources/
mv build/midipattern-ui.app/Contents/MacOS/midipattern-ui build/Carla.app/Contents/MacOS/resources/
mv build/notes-ui.app/Contents/MacOS/notes-ui build/Carla.app/Contents/MacOS/resources/
mv build/xycontroller-ui.app/Contents/MacOS/xycontroller-ui build/Carla.app/Contents/MacOS/resources/

mv build/Carla.app/Contents/MacOS/lib/library.zip build/Carla.app/Contents/MacOS/lib/library-carla1.zip
mv build/carla-plugin.app/Contents/MacOS/lib/library.zip build/Carla.app/Contents/MacOS/lib/library-carla2.zip
mv build/bigmeter-ui.app/Contents/MacOS/lib/library.zip build/Carla.app/Contents/MacOS/lib/library-bigmeter.zip
mv build/midipattern-ui.app/Contents/MacOS/lib/library.zip build/Carla.app/Contents/MacOS/lib/library-midipattern.zip
mv build/notes-ui.app/Contents/MacOS/lib/library.zip build/Carla.app/Contents/MacOS/lib/library-notes.zip
mv build/xycontroller-ui.app/Contents/MacOS/lib/library.zip build/Carla.app/Contents/MacOS/lib/library-xycontroller.zip

mkdir build/Carla.app/Contents/MacOS/lib/_lib
pushd build/Carla.app/Contents/MacOS/lib/_lib
unzip -o ../library-bigmeter.zip
unzip -o ../library-midipattern.zip
unzip -o ../library-notes.zip
unzip -o ../library-xycontroller.zip
unzip -o ../library-carla2.zip
unzip -o ../library-carla1.zip
zip -r -9 ../library.zip *
popd
rm -r build/Carla.app/Contents/MacOS/lib/_lib build/Carla.app/Contents/MacOS/lib/library-*.zip

rm -rf build/carla-plugin.app
rm -rf build/bigmeter-ui.app
rm -rf build/midipattern-ui.app
rm -rf build/notes-ui.app
rm -rf build/xycontroller-ui.app

cd build/Carla.app/Contents/MacOS/resources/
ln -sf ../Qt* ../lib ../iconengines ../imageformats ../platforms ../styles .
ln -sf carla-plugin carla-plugin-patchbay
cd ../../../../..

mkdir build/carla.lv2
mkdir build/carla.lv2/resources
mkdir build/carla.lv2/styles

cp bin/carla.lv2/*.* build/carla.lv2/
cp bin/carla-bridge-* build/carla.lv2/
cp bin/carla-discovery-* build/carla.lv2/
cp bin/libcarla_utils.dylib build/carla.lv2/
rm -f build/carla.lv2/carla-bridge-lv2-modgui
rm -f build/carla.lv2/carla-bridge-lv2-qt5
cp -LR build/Carla.app/Contents/MacOS/resources/* build/carla.lv2/resources/
cp build/Carla.app/Contents/MacOS/styles/* build/carla.lv2/styles/

./data/macos/generate-vst-bundles.sh
mv bin/CarlaVstShell.vst build/carla.vst
mv bin/CarlaVstFxShell.vst build/carlafx.vst
rm -rf bin/*.vst

mkdir build/carla.vst/Contents/MacOS/resources
mkdir build/carla.vst/Contents/MacOS/styles

mkdir build/carlafx.vst/Contents/MacOS/resources
mkdir build/carlafx.vst/Contents/MacOS/styles

cp bin/carla-bridge-* build/carla.vst/Contents/MacOS/
cp bin/carla-discovery-* build/carla.vst/Contents/MacOS/
cp bin/libcarla_utils.dylib build/carla.vst/Contents/MacOS/
rm -f build/carla.vst/carla-bridge-lv2-modgui
rm -f build/carla.vst/carla-bridge-lv2-qt5
cp -LR build/Carla.app/Contents/MacOS/resources/* build/carla.vst/Contents/MacOS/resources/
cp build/Carla.app/Contents/MacOS/styles/* build/carla.vst/Contents/MacOS/styles/

cp bin/carla-bridge-* build/carlafx.vst/Contents/MacOS/
cp bin/carla-discovery-* build/carlafx.vst/Contents/MacOS/
cp bin/libcarla_utils.dylib build/carlafx.vst/Contents/MacOS/
rm -f build/carlafx.vst/carla-bridge-lv2-modgui
rm -f build/carlafx.vst/carla-bridge-lv2-qt5
cp -LR build/Carla.app/Contents/MacOS/resources/* build/carlafx.vst/Contents/MacOS/resources/
cp build/Carla.app/Contents/MacOS/styles/* build/carlafx.vst/Contents/MacOS/styles/

##############################################################################################

rm -rf ${PKG_FOLDER}
mkdir ${PKG_FOLDER}
cp data/macos/README ${PKG_FOLDER}/
mv build/carla.lv2 ${PKG_FOLDER}/
mv build/carla.vst ${PKG_FOLDER}/
mv build/carlafx.vst ${PKG_FOLDER}/
mv build/Carla.app ${PKG_FOLDER}/
mv build/Carla-Control.app ${PKG_FOLDER}/

##############################################################################################
# Build Mac plugin installer

pkgbuild \
--identifier "studio.kx.carla.lv2" \
--install-location "/Library/Audio/Plug-Ins/LV2/carla.lv2/" \
--root "${PKG_FOLDER}/carla.lv2/" \
"${PKG_FOLDER}/carla-lv2.pkg"

pkgbuild \
--identifier "studio.kx.carla.vst2fx" \
--install-location "/Library/Audio/Plug-Ins/VST/carlafx.vst/" \
--root "${PKG_FOLDER}/carlafx.vst/" \
"${PKG_FOLDER}/carla-vst2fx.pkg"

pkgbuild \
--identifier "studio.kx.carla.vst2syn" \
--install-location "/Library/Audio/Plug-Ins/VST/carla.vst/" \
--root "${PKG_FOLDER}/carla.vst/" \
"${PKG_FOLDER}/carla-vst2syn.pkg"

productbuild \
--distribution data/macos/package.xml \
--identifier studio.kx.carla \
--package-path "${PKG_FOLDER}" \
--version ${VERSION} \
"${PKG_FOLDER}/Carla-Plugins.pkg"

rm -r ${PKG_FOLDER}/carla.lv2
rm -r ${PKG_FOLDER}/carla.vst
rm -r ${PKG_FOLDER}/carlafx.vst

rm ${PKG_FOLDER}/carla-lv2.pkg
rm ${PKG_FOLDER}/carla-vst2fx.pkg
rm ${PKG_FOLDER}/carla-vst2syn.pkg

##############################################################################################

+ 0
- 51
data/macos/common.env View File

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

if [ "$(uname -m)" = "arm64" ] || [ "$(uname -r)" = "20.1.0" ]; then
MACOS_UNIVERSAL=1
else
MACOS_UNIVERSAL=0
fi

PKG_CONFIG_VERSION=0.28
LIBLO_VERSION=0.30
ZLIB_VERSION=1.2.11
FILE_VERSION=5.34
LIBOGG_VERSION=1.3.4
LIBVORBIS_VERSION=1.3.6
FLAC_VERSION=1.3.2
LIBSNDFILE_VERSION=1.0.28
GLIB_VERSION=2.44.1
GLIB_MVERSION=2.44
FLUIDSYNTH_VERSION=1.1.11
MXML_VERSION=2.12
FFTW3_VERSION=3.3.8
PYTHON_VERSION=3.7.4
PYLIBLO_VERSION=0.9.2

SETUPTOOLS_SCM_VERSION=5.0.0
TOML_VERSION=0.10.2
ZIPP_VERSION=3.4.0
IMPORTLIB_METADATA_VERSION=3.1.1

if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
PYTHON_VERSION=3.9.1
CXFREEZE_VERSION=6.4.2
else
PYTHON_VERSION=3.7.4
CXFREEZE_VERSION=6.1
fi

if [ -n "${DEPS_NEW}" ]; then
QT5_VERSION=5.12.5
QT5_MVERSION=5.12
PYQT5_VERSION=5.13.1
SIP_VERSION=4.19.19
else
QT5_VERSION=5.9.8
QT5_MVERSION=5.9
SIP_VERSION=4.19.13
PYQT5_VERSION=5.9.2
fi

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

+ 0
- 39
data/macos/env.sh View File

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

##############################################################################################
# MacOS X default environment for Carla

source data/macos/common.env

if [ $(uname -r | cut -d '.' -f 1) -lt 16 ]; then
export MACOS_VERSION_MIN="10.8"
else
export MACOS_VERSION_MIN="10.12"
fi

export CC=clang
export CXX=clang++
export CFLAGS="-I${TARGETDIR}/carla64/include -mmacosx-version-min=${MACOS_VERSION_MIN} -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12"
export CFLAGS="${CFLAGS} -mtune=generic -msse -msse2"
export LDFLAGS="-L${TARGETDIR}/carla64/lib -stdlib=libc++"
unset CPPFLAGS

if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
export CFLAGS="${CFLAGS} -arch x86_64 -arch arm64"
export LDFLAGS="${LDFLAGS} -arch x86_64 -arch arm64"
export MACOS_UNIVERSAL="true"
else
export CFLAGS="${CFLAGS} -m64"
export LDFLAGS="${LDFLAGS} -m64"
fi

export CXXFLAGS="${CFLAGS} -stdlib=libc++ -Wno-unknown-pragmas -Wno-unused-private-field -Werror=auto-var-id"

export MACOS="true"

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

export MOC_QT5=moc
export RCC_QT5=rcc
export UIC_QT5=uic

+ 0
- 25
data/macos/generate-vst-bundles.sh View File

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

set -e

if [ -d bin ]; then
cd bin
else
echo "Please run this script from the root folder"
exit
fi

rm -rf *.vst/

PLUGINS=$(ls | grep "Carla" | grep "dylib")

for i in ${PLUGINS}; do
FILE=$(echo $i | awk 'sub(".dylib","")')
cp -r ../data/macos/plugin.vst ${FILE}.vst
cp $i ${FILE}.vst/Contents/MacOS/${FILE}
rm -f ${FILE}.vst/Contents/MacOS/deleteme
sed -i -e "s/X-PROJECTNAME-X/${FILE}/" ${FILE}.vst/Contents/Info.plist
rm -f ${FILE}.vst/Contents/Info.plist-e
done

cd ..

+ 0
- 19
data/macos/mac-build-test.sh View File

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

set -e

export MACOS_OLD=true
export CROSS_COMPILING=true

_FLAGS="-mmacosx-version-min=10.6 -Wno-attributes -Wno-deprecated-declarations -Werror"

export CFLAGS="${_FLAGS} -m32"
export CXXFLAGS="${_FLAGS} -m32"
export LDFLAGS="-m32"
apple-cross-setup make -j4

export CFLAGS="${_FLAGS} -m64"
export CXXFLAGS="${_FLAGS} -m64"
export LDFLAGS="-m64"
# FIXME
apple-cross-setup make posix64 -j4

+ 0
- 24
data/macos/plugin.vst/Contents/Info.plist View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>X-PROJECTNAME-X</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>net.sf.distrho.X-PROJECTNAME-X</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

+ 0
- 1
data/macos/plugin.vst/Contents/MacOS/deleteme View File

@@ -1 +0,0 @@

+ 0
- 1
data/macos/plugin.vst/Contents/PkgInfo View File

@@ -1 +0,0 @@
BNDL????

+ 0
- 0
data/macos/plugin.vst/Contents/Resources/empty.lproj View File


Loading…
Cancel
Save