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
8 changes: 6 additions & 2 deletions Formula/architect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ class Architect < Formula
license "MIT"

depends_on "pkg-config" => :build
depends_on "zig@0.16" => :build
depends_on xcode: :build
depends_on "zig@0.16" => :build
depends_on "sdl3"
depends_on "sdl3_ttf"

def install
# addTranslateC does not discover Homebrew dependency headers through the
# linker search path, so provide the include roots explicitly.
ENV["SDL3_INCLUDE_PATH"] = formula_opt_include("sdl3").to_s
ENV["SDL3_TTF_INCLUDE_PATH"] = formula_opt_include("sdl3_ttf").to_s

# Zig 0.16.0 cannot translate Apple headers against the arm64e-only SDK
# shipped with recent macOS toolchains. Source the helper in the same
# shell as the build so its SDK selection reaches every compiler step.
Expand All @@ -25,7 +30,6 @@ def install
contents = app_path/"Contents"
macos = contents/"MacOS"
resources = contents/"Resources"
share = contents/"share/architect"

macos.mkpath
resources.mkpath
Expand Down
6 changes: 4 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ SDL3 and the platform C APIs are translated at build time with Zig's built-in
`addTranslateC` steps using the small header shims under `src/c/`. When SDL is
provided outside the compiler's default search paths, `SDL3_INCLUDE_PATH` and
`SDL3_TTF_INCLUDE_PATH` supply the include paths to both translation and
compilation. On macOS, framework headers use the SDK path discovered from
`SDKROOT`, `DEVELOPER_DIR`, or `xcrun`, in that order.
compilation. The Homebrew formula sets these variables from the installed SDL
formula prefixes before starting the build. On macOS, framework headers use
the SDK path discovered from `SDKROOT`, `DEVELOPER_DIR`, or `xcrun`, in that
order.

## Tests and Formatting

Expand Down