Repository: eza-community/eza (language: rust)

Issue:
feat: Dynamically link libgit2.so
hi!

The `Cargo.toml` currently enables the `vendored-libgit2` feature unconditionally, I think this should default to off with an option to enable it (similar to the `vendored-openssl` feature that can optionally be enabled).

Thanks!


Discussion / hints:
Yes, this was introduced in #192 to ease packaging for debian/ubuntu. Perhaps @gierens can enable do this and enable the feature in the deb repository? 

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 0096cf043..f4800ef4f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -64,10 +64,6 @@ features = ["format"]
 version = "0.18"
 optional = true
 default-features = false
-# This builds libgit2 into the binary to avoid dependency problems on systems
-# that don't have the required version of libgit2 yet.
-# See: https://github.com/eza-community/eza/pull/192
-features = ["vendored-libgit2"]
 
 [target.'cfg(target_os = "linux")'.dependencies]
 proc-mounts = "0.3"
@@ -83,6 +79,7 @@ default-features = false
 default = [ "git" ]
 git = [ "git2" ]
 vendored-openssl = ["git2/vendored-openssl"]
+vendored-libgit2 = ["git2/vendored-libgit2"]
 
 
 # make dev builds faster by excluding debug symbols
diff --git a/devtools/deb-package.sh b/devtools/deb-package.sh
index 057cb79c7..0b1498d65 100755
--- a/devtools/deb-package.sh
+++ b/devtools/deb-package.sh
@@ -17,6 +17,9 @@ ARCH="amd64"
 DEB_TMP_DIR="${NAME}_${VERSION}_${ARCH}"
 DEB_PACKAGE="${NAME}_${VERSION}_${ARCH}.deb"
 
+cargo build --release --features vendored-libgit2
+just man
+
 read -r -d '' DEB_CONTROL << EOM
 Package: ${NAME}
 Version: ${VERSION}


Test patch: