Skip to content

Commit 13d2e33

Browse files
authored
Merge pull request #3450 from cmitu/flycast-update
lr-flycast: update to switch to upstream project
2 parents 566f1c2 + 9b271b2 commit 13d2e33

File tree

2 files changed

+22
-62
lines changed

2 files changed

+22
-62
lines changed

scriptmodules/libretrocores/lr-flycast.sh

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,51 @@
1010
#
1111

1212
rp_module_id="lr-flycast"
13-
rp_module_desc="Dreamcast emulator - Reicast port for libretro"
14-
rp_module_help="Previously named lr-reicast then lr-beetle-dc\n\nDreamcast ROM Extensions: .cdi .gdi .chd .m3u, Naomi/Atomiswave ROM Extension: .zip\n\nCopy your Dreamcast/Naomi roms to $romdir/dreamcast\n\nCopy the required Dreamcast BIOS files dc_boot.bin and dc_flash.bin to $biosdir/dc\n\nCopy the required Naomi/Atomiswave BIOS files naomi.zip and awbios.zip to $biosdir/dc"
15-
rp_module_licence="GPL2 https://raw.githubusercontent.com/libretro/flycast/master/LICENSE"
16-
rp_module_repo="git https://github.com/libretro/flycast.git master"
13+
rp_module_desc="Multi-platform Sega Dreamcast, Naomi and Atomiswave emulator derived from Reicast"
14+
rp_module_help="Dreamcast ROM Extensions: .cdi .gdi .chd .m3u, Naomi/Atomiswave ROM Extension: .zip\n\nCopy your Dreamcast/Naomi roms to $romdir/dreamcast\n\nCopy the required Dreamcast BIOS file dc_boot.bin to $biosdir/dc\n\nCopy the required Naomi/Atomiswave BIOS files naomi.zip and awbios.zip to $biosdir/dc"
15+
rp_module_licence="GPL2 https://raw.githubusercontent.com/flyinghead/flycast/master/LICENSE"
16+
rp_module_repo="git https://github.com/flyinghead/flycast.git master"
1717
rp_module_section="opt"
1818
rp_module_flags="!armv6"
1919

2020
function depends_lr-flycast() {
21-
local depends=(zlib1g-dev)
21+
local depends=(cmake zlib1g-dev libzip-dev)
2222
isPlatform "videocore" && depends+=(libraspberrypi-dev)
2323
isPlatform "mesa" && depends+=(libgles2-mesa-dev)
24+
isPlatform "x11" && depends+=(libgl-dev)
2425
getDepends "${depends[@]}"
2526
}
2627

27-
function _update_hook_lr-flycast() {
28-
renameModule "lr-reicast" "lr-beetle-dc"
29-
renameModule "lr-beetle-dc" "lr-flycast"
30-
}
31-
3228
function sources_lr-flycast() {
3329
gitPullOrClone
34-
# don't override our C/CXXFLAGS and set LDFLAGS to CFLAGS to avoid warnings on linking
35-
applyPatch "$md_data/01_flags_fix.diff"
3630
}
3731

3832
function build_lr-flycast() {
39-
local params=("HAVE_LTCG=0")
33+
local params=("-DLIBRETRO=On -DUSE_HOST_LIBZIP=On -DCMAKE_BUILD_TYPE=Release")
4034
local add_flags=()
41-
if isPlatform "gles"; then
35+
if isPlatform "gles" && ! isPlatform "gles3" ; then
4236
if isPlatform "videocore"; then
43-
params+=(
44-
"GLES=1"
45-
"GL_LIB=-L/opt/vc/lib -lbrcmGLESv2")
46-
add_flags+=("-I/opt/vc/include -DTARGET_NO_STENCIL -DLOW_END")
47-
else
48-
params+=("FORCE_GLES=1")
49-
fi
50-
if isPlatform "gles3"; then
51-
params+=("HAVE_GL3=1")
52-
else
53-
params+=("HAVE_GL3=0")
37+
add_flags+=("-I/opt/vc/include -DLOW_END")
38+
params+=("-DUSE_VIDEOCORE=On")
5439
fi
40+
params+=("-DUSE_GLES2=On")
5541
fi
56-
isPlatform "aarch64" && params+=("WITH_DYNAREC=arm64" "HOST_CPU_FLAGS=-DTARGET_LINUX_ARMv8")
57-
isPlatform "arm" && params+=("WITH_DYNAREC=arm")
58-
! isPlatform "x86" && params+=("HAVE_GENERIC_JIT=0" "HAVE_VULKAN=0")
59-
make "${params[@]}" clean
60-
CFLAGS+=" ${add_flags[@]}" make "${params[@]}"
61-
md_ret_require="$md_build/flycast_libretro.so"
42+
43+
isPlatform "gles3" && params+=("-DUSE_GLES=On")
44+
! isPlatform "x86" && params+=("-DUSE_VULKAN=Off")
45+
46+
mkdir -p build
47+
cd build
48+
CFLAGS="$CFLAGS ${add_flags[@]}" CXXFLAGS="$CXXFLAGS ${add_flags}" cmake "${params[@]}" ..
49+
make
50+
md_ret_require="$md_build/build/flycast_libretro.so"
6251
}
6352

6453
function install_lr-flycast() {
6554
md_ret_files=(
66-
'flycast_libretro.so'
55+
'build/flycast_libretro.so'
6756
'LICENSE'
57+
'README.md'
6858
)
6959
}
7060

scriptmodules/libretrocores/lr-flycast/01_flags_fix.diff

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)