From 64119060e470d48da2647a65332211c6b02abecc Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 16 Oct 2023 10:55:20 +0200 Subject: [PATCH] Tweak MOD bootstrap, always enable jack2 portaudio backend Signed-off-by: falkTX --- bootstrap-mod.sh | 68 +++++++++++------------- patches/jack2/01_portaudio-for-all.patch | 54 +++++++++++++++++++ 2 files changed, 84 insertions(+), 38 deletions(-) create mode 100644 patches/jack2/01_portaudio-for-all.patch diff --git a/bootstrap-mod.sh b/bootstrap-mod.sh index f9a6c21..8426ba4 100755 --- a/bootstrap-mod.sh +++ b/bootstrap-mod.sh @@ -110,42 +110,44 @@ if [ ! -e "${PAWPAW_PREFIX}-host/usr/bin" ]; then fi # --------------------------------------------------------------------------------------------------------------------- -# GNU tools by default +# GNU tools by default on macOS -if [ ! -e "${PAWPAW_PREFIX}-host/bin/awk" ]; then - ln -s $(command -v gawk) "${PAWPAW_PREFIX}-host/bin/awk" -fi +if [ "${MACOS}" -eq 1 ]; then + if [ ! -e "${PAWPAW_PREFIX}-host/bin/awk" ]; then + ln -s $(command -v gawk) "${PAWPAW_PREFIX}-host/bin/awk" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/install" ]; then - ln -s $(command -v ginstall) "${PAWPAW_PREFIX}-host/bin/install" -fi + if [ ! -e "${PAWPAW_PREFIX}-host/bin/install" ]; then + ln -s $(command -v ginstall) "${PAWPAW_PREFIX}-host/bin/install" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/libtool" ]; then - ln -s $(command -v glibtool) "${PAWPAW_PREFIX}-host/bin/libtool" -fi + if [ ! -e "${PAWPAW_PREFIX}-host/bin/libtool" ]; then + ln -s $(command -v glibtool) "${PAWPAW_PREFIX}-host/bin/libtool" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/libtoolize" ]; then - ln -s $(command -v glibtoolize) "${PAWPAW_PREFIX}-host/bin/libtoolize" -fi + if [ ! -e "${PAWPAW_PREFIX}-host/bin/libtoolize" ]; then + ln -s $(command -v glibtoolize) "${PAWPAW_PREFIX}-host/bin/libtoolize" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/m4" ]; then - ln -s $(command -v gm4) "${PAWPAW_PREFIX}-host/bin/m4" -fi + if [ ! -e "${PAWPAW_PREFIX}-host/bin/m4" ]; then + ln -s $(command -v gm4) "${PAWPAW_PREFIX}-host/bin/m4" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/make" ]; then - ln -s $(command -v gmake) "${PAWPAW_PREFIX}-host/bin/make" -fi + if [ ! -e "${PAWPAW_PREFIX}-host/bin/make" ]; then + ln -s $(command -v gmake) "${PAWPAW_PREFIX}-host/bin/make" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/readlink" ]; then - ln -s $(command -v greadlink) "${PAWPAW_PREFIX}-host/bin/readlink" -fi + if [ ! -e "${PAWPAW_PREFIX}-host/bin/readlink" ]; then + ln -s $(command -v greadlink) "${PAWPAW_PREFIX}-host/bin/readlink" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/realpath" ]; then - ln -s $(command -v grealpath) "${PAWPAW_PREFIX}-host/bin/realpath" -fi + if [ ! -e "${PAWPAW_PREFIX}-host/bin/realpath" ]; then + ln -s $(command -v grealpath) "${PAWPAW_PREFIX}-host/bin/realpath" + fi -if [ ! -e "${PAWPAW_PREFIX}-host/bin/sed" ]; then - ln -s $(command -v gsed) "${PAWPAW_PREFIX}-host/bin/sed" + if [ ! -e "${PAWPAW_PREFIX}-host/bin/sed" ]; then + ln -s $(command -v gsed) "${PAWPAW_PREFIX}-host/bin/sed" + fi fi # --------------------------------------------------------------------------------------------------------------------- @@ -191,17 +193,7 @@ if [ "${WIN32}" -eq 1 ]; then JACK2_EXTRAFLAGS+=" --static" fi -if [ "${WIN32}" -eq 1 ]; then - # FIXME something is wrong with winmme driver - JACK2_VERSION="88102ec4a73ecb18b58198193905aefe6b378ce5" - JACK2_EXTRAFLAGS+=" --example-tools=no" - JACK2_EXTRAFLAGS+=" --readline=no" - JACK2_EXTRAFLAGS+=" --sndfile=no" - JACK2_EXTRAFLAGS+=" --zalsa=no" -else - JACK2_VERSION="250420381b1a6974798939ad7104ab1a4b9a9994" -fi - +JACK2_VERSION="250420381b1a6974798939ad7104ab1a4b9a9994" JACK2_URL="https://github.com/jackaudio/jack2.git" download jack2 "${JACK2_VERSION}" "${JACK2_URL}" "" "git" diff --git a/patches/jack2/01_portaudio-for-all.patch b/patches/jack2/01_portaudio-for-all.patch new file mode 100644 index 0000000..7cf1259 --- /dev/null +++ b/patches/jack2/01_portaudio-for-all.patch @@ -0,0 +1,54 @@ +diff --git a/windows/portaudio/JackPortAudioDriver.h b/windows/portaudio/JackPortAudioDriver.h +index 9897f60..22e3bc1 100644 +--- a/windows/portaudio/JackPortAudioDriver.h ++++ b/windows/portaudio/JackPortAudioDriver.h +@@ -22,7 +22,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + #include "JackAudioDriver.h" + #include "JackPortAudioDevices.h" ++ ++#ifdef _WIN32 + #include "JackMMCSS.h" ++#endif + + namespace Jack + { +@@ -31,7 +34,11 @@ namespace Jack + \brief The PortAudio driver. + */ + +-class JackPortAudioDriver : public JackMMCSS, public JackAudioDriver ++class JackPortAudioDriver : ++#ifdef _WIN32 ++ public JackMMCSS, ++#endif ++ public JackAudioDriver + { + + private: +@@ -55,8 +62,11 @@ class JackPortAudioDriver : public JackMMCSS, public JackAudioDriver + + public: + +- JackPortAudioDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table, PortAudioDevices* pa_devices) +- : JackMMCSS(), JackAudioDriver(name, alias, engine, table), fStream(NULL), fInputBuffer(NULL), fOutputBuffer(NULL), ++ JackPortAudioDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table, PortAudioDevices* pa_devices) : ++#ifdef _WIN32 ++ JackMMCSS(), ++#endif ++ JackAudioDriver(name, alias, engine, table), fStream(NULL), fInputBuffer(NULL), fOutputBuffer(NULL), + fInputDevice(paNoDevice), fOutputDevice(paNoDevice), fPaDevices(pa_devices) + {} + +diff --git a/wscript b/wscript +index 86eb395..89a0b2a 100644 +--- a/wscript ++++ b/wscript +@@ -151,7 +151,6 @@ def options(opt): + 'portaudio', + help='Enable Portaudio driver', + conf_dest='BUILD_DRIVER_PORTAUDIO') +- portaudio.check(header_name='windows.h') # only build portaudio on windows + portaudio.check_cfg( + package='portaudio-2.0 >= 19', + uselib_store='PORTAUDIO',