From 4529bbabd6da1e49f6749cf6a34d53af9e771755 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Jun 07 2019 00:52:05 +0000 Subject: Update to 0.8.0 --- diff --git a/.gitignore b/.gitignore index 0bccb8f..fe55678 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /libgit2-sys-0.7.8.crate /libgit2-sys-0.7.10.crate /libgit2-sys-0.7.11.crate +/libgit2-sys-0.8.0.crate diff --git a/0001-build.rs-always-use-pkg-config.patch b/0001-build.rs-always-use-pkg-config.patch index b8f2bdb..601cc50 100644 --- a/0001-build.rs-always-use-pkg-config.patch +++ b/0001-build.rs-always-use-pkg-config.patch @@ -1,30 +1,38 @@ -From b5fcfdab05bbea12872e445517e16ec0e79f2803 Mon Sep 17 00:00:00 2001 +From d887c34ce5ec0d3b4228cf0f88e970f586abc845 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 26 Nov 2017 12:22:51 +0100 Subject: [PATCH] build.rs: always use pkg-config Signed-off-by: Igor Gnatenko +Signed-off-by: Josh Stone --- - libgit2-sys/build.rs | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) + libgit2-sys/build.rs | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libgit2-sys/build.rs b/libgit2-sys/build.rs -index 619472db287d..bc12a5976d4c 100644 +index cc76cd46b3b3..45c6ed61280d 100644 --- a/libgit2-sys/build.rs +++ b/libgit2-sys/build.rs -@@ -11,10 +11,8 @@ fn main() { +@@ -10,14 +10,12 @@ fn main() { + let https = env::var("CARGO_FEATURE_HTTPS").is_ok(); let ssh = env::var("CARGO_FEATURE_SSH").is_ok(); - let curl = env::var("CARGO_FEATURE_CURL").is_ok(); - + - if env::var("LIBGIT2_SYS_USE_PKG_CONFIG").is_ok() { -- if pkg_config::find_library("libgit2").is_ok() { +- let mut cfg = pkg_config::Config::new(); +- if let Ok(lib) = cfg.atleast_version("0.28.0").probe("libgit2") { +- for include in &lib.include_paths { +- println!("cargo:root={}", include.display()); +- } - return -- } -+ if pkg_config::find_library("libgit2").is_ok() { ++ let mut cfg = pkg_config::Config::new(); ++ if let Ok(lib) = cfg.atleast_version("0.28.0").probe("libgit2") { ++ for include in &lib.include_paths { ++ println!("cargo:root={}", include.display()); + } + return } if !Path::new("libgit2/.git").exists() { -- -2.17.1 +2.21.0 diff --git a/rust-libgit2-sys-no-include_depth.patch b/rust-libgit2-sys-no-include_depth.patch deleted file mode 100644 index 2f3a136..0000000 --- a/rust-libgit2-sys-no-include_depth.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/libgit2-sys/lib.rs b/libgit2-sys/lib.rs -index 5d0e2972f57d..1e3aca85efcd 100644 ---- a/libgit2-sys/lib.rs -+++ b/libgit2-sys/lib.rs -@@ -770,7 +770,7 @@ pub struct git_index_time { - pub struct git_config_entry { - pub name: *const c_char, - pub value: *const c_char, -- pub include_depth: c_uint, -+ // pub include_depth: c_uint, - pub level: git_config_level_t, - pub free: extern fn(*mut git_config_entry), - pub payload: *mut c_void, diff --git a/rust-libgit2-sys.spec b/rust-libgit2-sys.spec index b9edced..b5770ca 100644 --- a/rust-libgit2-sys.spec +++ b/rust-libgit2-sys.spec @@ -1,12 +1,12 @@ -# Generated by rust2rpm +# Generated by rust2rpm-9-1.fc30 %bcond_with check %global debug_package %{nil} %global crate libgit2-sys Name: rust-%{crate} -Version: 0.7.11 -Release: 5%{?dist} +Version: 0.8.0 +Release: 1%{?dist} Summary: Native bindings to the libgit2 library # Upstream license specification: MIT/Apache-2.0 @@ -16,19 +16,14 @@ Source: %{crates_source} # Doesn't seem to be upstreamable Patch0: 0001-build.rs-always-use-pkg-config.patch -# The bundled libgit2 is a snapshot from master, after 0.27 branched, and -# adds the field "include_depth" to "struct git_config_entry". We need to -# remove that to match our system libgit2-0.27 instead -Patch1: rust-libgit2-sys-no-include_depth.patch - ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging BuildRequires: (crate(cc/default) >= 1.0.25 with crate(cc/default) < 2.0.0) BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) BuildRequires: (crate(libz-sys/default) >= 1.0.22 with crate(libz-sys/default) < 2.0.0) -BuildRequires: (crate(pkg-config/default) >= 0.3.0 with crate(pkg-config/default) < 0.4.0) -BuildRequires: (pkgconfig(libgit2) >= 0.27 with pkgconfig(libgit2) < 0.28) +BuildRequires: (crate(pkg-config/default) >= 0.3.7 with crate(pkg-config/default) < 0.4.0) +BuildRequires: (pkgconfig(libgit2) >= 0.28 with pkgconfig(libgit2) < 0.29) %global _description \ Native bindings to the libgit2 library. @@ -38,7 +33,7 @@ Native bindings to the libgit2 library. %package devel Summary: %{summary} BuildArch: noarch -Requires: (pkgconfig(libgit2) >= 0.27 with pkgconfig(libgit2) < 0.28) +Requires: (pkgconfig(libgit2) >= 0.28 with pkgconfig(libgit2) < 0.29) %description devel %{_description} @@ -61,30 +56,6 @@ which use "default" feature of "%{crate}" crate. %files -n %{name}+default-devel %ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml -%package -n %{name}+curl-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+curl-devel %{_description} - -This package contains library source intended for building other packages -which use "curl" feature of "%{crate}" crate. - -%files -n %{name}+curl-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml - -%package -n %{name}+curl-sys-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+curl-sys-devel %{_description} - -This package contains library source intended for building other packages -which use "curl-sys" feature of "%{crate}" crate. - -%files -n %{name}+curl-sys-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml - %package -n %{name}+https-devel Summary: %{summary} BuildArch: noarch @@ -163,6 +134,9 @@ rm -vrf libgit2 %endif %changelog +* Fri Jun 07 2019 Josh Stone - 0.8.0-1 +- Update to 0.8.0 + * Sun Mar 10 2019 Igor Gnatenko - 0.7.11-5 - Do not pull optional dependencies diff --git a/sources b/sources index f00e61c..7efbb75 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgit2-sys-0.7.11.crate) = 361aa7d75a029209f59c799e2f091f6ab8c0ba6a4677932537eea8e0198a36a2382327e8c5db98a2980f47b6a4baf07708720f128734081ac58e30d8721c3435 +SHA512 (libgit2-sys-0.8.0.crate) = 0892697a330852840d4a77891cb2bfe9befe2f31438838f8c327045b2a253d7b343080bd2ea32d39ed9eebf3699d824f666f1a1d4e92ea75b4f2a165e30b3d84