arch-pkgs/dynarmic/PKGBUILD

60 lines
1.3 KiB
Bash

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Alexandre Bouvier <contact@amb.tf>
pkgname=dynarmic
pkgver=6.4.4
pkgrel=1
pkgdesc='An ARM dynamic recompiler'
arch=('x86_64')
url='https://github.com/merryhime/dynarmic'
license=('BSD')
depends=('gcc-libs' 'fmt' 'zydis')
makedepends=(
'git'
'boost'
'cmake'
'robin-map'
'xbyak'
'neovim'
)
checkdepends=('catch2')
_commit='befe547d5631024a70d81d2ccee808bbfcb3854e'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//'
}
build() {
cmake \
-B build \
-S "$pkgname" \
-D BUILD_SHARED_LIBS=ON \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-D CMAKE_INSTALL_PREFIX=/usr \
-D DYNARMIC_IGNORE_ASSERTS=ON \
-D DYNARMIC_NO_BUNDLED_CATCH=ON \
-D DYNARMIC_NO_BUNDLED_FMT=ON \
-D DYNARMIC_NO_BUNDLED_ROBIN_MAP=ON \
-D DYNARMIC_NO_BUNDLED_XBYAK=ON \
-D DYNARMIC_NO_BUNDLED_ZYDIS=ON \
-D DYNARMIC_TESTS="$CHECKFUNC" \
-W no-dev
cmake --build build
}
check() {
ctest --test-dir build --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$pkgname/LICENSE.txt"
}