|
8 | 8 | import subprocess |
9 | 9 | import sys |
10 | 10 |
|
11 | | -from cibuildpkg import Builder, Package, When, fetch, log_group, run |
| 11 | +from cibuildpkg import Builder, Package, fetch, log_group, run |
12 | 12 |
|
13 | 13 | plat = platform.system() |
14 | 14 | is_musllinux = plat == "Linux" and platform.libc_ver()[0] != "glibc" |
@@ -155,7 +155,6 @@ def calculate_sha256(filename: str) -> str: |
155 | 155 | source_url="https://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.6.tar.gz", |
156 | 156 | sha256="483eb4061088e2b34b358e47540b5d495a96cd468e361050fae615b1809dc4a1", |
157 | 157 | build_arguments=["--disable-dependency-tracking"], |
158 | | - when=When.community_only, |
159 | 158 | ), |
160 | 159 | Package( |
161 | 160 | name="x264", |
@@ -277,20 +276,12 @@ def make_tarball_name() -> str: |
277 | 276 | def main(): |
278 | 277 | parser = argparse.ArgumentParser("build-ffmpeg") |
279 | 278 | parser.add_argument("destination") |
280 | | - parser.add_argument("--community", action="store_true") |
281 | 279 |
|
282 | 280 | args = parser.parse_args() |
283 | | - |
284 | 281 | dest_dir = os.path.abspath(args.destination) |
285 | | - community = args.community |
286 | 282 |
|
287 | | - # Use ALSA only on Linux. |
288 | 283 | use_alsa = plat == "Linux" |
289 | | - |
290 | | - # Use CUDA if supported. |
291 | 284 | use_cuda = plat in {"Linux", "Windows"} |
292 | | - |
293 | | - # Use AMD AMF if supported. |
294 | 285 | use_amf = plat in {"Linux", "Windows"} |
295 | 286 |
|
296 | 287 | # Use Intel VPL (Video Processing Library) if supported to enable Intel QSV (Quick Sync Video) |
@@ -355,8 +346,8 @@ def main(): |
355 | 346 | "--enable-gnutls" if use_gnutls else "--disable-gnutls", |
356 | 347 | "--enable-libdav1d", |
357 | 348 | "--enable-libmp3lame", |
358 | | - "--enable-libopencore-amrnb" if community else "--disable-libopencore-amrnb", |
359 | | - "--enable-libopencore-amrwb" if community else "--disable-libopencore-amrwb", |
| 349 | + "--enable-libopencore-amrnb", |
| 350 | + "--enable-libopencore-amrwb", |
360 | 351 | "--enable-libopus", |
361 | 352 | "--enable-libspeex", |
362 | 353 | "--enable-libsvtav1", |
@@ -423,18 +414,10 @@ def main(): |
423 | 414 | packages += codec_group |
424 | 415 | packages += [ffmpeg_package] |
425 | 416 |
|
426 | | - filtered_packages = [] |
427 | | - for package in packages: |
428 | | - if package.when == When.community_only and not community: |
429 | | - continue |
430 | | - if package.when == When.commercial_only and community: |
431 | | - continue |
432 | | - filtered_packages.append(package) |
433 | | - |
434 | | - download_tars(build_tools + filtered_packages) |
| 417 | + download_tars(build_tools + packages) |
435 | 418 | for tool in build_tools: |
436 | 419 | builder.build(tool, for_builder=True) |
437 | | - for package in filtered_packages: |
| 420 | + for package in packages: |
438 | 421 | builder.build(package) |
439 | 422 |
|
440 | 423 | if plat == "Windows": |
@@ -479,10 +462,8 @@ def main(): |
479 | 462 | elif plat == "Windows": |
480 | 463 | libraries = glob.glob(os.path.join(dest_dir, "bin", "*.dll")) |
481 | 464 |
|
482 | | - # strip libraries |
483 | 465 | if plat == "Darwin": |
484 | | - run(["strip", "-S"] + libraries) |
485 | | - run(["otool", "-L"] + libraries) |
| 466 | + run(["strip", "-x", "-S"] + libraries) |
486 | 467 | else: |
487 | 468 | run(["strip", "-s"] + libraries) |
488 | 469 |
|
|
0 commit comments