Repository navigation
new(winehq.org): wine in pantry — needed for Windows-binary CI testing #12985
Description
Why
For native Windows bottle support (pkgxdev/brewkit#346 + #12984), we need a way to actually run the cross-compiled .exe files in brewkit's Linux test sandbox. Otherwise the test step is reduced to a PE-magic-byte check (necessary but not sufficient).
Wine is the standard tool for that — it implements the Windows API on Linux/macOS hosts and can transparently run native Windows binaries. It's exactly what we need for headless CI.
What we'd need
A winehq.org/wine recipe in pantry. Roughly:
distributable:
url: https://dl.winehq.org/wine/source/X.Y/wine-{{version.raw}}.tar.xz
strip-components: 1
versions:
url: https://dl.winehq.org/wine/source/
match: …
platforms:
- linux/x86-64
- linux/aarch64
- darwin/x86-64 # via Rosetta on Apple Silicon
- darwin/aarch64 # via Wine on ARM
build:
dependencies:
freetype.org: '*'
gnu.org/gnutls: '*'
# … wine's transitive deps
script:
- ./configure --enable-win64 --prefix={{prefix}} --disable-tests
- make -j {{hw.concurrency}}
- make install
provides:
- bin/wine
- bin/wine64(Wine's build is non-trivial — about 30-60 min single-arch, lots of optional deps. We could probably get away with --without-x and friends for headless CI use.)
What it unblocks
Once winehq.org/wine exists:
-
new(llvm.org/mingw-w64): LLVM-based mingw-w64 cross-compiler (Windows-target toolchain) #12984 —
llvm.org/mingw-w64test step upgrades from "verify PE magic" to "actually run hello.exe and assert stdout" (already wired as soft-dep; activates automatically when wine is available). -
Future Windows recipes can include real runtime tests in their
test:block, e.g.:test: dependencies: winehq.org: '*' script: - wine64 {{prefix}}/bin/foo.exe --version
-
Brewkit's audit step can sanity-check that bundled
.exefiles actually load (catches things like undefined imports, ABI mismatches, missing DLLs in the bundle — which a static magic-byte check would miss).
Alternatives considered
- GitHub Actions Windows runners: ~10× CPU minutes, slower, requires a separate workflow. Realistic for a final smoke-test but expensive for every PR.
- wine via Docker base image: would work but couples brewkit's CI infrastructure to a specific Docker image. Less reusable.
- box64 / proton / crossover: wrong tool, commercial, or not designed for this use case.
Wine in pantry is the cleanest fit: same model as every other build dep, opt-in per recipe.
Open questions
- Build from source vs. redistribute upstream binaries — WineHQ publishes per-distro packages (
.debfor Ubuntu,.rpmfor Fedora) but no generic Linux tarball. Source build is the only arch-agnostic path. Acceptable? - wine-stable vs. wine-staging — stable is fine for our use case (CLI testing); staging has more recent fixes. Either works.
- Optional deps — wine builds with optional support for OpenGL, Vulkan, ALSA, Pulse, X11, SDL, gphoto2, … For headless CI we can disable most. Which is the minimal-viable set?
cc @jhheider @mxcl — context: pkgxdev/brewkit#346 RFC + #12984 toolchain PR.
Activity
tannevaled commentedon May 22, 2026
Draft PR up: #12986.
Took the build-from-source path with minimum-viable headless config:
--enable-archs=x86_64(no 32-bit)--disable-tests(skip wine's internal test suite)--without-{x,opengl,vulkan,alsa,pulse,sdl,gstreamer,cups,gphoto,usb,v4l2,sane,udev,pcap,fontconfig,krb5,capi,cms,osmesa,oss}— strip everything that's not "console process execution"Build deps used:
gnu.org/bison,github.com/westes/flex,perl.org,gnu.org/gettext,freetype.org,gnutls.org,zlib.net,gnu.org/{make,gcc,binutils}.Pilot platform: linux/x86-64 only (linux/aarch64 + darwin/* are follow-ups — both have wine-side complications).
@jhheider re. your point about "wine-stable vs wine-staging" — went with stable (current = wine-11.0). Easy to swap if you'd rather track staging.
cc @mxcl
new(winehq.org): headless wine for Windows-binary CI testing