Skip to content

Commit

Permalink
simcoupe: update the branch selection to fix building
Browse files Browse the repository at this point in the history
Updated the default branch, since upstream changed the project repository's default to 'main'.
Since the `cmake` requirements have been bumped to 3.14 some time ago, select the closest tag before the change in order to fix building on Ubuntu 18.04.
Note also that current code requires C++17 'filesystem' support, which is not present in Ubuntu 18.04.
  • Loading branch information
cmitu authored and GeorgeMcMullen committed Sep 7, 2022
1 parent 3128e0f commit 9426732
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scriptmodules/emulators/simcoupe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ rp_module_section="opt"
rp_module_flags=""

function _get_branch_simcoupe() {
local branch="master"
# latest simcoupe requires cmake 3.8.2 - on Stretch older versions throw a cmake error about CXX17
local branch="main"
# latest simcoupe requires cmake 3.14 - on Stretch older versions throw a cmake error about CXX17
# dialect support but actually seem to build ok. Lock systems with older cmake to 20200711 tag,
# which builds ok on Raspbian Stretch and hopefully Ubuntu 18.04.
# which builds ok on Raspbian Stretch, and systems with cmake 3.12 to 20210501, which builds ok on Ubuntu 18.04.

# Test using "apt-cache madison" as this code could be called when cmake isn't yet installed but correct version
# is available - eg via update check with builder module which removes dependencies after building.
Expand All @@ -30,6 +30,8 @@ function _get_branch_simcoupe() {
local cmake_ver=$(apt-cache madison cmake | cut -d\| -f2 | sort --version-sort | head -1 | xargs)
if compareVersions "$cmake_ver" lt 3.8.2; then
branch="20200711"
elif compareVersions "$cmake_ver" lt 3.14; then
branch="20210501"
fi
echo "$branch"
}
Expand All @@ -44,6 +46,8 @@ function sources_simcoupe() {

function build_simcoupe() {
cmake -DCMAKE_INSTALL_PREFIX="$md_inst" .
# force the downloaded 'SAAsound' dependency to be statically linked
sed -i 's/ SHARED//' _deps/saasound-src/CMakeLists.txt
make clean
make
md_ret_require="$md_build/simcoupe"
Expand Down

0 comments on commit 9426732

Please sign in to comment.