1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-15 00:51:21 +01:00
Files
audacity/mac/scripts/build_wxwidgets
Sol Fisher Romanoff f395687c9f Change bash scripts to be POSIX-compatible
some Unix-like operating systems, namely Alpine, don't come with bash
preinstalled.
scripts in the lib-src/ directory were left untouched.

Signed-off-by: Sol Fisher Romanoff <sol@solfisher.com>
2021-12-02 10:13:12 +02:00

70 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
#
# You can use this to build wxWidgets. Just run it from within the root of the
# wxWidgets source tree like so:
#
# sudo <path to this script>/build_wxwidgets
#
# The minimum OS X version supported by Audacity is 10.7.
minver=10.7
# If you want to use a specific SDK, specify the full path here
sdkdir=""
# Build a specific configuration
bld()
{
flavour="${1}"
shift
# Create and change to our build directory
rm -rf "bld_${flavour}_${arch}"
mkdir -p "bld_${flavour}_${arch}"
(
cd "bld_${flavour}_${arch}"
# Force Audacity specific options
export CXX="g++ -std=c++1z -stdlib=libc++"
export LD="g++ -std=c++1z -stdlib=libc++"
# NOTES: liblzma isn't available on MacOS 10.8 or older and Audacity doesn't
# need it. So, build wxWidgets without the support to allow Audacity
# to run on MacOS 10.7 or newer.
../configure --prefix="/usr/local/${arch}" \
--enable-macosx-arch="${arch}" \
--enable-shared=yes \
--enable-unicode=yes \
--enable-universal_binary=no \
--enable-webkit=no \
--with-expat=builtin \
--with-flavour="${flavour}" \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-libtiff=builtin \
--with-macosx-sdk="${sdkdir}" \
--with-macosx-version-min="${minver}" \
--with-regex=builtin \
--with-zlib=builtin \
--without-liblzma \
"${@}"
make -j "$(sysctl -n hw.ncpu)" install
)
}
# Only build 32-bit version if running on 10.14 or older and
# using the 10.13 SDK or older.
arches="x86_64"
osver="$(sw_vers -productVersion)"
sdkver="$(xcrun --show-sdk-version)"
if expr "${osver}" \< "10.15" && expr "${sdkver}" \< "10.14"; then
arches="${arches} i386"
fi
for arch in ${arches}
do
bld "debug" --enable-debug=yes
bld "release" --enable-debug=no
done