diff --git a/build_info/bat.control b/build_info/bat.control index 9cbd78c336..518592894a 100644 --- a/build_info/bat.control +++ b/build_info/bat.control @@ -13,9 +13,6 @@ Description: cat(1) clone with syntax highlighting and git integration * automatic paging; * a user-friendly command-line interface. . - In this package the executable and its manpage have been renamed from ‘bat’ to - ‘batcat’ because of a file name clash with another Debian package. - . This package contains the following binaries built from the Rust crate "bat": - bat diff --git a/build_patch/bat/thing.patch b/build_patch/bat/thing.patch deleted file mode 100644 index 0f3a7d2376..0000000000 --- a/build_patch/bat/thing.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Cargo.toml b/Cargo.toml -index f0eb26c0..4d88f27a 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -67,7 +67,7 @@ - bytesize = { version = "1.1.0" } - - [dependencies.git2] --version = "0.14" -+git = "https://github.com/Teutates/git2-rs" - optional = true - default-features = false - diff --git a/build_patch/bat/use-git2-fork.patch b/build_patch/bat/use-git2-fork.patch new file mode 100644 index 0000000000..cd7ef06076 --- /dev/null +++ b/build_patch/bat/use-git2-fork.patch @@ -0,0 +1,25 @@ +Use different git2 fork when building. + +The git2-rs maintainers do not understand the difference +between ABI and API changes and ruin our system library +linking. This forces us (the Procursus Team) to patch +their mistakes to support projects that depend on their +work. + +See the link below for more info. + +https://github.com/rust-lang/git2-rs/pull/859 +================================================= +diff --git a/Cargo.toml b/Cargo.toml +index f0eb26c0..4d88f27a 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -68,7 +68,7 @@ + bytesize = { version = "1.1.0" } + + [dependencies.git2] +-version = "0.16" ++git = "https://github.com/Teutates/git2-rs" + optional = true + default-features = false + diff --git a/makefiles/bat.mk b/makefiles/bat.mk index 691939c83c..99bf24e7c4 100644 --- a/makefiles/bat.mk +++ b/makefiles/bat.mk @@ -3,22 +3,20 @@ $(error Use the main Makefile) endif SUBPROJECTS += bat -BAT_VERSION := 0.21.0 -DEB_BAT_V ?= $(BAT_VERSION)-1 +BAT_VERSION := 0.23.0 +DEB_BAT_V ?= $(BAT_VERSION) bat-setup: setup $(call GITHUB_ARCHIVE,sharkdp,bat,$(BAT_VERSION),v$(BAT_VERSION)) $(call EXTRACT_TAR,bat-$(BAT_VERSION).tar.gz,bat-$(BAT_VERSION),bat) -# Remove after https://github.com/rust-lang/git2-rs/pull/859 is merged. -# If said pull request is denied, move to maintaining fork from upstream. $(call DO_PATCH,bat,bat,-p1) + sed -i "20d;63d" $(BUILD_WORK)/bat/Cargo.toml ifneq ($(wildcard $(BUILD_WORK)/bat/.build_complete),) bat: @echo "Using previously built bat." else bat: bat-setup libgit2 - cd $(BUILD_WORK)/bat && cargo update cd $(BUILD_WORK)/bat && $(DEFAULT_RUST_FLAGS) cargo build \ --release \ --target=$(RUST_TARGET)