Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Currently FFmpeg 8.1 is built with the following packages enabled for all platfo
- openh264 2.6.0
- opencore-amr 0.1.6
- x264 32c3b801191522961102d4bea292cdb61068d0dd
- x265 4.1
- x265 4.2

The following additional packages are also enabled on Linux:

Expand Down
16 changes: 0 additions & 16 deletions patches/vorbis.patch

This file was deleted.

34 changes: 0 additions & 34 deletions patches/x265.patch

This file was deleted.

31 changes: 27 additions & 4 deletions scripts/build-ffmpeg.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import argparse
import concurrent.futures
import glob
import gzip
import hashlib
import os
import platform
import shutil
import subprocess
import sys
import tarfile

from cibuildpkg import Builder, Package, fetch, log_group, run

Expand Down Expand Up @@ -148,8 +150,8 @@ def calculate_sha256(filename: str) -> str:
),
Package(
name="x265",
source_url="https://bitbucket.org/multicoreware/x265_git/downloads/x265_4.1.tar.gz",
sha256="a31699c6a89806b74b0151e5e6a7df65de4b49050482fe5ebf8a4379d7af8f29",
source_url="https://bitbucket.org/multicoreware/x265_git/downloads/x265_4.2.tar.gz",
sha256="40b1ea0453e0309f0eba934e0ddf533f8f6295966679e8894e8f1c1c8d5e1210",
build_system="cmake",
source_dir="source",
),
Expand Down Expand Up @@ -484,9 +486,30 @@ def main():
else:
run(["strip", "-s"] + libraries)

# build output tarball
# build output tarball (reproducible: fixed timestamps, sorted entries)
os.makedirs(output_dir, exist_ok=True)
run(["tar", "czvf", output_tarball, "-C", dest_dir, "bin", "include", "lib"])
with gzip.GzipFile(output_tarball, "wb", mtime=0) as gz:
with tarfile.open(fileobj=gz, mode="w|") as tar:
for subdir in ("bin", "include", "lib"):
subdir_path = os.path.join(dest_dir, subdir)
if not os.path.exists(subdir_path):
continue
for root, dirs, files in os.walk(subdir_path):
dirs.sort()
for name in sorted(files):
filepath = os.path.join(root, name)
arcname = os.path.relpath(filepath, dest_dir)
info = tar.gettarinfo(filepath, arcname=arcname)
info.mtime = 0
info.uid = 0
info.gid = 0
info.uname = ""
info.gname = ""
if info.issym() or info.islnk():
tar.addfile(info)
else:
with open(filepath, "rb") as f:
tar.addfile(info, f)


if __name__ == "__main__":
Expand Down
Loading