Add riscv64 architecture

This commit is contained in:
Bart De Vries 2022-11-23 09:42:07 +01:00
parent da00fbee7a
commit 13a9a3fb37
2 changed files with 11 additions and 3 deletions

View File

@ -1,10 +1,11 @@
pkgbase = box64-git pkgbase = box64-git
pkgdesc = Linux Userspace x86_64 Emulator with a twist pkgdesc = Linux Userspace x86_64 Emulator with a twist
pkgver = v0.1.6.r24.g40c5824 pkgver = v0.2.0.r6.g554f4889
pkgrel = 1 pkgrel = 1
url = https://github.com/ptitSeb/box64 url = https://github.com/ptitSeb/box64
arch = x86_64 arch = x86_64
arch = aarch64 arch = aarch64
arch = riscv64
license = MIT license = MIT
makedepends = git makedepends = git
makedepends = cmake makedepends = cmake

View File

@ -2,10 +2,10 @@
_pkgname=box64 _pkgname=box64
pkgname=${_pkgname}-git pkgname=${_pkgname}-git
pkgver=v0.1.6.r24.g40c5824 pkgver=v0.2.0.r6.g554f4889
pkgrel=1 pkgrel=1
pkgdesc='Linux Userspace x86_64 Emulator with a twist' pkgdesc='Linux Userspace x86_64 Emulator with a twist'
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64' 'riscv64')
url='https://github.com/ptitSeb/box64' url='https://github.com/ptitSeb/box64'
license=('MIT') license=('MIT')
depends=('gcc-libs') depends=('gcc-libs')
@ -33,6 +33,11 @@ build() {
-DLD80BITS=1 -DNOALIGN=1 \ -DLD80BITS=1 -DNOALIGN=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_PREFIX=/usr
elif [[ $CARCH == "riscv64" ]]; then
cmake -B build -S . \
-DRV64=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr
fi fi
make -C build make -C build
} }
@ -43,6 +48,8 @@ package() {
make DESTDIR=${pkgdir} install make DESTDIR=${pkgdir} install
elif [[ $CARCH == "x86_64" ]]; then elif [[ $CARCH == "x86_64" ]]; then
install -Dm755 box64 -t "${pkgdir}/usr/bin/" install -Dm755 box64 -t "${pkgdir}/usr/bin/"
elif [[ $CARCH == "riscv64" ]]; then
make DESTDIR=${pkgdir} install
fi fi
install -Dm644 ../LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}/" install -Dm644 ../LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}/"