blob: b8dff9919496ba232a725bf6ff6624bc1ab18859 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mercurial
pkgver=6.3.3
pkgrel=0
pkgdesc="Scalable distributed SCM tool"
url="https://www.mercurial-scm.org/"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
makedepends="
python3-dev
zlib-dev
"
checkdepends="bash unzip diffutils xz sqlite gettext py3-docutils"
subpackages="
$pkgname-doc
$pkgname-vim:vim:noarch
$pkgname-zsh-completion
$pkgname-bash-completion
"
source="https://www.mercurial-scm.org/release/mercurial-$pkgver.tar.gz
blacklist.txt
"
options="!check" # a ton of tests fail due to egrep being deprecated and printing a warning
case "$CARCH" in
aarch64|armhf)
# around 400 of 919 tests time out
options="$options !check"
;;
esac
case "$CARCH" in
x86_64|armv7|armhf|aarch64|x86|ppc64le)
# Oxidation, limited by Rust
export HGWITHRUSTEXT=cpython
makedepends="$makedepends cargo"
;;
esac
# secfixes:
# 4.9-r0:
# - CVE-2019-3902
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
build() {
python3 setup.py build
}
check() {
make PYTHON=python3 TESTFLAGS=--blacklist="$srcdir/blacklist.txt" tests
}
package() {
HGPYTHON3=1 python3 setup.py install --root="$pkgdir" --skip-build
install -m755 contrib/hgk contrib/hg-ssh hgeditor -t "$pkgdir"/usr/bin
local man
for man in doc/*.?; do
install -Dm644 "$man" \
"$pkgdir"/usr/share/man/man${man##*.}/${man##*/}
done
}
vim() {
depends=""
pkgdesc="Vim syntax for $pkgname"
install_if="vim $pkgname=$pkgver-r$pkgrel"
cd "$builddir"/contrib/vim/
mkdir -p "$subpkgdir"/usr/share/vim/vimfiles/syntax/
install -Dm644 HGAnnotate.vim hgtest.vim \
"$subpkgdir"/usr/share/vim/vimfiles/syntax/
}
sha512sums="
2c09ec01857552e92dee2ff946444f6ccd86a7249561d2181f339aa66316e9ce0f19399895782d0b63c1b5fdb6d341f866d166616ae51a78bac7e1bb4128a0fd mercurial-6.3.3.tar.gz
b24e1b79ca36ac1d78a5af4e35eb87581f209255838327a7d9315c17175d41bfa4b7f98c66be078cfa1e7d27a41c1a12bba265fa6d3d30edb4e2ba599fe0ed18 blacklist.txt
"
|