select BR2_PACKAGE_LIBOGG
select BR2_PACKAGE_LIBPNG # runtime
select BR2_PACKAGE_LIBVORBIS
- select BR2_PACKAGE_LUAJIT
+ select BR2_PACKAGE_LUAJIT if !BR2_PACKAGE_LUA_5_1
select BR2_PACKAGE_OPENAL
select BR2_PACKAGE_PHYSFS
select BR2_PACKAGE_SDL2
https://github.com/solarus-games/solarus
comment "solarus needs OpenGL and a toolchain w/ C++, gcc >= 4.8, NPTL, dynamic library"
- depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS || BR2_PACKAGE_LUA_5_1
depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
# Install libsolarus.so
SOLARUS_INSTALL_STAGING = YES
-SOLARUS_DEPENDENCIES = libgl libmodplug libogg libvorbis luajit openal physfs sdl2 \
+SOLARUS_DEPENDENCIES = libgl libmodplug libogg libvorbis openal physfs sdl2 \
sdl2_image sdl2_ttf
# Disable launcher GUI (requires Qt5)
SOLARUS_CONF_OPTS = -DSOLARUS_GUI=OFF
+ifeq ($(BR2_PACKAGE_LUAJIT),y)
+SOLARUS_CONF_OPTS += -DSOLARUS_USE_LUAJIT=ON
+SOLARUS_DEPENDENCIES += luajit
+else
+SOLARUS_CONF_OPTS += -DSOLARUS_USE_LUAJIT=OFF
+SOLARUS_DEPENDENCIES += lua
+endif
+
$(eval $(cmake-package))