aboutsummaryrefslogtreecommitdiffstats
path: root/community/cargo/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/cargo/APKBUILD')
-rw-r--r--community/cargo/APKBUILD43
1 files changed, 24 insertions, 19 deletions
diff --git a/community/cargo/APKBUILD b/community/cargo/APKBUILD
index cf1f7a8d6d..b5519484a2 100644
--- a/community/cargo/APKBUILD
+++ b/community/cargo/APKBUILD
@@ -1,18 +1,20 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=cargo
-pkgver=0.22.0
-pkgrel=4
+pkgver=0.25.0
+pkgrel=0
pkgdesc="The Rust package manager"
url="https://crates.io"
-arch="" # FIXME: fix build with libressl 2.7 # limited by rust pkg
+arch="x86_64" # limited by rust pkg
license="MIT Apache-2.0"
depends="rust"
makedepends="cmake curl-dev libgit2-dev libssh2-dev libressl-dev python2 zlib-dev"
subpackages="$pkgname-doc
$pkgname-bash-completion:bashcomp:noarch
$pkgname-zsh-completion:zshcomp:noarch"
-# Note: Cargo is self-hosted, so you need cargo to build cargo (ugh).
+# NOTE: Cargo is self-hosted, so you need cargo to build cargo (ugh).
+# The bootstrap static cargo has been cross-compiled on GNU system using
+# prebuilt cargo downloaded from the upstream.
# XXX: Cargo depends on many crates (Rust packages) and currently downloads
# them itself in the build phase. This quite violates our policy. However,
# unlike some other package managers, Cargo does not download arbitrary
@@ -22,23 +24,25 @@ subpackages="$pkgname-doc
# adhere to this file and verify checksums. So it provides the same
# guarantees as abuild. That said, for now it's exception only for cargo
# package and should not be applied to other rust packages!
-_bootstrap_cargo_ver=0.17.0
-# We must use newer version of openssl crate and patch it for compatibility
-# with LibreSSL 2.6.3.
-_crate_openssl_ver="0.9.24"
+# FIXME: There's no Cargo.lock in the cargo's repository anymore! According to
+# the upstream, Cargo should be always built together with Rust... For now we
+# at least include Cargo.lock generated locally as a side effect of running
+# `cargo build` for particular $pkgver to ensure basic reproducibility.
+_bootstrap_cargo_ver=0.25.0
source="$pkgname-$pkgver.tar.gz::https://github.com/rust-lang/$pkgname/archive/$pkgver.tar.gz
- https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_bootstrap_cargo_ver-x86_64-alpine-linux-musl.tar.gz
+ https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_bootstrap_cargo_ver-x86_64-unknown-linux-musl.tar.gz
+ Cargo.lock
tests-fix-build-auth-http_auth_offered.patch
tests-ignore-ssh_something_happens.patch
tests-ignore-rustdoc.patch
- replace-openssl-crate.patch
- rust-openssl-$_crate_openssl_ver.tar.gz::https://github.com/sfackler/rust-openssl/archive/openssl-v$_crate_openssl_ver.tar.gz"
+ tests-ignore-wasm32_final_outputs.patch
+ "
builddir="$srcdir/$pkgname-$pkgver"
export CARGO_HOME="$srcdir/.cargo"
-_bootstrap_cargo="$srcdir/$pkgname-$_bootstrap_cargo_ver-$CHOST/bin/cargo"
-_cargo_opts="--release --verbose ${JOBS:+--jobs $JOBS}"
+_bootstrap_cargo="$srcdir/$pkgname-$_bootstrap_cargo_ver-${CHOST/alpine/unknown}/bin/cargo"
+_cargo_opts="--locked --release --verbose ${JOBS:+--jobs $JOBS}"
# Uploaded cargo binary from the built package to dev.a.o, so it can be used
# for building cargo next time (needed for bootstrapping).
@@ -60,8 +64,9 @@ snapshot() {
}
prepare() {
- mv "$srcdir"/rust-openssl-openssl-v$_crate_openssl_ver "$builddir"/openssl
default_prepare
+
+ cp "$srcdir"/Cargo.lock "$builddir"/
}
build() {
@@ -115,10 +120,10 @@ zshcomp() {
"$subpkgdir"/usr/share/zsh/site-functions/_cargo
}
-sha512sums="31764df0462fcd0e7ddd29aee63ed0916b0d05e44d72aa815b3b823256e90f85e582c468a517d048e4451dfc1a3b22434abf25d825d3d926ab7a95f7bb44ad40 cargo-0.22.0.tar.gz
-b78a03942344852fd1a8c0ac893580c589757d4946150e5959e1df08b163b94ce5319236a48506c18f987cf3500a2c7cfe808eef13092c45d271e169946a18d1 cargo-0.17.0-x86_64-alpine-linux-musl.tar.gz
-4e9a0d409951a72b5c1d3578cb310c0efc5d98a5b963432ec4f485f1d58d2354f0050c31574d6bd9090b7247468ef1a13b04b133deabe6daed91032764468f97 tests-fix-build-auth-http_auth_offered.patch
+sha512sums="959277eaf993b455ced93581dd04358507d91390dbc4413ca5e30f5548221e8d321b8983c195025b73a193107410429b33b9692298733c201c98ab62da99dfad cargo-0.25.0.tar.gz
+67d6d353d26232aa9e7c8d5b0eacc7cacb455fafa42b1932e6ebc832cbc9f948e723e5c5a9209ad504b34313e8a861236691e9bfefc12ef22afcd23f8859e918 cargo-0.25.0-x86_64-unknown-linux-musl.tar.gz
+9a2c46560b3291a7db43294573957871a9359221bc2986c4ca220061ff45566da0ecf388e8ff582032419081a85c7643845fea9c76870008a376cefecf5181ae Cargo.lock
+8f9ce1c7c17693a92b8f5f1e7718bf6045910240326cd06346adbf66049dd62a4ea5a2e7a60d2793e532d2b406d5ed673d05068058abb5ca8e8df85273625024 tests-fix-build-auth-http_auth_offered.patch
17c669a71443e21cc5e5cc6eb99933c20562b7df9d859c493ff25252167eb1aea6dd7322a06207776eab1c769464f95a432d1520a949512a52592b1eb115a4be tests-ignore-ssh_something_happens.patch
cf2c55d71cb376fdaac7efedfd9bb7a1d8b8709c7cd98aa7e74e574885e8dfa17fbb61050335d7fc63932c5b45ac1ca33cf516d4340e1ba9fe5f41fd6983078e tests-ignore-rustdoc.patch
-93232da79f95703976568475e02246cf9c8b5df0240a5395c00682324e4ae426313356c8345db8a6a99fad8ec2cf72560dbb498801e6994aa0a43939938dc65c replace-openssl-crate.patch
-885add87d74e3a8cbaf7fa66a632d1f58fbe729964fc48eae7abefd0d738d8bfea3a76801cca7f93868fdc52012813bed6de622ec87704b2cfae29826517e76f rust-openssl-0.9.24.tar.gz"
+9319350e31dc661131bc6c3cc4609a221d70e8d9f22faa8bea12cdbe87c989872b8b69c181e6c701bc38682b26c49a8133f93be316271995856f6ead1df296b5 tests-ignore-wasm32_final_outputs.patch"