Skip to content

Commit

Permalink
Tweak MOD bootstrap, always enable jack2 portaudio backend
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 16, 2023
1 parent 19d47d4 commit 6411906
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 38 deletions.
68 changes: 30 additions & 38 deletions bootstrap-mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

# ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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"
Expand Down
54 changes: 54 additions & 0 deletions patches/jack2/01_portaudio-for-all.patch
Original file line number Diff line number Diff line change
@@ -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',

0 comments on commit 6411906

Please sign in to comment.