Skip to content

Commit a6929be

Browse files
authored
Merge pull request #3821 from cmitu/smw-sdl2
smw: switch to @mmatyas's fork; upgrade to 2.0
2 parents cf277b2 + 34f6462 commit a6929be

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

scriptmodules/ports/smw.sh

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,48 @@
1010
#
1111

1212
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"
1616
rp_module_section="opt"
17-
rp_module_flags="sdl1 !mali"
17+
rp_module_flags="sdl2"
1818

1919
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
2121
}
2222

2323
function sources_smw() {
2424
gitPullOrClone
2525
}
2626

2727
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"
3235
}
3336

3437
function install_smw() {
35-
make install
38+
md_ret_files=(
39+
"build/smw"
40+
"data"
41+
"docs"
42+
"README.md"
43+
"CREDITS"
44+
)
3645
}
3746

3847
function configure_smw() {
3948
addPort "$md_id" "smw" "Super Mario War" "$md_inst/smw"
4049

4150
[[ "$md_mode" == "remove" ]] && return
4251

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
4657
}

0 commit comments

Comments
 (0)