From 53fecf70e7e3da255831a1a0519f8cb1418b2fc2 Mon Sep 17 00:00:00 2001 From: demize Date: Sun, 16 Mar 2025 14:29:04 -0400 Subject: [PATCH] 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 --- 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 8fda65f025..6af483cb54 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 86d304325b..11f21661ed 100644 --- a/dev-vcs/jj/metadata.xml +++ b/dev-vcs/jj/metadata.xml @@ -8,4 +8,10 @@ jj-vcs/jj + + Enables transitory support for dev-libs/libgit2. + + Enables the "max-performance" feature when building gitoxide, allowing gitoxide to achieve better performance at the cost of wider compatibility. + +