forked from EIRTeam/FFmpeg-Builds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
109 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds | ||
FROM $GH_REPO/base:latest | ||
|
||
RUN --mount=src=MacOSX12.3.sdk.tar.xz,dst=/sdk.tar.xz \ | ||
git clone https://github.com/tpoechtrager/osxcross.git /opt/osxcross && \ | ||
cd /opt/osxcross && \ | ||
git fetch --all && \ | ||
git checkout ff8d100f3f026b4ffbe4ce96d8aac4ce06f1278b && \ | ||
ln -s /sdk.tar.xz /opt/osxcross/tarballs/MacOSX12.3.sdk.tar.xz && \ | ||
UNATTENDED=1 ./build.sh | ||
|
||
RUN rustup target add aarch64-apple-darwin | ||
|
||
ADD toolchain.cmake /toolchain.cmake | ||
ADD cross.meson /cross.meson | ||
|
||
ENV FFBUILD_TOOLCHAIN=aarch64-apple-darwin21.4 | ||
ENV PATH="/opt/osxcross/target/bin:${PATH}" \ | ||
FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=${FFBUILD_TOOLCHAIN}- --arch=aarch64 --target-os=darwin" \ | ||
FFBUILD_CROSS_PREFIX="${FFBUILD_TOOLCHAIN}-" \ | ||
FFBUILD_RUST_TARGET="aarch64-apple-darwin" \ | ||
FFBUILD_PREFIX=/opt/ffbuild \ | ||
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \ | ||
PKG_CONFIG=pkg-config \ | ||
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \ | ||
CC="${FFBUILD_TOOLCHAIN}-clang" \ | ||
CXX="${FFBUILD_TOOLCHAIN}-clang++" \ | ||
LD="${FFBUILD_TOOLCHAIN}-ld" \ | ||
AR="${FFBUILD_TOOLCHAIN}-ar" \ | ||
RANLIB="${FFBUILD_TOOLCHAIN}-ranlib" \ | ||
NM="${FFBUILD_TOOLCHAIN}-nm" \ | ||
## zlib produces test files with off64_t variables. There is no support for _LARGE_FILE64_SOURCE / _FILE_OFFSET_BITS | ||
## flags in Clang yet: https://github.com/llvm/llvm-project/issues/77376 | ||
## So, for now we redefine this type to int64_t | ||
CFLAGS="-mmacosx-version-min=12.3 -Doff64_t=int64_t -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -pthread" \ | ||
CXXFLAGS="-mmacosx-version-min=12.3 -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -pthread" \ | ||
LDFLAGS="-L/opt/ffbuild/lib -O2 -pipe -pthread -lm" \ | ||
STAGE_CFLAGS="-fvisibility=hidden" \ | ||
STAGE_CXXFLAGS="-fvisibility=hidden" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[binaries] | ||
c = 'aarch64-apple-darwin21.4-clang' | ||
cpp = 'aarch64-apple-darwin21.4-clang++' | ||
ld = 'aarch64-apple-darwin21.4-ld' | ||
ar = 'aarch64-apple-darwin21.4-ar' | ||
ranlib = 'aarch64-apple-darwin21.4-ranlib' | ||
strip = 'aarch64-apple-darwin21.4-strip' | ||
|
||
[host_machine] | ||
system = 'darwin' | ||
cpu_family = 'aarch64' | ||
cpu = 'aarch64' | ||
endian = 'little' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set(CMAKE_SYSTEM_NAME Darwin) | ||
set(CMAKE_SYSTEM_PROCESSOR aarch64) | ||
|
||
set(triple aarch64-apple-darwin21.4) | ||
|
||
set(CMAKE_C_COMPILER ${triple}-clang) | ||
set(CMAKE_CXX_COMPILER ${triple}-clang++) | ||
set(CMAKE_RANLIB ${triple}-ranlib) | ||
set(CMAKE_AR ${triple}-ar) | ||
|
||
set(CMAKE_OSX_DEPLOYMENT_TARGET 12.3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/macos-install-shared-godot.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/lgpl-godot.sh | ||
|
||
FFBUILD_TOOLCHAIN=arm64-apple-darwin21.4 | ||
|
||
FF_CONFIGURE+=" --cc=${FFBUILD_TOOLCHAIN}-clang --cxx=${FFBUILD_TOOLCHAIN}-clang++ --install-name-dir=@loader_path" | ||
|
||
TOOLBOX="--enable-videotoolbox" | ||
NEON="--enable-neon" | ||
|
||
FF_CONFIGURE+=" $TOOLBOX $NEON" |