Alien-SDL3
view release on metacpan or search on metacpan
lib/Alien/SDL3.pm view on Meta::CPAN
package Alien::SDL3 v3.4.22 {
use feature 'class';
no warnings 'experimental::class';
use Alien::Xrepo::Runtime;
use Config ();
class Alien::SDL3 : isa(Alien::Xrepo::Runtime) {
# SDL3 is bound as a family: core + the common extension libraries. Each is installed
# separately (as a SHARED library; xrepo builds SDL3 static by default, and Affix/FFI::Platypus
# need a real .dll/.so/.dylib) and exposed via the Alien::Build-style `alt()` accessor or a
# package-name argument.
#
# recipes/ is a small local xmake-repo tree (local overrides of libsdl3, libsdl3_image,
# libsdl3_ttf and libsdl3_mixer); registering it here means the runtime description also
# carries everything the engine needs to reproduce the build.
method recipe {
# install_opts() is only the runtime's dynamic-resolution ambient; the build engine reads the
# recipe's `defaults`. Folding install_opts() in here is what actually hands -a (and the Windows
# toolchain below) to `perl Build`, keeping the built profile and dynamic resolution in step.
recipes/packages/l/libsdl3/xmake.lua view on Meta::CPAN
end
table.insert(names, self:name())
for _, name in ipairs(names) do
-- self:find_package() rather than the global find_package(): it
-- defaults to system-only for non-xmake:: names, which is what the
-- fallback below uses, so we test the same package it would pick.
local fetchinfo = self:find_package(name, {system = true})
if fetchinfo then
local found = fetchinfo.version
-- pkgconfig-style managers report a plain semver; vcpkg reports
-- "<semver>-<portrevision>" (libsdl3_3.4.18-1_x64-windows.list).
-- semver reads that as a 3.4.18 pre-release, so a perfectly
-- current vcpkg SDL3 would look older than it is. Drop the port
-- revision before comparing.
local comparable = found and found:gsub("%-%d+$", "")
-- try() returns the try-function's return values directly, not
-- (ok, result) -- @see core/sandbox/modules/try.lua:132 -- so an
-- unparseable version arrives here as nil rather than false.
local satisfies = try {
function () return semver.satisfies(comparable, ">=" .. _MIN_SYSTEM_VERSION) end
( run in 4.521 seconds using v1.01-cache-2.11-cpan-b554fb43c41 )