Skip to content

Fix FreeType pkg-config module and brew formula names#9

Merged
colemancda merged 2 commits into
masterfrom
fix/freetype-pkgconfig
Jul 13, 2026
Merged

Fix FreeType pkg-config module and brew formula names#9
colemancda merged 2 commits into
masterfrom
fix/freetype-pkgconfig

Conversation

@colemancda

Copy link
Copy Markdown
Member

CFreeType declares pkgConfig: "freetype", but the pkg-config module FreeType ships is freetype2 (pkg-config --libs freetype2-L/opt/homebrew/opt/freetype/lib -lfreetype). SwiftPM's probe therefore fails with the "you may be able to install freetype" warning and emits no library search path, so consumers fail to link FT_* symbols unless another dependency happens to add the same -L path.

The brew provider hint had the names reversed as well: the Homebrew formula is freetype (there is no freetype2 formula).

Verified: swift build links clean on macOS with only this package's own pkg-config flags, and the same fix unblocks Linux (apt's libfreetype-dev also ships freetype2.pc).

CFreeType declared pkgConfig: "freetype", but the pkg-config module
FreeType ships is "freetype2" -- SwiftPM's probe fails, no library
search path is emitted, and consumers fail to link FT_* symbols unless
another dependency happens to add the same -L path. The brew provider
hint had the names reversed: the formula is "freetype".
- actions/checkout v2 -> v4 and drop slashmo/install-swift (its
  internal actions/cache@v2 is hard-failed by GitHub now); use the
  runner's Xcode toolchain on macOS and the swift container on Linux.
- ubuntu-20.04 runners were retired (jobs queue forever); move to
  ubuntu-latest with the swift:latest container.
@colemancda
colemancda merged commit af9fa9d into master Jul 13, 2026
2 checks passed
colemancda added a commit to PureSwift/Silica that referenced this pull request Jul 13, 2026
FontTests expects Liberation Serif on Linux (the swift container ships
no fonts). The macOS test bundle needs brew's lib dir on LIBRARY_PATH
to link FT_* symbols until PureSwift/Cairo#9 fixes CFreeType's
pkg-config module name upstream.
colemancda added a commit to MillerTechnologyPeru/ClassicUI that referenced this pull request Jul 13, 2026
PureSwift/Cairo#9 (freetype2 pkg-config) and PureSwift/Silica#16
(import Darwin) are merged, so the patch script, its CI steps, and
the Xcode project's local package overrides are no longer needed.
Dependency pins updated to the fixed masters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant