Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bat: Update to 0.23.0 #1401

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions build_info/bat.control
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 0 additions & 13 deletions build_patch/bat/thing.patch

This file was deleted.

25 changes: 25 additions & 0 deletions build_patch/bat/use-git2-fork.patch
Original file line number Diff line number Diff line change
@@ -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

8 changes: 3 additions & 5 deletions makefiles/bat.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down