cargo: update to 0.39.0

This commit is contained in:
q66 2019-10-04 03:24:19 +02:00 committed by Johannes
parent aa6157e4a5
commit cece245278
2 changed files with 62 additions and 15 deletions

View file

@ -0,0 +1,32 @@
Source: FreeBSD
Revert to libgit2 0.28 API per https://github.com/rust-lang/git2-rs/issues/458
--- libgit2-sys/lib.rs
+++ libgit2-sys/lib.rs
@@ -331,7 +331,6 @@ pub struct git_remote_callbacks {
pub push_negotiation: Option<git_push_negotiation>,
pub transport: Option<git_transport_cb>,
pub payload: *mut c_void,
- pub resolve_url: Option<git_url_resolve_cb>,
}
#[repr(C)]
@@ -385,8 +384,6 @@ pub type git_push_negotiation =
pub type git_push_update_reference_cb =
extern "C" fn(*const c_char, *const c_char, *mut c_void) -> c_int;
-pub type git_url_resolve_cb =
- extern "C" fn(*mut git_buf, *const c_char, c_int, *mut c_void) -> c_int;
#[repr(C)]
pub struct git_push_update {
@@ -2233,7 +2230,7 @@ extern "C" {
source: *const git_tree,
) -> c_int;
pub fn git_treebuilder_clear(bld: *mut git_treebuilder);
- pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> size_t;
+ pub fn git_treebuilder_entrycount(bld: *mut git_treebuilder) -> c_uint;
pub fn git_treebuilder_free(bld: *mut git_treebuilder);
pub fn git_treebuilder_get(
bld: *mut git_treebuilder,

View file

@ -1,7 +1,8 @@
# Template file for 'cargo' # Template file for 'cargo'
pkgname=cargo pkgname=cargo
version=0.37.0 version=0.39.0
revision=1 revision=1
wrksrc="cargo-${version}"
build_helper=rust build_helper=rust
hostmakedepends="rust python curl cmake pkg-config" hostmakedepends="rust python curl cmake pkg-config"
makedepends="libcurl-devel libgit2-devel" makedepends="libcurl-devel libgit2-devel"
@ -10,9 +11,11 @@ short_desc="Rust package manager"
maintainer="Enno Boland <gottox@voidlinux.org>" maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT, Apache-2.0" license="MIT, Apache-2.0"
homepage="https://crates.io/" homepage="https://crates.io/"
distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz" distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
checksum=377e1090e9ce21206270576193746499a26e8ffbd8b89ccd5f8eb1085ca00e3b https://github.com/rust-lang/git2-rs/archive/libgit2-sys-0.8.2.tar.gz"
_cargo_dist_version=0.37.0 checksum="1fade63d5c09eab6fa234a1fdf64693ccf1b63398a316ad27edeb1f76ee4a57e
c6597bcdc2be7a2fd70c1bb8fdc75883ca5df6aea33f0354c5a8124eacc0938b"
_cargo_dist_version=0.39.0
build_options="static" build_options="static"
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
@ -33,39 +36,39 @@ else
case "$XBPS_MACHINE" in case "$XBPS_MACHINE" in
i686) i686)
checksum+=" checksum+="
6835a73e2ce17e11eda5393133dd7c78bc41bae5a09784e5327648f14340fd48" 2996b0fb41506e87d9b07851f40b41fed94725cf53c3d251e4e1c78eea08df4c"
;; ;;
x86_64) x86_64)
checksum+=" checksum+="
d20fa121951339d5492cf8862f8a7af59efc99d18f3c27b95ab6d4658b6a7d67" 80bcb1368ce98d13cb371df89cbbed9007fb98843f34d07f2abd2c03b8f2747a"
;; ;;
x86_64-musl) x86_64-musl)
checksum+=" checksum+="
53975d91e11569f2255d8e30176f05f6976cd810725197a527b0e7ad547ca70c" 1d7d881a5af73fb7c3f632278d47a7d174f8347673e2263c4cd6a2f7d0278733"
;; ;;
ppc64le) ppc64le)
checksum+=" checksum+="
4cda7686160f6981e936229703e8e2e756c74f390245f2ad9e356bbbed28a2c9" 456d019511cfe015152a7a4c1c2f518fdeb10e0c610c9bc3ef44d73861ca967e"
;; ;;
ppc64le-musl) ppc64le-musl)
checksum+=" checksum+="
d2690135522db9fdc6efa2f432e5719b8b70abc94e91db278b84be834a75bf72" 5725c42c8356443db15f378d88f2ccb67e363ebf4beacc96ae1eac9ba36f8fe7"
;; ;;
ppc64) ppc64)
checksum+=" checksum+="
8b2f7d5da611a21dd7e0b4238b9aca6ee32f1e49d8fe831435301f11a29b12de" 73a4f13b8edda6b4c9c1818341c5d936f7b11a04f892358039d072b80ccd41dc"
;; ;;
ppc64-musl) ppc64-musl)
checksum+=" checksum+="
131db0127366665b2ae55327155c171e99c2eddfb4bcdd7e5cd2663ada109bd5" ac18707b8df5d1f64b7e15dabd73eb7a3b0f9ef5976ef7c6ceb462b5d3feb9cd"
;; ;;
ppc) ppc)
checksum+=" checksum+="
856fcb63f6ebeab67038fe3fc96ee0911353b1ee19cabcb0496c7d419de0d531" 02c07b741062e75556f5993a05eefe6dace70fee4a45542f1c6997fa69624d7e"
;; ;;
ppc-musl) ppc-musl)
checksum+=" checksum+="
119dba3538f6c1d1164b720b238acac598e1924d943ebbdf3c7113ec3cbd8a2a" b06306fc164bffa73afd2d21d96381a28d38446e58cf01a0d1585e92b4656a23"
;; ;;
esac esac
fi fi
@ -75,6 +78,20 @@ post_extract() {
mkdir -p target/snapshot mkdir -p target/snapshot
cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo
fi fi
# need this for the patch to work
cp -R ${XBPS_BUILDDIR}/git2-rs-libgit2-sys-0.8.2/libgit2-sys .
}
post_patch() {
# but only use the patched libgit2 when not static; when static, bundled
# libgit2 is used and this would not work (libgit2 sources are not there)
if [ ! "$build_option_static" ]; then
cat >> Cargo.toml <<- EOF
[patch.crates-io]
libgit2-sys = { path = './libgit2-sys' }
EOF
fi
} }
do_build() { do_build() {
@ -93,8 +110,6 @@ do_build() {
cargo="./cargo" cargo="./cargo"
fi fi
$cargo update
$cargo update --package libc --precise 0.2.55
$cargo build --release $(vopt_if static --features="all-static") $cargo build --release $(vopt_if static --features="all-static")
} }