blob: 8191cf3b18ade8001e7a4b8eb9a90146b60a7c9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Alexandre Bouvier <contact@amb.tf>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: perlawk <perlawk@yahoo.com.hk>
# Contributor: xantares <xantares09@hotmail.com>
_pkgname=asmjit
pkgname=$_pkgname-git
pkgver=r417.5c469e3
pkgrel=1
pkgdesc="Machine code generation for C++"
arch=('aarch64' 'armv7h' 'i486' 'i686' 'pentium4' 'x86_64')
url="https://asmjit.com/"
license=('zlib')
depends=('gcc-libs')
makedepends=('cmake' 'git')
provides=("$_pkgname=$pkgver" 'libasmjit.so')
conflicts=("$_pkgname")
source=("$_pkgname::git+https://github.com/asmjit/asmjit.git")
b2sums=('SKIP')
pkgver() {
cd $_pkgname
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
sed -i 's/-O2//' $_pkgname/CMakeLists.txt
}
build() {
cmake -S $_pkgname -B build \
-DASMJIT_TEST="$CHECKFUNC" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_INSTALL_PREFIX=/usr \
-Wno-dev
cmake --build build
}
check() {
ctest --test-dir build
}
package() {
# shellcheck disable=SC2154
DESTDIR="$pkgdir" cmake --install build
install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname $_pkgname/LICENSE.md
}
|