|
10 | 10 | #
|
11 | 11 |
|
12 | 12 | 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" |
17 | 17 | rp_module_section="opt"
|
18 | 18 | rp_module_flags="!armv6"
|
19 | 19 |
|
20 | 20 | function depends_lr-flycast() {
|
21 |
| - local depends=(zlib1g-dev) |
| 21 | + local depends=(cmake zlib1g-dev libzip-dev) |
22 | 22 | isPlatform "videocore" && depends+=(libraspberrypi-dev)
|
23 | 23 | isPlatform "mesa" && depends+=(libgles2-mesa-dev)
|
| 24 | + isPlatform "x11" && depends+=(libgl-dev) |
24 | 25 | getDepends "${depends[@]}"
|
25 | 26 | }
|
26 | 27 |
|
27 |
| -function _update_hook_lr-flycast() { |
28 |
| - renameModule "lr-reicast" "lr-beetle-dc" |
29 |
| - renameModule "lr-beetle-dc" "lr-flycast" |
30 |
| -} |
31 |
| - |
32 | 28 | function sources_lr-flycast() {
|
33 | 29 | 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" |
36 | 30 | }
|
37 | 31 |
|
38 | 32 | function build_lr-flycast() {
|
39 |
| - local params=("HAVE_LTCG=0") |
| 33 | + local params=("-DLIBRETRO=On -DUSE_HOST_LIBZIP=On -DCMAKE_BUILD_TYPE=Release") |
40 | 34 | local add_flags=()
|
41 |
| - if isPlatform "gles"; then |
| 35 | + if isPlatform "gles" && ! isPlatform "gles3" ; then |
42 | 36 | 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") |
54 | 39 | fi
|
| 40 | + params+=("-DUSE_GLES2=On") |
55 | 41 | 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" |
62 | 51 | }
|
63 | 52 |
|
64 | 53 | function install_lr-flycast() {
|
65 | 54 | md_ret_files=(
|
66 |
| - 'flycast_libretro.so' |
| 55 | + 'build/flycast_libretro.so' |
67 | 56 | 'LICENSE'
|
| 57 | + 'README.md' |
68 | 58 | )
|
69 | 59 | }
|
70 | 60 |
|
|
0 commit comments