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@unstable.systems>
This commit is contained in:
demize 2025-03-16 14:29:04 -04:00
parent da4a46ee96
commit 53fecf70e7
No known key found for this signature in database
GPG Key ID: AECE696834DC11E9
2 changed files with 30 additions and 5 deletions

View File

@ -17,13 +17,22 @@ LICENSE+="
Apache-2.0 BSD MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 WTFPL-2 Apache-2.0 BSD MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 WTFPL-2
" "
SLOT="0" SLOT="0"
IUSE="
+git2
gix-max-performance
"
BDEPEND="virtual/pkgconfig" BDEPEND="
virtual/pkgconfig
gix-max-performance? ( dev-build/cmake )
"
DEPEND=" DEPEND="
>=dev-libs/libgit2-1.9.0:0/1.9 git2? (
dev-libs/openssl:= >=dev-libs/libgit2-1.9.0:0/1.9
net-libs/libssh2:= sys-libs/zlib
sys-libs/zlib dev-libs/openssl:=
net-libs/libssh2:=
)
" "
RDEPEND=" RDEPEND="
${DEPEND} ${DEPEND}
@ -45,6 +54,16 @@ src_unpack() {
cargo_live_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() { src_install() {
cargo_src_install --path cli cargo_src_install --path cli
} }

View File

@ -8,4 +8,10 @@
<upstream> <upstream>
<remote-id type="github">jj-vcs/jj</remote-id> <remote-id type="github">jj-vcs/jj</remote-id>
</upstream> </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> </pkgmetadata>