Build: Support macOS Armv8/x86-64 univ. binaries

- Rename IOS_ARMV8_BUILD to ARMV8_BUILD.
- Rename install_ios() to install_subbuild() in makemacpkg.
- Wordsmith the build instructions accordingly.
- Use xcode12.2 image in Travis CI.
This commit is contained in:
DRC
2020-11-18 15:01:24 -06:00
parent e417033d84
commit 0ba70b6a13
4 changed files with 19 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ matrix:
- docker - docker
- os: osx - os: osx
env: BUILD_OFFICIAL=1 env: BUILD_OFFICIAL=1
osx_image: xcode8.3 osx_image: xcode12.2
- os: linux - os: linux
compiler: clang compiler: clang
env: env:
@@ -72,14 +72,13 @@ before_install:
sudo apt -y --install-recommends install libc6-dev-x32; sudo apt -y --install-recommends install libc6-dev-x32;
fi fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
pushd $HOME/Downloads && curl -LO https://distfiles.macports.org/MacPorts/MacPorts-2.6.4-10.15-Catalina.pkg &&
curl -LO https://distfiles.macports.org/MacPorts/MacPorts-2.6.4-10.12-Sierra.pkg && sudo installer -pkg MacPorts-2.6.4-10.15-Catalina.pkg -target / &&
sudo installer -pkg MacPorts-2.6.4-10.12-Sierra.pkg -target / && rm MacPorts-2.6.4-10.15-Catalina.pkg &&
rm MacPorts-2.6.4-10.12-Sierra.pkg &&
sudo /opt/local/bin/port -N install yasm md5sha1sum && sudo /opt/local/bin/port -N install yasm md5sha1sum &&
export PATH=/opt/local/bin:$PATH && export PATH=/opt/local/bin:$PATH &&
popd &&
ln -fs /Applications/Xcode.app /Applications/Xcode83.app; ln -fs /Applications/Xcode.app /Applications/Xcode83.app;
ln -fs /Applications/Xcode.app /Applications/Xcode122.app;
fi fi
- if [ "${BUILD_OFFICIAL:-}" != "" ]; then - if [ "${BUILD_OFFICIAL:-}" != "" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then if [ "$TRAVIS_OS_NAME" = "linux" ]; then

View File

@@ -642,17 +642,18 @@ are installed by default on OS X/macOS 10.7 and later.
In order to create a Mac package/disk image that contains universal In order to create a Mac package/disk image that contains universal
x86-64/Arm binaries, set the following CMake variable: x86-64/Arm binaries, set the following CMake variable:
* `IOS_ARMV8_BUILD`: Directory containing an Armv8 (64-bit) iOS build of * `ARMV8_BUILD`: Directory containing an Armv8 (64-bit) iOS or macOS build of
libjpeg-turbo to include in the universal binaries libjpeg-turbo to include in the universal binaries
You should first use CMake to configure an Armv8 sub-build of libjpeg-turbo You should first use CMake to configure an Armv8 sub-build of libjpeg-turbo
(see "Building libjpeg-turbo for iOS" above) in a build directory that matches (see "Building libjpeg-turbo for iOS" above, if applicable) in a build
the one specified in the aforementioned CMake variable. Next, configure the directory that matches the one specified in the aforementioned CMake variable.
primary (x86-64) build of libjpeg-turbo as an out-of-tree build, specifying the Next, configure the primary (x86-64) build of libjpeg-turbo as an out-of-tree
aforementioned CMake variable, and build it. Once the primary build has been build, specifying the aforementioned CMake variable, and build it. Once the
built, run `make dmg` from the build directory. The packaging system will primary build has been built, run `make dmg` from the build directory. The
build the sub-build, use lipo to combine it with the primary build into a packaging system will build the sub-build, use lipo to combine it with the
single set of universal binaries, then package the universal binaries. primary build into a single set of universal binaries, then package the
universal binaries.
Windows Windows

View File

@@ -134,8 +134,8 @@ endif() # WIN32
if(APPLE) if(APPLE)
set(IOS_ARMV8_BUILD "" CACHE PATH set(ARMV8_BUILD "" CACHE PATH
"Directory containing Armv8 iOS build to include in universal binaries") "Directory containing Armv8 iOS or macOS build to include in universal binaries")
set(MACOS_APP_CERT_NAME "" CACHE STRING set(MACOS_APP_CERT_NAME "" CACHE STRING
"Name of the Developer ID Application certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo DMG. Leave this blank to generate an unsigned DMG.") "Name of the Developer ID Application certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo DMG. Leave this blank to generate an unsigned DMG.")

View File

@@ -51,7 +51,7 @@ PKGNAME=@PKGNAME@
VERSION=@VERSION@ VERSION=@VERSION@
BUILD=@BUILD@ BUILD=@BUILD@
SRCDIR=@CMAKE_CURRENT_SOURCE_DIR@ SRCDIR=@CMAKE_CURRENT_SOURCE_DIR@
BUILDDIRARMV8=@IOS_ARMV8_BUILD@ BUILDDIRARMV8=@ARMV8_BUILD@
WITH_JAVA=@WITH_JAVA@ WITH_JAVA=@WITH_JAVA@
MACOS_APP_CERT_NAME="@MACOS_APP_CERT_NAME@" MACOS_APP_CERT_NAME="@MACOS_APP_CERT_NAME@"
MACOS_INST_CERT_NAME="@MACOS_INST_CERT_NAME@" MACOS_INST_CERT_NAME="@MACOS_INST_CERT_NAME@"
@@ -98,7 +98,7 @@ if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL
ln -fs /Library/Documentation/$PKGNAME $PKGROOT$DOCDIR ln -fs /Library/Documentation/$PKGNAME $PKGROOT$DOCDIR
fi fi
install_ios() install_subbuild()
{ {
BUILDDIR=$1 BUILDDIR=$1
ARCHNAME=$2 ARCHNAME=$2
@@ -160,7 +160,7 @@ install_ios()
} }
if [ "$BUILDDIRARMV8" != "" ]; then if [ "$BUILDDIRARMV8" != "" ]; then
install_ios $BUILDDIRARMV8 Armv8 armv8 arm64 install_subbuild $BUILDDIRARMV8 Armv8 armv8 arm64
fi fi
install_name_tool -id $LIBDIR/$LIBJPEG_DSO_NAME $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME install_name_tool -id $LIBDIR/$LIBJPEG_DSO_NAME $PKGROOT/$LIBDIR/$LIBJPEG_DSO_NAME