Merge pull request 'feat: add package sdl2-compat' (#83) from sisungo/ports:sdl2-compat into main
Reviewed-on: #83
This commit was merged in pull request #83.
This commit is contained in:
commit
f9e01a7921
1 file changed
+36
@@ -0,0 +1,36 @@
|
||||
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"])
|
||||
Reference in new issue
Block a user