525d856efc
Use cargo-0.25.0 distfile to fix dependency on outdated libressl. Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
62 lines
1.7 KiB
Bash
62 lines
1.7 KiB
Bash
# Template file for 'cargo'
|
|
pkgname=cargo
|
|
version=0.25.0
|
|
revision=1
|
|
_githash_installer=4f994850808a572e2cc8d43f968893c8e942e9bf
|
|
hostmakedepends="rust python curl cmake pkg-config"
|
|
makedepends="libcurl-devel libgit2-devel"
|
|
depends="rust"
|
|
short_desc="Rust package manager"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="MIT, Apache-2.0"
|
|
homepage="https://crates.io/"
|
|
distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz"
|
|
checksum=e826fc9c2c97a46c2da24f71b54dc6acef16e4fa5dc15667d278f9a7e5edbe60
|
|
nocross=yes
|
|
|
|
case "$XBPS_MACHINE" in
|
|
x86_64-musl)
|
|
distfiles+="
|
|
https://repo.voidlinux.eu/distfiles/cargo-0.25.0-x86_64-unknown-linux-musl.tar.gz"
|
|
checksum+="
|
|
b909608608b36cd75f63f7aab1efb31f3eb50a1f0744151474ebc9559f721bdd"
|
|
;;
|
|
x86_64)
|
|
distfiles+="
|
|
https://static.rust-lang.org/dist/cargo-0.20.0-x86_64-unknown-linux-gnu.tar.gz"
|
|
checksum+="
|
|
a677d13b01d00ad13edf75c7d1b484421c7fc09338bf9ed6d456b4685bb42ed1"
|
|
;;
|
|
i686)
|
|
distfiles+="
|
|
https://static.rust-lang.org/dist/cargo-0.20.0-i686-unknown-linux-gnu.tar.gz"
|
|
checksum+="
|
|
1a6b45f04d63d54c5d265e8bf1d647df171c1624ca1c081d75971eb8bb741d53"
|
|
;;
|
|
esac
|
|
|
|
post_extract() {
|
|
mkdir -p target/snapshot
|
|
case "$XBPS_MACHINE" in
|
|
x86_64-musl) cp ../cargo cargo;;
|
|
*) cp ../cargo-*/cargo/bin/cargo cargo;;
|
|
esac
|
|
}
|
|
do_build() {
|
|
export LIBGIT2_SYS_USE_PKG_CONFIG=yes
|
|
export CARGO_HOME="${wrksrc}/.cargo"
|
|
export RUST_BACKTRACE=1
|
|
./cargo build --release
|
|
}
|
|
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
|
|
}
|