diff -Nru rust-libgit2-sys-0.7.7/build.rs rust-libgit2-sys-0.7.10/build.rs --- rust-libgit2-sys-0.7.7/build.rs 2018-07-30 14:30:59.000000000 +0000 +++ rust-libgit2-sys-0.7.10/build.rs 2018-09-25 17:06:03.000000000 +0000 @@ -1,35 +1,15 @@ -extern crate cmake; extern crate cc; extern crate pkg_config; use std::env; -use std::ffi::OsString; -use std::fs::{self, File}; -use std::io::prelude::*; +use std::fs; use std::path::{Path, PathBuf}; use std::process::Command; -macro_rules! t { - ($e:expr) => (match $e{ - Ok(e) => e, - Err(e) => panic!("{} failed with {}", stringify!($e), e), - }) -} - 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 ssh { - register_dep("SSH2"); - } - if https { - register_dep("OPENSSL"); - } - if curl { - register_dep("CURL"); - } - let has_pkgconfig = Command::new("pkg-config").output().is_ok(); if env::var("LIBGIT2_SYS_USE_PKG_CONFIG").is_ok() { if pkg_config::find_library("libgit2").is_ok() { @@ -43,141 +23,142 @@ } let target = env::var("TARGET").unwrap(); - let host = env::var("HOST").unwrap(); let windows = target.contains("windows"); - let msvc = target.contains("msvc"); - let mut cfg = cmake::Config::new("libgit2"); + let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap()); + let include = dst.join("include"); + let mut cfg = cc::Build::new(); + fs::create_dir_all(&include).unwrap(); + + // Copy over all header files + cp_r("libgit2/include".as_ref(), &include); + + cfg.include(&include) + .include("libgit2/src") + .out_dir(dst.join("build")) + .warnings(false); + + // Include all cross-platform C files + add_c_files(&mut cfg, "libgit2/src".as_ref()); + add_c_files(&mut cfg, "libgit2/src/xdiff".as_ref()); + + // These are activated by feautres, but they're all unconditionally always + // compiled apparently and have internal #define's to make sure they're + // compiled correctly. + add_c_files(&mut cfg, "libgit2/src/transports".as_ref()); + add_c_files(&mut cfg, "libgit2/src/streams".as_ref()); + + // Always use bundled http-parser for now + cfg.include("libgit2/deps/http-parser") + .file("libgit2/deps/http-parser/http_parser.c"); + + // Always use bundled regex for now + cfg.include("libgit2/deps/regex") + .file("libgit2/deps/regex/regex.c"); + + if windows { + add_c_files(&mut cfg, "libgit2/src/win32".as_ref()); + cfg.define("STRSAFE_NO_DEPRECATE", None); + + // libgit2's build system claims that forks like mingw-w64 of MinGW + // still want this define to use C99 stdio functions automatically. + // Apparently libgit2 breaks at runtime if this isn't here? Who knows! + if target.contains("gnu") { + cfg.define("__USE_MINGW_ANSI_STDIO", "1"); + } + } else { + add_c_files(&mut cfg, "libgit2/src/unix".as_ref()); + cfg.flag("-fvisibility=hidden"); + } + if target.contains("solaris") { + cfg.define("_POSIX_C_SOURCE", "200112L"); + cfg.define("__EXTENSIONS__", None); + } - #[cfg(feature = "ssh_key_from_memory")] - cfg.define("GIT_SSH_MEMORY_CREDENTIALS", "1"); + let mut features = String::new(); - if msvc { - // libgit2 passes the /GL flag to enable whole program optimization, but - // this requires that the /LTCG flag is passed to the linker later on, - // and currently the compiler does not do that, so we disable whole - // program optimization entirely. - cfg.cflag("/GL-"); - - // Currently liblibc links to msvcrt which apparently is a dynamic CRT, - // so we need to turn this off to get it to link right. - let features = env::var("CARGO_CFG_TARGET_FEATURE") - .unwrap_or(String::new()); - if features.contains("crt-static") { - cfg.define("STATIC_CRT", "ON"); - } else { - cfg.define("STATIC_CRT", "OFF"); - } + features.push_str("#ifndef INCLUDE_features_h\n"); + features.push_str("#define INCLUDE_features_h\n"); + features.push_str("#define GIT_THREADS 1\n"); + + if !target.contains("android") { + features.push_str("#define GIT_USE_NSEC 1\n"); } - // libgit2 uses pkg-config to discover libssh2, but this doesn't work on - // windows as libssh2 doesn't come with a libssh2.pc file in that install - // (or when pkg-config isn't found). As a result we just manually turn on - // SSH support in libgit2 (a little jankily) here... - let mut ssh_forced = false; - if ssh && (windows || !has_pkgconfig) { - if let Ok(libssh2_include) = env::var("DEP_SSH2_INCLUDE") { - ssh_forced = true; - if msvc { - cfg.cflag(format!("/I{}", libssh2_include)) - .cflag("/DGIT_SSH"); - } else { - cfg.cflag(format!("-I{}", sanitize_sh(libssh2_include.as_ref()))) - .cflag("-DGIT_SSH"); - } - } + if target.contains("apple") { + features.push_str("#define GIT_USE_STAT_MTIMESPEC 1\n"); + } else { + features.push_str("#define GIT_USE_STAT_MTIM 1\n"); } - // When cross-compiling, we're pretty unlikely to find a `dlltool` binary - // lying around, so try to find another if it exists - if windows && !host.contains("windows") { - let c_compiler = cc::Build::new().cargo_metadata(false) - .get_compiler(); - let exe = c_compiler.path(); - let path = env::var_os("PATH").unwrap_or(OsString::new()); - let exe = env::split_paths(&path) - .map(|p| p.join(&exe)) - .find(|p| p.exists()); - if let Some(exe) = exe { - if let Some(name) = exe.file_name().and_then(|e| e.to_str()) { - let name = name.replace("gcc", "dlltool"); - let dlltool = exe.with_file_name(name); - cfg.define("DLLTOOL", &dlltool); - } - } + if env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap() == "32" { + features.push_str("#define GIT_ARCH_32 1\n"); + } else { + features.push_str("#define GIT_ARCH_64 1\n"); } if ssh { - cfg.register_dep("SSH2"); - } else { - cfg.define("USE_SSH", "OFF"); + if let Some(path) = env::var_os("DEP_SSH2_INCLUDE") { + cfg.include(path); + } + features.push_str("#define GIT_SSH 1\n"); + features.push_str("#define GIT_SSH_MEMORY_CREDENTIALS 1\n"); } if https { - cfg.register_dep("OPENSSL"); - } else { - cfg.define("USE_OPENSSL", "OFF"); - cfg.define("USE_HTTPS", "OFF"); - } - if curl { - cfg.register_dep("CURL"); + features.push_str("#define GIT_HTTPS 1\n"); + + if windows { + features.push_str("#define GIT_WINHTTP 1\n"); + features.push_str("#define GIT_SHA1_WIN32 1\n"); + cfg.file("libgit2/src/hash/hash_win32.c"); + } else if target.contains("apple") { + features.push_str("#define GIT_SECURE_TRANSPORT 1\n"); + features.push_str("#define GIT_SHA1_COMMON_CRYPTO 1\n"); + } else { + features.push_str("#define GIT_OPENSSL 1\n"); + features.push_str("#define GIT_SHA1_OPENSSL 1\n"); + if let Some(path) = env::var_os("DEP_OPENSSL_INCLUDE") { + cfg.include(path); + } + } } else { - cfg.define("CURL", "OFF"); + cfg.file("libgit2/src/hash/hash_generic.c"); } - //Use bundled http-parser if cross compiling - if host != target { - cfg.define("USE_EXT_HTTP_PARSER", "OFF"); - } - - let _ = fs::remove_dir_all(env::var("OUT_DIR").unwrap()); - t!(fs::create_dir_all(env::var("OUT_DIR").unwrap())); - - // Unset DESTDIR or libgit2.a ends up in it and cargo can't find it - env::remove_var("DESTDIR"); - let dst = cfg.define("BUILD_SHARED_LIBS", "OFF") - .define("BUILD_CLAR", "OFF") - .register_dep("Z") - .build(); - - // Make sure libssh2 was detected on unix systems, because it definitely - // should have been! - if ssh && !ssh_forced { - let flags = dst.join("build/src/git2/sys/features.h"); - let mut contents = String::new(); - t!(t!(File::open(flags)).read_to_string(&mut contents)); - if !contents.contains("#define GIT_SSH 1") { - panic!("libgit2 failed to find libssh2, and SSH support is required"); + if curl { + features.push_str("#define GIT_CURL 1\n"); + if let Some(path) = env::var_os("DEP_CURL_INCLUDE") { + cfg.include(path); + } + // Handle dllimport/dllexport on windows by making sure that if we built + // curl statically (as told to us by the `curl-sys` crate) we define the + // correct values for curl's header files. + if env::var_os("DEP_CURL_STATIC").is_some() { + cfg.define("CURL_STATICLIB", None); } } + if let Some(path) = env::var_os("DEP_Z_INCLUDE") { + cfg.include(path); + } - // libgit2 requires the http_parser library for the HTTP transport to be - // implemented, and it will attempt to use the system http_parser if it's - // available. Detect this situation and report using the system http parser - // the same way in this situation. - // - // Note that other dependencies of libgit2 like openssl, libz, and libssh2 - // are tracked via crates instead of this. Ideally this should be a crate as - // well. - let pkgconfig_file = dst.join("lib/pkgconfig/libgit2.pc"); - if let Ok(mut f) = File::open(&pkgconfig_file) { - let mut contents = String::new(); - t!(f.read_to_string(&mut contents)); - if contents.contains("-lhttp_parser") { - println!("cargo:rustc-link-lib=http_parser"); - } + if target.contains("apple") { + features.push_str("#define GIT_USE_ICONV 1\n"); } + features.push_str("#endif\n"); + fs::write(include.join("git2/sys/features.h"), features).unwrap(); + + cfg.compile("git2"); + + println!("cargo:root={}", dst.display()); + if target.contains("windows") { println!("cargo:rustc-link-lib=winhttp"); println!("cargo:rustc-link-lib=rpcrt4"); println!("cargo:rustc-link-lib=ole32"); println!("cargo:rustc-link-lib=crypt32"); - println!("cargo:rustc-link-lib=static=git2"); - println!("cargo:rustc-link-search=native={}/lib", dst.display()); return } - println!("cargo:rustc-link-lib=static=git2"); - println!("cargo:rustc-link-search=native={}", dst.join("lib").display()); if target.contains("apple") { println!("cargo:rustc-link-lib=iconv"); println!("cargo:rustc-link-lib=framework=Security"); @@ -185,46 +166,29 @@ } } -fn register_dep(dep: &str) { - if let Some(s) = env::var_os(&format!("DEP_{}_ROOT", dep)) { - if !cfg!(target_env = "msvc") { - prepend("PKG_CONFIG_PATH", Path::new(&s).join("lib/pkgconfig")); - } - return - } - if let Some(s) = env::var_os(&format!("DEP_{}_INCLUDE", dep)) { - let root = Path::new(&s).parent().unwrap(); - env::set_var(&format!("DEP_{}_ROOT", dep), root); - let path = root.join("lib/pkgconfig"); - if path.exists() { - if !cfg!(target_env = "msvc") { - prepend("PKG_CONFIG_PATH", path); - } - return +fn cp_r(from: &Path, to: &Path) { + for e in from.read_dir().unwrap() { + let e = e.unwrap(); + let from = e.path(); + let to = to.join(e.file_name()); + if e.file_type().unwrap().is_dir() { + fs::create_dir_all(&to).unwrap(); + cp_r(&from, &to); + } else { + println!("{} => {}", from.display(), to.display()); + fs::copy(&from, &to).unwrap(); } } } -fn prepend(var: &str, val: PathBuf) { - let prefix = env::var(var).unwrap_or(String::new()); - let mut v = vec![val]; - v.extend(env::split_paths(&prefix)); - env::set_var(var, &env::join_paths(v).unwrap()); -} - -fn sanitize_sh(path: &Path) -> String { - let path = path.to_str().unwrap().replace("\\", "/"); - return change_drive(&path).unwrap_or(path); - - fn change_drive(s: &str) -> Option { - let mut ch = s.chars(); - let drive = ch.next().unwrap_or('C'); - if ch.next() != Some(':') { - return None - } - if ch.next() != Some('/') { - return None +fn add_c_files(build: &mut cc::Build, path: &Path) { + for e in path.read_dir().unwrap() { + let e = e.unwrap(); + let path = e.path(); + if e.file_type().unwrap().is_dir() { + // skip dirs for now + } else if path.extension().and_then(|s| s.to_str()) == Some("c") { + build.file(&path); } - Some(format!("/{}/{}", drive, &s[drive.len_utf8() + 2..])) } } diff -Nru rust-libgit2-sys-0.7.7/Cargo.toml rust-libgit2-sys-0.7.10/Cargo.toml --- rust-libgit2-sys-0.7.7/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 +++ rust-libgit2-sys-0.7.10/Cargo.toml 1970-01-01 00:00:00.000000000 +0000 @@ -12,7 +12,7 @@ [package] name = "libgit2-sys" -version = "0.7.7" +version = "0.7.10" authors = ["Alex Crichton "] build = "build.rs" links = "git2" @@ -25,23 +25,20 @@ name = "libgit2_sys" path = "lib.rs" [dependencies.curl-sys] -version = "0.4.6" +version = "0.4.10" optional = true [dependencies.libc] version = "0.2" [dependencies.libssh2-sys] -version = "0.2.8" +version = "0.2.11" optional = true [dependencies.libz-sys] -version = "1.0.18" +version = "1.0.22" [build-dependencies.cc] -version = "1.0" - -[build-dependencies.cmake] -version = "0.1.24" +version = "1.0.25" [build-dependencies.pkg-config] version = "0.3" diff -Nru rust-libgit2-sys-0.7.7/Cargo.toml.orig rust-libgit2-sys-0.7.10/Cargo.toml.orig --- rust-libgit2-sys-0.7.7/Cargo.toml.orig 1970-01-01 00:00:00.000000000 +0000 +++ rust-libgit2-sys-0.7.10/Cargo.toml.orig 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +1,6 @@ [package] name = "libgit2-sys" -version = "0.7.7" +version = "0.7.10" authors = ["Alex Crichton "] links = "git2" build = "build.rs" @@ -16,15 +16,14 @@ path = "lib.rs" [dependencies] -curl-sys = { version = "0.4.6", optional = true } +curl-sys = { version = "0.4.10", optional = true } libc = "0.2" -libssh2-sys = { version = "0.2.8", optional = true } -libz-sys = "1.0.18" +libssh2-sys = { version = "0.2.11", optional = true } +libz-sys = "1.0.22" [build-dependencies] pkg-config = "0.3" -cmake = "0.1.24" -cc = "1.0" +cc = "1.0.25" [target.'cfg(unix)'.dependencies] openssl-sys = { version = "0.9", optional = true } diff -Nru rust-libgit2-sys-0.7.7/debian/cargo-checksum.json rust-libgit2-sys-0.7.10/debian/cargo-checksum.json --- rust-libgit2-sys-0.7.7/debian/cargo-checksum.json 2018-08-03 13:41:12.000000000 +0000 +++ rust-libgit2-sys-0.7.10/debian/cargo-checksum.json 2018-12-09 04:17:48.000000000 +0000 @@ -1 +1 @@ -{"package":"6ab62b46003ba97701554631fa570d9f7e7947e2480ae3d941e555a54a2c0f05","files":{}} +{"package":"Could not get crate checksum","files":{}} diff -Nru rust-libgit2-sys-0.7.7/debian/changelog rust-libgit2-sys-0.7.10/debian/changelog --- rust-libgit2-sys-0.7.7/debian/changelog 2018-08-03 13:41:12.000000000 +0000 +++ rust-libgit2-sys-0.7.10/debian/changelog 2018-12-09 04:17:48.000000000 +0000 @@ -1,3 +1,10 @@ +rust-libgit2-sys (0.7.10-1) unstable; urgency=medium + + * Team upload. + * Package libgit2-sys 0.7.10 from crates.io using debcargo 2.2.9 + + -- Matt Kraai Sat, 08 Dec 2018 20:17:48 -0800 + rust-libgit2-sys (0.7.7-1) unstable; urgency=medium * Package libgit2-sys 0.7.7 from crates.io using debcargo 2.2.5 diff -Nru rust-libgit2-sys-0.7.7/debian/control rust-libgit2-sys-0.7.10/debian/control --- rust-libgit2-sys-0.7.7/debian/control 2018-08-03 13:41:12.000000000 +0000 +++ rust-libgit2-sys-0.7.10/debian/control 2018-12-09 04:17:48.000000000 +0000 @@ -2,19 +2,19 @@ Section: rust Priority: optional Build-Depends: debhelper (>= 11), - dh-cargo (>= 6), + dh-cargo (>= 10), cargo:native , rustc:native , libstd-rust-dev , - librust-cc-1+default-dev , - librust-cmake-0.1+default-dev (>= 0.1.24~~) , + librust-cc-1+default-dev (>= 1.0.25-~~) , librust-libc-0.2+default-dev , - librust-libz-sys-1+default-dev (>= 1.0.18~~) , + librust-libz-sys-1+default-dev (>= 1.0.22-~~) , librust-pkg-config-0.3+default-dev , libgit2-dev Maintainer: Debian Rust Maintainers -Uploaders: Ximin Luo -Standards-Version: 4.1.5 +Uploaders: + Ximin Luo +Standards-Version: 4.2.0 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/libgit2-sys] Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/libgit2-sys @@ -23,10 +23,9 @@ Multi-Arch: same Depends: ${misc:Depends}, - librust-cc-1+default-dev, - librust-cmake-0.1+default-dev (>= 0.1.24~~), + librust-cc-1+default-dev (>= 1.0.25-~~), librust-libc-0.2+default-dev, - librust-libz-sys-1+default-dev (>= 1.0.18~~), + librust-libz-sys-1+default-dev (>= 1.0.22-~~), librust-pkg-config-0.3+default-dev, libgit2-dev Suggests: @@ -45,9 +44,9 @@ librust-libgit2-sys-0.7-dev (= ${binary:Version}), librust-libgit2-sys-0.7+default-dev (= ${binary:Version}), librust-libgit2-sys-0.7+ssh-key-from-memory-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+default-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+ssh-key-from-memory-dev (= ${binary:Version}) + librust-libgit2-sys-0.7.10-dev (= ${binary:Version}), + librust-libgit2-sys-0.7.10+default-dev (= ${binary:Version}), + librust-libgit2-sys-0.7.10+ssh-key-from-memory-dev (= ${binary:Version}) Description: Native bindings to the libgit2 library - Rust source code This package contains the source for the Rust libgit2-sys crate, packaged by debcargo for use with cargo and dh-cargo. @@ -58,11 +57,11 @@ Depends: ${misc:Depends}, librust-libgit2-sys-dev (= ${binary:Version}), - librust-curl-sys-0.4+default-dev (>= 0.4.6~~) + librust-curl-sys-0.4+default-dev (>= 0.4.10-~~) Provides: librust-libgit2-sys-0+curl-dev (= ${binary:Version}), librust-libgit2-sys-0.7+curl-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+curl-dev (= ${binary:Version}) + librust-libgit2-sys-0.7.10+curl-dev (= ${binary:Version}) Description: Native bindings to the libgit2 library - feature "curl" This metapackage enables feature curl for the Rust libgit2-sys crate, by pulling in any additional dependencies needed by that feature. @@ -73,11 +72,11 @@ Depends: ${misc:Depends}, librust-libgit2-sys-dev (= ${binary:Version}), - librust-curl-sys-0.4+default-dev (>= 0.4.6~~) + librust-curl-sys-0.4+default-dev (>= 0.4.10-~~) Provides: librust-libgit2-sys-0+curl-sys-dev (= ${binary:Version}), librust-libgit2-sys-0.7+curl-sys-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+curl-sys-dev (= ${binary:Version}) + librust-libgit2-sys-0.7.10+curl-sys-dev (= ${binary:Version}) Description: Native bindings to the libgit2 library - feature "curl-sys" This metapackage enables feature curl-sys for the Rust libgit2-sys crate, by pulling in any additional dependencies needed by that feature. @@ -92,7 +91,7 @@ Provides: librust-libgit2-sys-0+https-dev (= ${binary:Version}), librust-libgit2-sys-0.7+https-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+https-dev (= ${binary:Version}) + librust-libgit2-sys-0.7.10+https-dev (= ${binary:Version}) Description: Native bindings to the libgit2 library - feature "https" This metapackage enables feature https for the Rust libgit2-sys crate, by pulling in any additional dependencies needed by that feature. @@ -103,11 +102,11 @@ Depends: ${misc:Depends}, librust-libgit2-sys-dev (= ${binary:Version}), - librust-libssh2-sys-0.2+default-dev (>= 0.2.8~~) + librust-libssh2-sys-0.2+default-dev (>= 0.2.11-~~) Provides: librust-libgit2-sys-0+libssh2-sys-dev (= ${binary:Version}), librust-libgit2-sys-0.7+libssh2-sys-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+libssh2-sys-dev (= ${binary:Version}) + librust-libgit2-sys-0.7.10+libssh2-sys-dev (= ${binary:Version}) Description: Native bindings to the libgit2 library - feature "libssh2-sys" This metapackage enables feature libssh2-sys for the Rust libgit2-sys crate, by pulling in any additional dependencies needed by that feature. @@ -122,7 +121,7 @@ Provides: librust-libgit2-sys-0+openssl-sys-dev (= ${binary:Version}), librust-libgit2-sys-0.7+openssl-sys-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+openssl-sys-dev (= ${binary:Version}) + librust-libgit2-sys-0.7.10+openssl-sys-dev (= ${binary:Version}) Description: Native bindings to the libgit2 library - feature "openssl-sys" This metapackage enables feature openssl-sys for the Rust libgit2-sys crate, by pulling in any additional dependencies needed by that feature. @@ -133,11 +132,11 @@ Depends: ${misc:Depends}, librust-libgit2-sys-dev (= ${binary:Version}), - librust-libssh2-sys-0.2+default-dev (>= 0.2.8~~) + librust-libssh2-sys-0.2+default-dev (>= 0.2.11-~~) Provides: librust-libgit2-sys-0+ssh-dev (= ${binary:Version}), librust-libgit2-sys-0.7+ssh-dev (= ${binary:Version}), - librust-libgit2-sys-0.7.7+ssh-dev (= ${binary:Version}) + librust-libgit2-sys-0.7.10+ssh-dev (= ${binary:Version}) Description: Native bindings to the libgit2 library - feature "ssh" This metapackage enables feature ssh for the Rust libgit2-sys crate, by pulling in any additional dependencies needed by that feature. diff -Nru rust-libgit2-sys-0.7.7/debian/copyright.debcargo.hint rust-libgit2-sys-0.7.10/debian/copyright.debcargo.hint --- rust-libgit2-sys-0.7.7/debian/copyright.debcargo.hint 2018-08-03 13:41:12.000000000 +0000 +++ rust-libgit2-sys-0.7.10/debian/copyright.debcargo.hint 2018-12-09 04:17:48.000000000 +0000 @@ -22,7 +22,7 @@ Files: debian/* Copyright: 2018 Debian Rust Maintainers - 2018 FIXME (overlay) Your Name + 2018 Ximin Luo License: MIT or Apache-2.0 License: Apache-2.0 diff -Nru rust-libgit2-sys-0.7.7/debian/debcargo.toml rust-libgit2-sys-0.7.10/debian/debcargo.toml --- rust-libgit2-sys-0.7.7/debian/debcargo.toml 2018-08-03 13:41:12.000000000 +0000 +++ rust-libgit2-sys-0.7.10/debian/debcargo.toml 2018-12-09 04:17:48.000000000 +0000 @@ -1,4 +1,5 @@ overlay = "." +uploaders = ["Ximin Luo "] excludes = ["libgit2/**"] [packages.lib] diff -Nru rust-libgit2-sys-0.7.7/debian/patches/no-special-snowflake-env.patch rust-libgit2-sys-0.7.10/debian/patches/no-special-snowflake-env.patch --- rust-libgit2-sys-0.7.7/debian/patches/no-special-snowflake-env.patch 2018-08-03 13:41:12.000000000 +0000 +++ rust-libgit2-sys-0.7.10/debian/patches/no-special-snowflake-env.patch 2018-12-09 04:17:48.000000000 +0000 @@ -1,8 +1,10 @@ ---- libgit2-sys-0.6.19/build.rs.orig 2018-02-06 14:11:05.758487595 +0100 -+++ libgit2-sys-0.6.19/build.rs 2018-02-06 14:11:09.514541164 +0100 -@@ -31,10 +31,8 @@ - } - let has_pkgconfig = Command::new("pkg-config").output().is_ok(); +Index: libgit2-sys/build.rs +=================================================================== +--- libgit2-sys.orig/build.rs ++++ libgit2-sys/build.rs +@@ -11,10 +11,8 @@ fn main() { + 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() { diff -Nru rust-libgit2-sys-0.7.7/debian/watch rust-libgit2-sys-0.7.10/debian/watch --- rust-libgit2-sys-0.7.7/debian/watch 2018-08-03 13:41:12.000000000 +0000 +++ rust-libgit2-sys-0.7.10/debian/watch 2018-12-09 04:17:48.000000000 +0000 @@ -1,4 +1,5 @@ version=4 -opts=filenamemangle=s/.*\/(.*)\/download/libgit2-sys-$1\.tar\.gz/g\ - https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/libgit2-sys .*/crates/libgit2-sys/@ANY_VERSION@/download +opts=filenamemangle=s/.*\/(.*)\/download/libgit2-sys-$1\.tar\.gz/g,\ +uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ +https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/libgit2-sys .*/crates/libgit2-sys/@ANY_VERSION@/download