cargo: update to 0.20.0.

This commit is contained in:
Leah Neukirchen 2017-07-25 15:30:45 +02:00
parent 6e493f3fc6
commit 43391fa149

View file

@ -1,13 +1,11 @@
# Template file for 'cargo'
pkgname=cargo
version=0.19.0
revision=2
version=0.20.0
revision=1
_githash_installer=4f994850808a572e2cc8d43f968893c8e942e9bf
patch_args="-Np1"
build_style=gnu-configure
make_build_args="VERBOSE=1"
hostmakedepends="rust python curl cmake pkg-config"
makedepends="libcurl-devel http-parser-devel libgit2-devel"
makedepends="libcurl-devel libgit2-devel"
depends="rust"
short_desc="Rust package manager"
maintainer="Leah Neukirchen <leah@vuxu.org>"
@ -15,7 +13,7 @@ license="MIT, Apache-2.0"
homepage="https://crates.io/"
distfiles="https://github.com/rust-lang/${pkgname}/archive/${version}.tar.gz
https://github.com/rust-lang/rust-installer/archive/${_githash_installer}.tar.gz"
checksum="9ea59d17a7fa81aa4bdefa2bb45a5315219414386753eaf0988cadd465550b40
checksum="f0e21d23cffd3510ba8a65e6a4d1010073afc0e573d9d92c23d22b868ca0bc42
dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
nocross=yes
@ -43,21 +41,24 @@ esac
post_extract() {
rm -rf src/rust-installer
mv ../rust-installer-${_githash_installer} src/rust-installer
sed -i 's,/etc/bash_completion.d,/share/bash-completion/completions,g' Makefile.in
mkdir -p target/snapshot
cp ../cargo-*/cargo/bin/cargo cargo
rm Cargo.lock # unlock rust-openssl 0.9.4
}
pre_configure() {
configure_args+=" --host=${XBPS_TRIPLET/-pc-/-unknown-} --build=${XBPS_TRIPLET/-pc-/-unknown-} --cargo=$wrksrc/cargo"
sed -i '/not recognized/s/err/warn/' configure
do_build() {
export LIBGIT2_SYS_USE_PKG_CONFIG=yes
export CARGO_HOME="${wrksrc}/.cargo"
export RUST_BACKTRACE=1
./cargo build --release
}
pre_build() {
export LIBGIT2_SYS_USE_PKG_CONFIG=yes
}
post_install() {
rm -rf ${DESTDIR}/usr/lib/rustlib ${DESTDIR}/usr/share/doc/cargo
do_install() {
vbin target/release/cargo
for f in src/etc/man/*.?; do
vman $f
done
vinstall src/etc/cargo.bashcomp.sh 0644 usr/share/bash-completion/completions cargo
vinstall src/etc/_cargo 0644 usr/share/zsh/site-functions
vlicense LICENSE-APACHE
vlicense LICENSE-MIT
vlicense LICENSE-THIRD-PARTY