|
| 1 | +-- compat.accesskit — AccessKit's C bindings (accesskit-c), prebuilt: a UI |
| 2 | +-- describes its tree once and AccessKit serves it to each platform's |
| 3 | +-- assistive technology — UI Automation on Windows, NSAccessibility on macOS, |
| 4 | +-- AT-SPI on Linux (a screen reader, a magnifier, voice control). |
| 5 | +-- |
| 6 | +-- THE LIBRARY IS RUST, SO ITS RELEASE IS THE ARTIFACT. Building it here would |
| 7 | +-- need a Rust toolchain in the recipe; upstream's release archive carries the |
| 8 | +-- header and a static library for every platform it supports, built from the |
| 9 | +-- tagged source by its own CI. This descriptor exposes the header and links the |
| 10 | +-- static library of the host's platform, with the system libraries upstream's |
| 11 | +-- own `accesskit-config.cmake` names for each. |
| 12 | +-- |
| 13 | +-- WHAT IS NOT COVERED: upstream ships no Linux arm64 build, and this version |
| 14 | +-- links macOS arm64 and Windows x86_64 (the x86_64 Mac and arm64 Windows |
| 15 | +-- libraries are in the archive too, but the index states one library path per |
| 16 | +-- platform). A consumer that wants AccessKit there gates its use by platform. |
| 17 | +-- |
| 18 | +-- One archive for all three platforms (about 64 MB): the paths below reach into |
| 19 | +-- its `accesskit-c-0.23.1/` wrap layer; mcpp rewrites a relative `-L` to the |
| 20 | +-- package's own directory. |
| 21 | +package = { |
| 22 | + spec = "1", |
| 23 | + namespace = "compat", |
| 24 | + name = "accesskit", |
| 25 | + description = "AccessKit C bindings (prebuilt static library): one accessibility tree served to UIA, NSAccessibility and AT-SPI", |
| 26 | + licenses = {"MIT", "Apache-2.0"}, |
| 27 | + repo = "https://github.com/AccessKit/accesskit-c", |
| 28 | + type = "package", |
| 29 | + |
| 30 | + xpm = { |
| 31 | + linux = { |
| 32 | + ["0.23.1"] = { |
| 33 | + url = "https://github.com/AccessKit/accesskit-c/releases/download/0.23.1/accesskit-c-0.23.1.zip", |
| 34 | + sha256 = "35b7ca8a6f1e038b5da35e1e9e5a0adaed9bfcf21e1496d29598fbbadcc7043f", |
| 35 | + }, |
| 36 | + ["latest"] = { ref = "0.23.1" }, |
| 37 | + }, |
| 38 | + macosx = { |
| 39 | + ["0.23.1"] = { |
| 40 | + url = "https://github.com/AccessKit/accesskit-c/releases/download/0.23.1/accesskit-c-0.23.1.zip", |
| 41 | + sha256 = "35b7ca8a6f1e038b5da35e1e9e5a0adaed9bfcf21e1496d29598fbbadcc7043f", |
| 42 | + }, |
| 43 | + ["latest"] = { ref = "0.23.1" }, |
| 44 | + }, |
| 45 | + windows = { |
| 46 | + ["0.23.1"] = { |
| 47 | + url = "https://github.com/AccessKit/accesskit-c/releases/download/0.23.1/accesskit-c-0.23.1.zip", |
| 48 | + sha256 = "35b7ca8a6f1e038b5da35e1e9e5a0adaed9bfcf21e1496d29598fbbadcc7043f", |
| 49 | + }, |
| 50 | + ["latest"] = { ref = "0.23.1" }, |
| 51 | + }, |
| 52 | + }, |
| 53 | + |
| 54 | + mcpp = { |
| 55 | + language = "c++23", |
| 56 | + import_std = false, |
| 57 | + c_standard = "c11", |
| 58 | + include_dirs = { "*/include" }, |
| 59 | + generated_files = { |
| 60 | + ["mcpp_generated/accesskit_anchor.c"] = "int mcpp_compat_accesskit_anchor(void) { return 0; }\n", |
| 61 | + }, |
| 62 | + sources = { "mcpp_generated/accesskit_anchor.c" }, |
| 63 | + targets = { ["accesskit"] = { kind = "lib" } }, |
| 64 | + deps = {}, |
| 65 | + -- The static library and what upstream's accesskit-config.cmake links beside it. |
| 66 | + linux = { |
| 67 | + ldflags = { "-Laccesskit-c-0.23.1/lib/linux/x86_64/static", "-l:libaccesskit.a", "-static-libgcc", "-lm" }, |
| 68 | + }, |
| 69 | + macosx = { |
| 70 | + ldflags = { "-Laccesskit-c-0.23.1/lib/macos/arm64/static", "-laccesskit", |
| 71 | + "-framework", "AppKit", "-framework", "Foundation", "-framework", "CoreFoundation", "-lobjc", "-lc++" }, |
| 72 | + }, |
| 73 | + windows = { |
| 74 | + ldflags = { "-Laccesskit-c-0.23.1/lib/windows/x86_64/msvc/static", "-laccesskit", |
| 75 | + "-lbcrypt", "-lntdll", "-lpropsys", "-lruntimeobject", "-luiautomationcore", "-luserenv", "-lws2_32" }, |
| 76 | + }, |
| 77 | + }, |
| 78 | +} |
0 commit comments