aboutsummaryrefslogtreecommitdiffstats
path: root/community/mercurial/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/mercurial/APKBUILD')
-rw-r--r--community/mercurial/APKBUILD116
1 files changed, 82 insertions, 34 deletions
diff --git a/community/mercurial/APKBUILD b/community/mercurial/APKBUILD
index a6f9337cb42..3c66bae18a8 100644
--- a/community/mercurial/APKBUILD
+++ b/community/mercurial/APKBUILD
@@ -1,85 +1,133 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mercurial
-pkgver=5.9.3
-pkgrel=1
+pkgver=6.7.2
+pkgrel=2
pkgdesc="Scalable distributed SCM tool"
url="https://www.mercurial-scm.org/"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
-makedepends="python3-dev"
-checkdepends="bash unzip diffutils xz sqlite gettext py3-docutils"
+makedepends="
+ cargo-auditable
+ gettext-dev
+ py3-gpep517
+ py3-setuptools
+ py3-wheel
+ python3-dev
+ zlib-dev
+ "
+checkdepends="
+ bash
+ diffutils
+ py3-docutils
+ sqlite
+ unzip
+ xz
+ "
subpackages="
+ $pkgname-pyc
$pkgname-doc
- $pkgname-vim:vim:noarch
- $pkgname-zsh-completion:zshcomp:noarch
- $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-lang
+ $pkgname-vim::noarch
+ $pkgname-zsh-completion
+ $pkgname-bash-completion
"
source="https://www.mercurial-scm.org/release/mercurial-$pkgver.tar.gz
blacklist.txt
"
+options="net !check"
+
case "$CARCH" in
- ppc64le|mips64|aarch64|armv7|armhf) options="$options !check" ;; # around 400 of 919 tests time out
+aarch64|armhf)
+ # around 400 of 919 tests time out
+ options="$options !check"
+ ;;
esac
case "$CARCH" in
+*) ;; # https://github.com/dgrunwald/rust-cpython/issues/294
+x86_64|armv7|armhf|aarch64|x86|ppc64le)
# Oxidation, limited by Rust
- x86_64|armv7|armhf|aarch64|x86|ppc64le) makedepends="$makedepends cargo" ;;
+ export HGWITHRUSTEXT=cpython
+ makedepends="$makedepends cargo"
+ subpackages="$subpackages $pkgname-chg"
+ ;;
esac
# secfixes:
# 4.9-r0:
# - CVE-2019-3902
+prepare() {
+ default_prepare
+
+ if [ "$HGWITHRUSTEXT" = "cpython" ]; then
+ cd rust
+ cargo fetch --target=$CTARGET --locked
+ cd chg
+ cargo fetch --target=$CTARGET --locked
+ fi
+}
+
build() {
- HGPYTHON3=1 python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
+
+ if [ "$HGWITHRUSTEXT" = "cpython" ]; then
+ cd rust
+ cargo auditable build --release --frozen --manifest-path chg/Cargo.toml
+ fi
}
check() {
- make PYTHON=python3 TESTFLAGS=--blacklist="$srcdir/blacklist.txt" tests
+ cd tests
+ python3 run-tests.py --blacklist="$srcdir"/blacklist.txt
}
package() {
- HGPYTHON3=1 python3 setup.py install --root="$pkgdir"
- install -m755 contrib/hgk contrib/hg-ssh hgeditor "$pkgdir"/usr/bin
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
+
+ install -Dm755 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
+
+ install -Dm644 contrib/vim/HGAnnotate.vim contrib/vim/hgtest.vim \
+ -t "$pkgdir"/usr/share/vim/vimfiles/syntax/
+
+ if [ "$HGWITHRUSTEXT" = "cpython" ]; then
+ install -Dm755 rust/chg/target/release/chg -t "$pkgdir"/usr/bin/
+ fi
}
-vim() {
- depends=""
- pkgdesc="Vim syntax for $pkgname"
- install_if="vim $pkgname=$pkgver-r$pkgrel"
+chg() {
+ pkgdesc="Client for Mercurial command server with cHg extension"
+ depends="$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/
+ amove usr/bin/chg
}
-zshcomp() {
+vim() {
depends=""
- pkgdesc="Zsh completion for $pkgname"
- install_if="$pkgname=$pkgver-r$pkgrel zsh"
+ pkgdesc="Vim syntax for $pkgname"
+ install_if="vim $pkgname=$pkgver-r$pkgrel"
- install -Dm644 "$builddir"/contrib/zsh_completion \
- "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
+ amove usr/share/vim
}
-bashcomp() {
- depends=""
- pkgdesc="Bash completion for $pkgname"
- install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+lang() {
+ pkgdesc="translations for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel lang"
- install -Dm644 "$builddir"/contrib/bash_completion \
- "$subpkgdir"/usr/share/bash-completion/completions/$pkgname
+ amove usr/lib/python3*/site-packages/mercurial/locale
}
sha512sums="
-d2a91cf63ca8f7621a2d36af7993c9878a2a36c7c95a027f2ff9d5ec3cdb01b9f86a60108cf3ca674b5b306488f61f749c3d8c5f814d6c90c04941d551d458dd mercurial-5.9.3.tar.gz
-78ea6727d05ac15a71b37022bd61b839ce8558310d552aac4941c832657e499bab1fdb33ea11ec765d6f258b29e450b71eb99b0cb70f26768698bd444ba77635 blacklist.txt
+cb64daf885451d606ad34c408fbefc900be0fab7c0e0c2fc63dda32676de1c77a9d194c8c4974a608020a0f09e326682443537769eaa97acaf89ad7e385e0ce5 mercurial-6.7.2.tar.gz
+b24e1b79ca36ac1d78a5af4e35eb87581f209255838327a7d9315c17175d41bfa4b7f98c66be078cfa1e7d27a41c1a12bba265fa6d3d30edb4e2ba599fe0ed18 blacklist.txt
"