Skip to content

Commit

Permalink
addpatch: hatari
Browse files Browse the repository at this point in the history
Fix duplicate REG_A0. Patch taken from Debian.
  • Loading branch information
hack3ric authored and felixonmars committed Sep 9, 2023
1 parent bb2c932 commit 5e7aba4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions hatari/fix-rega0-for-riscv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Description: Fix issue where REG_A0 is already defined by riscv64 platform
Author: Tien Hock Loh <tienhock.loh@starfivetech.com>
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
20 changes: 20 additions & 0 deletions hatari/riscv64.patch
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 5e7aba4

Please sign in to comment.