diff --git a/.github/workflows/build-ffmpeg.yml b/.github/workflows/build-ffmpeg.yml index fca83f0b..890bce51 100644 --- a/.github/workflows/build-ffmpeg.yml +++ b/.github/workflows/build-ffmpeg.yml @@ -26,18 +26,25 @@ jobs: - os: macos-13 arch: x86_64 shell: bash + - os: ubuntu-24.04-arm + arch: aarch64 + shell: bash - os: ubuntu-24.04 arch: i686 shell: bash - os: ubuntu-24.04 arch: x86_64 shell: bash + - os: windows-11-arm + arch: ARM64 + shell: 'msys2 {0}' + msys_prefix: mingw-w64-clang-aarch64 + msys_system: CLANGARM64 - os: windows-latest arch: AMD64 shell: 'msys2 {0}' - - os: ubuntu-24.04-arm - arch: aarch64 - shell: bash + msys_prefix: mingw-w64-x86_64 + msys_system: MINGW64 defaults: run: shell: ${{ matrix.shell }} @@ -55,11 +62,11 @@ jobs: brew update brew unlink gettext libidn2 libpng libtiff libunistring libx11 libxau libxcb libxdmcp little-cms2 unbound - uses: msys2/setup-msys2@v2 - if: matrix.os == 'windows-latest' + if: matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm' with: - install: base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gperf mingw-w64-x86_64-nasm openssl-devel - path-type: inherit - release: false + install: base-devel openssl-devel ${{ matrix.msys_prefix }}-gcc ${{ matrix.msys_prefix }}-gperf ${{ matrix.msys_prefix }}-nasm + msystem: ${{ matrix.msys_system }} + #path-type: inherit - name: Build FFmpeg env: CIBW_ARCHS: ${{ matrix.arch }} diff --git a/patches/winpthreads.patch b/patches/winpthreads.patch deleted file mode 100644 index b1c09905..00000000 --- a/patches/winpthreads.patch +++ /dev/null @@ -1,26 +0,0 @@ -Temporary patch for this issue: - -https://sourceforge.net/p/mingw-w64/mailman/message/59184409/ - -This patch can be removed once msys2's packages have been updated. - ---- a/mingw-w64-libraries/winpthreads/include/pthread_time.h -+++ b/mingw-w64-libraries/winpthreads/include/pthread_time.h -@@ -23,6 +23,7 @@ - #ifndef WIN_PTHREADS_TIME_H - #define WIN_PTHREADS_TIME_H - -+#include - #include "pthread_compat.h" - - /* Posix timers are supported */ ---- a/mingw-w64-libraries/winpthreads/include/semaphore.h -+++ b/mingw-w64-libraries/winpthreads/include/semaphore.h -@@ -23,6 +23,7 @@ - #ifndef WIN_PTHREADS_SEMAPHORE_H - #define WIN_PTHREADS_SEMAPHORE_H - -+#include - #include "pthread_compat.h" - - #ifdef __cplusplus diff --git a/scripts/build-ffmpeg.py b/scripts/build-ffmpeg.py index fd6e39fd..170371e8 100644 --- a/scripts/build-ffmpeg.py +++ b/scripts/build-ffmpeg.py @@ -336,10 +336,6 @@ def main(): builder = Builder(dest_dir=dest_dir) builder.create_directories() - # Fix winpthreads breakage until the fix reaches msys2 repos. - if plat == "Windows": - run(["patch", "-d", "C:/msys64/mingw64", "-i", os.path.join(builder.patch_dir, "winpthreads.patch"), "-p3"]) - # install packages available_tools = set() if plat == "Windows": diff --git a/scripts/cibuildpkg.py b/scripts/cibuildpkg.py index 552397e4..c5637582 100644 --- a/scripts/cibuildpkg.py +++ b/scripts/cibuildpkg.py @@ -32,7 +32,9 @@ def get_platform() -> str: elif system == "Darwin": return f"macosx_{machine}" elif system == "Windows": - if struct.calcsize("P") * 8 == 64: + if machine == "ARM64": + return "win_arm64" + elif struct.calcsize("P") * 8 == 64: return "win_amd64" else: return "win32"