|
10 | 10 | #
|
11 | 11 |
|
12 | 12 | rp_module_id="smw"
|
13 |
| -rp_module_desc="Super Mario War" |
14 |
| -rp_module_licence="GPL http://supermariowar.supersanctuary.net/" |
15 |
| -rp_module_repo="git https://github.com/HerbFargus/Super-Mario-War.git master" |
| 13 | +rp_module_desc="Super Mario War - A fan-made multiplayer Super Mario Bros. style deathmatch game" |
| 14 | +rp_module_licence="GPL2 https://smwstuff.net" |
| 15 | +rp_module_repo="git https://github.com/mmatyas/supermariowar master" |
16 | 16 | rp_module_section="opt"
|
17 |
| -rp_module_flags="sdl1 !mali" |
| 17 | +rp_module_flags="sdl2" |
18 | 18 |
|
19 | 19 | function depends_smw() {
|
20 |
| - getDepends libsdl1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev |
| 20 | + getDepends cmake libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev zlib1g-dev |
21 | 21 | }
|
22 | 22 |
|
23 | 23 | function sources_smw() {
|
24 | 24 | gitPullOrClone
|
25 | 25 | }
|
26 | 26 |
|
27 | 27 | function build_smw() {
|
28 |
| - ./configure --prefix="$md_inst" |
29 |
| - make clean |
30 |
| - make |
31 |
| - md_ret_require="$md_build/smw" |
| 28 | + local params=(-DUSE_SDL2_LIBS=ON -DSMW_INSTALL_PORTABLE=ON) |
| 29 | + isPlatform "gles2" && params+=(-DSDL2_FORCE_GLES=ON) |
| 30 | + rm -fr build |
| 31 | + mkdir -p build && cd build |
| 32 | + cmake .. "${params[@]}" |
| 33 | + make smw |
| 34 | + md_ret_require="$md_build/build/smw" |
32 | 35 | }
|
33 | 36 |
|
34 | 37 | function install_smw() {
|
35 |
| - make install |
| 38 | + md_ret_files=( |
| 39 | + "build/smw" |
| 40 | + "data" |
| 41 | + "docs" |
| 42 | + "README.md" |
| 43 | + "CREDITS" |
| 44 | + ) |
36 | 45 | }
|
37 | 46 |
|
38 | 47 | function configure_smw() {
|
39 | 48 | addPort "$md_id" "smw" "Super Mario War" "$md_inst/smw"
|
40 | 49 |
|
41 | 50 | [[ "$md_mode" == "remove" ]] && return
|
42 | 51 |
|
43 |
| - isPlatform "dispmanx" && setBackend "$md_id" "dispmanx" |
44 |
| - |
45 |
| - moveConfigFile "$home/.smw.options.bin" "$md_conf_root/smw/.smw.options.bin" |
| 52 | + moveConfigDir "$home/.smw" "$md_conf_root/smw" |
| 53 | + # try to migrate existing settings to the new conf folder |
| 54 | + if [[ -f "$md_conf_root/smw/.smw.options.bin" ]] ; then |
| 55 | + mv "$md_conf_root/smw/.smw.options.bin" "$md_conf_root/smw/options.bin" |
| 56 | + fi |
46 | 57 | }
|
0 commit comments