Files
ports/packages/sdl2-compat/pkgbuild.py
T
2026-11-30 03:39:12 +00:00

37 lines
921 B
Python

from lib import cpp, packie
from lib.make import *
version("2.32.74+compat3")
description("An SDL2 compatibility layer that uses SDL3 behind the scenes.")
maintainer("sisungo <[email protected]>")
source_managed("github://libsdl-org/sdl2-compat#release-2.32.74")
builddep("shortcut/c++")
builddep("shortcut/cmake")
builddep("libsdl-dev (~3) @target")
def build():
cpp.cmake([
"-DCMAKE_INSTALL_PREFIX=/",
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libsdl')}/lib",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libsdl-dev')}/include",
f"-DSDL3_INCLUDE_DIRS={packie.prefix_of('libsdl-dev (~3)')}/include",
"-DSDL2COMPAT_X11=OFF",
])
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libsdl")
dep("libsdl (~3) @same-arch")
cpp.use_auto_pack(["lib"])
package("libsdl-dev")
dep("libsdl (same)")
dep("libsdl-dev (~3) @same-arch")
cpp.use_auto_pack(["dev", "bin"])