# Alien::SDL3::Native Native SDL3 development libraries for Perl C and C++ extensions. Uses Alien::Build and Alien::Base, not Xmake or Xrepo. Requires SDL >= 3.2 for system discovery. Source builds use the official SDL 3.4.20 release and its published SHA-256 digest. ## Build cpanm --installdeps . perl Makefile.PL make make test Set ALIEN_INSTALL_TYPE=share to force the bundled source build or ALIEN_INSTALL_TYPE=system to require a system pkg-config installation. Linux source builds need a compiler, CMake, and native development packages for the desired graphical drivers. For example on Debian: sudo apt install build-essential cmake pkg-config libx11-dev \ libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxfixes-dev \ libxss-dev libwayland-dev libxkbcommon-dev libegl-dev libgl-dev Other SDL subsystems can require additional OS packages. No display server is needed to run the native smoke tests. ## Testing system discovery Use an independent native prefix when testing the system installation path. Do not point PKG_CONFIG_PATH at this distribution's own installed share directory: Alien::Base can relocate those flags into the current build's empty blib share directory, and reinstalling in system mode can overwrite the metadata for the bundled installation. For example, after installing the bundled build (on Linux): SDL3_PREFIX=$(perl -MAlien::SDL3::Native -e 'print Alien::SDL3::Native->dist_dir') SDL3_TEST_PREFIX=$(mktemp -d) cp -a "$SDL3_PREFIX/include" "$SDL3_PREFIX/lib" "$SDL3_TEST_PREFIX/" make realclean export PKG_CONFIG_PATH="$SDL3_TEST_PREFIX/lib/pkgconfig" export ALIEN_INSTALL_TYPE=system perl Makefile.PL make make test Do not run make install for this temporary system-mode test. Keep the native copy until testing is complete. ## Consumer interface use Alien::SDL3::Native; print Alien::SDL3::Native->cflags, "\n"; print Alien::SDL3::Native->libs, "\n"; The bundled library is static and PIC. Native link flags include its dependencies. This distribution is not a Perl SDL binding and does not bundle SDL_image, SDL_ttf, or SDL_mixer. Initial development targets Linux. Other platforms need native build and link verification. CMake-only system discovery is not implemented yet; source builds use CMake and system detection uses pkg-config. MIT license; SDL retains its upstream zlib license.