59 lines
2 KiB
Bash
59 lines
2 KiB
Bash
# Template file for 'cargo'
|
|
pkgname=cargo
|
|
version=0.15.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"
|
|
depends="rust"
|
|
short_desc="Rust package manager"
|
|
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
|
|
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="6ebe9e0de255d5bd912528bef0f57db7746e162c6d9875a89c6c8b2b40a21d64
|
|
dc7240d60a869fa24a68c8734fb7c810c27cca0a6dad52df6279865e4e8e7fae"
|
|
nocross=yes
|
|
|
|
case "$XBPS_MACHINE" in
|
|
x86_64-musl)
|
|
distfiles+="
|
|
https://alpine.geeknet.cz/distfiles/cargo-0.11.0-nightly-x86_64-alpine-linux-musl.tar.gz"
|
|
checksum+="
|
|
587172026c0565e839d96b0c1d4c68c000927817398241f96682dca47fa8c3b9"
|
|
;;
|
|
x86_64)
|
|
distfiles+="
|
|
https://static.rust-lang.org/cargo-dist/2016-03-21/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz"
|
|
checksum+="
|
|
55ad9a8929303b4e06c18d0dd30b0d6296da784606d9c55cce98d5d7fc39a0b2"
|
|
;;
|
|
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-nightly*/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
|
|
export LIBGIT2_SYS_USE_PKG_CONFIG=yes
|
|
export CARGO_HOME="${wrksrc}/.cargo"
|
|
}
|
|
pre_build() {
|
|
export LIBGIT2_SYS_USE_PKG_CONFIG=yes
|
|
}
|
|
post_install() {
|
|
rm -rf ${DESTDIR}/usr/lib/rustlib ${DESTDIR}/usr/share/doc/cargo
|
|
vlicense LICENSE-APACHE
|
|
vlicense LICENSE-MIT
|
|
vlicense LICENSE-THIRD-PARTY
|
|
}
|