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

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

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1862
Author: @cfsmp3
Created: 12/20/2025
Status: Merged
Merged: 12/20/2025
Merged by: @cfsmp3

Base: masterHead: fix/issue-1580-homebrew-system-libs


📝 Commits (2)

  • 6838666 build(mac): Add -system-libs flag for Homebrew compatibility
  • eda4892 fix(mac): Correct lib_hash include path for system-libs build

📊 Changes

2 files changed (+101 additions, -48 deletions)

View changed files

📝 .github/workflows/build_mac.yml (+13 -0)
📝 mac/build.command (+88 -48)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1862 **Author:** [@cfsmp3](https://github.com/cfsmp3) **Created:** 12/20/2025 **Status:** ✅ Merged **Merged:** 12/20/2025 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fix/issue-1580-homebrew-system-libs` --- ### 📝 Commits (2) - [`6838666`](https://github.com/CCExtractor/ccextractor/commit/6838666b792264c029563607e0a1aa5d80f25aba) build(mac): Add -system-libs flag for Homebrew compatibility - [`eda4892`](https://github.com/CCExtractor/ccextractor/commit/eda489265d00ac6d9fb750612e6116d0fda7f233) fix(mac): Correct lib_hash include path for system-libs build ### 📊 Changes **2 files changed** (+101 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build_mac.yml` (+13 -0) 📝 `mac/build.command` (+88 -48) </details> ### 📄 Description ## 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#2631