shithub: m8c

Download patch

ref: c08e0604e8c731dde7430077ab7c04c19cacf9d8
parent: 46458850aca23f4a4cdd4587e7ed2086474bcffc
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Sat Mar 1 17:02:55 EST 2025

try to fix cicd

--- a/.github/workflows/build-macos-arm.yml
+++ b/.github/workflows/build-macos-arm.yml
@@ -16,7 +16,7 @@
           uname -m
     
       - name: 'Install dependencies'
-        run: brew install cmake pkg-config sdl3 libserialport
+        run: brew update && brew install cmake pkg-config sdl3 libserialport
           
       - name: 'Checkout'
         uses: actions/checkout@v4
--- a/.github/workflows/build-macos-intel.yml
+++ b/.github/workflows/build-macos-intel.yml
@@ -50,7 +50,7 @@
       - name: 'Download SDL3 sources'
         if: steps.cache-x86_64-sdl2-files.outputs.cache-hit != 'true'
         run: |
-          (curl https://www.libsdl.org/release/SDL3-$SDL_VERSION.tar.gz || curl -L https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL3-$SDL_VERSION.tar.gz) | echo $SDL_SHA256 | tar xvf -
+          (curl https://www.libsdl.org/release/SDL3-$SDL_VERSION.tar.gz || curl -L https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL3-$SDL_VERSION.tar.gz) | tar xvf -
         
       - name: 'Build SDL3'
         if: steps.cache-x86_64-sdl2-files.outputs.cache-hit != 'true'
--- a/.github/workflows/build-ubuntu.yml
+++ b/.github/workflows/build-ubuntu.yml
@@ -14,7 +14,36 @@
       - name: 'Install dependencies'
         run: |
           sudo apt-get update
-          sudo apt-get install --fix-missing build-essential libsdl3-dev libserialport-dev zip
+          sudo apt-get install --fix-missing build-essential libserialport-dev zip
+
+      - name: 'Cache SDL3 files'
+        id: cache-x86_64-sdl3-files
+        uses: actions/cache@v4
+        with:
+          path: 'SDL3-3.2.4'
+          key: linux-x86_64-sdl3-files
+
+      - name: 'Download SDL3 sources'
+        if: steps.cache-x86_64-sdl3-files.outputs.cache-hit != 'true'
+        run: |
+          (curl https://www.libsdl.org/release/SDL3-$SDL_VERSION.tar.gz || curl -L https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL3-$SDL_VERSION.tar.gz) | tar xvf -
+
+      - name: 'Build SDL3'
+        if: steps.cache-x86_64-sdl3-files.outputs.cache-hit != 'true'
+        run: |
+          pushd SDL3-$SDL_VERSION
+          mkdir build_x86_64
+          cd build_x86_64
+          ../configure
+          make
+          popd
+
+      - name: 'Install SDL3'
+        run: |
+          pushd SDL3-$SDL_VERSION/build_x86_64
+          make install 
+          popd
+
       - name: 'Checkout'
         uses: actions/checkout@v4
 
--- a/.github/workflows/build-windows.yml
+++ b/.github/workflows/build-windows.yml
@@ -20,6 +20,7 @@
         shell: msys2 {0}
     env:
       MINGW_ARCH: ${{ matrix.sys }}
+      SDL_VERSION: 3.2.4
     steps:
 
     - name: 'git config'
@@ -37,6 +38,34 @@
         msystem: ${{ matrix.sys }}
         update: true
         install: mingw-w64-${{ matrix.env }}-toolchain make mingw-w64-${{ matrix.env }}-sdl3 zip dos2unix autoconf automake-wrapper libtool make unzip
+
+    - name: 'Cache SDL3 files'
+      id: cache-sdl3-files
+      uses: actions/cache@v4
+      with:
+        path: 'SDL3-3.2.4'
+        key: win-sdl3-files
+
+    - name: 'Download SDL3 sources'
+      if: steps.cache-sdl3-files.outputs.cache-hit != 'true'
+      run: |
+        (curl https://www.libsdl.org/release/SDL3-$SDL_VERSION.tar.gz || curl -L https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL3-$SDL_VERSION.tar.gz) | tar xvf -
+
+    - name: 'Build SDL3'
+      if: steps.cache-sdl3-files.outputs.cache-hit != 'true'
+      run: |
+        pushd SDL3-$SDL_VERSION
+        mkdir build_${{ matrix.env }}
+        cd build_${{ matrix.env }}
+        ../configure
+        make
+        popd
+
+    - name: 'Install SDL3'
+      run: |
+        pushd SDL3-$SDL_VERSION/build_x86_64
+        make install 
+        popd        
 
     - name: 'Build libserialport manually'
       run: |
--- a/flake.nix
+++ b/flake.nix
@@ -31,7 +31,7 @@
         { stdenv
         , gnumake
         , pkg-config
-        , SDL2
+        , SDL3
         , libserialport
         , fetchFromGitHub
         }:
@@ -47,7 +47,7 @@
 
           installFlags = [ "PREFIX=$(out)" ];
           nativeBuildInputs = [ gnumake pkg-config ];
-          buildInputs = [ SDL2 libserialport ];
+          buildInputs = [ SDL3 libserialport ];
         };
       eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f
         (import nixpkgs { inherit system; })
--- a/package/rpm/m8c.spec
+++ b/package/rpm/m8c.spec
@@ -1,5 +1,5 @@
 Name:           m8c
-Version:        1.7.9
+Version:        2.0.0
 Release:        1%{?dist}
 Summary:        m8c is a client for Dirtywave M8 music tracker's headless mode
 
@@ -9,9 +9,9 @@
 
 BuildRequires:  gcc
 BuildRequires:  make
-BuildRequires:  SDL2-devel
+BuildRequires:  SDL3-devel
 BuildRequires:  libserialport-devel
-Requires:       SDL2
+Requires:       SDL3
 Requires:       libserialport
 
 %description
@@ -35,5 +35,7 @@
 
 
 %changelog
-* Tue Aug 29 2023 Jonne Kokkonen <jonne.kokkonen@ambientia.fi>
+* Sat Mar 01 2025 Jonne Kokkonen <jonne.kokkonen@gmail.com>
+- Update dependencies (SDL2 -> SDL3)
+* Tue Aug 29 2023 Jonne Kokkonen <jonne.kokkonen@gmail.com>
 - First m8c package
--