2021-07-07 21:36:26 +08:00
|
|
|
# Maintainer: Bart De Vries <bart at mogwai dot be>
|
|
|
|
|
|
|
|
_pkgname=box64
|
|
|
|
pkgname=${_pkgname}-git
|
2022-11-23 16:42:07 +08:00
|
|
|
pkgver=v0.2.0.r6.g554f4889
|
2021-07-07 21:36:26 +08:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='Linux Userspace x86_64 Emulator with a twist'
|
2022-11-23 16:42:07 +08:00
|
|
|
arch=('x86_64' 'aarch64' 'riscv64')
|
2021-07-07 21:36:26 +08:00
|
|
|
url='https://github.com/ptitSeb/box64'
|
|
|
|
license=('MIT')
|
|
|
|
depends=('gcc-libs')
|
|
|
|
#optdepends=('')
|
2021-11-28 04:20:58 +08:00
|
|
|
makedepends=('git' 'cmake' 'python')
|
2021-07-07 21:36:26 +08:00
|
|
|
provides=(box64)
|
|
|
|
conflicts=(box64)
|
|
|
|
source=("git+https://github.com/ptitSeb/box64.git#branch=main")
|
|
|
|
sha256sums=('SKIP')
|
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
cd ${_pkgname}
|
|
|
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ${_pkgname}
|
|
|
|
if [[ $CARCH == "aarch64" ]]; then
|
|
|
|
cmake -B build -S . \
|
|
|
|
-DARM_DYNAREC=ON \
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr
|
|
|
|
elif [[ $CARCH == "x86_64" ]]; then
|
|
|
|
cmake -B build -S . \
|
|
|
|
-DLD80BITS=1 -DNOALIGN=1 \
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr
|
2022-11-23 16:42:07 +08:00
|
|
|
elif [[ $CARCH == "riscv64" ]]; then
|
|
|
|
cmake -B build -S . \
|
|
|
|
-DRV64=1 \
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr
|
2021-07-07 21:36:26 +08:00
|
|
|
fi
|
|
|
|
make -C build
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd ${_pkgname}/build
|
|
|
|
if [[ $CARCH == "aarch64" ]]; then
|
|
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
elif [[ $CARCH == "x86_64" ]]; then
|
|
|
|
install -Dm755 box64 -t "${pkgdir}/usr/bin/"
|
2022-11-23 16:42:07 +08:00
|
|
|
elif [[ $CARCH == "riscv64" ]]; then
|
|
|
|
make DESTDIR=${pkgdir} install
|
2021-07-07 21:36:26 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
install -Dm644 ../LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}/"
|
|
|
|
|
|
|
|
# Install documentation
|
|
|
|
install -d "${pkgdir}/usr/share/doc/${_pkgname}/"
|
|
|
|
cp -R ../docs/* "${pkgdir}/usr/share/doc/${_pkgname}/"
|
|
|
|
|
|
|
|
}
|