diff --git a/hatari/fix-rega0-for-riscv.patch b/hatari/fix-rega0-for-riscv.patch new file mode 100644 index 000000000..75fde05fd --- /dev/null +++ b/hatari/fix-rega0-for-riscv.patch @@ -0,0 +1,18 @@ +Description: Fix issue where REG_A0 is already defined by riscv64 platform +Author: Tien Hock Loh +Forwarded: https://listengine.tuxfamily.org/lists.tuxfamily.org/hatari-devel/2022/06/msg00140.html + +Index: hatari-2.3.1+dfsg/src/includes/m68000.h +=================================================================== +--- pkg-hatari.orig/src/includes/m68000.h ++++ pkg-hatari/src/includes/m68000.h +@@ -15,6 +15,9 @@ + /* a possible pairing between add.l (a5,d1.w),d0 */ + /* and move.b 7(a5,d1.w),d5. */ + ++#ifdef REG_A0 ++#undef REG_A0 ++#endif + + #ifndef HATARI_M68000_H + #define HATARI_M68000_H diff --git a/hatari/riscv64.patch b/hatari/riscv64.patch new file mode 100644 index 000000000..d55632a0e --- /dev/null +++ b/hatari/riscv64.patch @@ -0,0 +1,20 @@ +--- PKGBUILD ++++ PKGBUILD +@@ -24,8 +24,15 @@ optdepends=( + 'python: for atari-convert-dir' + 'sh: for atari-hd-image, zip2st, hatari-prg-args' + ) +-source=("https://download.tuxfamily.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2") +-sha256sums=('2a5da1932804167141de4bee6c1c5d8d53030260fe7fe7e31e5e71a4c00e0547') ++source=("https://download.tuxfamily.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2" ++ "fix-rega0-for-riscv.patch") ++sha256sums=('2a5da1932804167141de4bee6c1c5d8d53030260fe7fe7e31e5e71a4c00e0547' ++ '97aa3956079f3636865cb26b40e82a7c97fda92341adbef9d2e6878a5cde5ab4') ++ ++prepare() { ++ cd ${pkgname}-${pkgver} ++ patch -Np1 -i ../fix-rega0-for-riscv.patch ++} + + build() { + cd ${pkgname}-${pkgver}