Files
2026-11-30 03:42:40 +00:00

56 lines
1.6 KiB
Python

from lib import cpp, packie
from lib.make import *
version("3.4.20")
description("Simple DirectMedia Layer")
maintainer("sisungo <[email protected]>")
source_managed("github://libsdl-org/SDL#release-3.4.20")
builddep("shortcut/c++")
builddep("shortcut/cmake")
builddep("alsa-lib-dev @target")
builddep("libwayland-dev @target")
builddep("libopengl-dev @target")
builddep("libglesv2-dev @target")
builddep("libvulkan-dev @target")
builddep("libfribidi-dev @target")
builddep("libdrm-dev @target")
builddep("libgbm-dev @target")
builddep("libegl-dev @target")
builddep("libxkbcommon-dev @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"-DALSA_LIBRARY={packie.prefix_of('alsa-lib')}/lib/libasound.so",
f"-DALSA_INCLUDE_DIR={packie.prefix_of('alsa-lib-dev')}/include",
f"-DOPENGL_opengl_LIBRARY={packie.prefix_of('libopengl')}/lib/libOpenGL.so",
f"-DOPENGL_INCLUDE_DIR={packie.prefix_of('libopengl-dev')}/include",
])
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libsdl")
dep("alsa-lib @same-arch")
dep("libwayland @same-arch")
dep("libegl @same-arch")
dep("libxkbcommon @same-arch")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libsdl-dev")
dep("libsdl (same)")
dep("alsa-lib-dev @same-arch")
dep("libwayland-dev @same-arch")
dep("libegl-dev @same-arch")
dep("libxkbcommon-dev @same-arch")
dep("semi-libc-dev @same-arch")
cpp.use_auto_pack(["dev"])