commit: 53fecf70e7e3da255831a1a0519f8cb1418b2fc2
Author: demize <demize <AT> unstable <DOT> systems>
AuthorDate: Sun Mar 16 18:29:04 2025 +0000
Commit: demize <demize <AT> unstable <DOT> systems>
CommitDate: Sun Mar 16 18:32:55 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=53fecf70
dev-vcs/jj: add USE flags to live ebuild
This adds a git2 USE flag (enabled by default) to
match the git2 feature flag added by upstream.
This also adds a gix-max-performance USE flag to
match an existing featre flag. Upstream recommends
this be enabled by packagers, but I've left it
disabled by default here, as it comes with both a
dependency on cmake (for an unfortunately-vendored
zlib-ng) and potential incompatibilties (since it
uses assembly versions of SHA1 code in gitoxide).
Signed-off-by: demize <demize <AT> unstable.systems>
dev-vcs/jj/jj-9999.ebuild | 29 ++++++++++++++++++++++++-----
dev-vcs/jj/metadata.xml | 6 ++++++
2 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/dev-vcs/jj/jj-9999.ebuild b/dev-vcs/jj/jj-9999.ebuild
index 8fda65f02..6af483cb5 100644
--- a/dev-vcs/jj/jj-9999.ebuild
+++ b/dev-vcs/jj/jj-9999.ebuild
@@ -17,13 +17,22 @@ LICENSE+="
Apache-2.0 BSD MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 WTFPL-2
"
SLOT="0"
+IUSE="
+ +git2
+ gix-max-performance
+"
-BDEPEND="virtual/pkgconfig"
+BDEPEND="
+ virtual/pkgconfig
+ gix-max-performance? ( dev-build/cmake )
+"
DEPEND="
- >=dev-libs/libgit2-1.9.0:0/1.9
- dev-libs/openssl:=
- net-libs/libssh2:=
- sys-libs/zlib
+ git2? (
+ >=dev-libs/libgit2-1.9.0:0/1.9
+ sys-libs/zlib
+ dev-libs/openssl:=
+ net-libs/libssh2:=
+ )
"
RDEPEND="
${DEPEND}
@@ -45,6 +54,16 @@ src_unpack() {
cargo_live_src_unpack
}
+src_configure() {
+ local myfeatures=(
+ $(usev git2)
+ $(usev gix-max-performance)
+ watchman
+ git
+ )
+ cargo_src_configure --no-default-features
+}
+
src_install() {
cargo_src_install --path cli
}
diff --git a/dev-vcs/jj/metadata.xml b/dev-vcs/jj/metadata.xml
index 86d304325..11f21661e 100644
--- a/dev-vcs/jj/metadata.xml
+++ b/dev-vcs/jj/metadata.xml
@@ -8,4 +8,10 @@
<upstream>
<remote-id type="github">jj-vcs/jj</remote-id>
</upstream>
+ <use>
+ <flag name="git2">Enables transitory support for
<pkg>dev-libs/libgit2</pkg>.</flag>
+ <flag name="gix-max-performance">
+ Enables the "max-performance" feature when building gitoxide, allowing
gitoxide to achieve better performance at the cost of wider compatibility.
+ </flag>
+ </use>
</pkgmetadata>