[PR #1862] build(mac): Add -system-libs flag for Homebrew compatibility #2634

Open
opened 2026-01-29 17:23:11 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1862

State: closed
Merged: Yes


Summary

  • Add -system-libs flag to mac/build.command for Homebrew formula compatibility
  • Add CI job to test the new flag on macOS

Problem

CCExtractor was removed from Homebrew (homebrew-core) because:

  1. The formula couldn't build with newer GPAC versions (fixed in current codebase)
  2. Homebrew prefers using system libraries via pkg-config instead of bundled copies

See:

Solution

Add a -system-libs flag that:

Mode Includes Sources Links
Default (bundled) Bundled headers Compiles zlib, libpng, freetype, utf8proc -lgpac only
-system-libs pkg-config CCExtractor only freetype2, gpac, libpng, protobuf-c, utf8proc, zlib via pkg-config

This allows a Homebrew formula to use:

system "./build.command", "-system-libs"

Test plan

  • CI: build_shell job passes (default bundled build)
  • CI: build_shell_system_libs job passes (new system libs build)
  • Verify ./ccextractor --version works in both modes

Future work

Once CI passes, a new Homebrew formula can be submitted to homebrew-core using the -system-libs flag.

Refs #1580, #1534

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/CCExtractor/ccextractor/pull/1862 **State:** closed **Merged:** Yes --- ## Summary - Add `-system-libs` flag to `mac/build.command` for Homebrew formula compatibility - Add CI job to test the new flag on macOS ## Problem CCExtractor was removed from Homebrew (homebrew-core) because: 1. The formula couldn't build with newer GPAC versions (fixed in current codebase) 2. Homebrew prefers using system libraries via pkg-config instead of bundled copies See: - [PR #118897](https://github.com/Homebrew/homebrew-core/pull/118897) - Formula disabled (Jan 2023) - [PR #158204](https://github.com/Homebrew/homebrew-core/pull/158204) - Formula removed (Jun 2024) ## Solution Add a `-system-libs` flag that: | Mode | Includes | Sources | Links | |------|----------|---------|-------| | Default (bundled) | Bundled headers | Compiles zlib, libpng, freetype, utf8proc | `-lgpac` only | | `-system-libs` | pkg-config | CCExtractor only | freetype2, gpac, libpng, protobuf-c, utf8proc, zlib via pkg-config | This allows a Homebrew formula to use: ```ruby system "./build.command", "-system-libs" ``` ## Test plan - [ ] CI: `build_shell` job passes (default bundled build) - [ ] CI: `build_shell_system_libs` job passes (new system libs build) - [ ] Verify `./ccextractor --version` works in both modes ## Future work Once CI passes, a new Homebrew formula can be submitted to homebrew-core using the `-system-libs` flag. Refs #1580, #1534 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claunia added the pull-request label 2026-01-29 17:23:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2634