Build PortAudio statically and use internal curl/zlib for wxWidgets.
parent
623ef7a621
commit
ee23b4c78c
|
@ -8,7 +8,7 @@ export FREEDVGUIDIR=${PWD}
|
|||
export CODEC2DIR=$FREEDVGUIDIR/codec2
|
||||
export LPCNETDIR=$FREEDVGUIDIR/LPCNet
|
||||
export HAMLIBDIR=$FREEDVGUIDIR/hamlib
|
||||
export CODEC2_BRANCH=master
|
||||
export CODEC2_BRANCH=ms-macos-older-releases
|
||||
export LPCNET_BRANCH=master
|
||||
export UT_ENABLE=${UT_ENABLE:-0}
|
||||
|
||||
|
@ -62,10 +62,10 @@ if [ -d .git ]; then
|
|||
git pull
|
||||
fi
|
||||
mkdir -p build_osx && cd build_osx && rm -Rf *
|
||||
cmake -DBUILD_OSX_UNIVERSAL=1 -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=1 -DUSE_STATIC_SPEEXDSP=1 -DHAMLIB_INCLUDE_DIR=${HAMLIBDIR}/include -DHAMLIB_LIBRARY=${HAMLIBDIR}/lib/libhamlib.a -DCODEC2_BUILD_DIR=$CODEC2DIR/build_osx -DLPCNET_BUILD_DIR=$LPCNETDIR/build_osx ..
|
||||
cmake -DBUILD_OSX_UNIVERSAL=1 -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=1 -DUSE_STATIC_SPEEXDSP=1 -DUSE_STATIC_PORTAUDIO=1 -DHAMLIB_INCLUDE_DIR=${HAMLIBDIR}/include -DHAMLIB_LIBRARY=${HAMLIBDIR}/lib/libhamlib.a -DCODEC2_BUILD_DIR=$CODEC2DIR/build_osx -DLPCNET_BUILD_DIR=$LPCNETDIR/build_osx ..
|
||||
make VERBOSE=1
|
||||
|
||||
# Rebuild now that wxWidgets is bootstrapped
|
||||
cmake -DBUILD_OSX_UNIVERSAL=1 -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=1 -DUSE_STATIC_SPEEXDSP=1 -DUSE_STATIC_SAMPLERATE=1 -DUSE_STATIC_SNDFILE=1 -DUNITTEST=$UT_ENABLE -DHAMLIB_INCLUDE_DIR=${HAMLIBDIR}/include -DHAMLIB_LIBRARY=${HAMLIBDIR}/lib/libhamlib.a -DCODEC2_BUILD_DIR=$CODEC2DIR/build_osx -DLPCNET_BUILD_DIR=$LPCNETDIR/build_osx ..
|
||||
cmake -DBUILD_OSX_UNIVERSAL=1 -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=1 -DUSE_STATIC_SPEEXDSP=1 -DUSE_STATIC_PORTAUDIO=1 -DUSE_STATIC_SAMPLERATE=1 -DUSE_STATIC_SNDFILE=1 -DUNITTEST=$UT_ENABLE -DHAMLIB_INCLUDE_DIR=${HAMLIBDIR}/include -DHAMLIB_LIBRARY=${HAMLIBDIR}/lib/libhamlib.a -DCODEC2_BUILD_DIR=$CODEC2DIR/build_osx -DLPCNET_BUILD_DIR=$LPCNETDIR/build_osx ..
|
||||
make VERBOSE=1
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ if(MINGW AND CMAKE_CROSSCOMPILING)
|
|||
elseif(APPLE)
|
||||
|
||||
if(BUILD_OSX_UNIVERSAL)
|
||||
set(CONFIGURE_COMMAND ./configure --disable-shared --with-osx_cocoa --enable-universal_binary=x86_64,arm64 --with-macosx-version-min=10.11 --prefix=${CMAKE_BINARY_DIR}/external/dist --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-expat=builtin CXXFLAGS=-stdlib=libc++\ -std=c++11\ -DWX_PRECOMP\ -O2\ -fno-strict-aliasing\ -fno-common)
|
||||
set(CONFIGURE_COMMAND ./configure --disable-shared --with-osx_cocoa --enable-universal_binary=x86_64,arm64 --with-macosx-version-min=10.11 --prefix=${CMAKE_BINARY_DIR}/external/dist --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-expat=builtin --with-libcurl=builtin --with-zlib=builtin CXXFLAGS=-stdlib=libc++\ -std=c++11\ -DWX_PRECOMP\ -O2\ -fno-strict-aliasing\ -fno-common)
|
||||
else()
|
||||
set(CONFIGURE_COMMAND ./configure --disable-shared --with-macosx-version-min=10.10 --prefix=${CMAKE_BINARY_DIR}/external/dist --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-expat=builtin CXXFLAGS=-stdlib=libc++\ -std=c++11\ -DWX_PRECOMP\ -O2\ -fno-strict-aliasing\ -fno-common)
|
||||
set(CONFIGURE_COMMAND ./configure --disable-shared --with-macosx-version-min=10.10 --prefix=${CMAKE_BINARY_DIR}/external/dist --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-libcurl=builtin --with-zlib=builtin --with-expat=builtin CXXFLAGS=-stdlib=libc++\ -std=c++11\ -DWX_PRECOMP\ -O2\ -fno-strict-aliasing\ -fno-common)
|
||||
endif(BUILD_OSX_UNIVERSAL)
|
||||
|
||||
else()
|
||||
|
|
|
@ -35,7 +35,6 @@ ExternalProject_Add(portaudio
|
|||
CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND $(MAKE)
|
||||
INSTALL_COMMAND $(MAKE) install
|
||||
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/portaudio-macos.patch && autoconf && cd bindings/cpp && autoconf
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(portaudio
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
diff -ur portaudio.orig/configure portaudio/configure
|
||||
--- portaudio.orig/configure 2020-11-19 17:23:04.000000000 -0800
|
||||
+++ portaudio/configure 2021-05-25 22:24:37.000000000 -0700
|
||||
@@ -15884,13 +15884,25 @@
|
||||
elif xcodebuild -version -sdk macosx10.15 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.15 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.0 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.0 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.1 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.1 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.2 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.2 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.3 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.3 Path`"
|
||||
else
|
||||
- as_fn_error $? "Could not find 10.5 to 10.13 SDK." "$LINENO" 5
|
||||
+ as_fn_error $? "Could not find 10.5 to 11.3 SDK." "$LINENO" 5
|
||||
fi
|
||||
esac
|
||||
|
||||
mac_arches=""
|
||||
- for arch in x86_64
|
||||
+ for arch in x86_64 arm64
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -arch $arch"
|
||||
diff -ur portaudio.orig/configure.in portaudio/configure.in
|
||||
--- portaudio.orig/configure.in 2020-11-19 17:23:04.000000000 -0800
|
||||
+++ portaudio/configure.in 2021-05-25 22:25:12.000000000 -0700
|
||||
@@ -267,15 +267,27 @@
|
||||
elif xcodebuild -version -sdk macosx10.15 Path >/dev/null 2>&1 ; then
|
||||
mac_version_min="-mmacosx-version-min=10.4"
|
||||
mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.15 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.0 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.0 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.1 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.1 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.2 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.2 Path`"
|
||||
+ elif xcodebuild -version -sdk macosx11.3 Path >/dev/null 2>&1 ; then
|
||||
+ mac_version_min="-mmacosx-version-min=10.9"
|
||||
+ mac_sysroot="-isysroot `xcodebuild -version -sdk macosx11.3 Path`"
|
||||
else
|
||||
- AC_MSG_ERROR([Could not find 10.5 to 10.13 SDK.])
|
||||
+ AC_MSG_ERROR([Could not find 10.5 to 11.3 SDK.])
|
||||
fi
|
||||
esac
|
||||
|
||||
dnl Pick which architectures to build for based on what
|
||||
dnl the compiler supports.
|
||||
mac_arches=""
|
||||
- for arch in x86_64
|
||||
+ for arch in x86_64 arm64
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -arch $arch"
|
Loading…
Reference in New Issue