Merge pull request #301 from drowe67/ms-macos-older-releases

CMAKE_OSX_DEPLOYMENT_TARGET needs to be before project().
pull/304/head
Mooneer Salem 2022-11-17 22:50:19 -08:00 committed by GitHub
commit a915de3deb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 8 additions and 71 deletions

View File

@ -6,6 +6,7 @@
# mailing list: https://lists.sourceforge.net/lists/listinfo/freetel-codec2
#
cmake_minimum_required(VERSION 3.13)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version")
project(FreeDV
VERSION 1.8.4
DESCRIPTION "HF Digital Voice for Radio Amateurs"
@ -35,7 +36,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if(BUILD_OSX_UNIVERSAL)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
endif(BUILD_OSX_UNIVERSAL)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version")
# Return the date (yyyy-mm-dd)
string(TIMESTAMP DATE_RESULT "%Y-%m-%d" UTC)

View File

@ -167,7 +167,7 @@ Testing FreeDV API:
Using MacPorts, most of the appropriate dependencies can be installed by:
$ sudo port install subversion git libtool libsamplerate +universal sox +universal cmake portaudio +universal
$ sudo port install subversion git libtool sox +universal cmake
It should be fairly similar using HomeBrew, but you will need to replace all the /opt/ paths in the following instructions.

View File

@ -581,6 +581,7 @@ FMA - Supports FMA extensions using YMM state</code></pre>
</ul></li>
<li>Bugfixes:
<ul>
<li>Fix issue preventing macOS binaries from running on releases older than 12.0. (PR #301)</li>
<li>Fix issue with 2020B not being selected as default on next start (PR #299)</li>
</ul></li>
<li>Documentation:

View File

@ -788,6 +788,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
2. Enhancements:
* Update FreeDV configuration defaults to improve first-time usability. (PR #293)
3. Bugfixes:
* Fix issue preventing macOS binaries from running on releases older than 12.0. (PR #301)
* Fix issue with 2020B not being selected as default on next start (PR #299)
4. Documentation:
* Update manual to reflect Ubuntu renaming libsndfile-dev to libsnd1file-dev. (PR #297)

Binary file not shown.

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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"