From 4bcca85d45d358c99cc9eb0b9af16b5638b8655c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 13 Jun 2020 22:13:31 +0100 Subject: [PATCH] Add libsamplerate and opus, fix db for mingw --- bootstrap.sh | 9 ++++-- build-jack.sh | 28 ++++++++++++++----- ...b-1-fix-including-winioctl-h-lowcase.patch | 27 ++++++++++++++++++ setup/functions.sh | 2 +- setup/versions.sh | 2 ++ 5 files changed, 57 insertions(+), 11 deletions(-) create mode 100644 patches/db/db-1-fix-including-winioctl-h-lowcase.patch diff --git a/bootstrap.sh b/bootstrap.sh index 58fb3f4..26934f1 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -26,9 +26,6 @@ fi # - sed # - tar -# TODO add these libraries -# - libsamplerate - source setup/check_target.sh source setup/env.sh source setup/functions.sh @@ -84,6 +81,12 @@ build_autoconf libvorbis "${LIBVORBIS_VERSION}" download flac "${FLAC_VERSION}" "https://ftp.osuosl.org/pub/xiph/releases/flac" "tar.xz" build_autoconf flac "${FLAC_VERSION}" +# --------------------------------------------------------------------------------------------------------------------- +# libsamplerate + +download libsamplerate "${LIBSAMPLERATE_VERSION}" "http://www.mega-nerd.com/SRC" +build_autoconf libsamplerate "${LIBSAMPLERATE_VERSION}" "--disable-fftw --disable-sndfile" + # --------------------------------------------------------------------------------------------------------------------- # libsndfile diff --git a/build-jack.sh b/build-jack.sh index d946aff..c0dced5 100755 --- a/build-jack.sh +++ b/build-jack.sh @@ -18,8 +18,9 @@ fi # TODO check that bootstrap.sh has been run -# TODO add these libraries -# - opus (custom) +# TODO +# - portaudio (with asio support) for windows +# - readline for windows? source setup/check_target.sh source setup/env.sh @@ -55,6 +56,9 @@ function build_custom_db() { if [ "${CROSS_COMPILING}" -eq 1 ]; then extraconfrules="--host=${TOOLCHAIN_PREFIX} ${extraconfrules}" fi + if [ "${WIN32}" -eq 1 ]; then + extraconfrules="--enable-mingw ${extraconfrules}" + fi _prebuild "${name}" "${pkgdir}" @@ -83,20 +87,30 @@ function build_custom_db() { } patch_file db "${DB_VERSION}" "src/dbinc/atomic.h" 's/__atomic_compare_exchange/__db_atomic_compare_exchange/' -build_custom_db db "${DB_VERSION}" --disable-java --disable-sql --disable-tcl - +build_custom_db db "${DB_VERSION}" "--disable-java --disable-replication --disable-sql --disable-tcl" # --enable-posixmutexes --enable-compat185 --enable-cxx --enable-dbm --enable-stl -# make LIBSO_LIBS=-lpthread # --------------------------------------------------------------------------------------------------------------------- +# opus + +download opus "${OPUS_VERSION}" "https://archive.mozilla.org/pub/opus" +build_autoconf opus "${OPUS_VERSION}" "--disable-extra-programs --enable-custom-modes --enable-float-approx" + +# --------------------------------------------------------------------------------------------------------------------- +# and finally jack2 if [ ! -d jack2 ]; then git clone --recursive git@github.com:jackaudio/jack2.git fi +jack2_args="--prefix=\"${PAWPAW_PREFIX}/jack2\"" + +# if [ "${MACOS_OLD}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then +# jack2_args="${jack2_args} --mixed" +# fi + ln -sf "$(pwd)/jack2" "${PAWPAW_BUILDDIR}/jack2-git" rm -f "${PAWPAW_BUILDDIR}/jack2-git/.stamp_built" -build_waf jack2 "git" -# "--lv2dir=${PAWPAW_PREFIX}/lib/lv2" +build_waf jack2 "git" "${jack2_args}" # --------------------------------------------------------------------------------------------------------------------- diff --git a/patches/db/db-1-fix-including-winioctl-h-lowcase.patch b/patches/db/db-1-fix-including-winioctl-h-lowcase.patch new file mode 100644 index 0000000..30f2db0 --- /dev/null +++ b/patches/db/db-1-fix-including-winioctl-h-lowcase.patch @@ -0,0 +1,27 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +From b768ced5dfb6e45b03aff92c747af641f12dcf06 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev +Date: Wed, 2 Sep 2015 20:17:34 +0300 +Subject: [PATCH] fix including winioctl.h (lowcase) + +--- + src/dbinc/win_db.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/dbinc/win_db.h b/src/dbinc/win_db.h +index e22aba9..bfcc274 100644 +--- a/src/dbinc/win_db.h ++++ b/src/dbinc/win_db.h +@@ -50,7 +50,7 @@ + #include + #include + #ifndef DB_WINCE +-#include ++#include + #endif + + #ifdef HAVE_GETADDRINFO +-- +2.1.4 + diff --git a/setup/functions.sh b/setup/functions.sh index b746e54..621f0b4 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -133,7 +133,7 @@ function build_autoconf() { if [ ! -f "${pkgdir}/.stamp_configured" ]; then pushd "${pkgdir}" - ./configure --enable-static --disable-shared --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules} + ./configure --enable-static --disable-shared --disable-doc --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules} touch .stamp_configured popd fi diff --git a/setup/versions.sh b/setup/versions.sh index 8a6ebbb..2d230d8 100644 --- a/setup/versions.sh +++ b/setup/versions.sh @@ -7,6 +7,7 @@ FILE_VERSION=5.34 LIBOGG_VERSION=1.3.4 LIBVORBIS_VERSION=1.3.6 FLAC_VERSION=1.3.2 +LIBSAMPLERATE_VERSION=0.1.9 LIBSNDFILE_VERSION=1.0.28 LV2_VERSION=1.18.0 FFTW_VERSION=3.3.8 @@ -14,6 +15,7 @@ FFTW_VERSION=3.3.8 # jack builds only AFTEN_VERSION=0.0.8 DB_VERSION=5.3.28 +OPUS_VERSION=1.3.1 # GLIB_VERSION=2.44.1 # GLIB_MVERSION=2.44