diff --git a/recipes/libretro-super/recipe.toml b/recipes/libretro-super/recipe.toml new file mode 100644 index 0000000000000000000000000000000000000000..b75ec627138ceeb2723504781baf4b2d56eb5aec --- /dev/null +++ b/recipes/libretro-super/recipe.toml @@ -0,0 +1,24 @@ +[source] +git = "https://github.com/jackpot51/libretro-super.git" + +[build] +template = "custom" +dependencies = [ + "zlib", +] +script = """ +CORES=( + snes9x +) + +pushd "${COOKBOOK_SOURCE}" +./libretro-fetch.sh "${CORES[@]}" +popd + +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +export platform=Redox +export STATIC_LINKING=1 +./libretro-build.sh "${CORES[@]}" +./libretro-install.sh "${COOKBOOK_STAGE}/share/libretro" +""" diff --git a/recipes/retroarch/recipe.toml b/recipes/retroarch/recipe.toml index e878cb2494f96f731fae5fd58d47b215d017d622..25a38366366c30ef8bf331264dca7e6f7c47902f 100644 --- a/recipes/retroarch/recipe.toml +++ b/recipes/retroarch/recipe.toml @@ -5,6 +5,7 @@ git = "https://github.com/jackpot51/retroarch.git" template = "custom" dependencies = [ "liborbital", + "libretro-super", "llvm", "mesa", "openssl", @@ -18,17 +19,25 @@ popd rsync -av --delete "${COOKBOOK_SOURCE}/" ./ +# For now, we will statically link with the snes9x libretro +mkdir -pv "${COOKBOOK_SYSROOT}/lib" +cp -v "${COOKBOOK_SYSROOT}/share/libretro/snes9x_libretro.a" "${COOKBOOK_SYSROOT}/lib/libretro.a" + COOKBOOK_CONFIGURE_FLAGS=( --host="${TARGET}" --prefix="/" --disable-builtinzlib # conflicts with zlib --disable-discord # does not link + --disable-dylib + --disable-dynamic --disable-netplaydiscovery # missing ifaddrs.h --disable-thread_storage # crash in pthread_setspecific called by sthread_tls_set + --disable-threads # prevents hang --enable-opengl --enable-sdl2 --enable-ssl --enable-zlib + --with-libretro="-lretro -lstdc++ -lz" ) cookbook_configure """