blob: d8e97885352ce635c5347123d5a1255497b355df (
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgname=comrak
pkgver=0.49.0
pkgrel=1
pkgdesc='CommonMark + GFM compatible Markdown parser and renderer'
arch=(x86_64 i686)
url="https://github.com/kivikakk/$pkgname"
license=(BSD-2-Clause)
depends=(gcc-libs
glibc
oniguruma)
makedepends=(cargo)
_archive="$pkgname-$pkgver"
source=("$url/archive/v$pkgver/$_archive.tar.gz")
sha256sums=('0ce97f37c67fca030d70b8736cd9ca37e3b5b0685d4e003412b1534f074ca122')
prepare() {
cd "$_archive"
cargo fetch --locked --target "$(rustc --print host-tuple)"
}
_srcenv() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export RUSTONIG_DYNAMIC_LIBONIG=1
export CFLAGS+=' -ffat-lto-objects'
}
build() {
_srcenv
cargo build --frozen --release --all-features
}
check() {
_srcenv
# Test suite has syntax error (not failing test), so can't be run with all features
# https://github.com/kivikakk/comrak/pull/546
local skipped=()
# cargo test --frozen --all-features -- ${skipped[@]/#/--skip }
}
package () {
cd "$_archive"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
}
|