summaryrefslogtreecommitdiff
path: root/testing/scryer-prolog/APKBUILD
blob: d33dc13495341749ad0b37dfdc81739da6237544 (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
48
49
50
51
52
53
54
55
# Contributor: Adrián Arroyo Calle <adrian.arroyocalle@gmail.com>
# Maintainer: Adrián Arroyo Calle <adrian.arroyocalle@gmail.com>
pkgname=scryer-prolog
pkgver=0.9.0
pkgrel=0
pkgdesc="Modern Prolog implementation written in Rust"
url="https://github.com/mthom/scryer-prolog"
# s390x, riscv64: rust
# ppc64le: rust-ring
# 32-bit: unsupported
arch="aarch64 x86_64"
license="BSD-3-Clause"
makedepends="
	cargo
	gmp-dev
	libsodium-dev
	m4
	mpc1-dev
	mpfr-dev
	openssl-dev
	rustfmt
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/mthom/scryer-prolog/archive/refs/tags/v$pkgver.tar.gz"

# system libs
export OPENSSL_NO_VENDOR=1
export CARGO_FEATURE_USE_SYSTEM_LIBS=1
export SODIUM_USE_PKG_CONFIG=1

# optimise size
export CARGO_PROFILE_RELEASE_LTO="true"
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/scryer-prolog -t "$pkgdir"/usr/bin
}

sha512sums="
ef929def6b71f94241b38df576cc6590f79647c9c6fe3d5998dd54f2f5911f18eaef2dccf3fa9a378ed8a82a54ed97b7e00ba3bef6f87b916d8de86c84634a8c  scryer-prolog-0.9.0.tar.gz
"