From 2fd57282f0262ca084e05b0f2c63fbada395d02b Mon Sep 17 00:00:00 2001
From: V3n3RiX <venerix@koprulu.sector>
Date: Sun, 16 Jan 2022 20:27:28 +0000
Subject: gentoo resync : 16.01.2021

---
 dev-vcs/Manifest.gz                                | Bin 10840 -> 10839 bytes
 dev-vcs/git/Manifest                               |  20 +-
 dev-vcs/git/git-2.32.0-r1.ebuild                   |   4 +-
 dev-vcs/git/git-2.33.1.ebuild                      |   4 +-
 dev-vcs/git/git-2.34.1-r1.ebuild                   |   4 +-
 dev-vcs/git/git-2.34.1.ebuild                      |   4 +-
 dev-vcs/git/git-2.35.0_rc1.ebuild                  | 660 +++++++++++++++++++++
 dev-vcs/git/git-9999-r1.ebuild                     |   4 +-
 dev-vcs/git/git-9999-r2.ebuild                     |   4 +-
 dev-vcs/git/git-9999-r3.ebuild                     |   4 +-
 dev-vcs/git/git-9999.ebuild                        |   4 +-
 dev-vcs/mercurial/Manifest                         |   7 +-
 .../files/mercurial-6.0-testing-bigendian.patch    | 255 --------
 dev-vcs/mercurial/mercurial-6.0.1.ebuild           | 306 ++++++++++
 dev-vcs/mercurial/mercurial-6.0.ebuild             | 310 ----------
 dev-vcs/mercurial/mercurial-9999.ebuild            |   3 +-
 dev-vcs/qgit/Manifest                              |   2 +
 dev-vcs/qgit/qgit-2.10.ebuild                      |  27 +
 dev-vcs/stgit/Manifest                             |   4 +-
 dev-vcs/stgit/stgit-1.1.ebuild                     |  79 ---
 dev-vcs/stgit/stgit-1.4.ebuild                     |   4 +-
 dev-vcs/tig/Manifest                               |   4 +-
 dev-vcs/tig/tig-2.5.5.ebuild                       |  66 +++
 dev-vcs/tig/tig-9999.ebuild                        |  22 +-
 24 files changed, 1113 insertions(+), 688 deletions(-)
 create mode 100644 dev-vcs/git/git-2.35.0_rc1.ebuild
 delete mode 100644 dev-vcs/mercurial/files/mercurial-6.0-testing-bigendian.patch
 create mode 100644 dev-vcs/mercurial/mercurial-6.0.1.ebuild
 delete mode 100644 dev-vcs/mercurial/mercurial-6.0.ebuild
 create mode 100644 dev-vcs/qgit/qgit-2.10.ebuild
 delete mode 100644 dev-vcs/stgit/stgit-1.1.ebuild
 create mode 100644 dev-vcs/tig/tig-2.5.5.ebuild

(limited to 'dev-vcs')

diff --git a/dev-vcs/Manifest.gz b/dev-vcs/Manifest.gz
index 5c725c547514..147a130fb011 100644
Binary files a/dev-vcs/Manifest.gz and b/dev-vcs/Manifest.gz differ
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
index 45e4a2452413..c7863b4afcb8 100644
--- a/dev-vcs/git/Manifest
+++ b/dev-vcs/git/Manifest
@@ -16,18 +16,22 @@ AUX git-daemon_at-r1.service 340 BLAKE2B 879db8b274d8e1d2995a2ea1e4b1d66cac3d697
 DIST git-2.32.0.tar.xz 6551348 BLAKE2B 546203ce3f749ba806866a9e9767bc807794cec435fd0b60306ae6cd2b1b17a0159ef9774c79c4f59d0dba45b36941085b55f103e1820450d560bffa41d1058f SHA512 1ab3e7022ccee411d14a7da5c37d6259ef5c0f85ebed8f49698e25c65cbc7a46f8096919fcb6568360bfe284dd7475b596eee1a167db966096255a405853837c
 DIST git-2.33.1.tar.xz 6558636 BLAKE2B f4959d5309f85e063448673a3f06f1d3cdd65ced5f5173cfe5a38df3b5547cae1c08275bda02e48307e8290628735e2ea1ff49222262e7cd29b252a6aa4d4a15 SHA512 16d417183232e1057bea754d59cdf4bbacc5f1527d1de6ee04cdd293a2512bfa7208e20f6130816605528b59cb1bc3188c5bddf1a42c1413095ee74e44dd2f91
 DIST git-2.34.1.tar.xz 6623760 BLAKE2B 9b5d7a450ec495898bcc0e1f6ae87c0ad102d039cf7c4106cdfe3ada501d9bfaf22b83c522de383d3c01f7d5a29dbfd7fc44b371efa8fc3a418ab3c609a692c1 SHA512 a1a8e9e6f64b1da25508fbd2f783564dcdbe181fb5ff1ebab3bdac6db6094e18acc334479a1abf22ac17ce4f733cc3e10a664db9ab234cd523735a3f027b42db
+DIST git-2.35.0.rc1.tar.xz 6865756 BLAKE2B 6e55dc6d7f040ce066380745fc9d213adbefe4f3c7c09cf3a3a1557cdfc756f5f1baff4028061820ad45383e2d16efc0a651b36b9dd4268c3ebbca5d0450215a SHA512 fe7fdf5dfa9f3c7ac89158fd73520335cb0c10ab992258dbb88ee1a90b03f4f8bfbe490dcf704770e91245e162014deb400f3b507dd6fda4f52b01c16081b2cd
 DIST git-htmldocs-2.32.0.tar.xz 1381664 BLAKE2B d1b47aa99d32a252fd20df26eff44a558044f3a389379b161bb43621eb28375eb0621969849a31938ba7fc9fc58b140d27d703559ea5735d0a0ffd2e93cd9692 SHA512 12b84e342f0d19afe385ab8a685ae625e86c3295d1555992e0c427b361aa2cdfc89a679e7dbc468d3568a325dafbf699468aadcdb02f93e372eff3dd96a7cf7f
 DIST git-htmldocs-2.33.1.tar.xz 1396744 BLAKE2B cbd65cf08fc7ea466fcd72820ba3e2135ade37f69c436a4ee7276dc71fb62f6270b71e2f46d981f5681a0fd3c30613d61680c2ef2460d0d7d292f7455e114128 SHA512 5b856b919067e1f644539d43a85aab6f602537ea0970b6248b471e3fa6756a8494f0525a69d22ad3795fcf9e106ff8439e0f6716ba0b8c895d7aad8c59e5bd74
 DIST git-htmldocs-2.34.1.tar.xz 1406464 BLAKE2B 6ee2f58df3c1622d96ac4b1a70d4dc3d0c973635774dd6bb89fea3e502dd82d99d676e2f9cb33c14c429c3d4680cd6020213154099b3f7fe71ad67602ca9bc6c SHA512 cf9fa952d43e477528deece9f22d1bb63fa50b3a831fae20812c6af31c1dbaf193abe2fed48ac9966bcf1787442ceed19f00c00e524a1911f0ea31952a52fc8f
+DIST git-htmldocs-2.35.0.rc1.tar.xz 1410404 BLAKE2B 4d3202d31e71ce3b72f4d2fa503fe16a79af22120635da5de511f8f2f7d586fc11b8d74c05782a7ce867f80973c6a3fec4580eccd3a6c6307856aad818e8251f SHA512 87b9b24b4faf9ede8b2200eadd80dcf2b0011ae5cda477f9161a89853f4583a794d541343b9c4fefec341ecbeded2185ba550e5701858b13f7ac66dfcc1395df
 DIST git-manpages-2.32.0.tar.xz 491868 BLAKE2B 7598a864246aed771371924604ee13d3f51b839b10b254bb1159dd47266513f5cd6484aab200a7b4ed427edc76538a98e39a040a17201483965175f5e1c5f484 SHA512 5c9950bd5d6904972cddf4afad534197d843c0dee8198d14ec5a3448873cab37dac88295b2a4df3658749f048bda4800b54fdc850517be7208906c911832c66e
 DIST git-manpages-2.33.1.tar.xz 494288 BLAKE2B 1f8bd4f23de31a285d3f4327e562dddafdf9f28e8b36334e54f5e280c81fc8170e8b153ca42baa642d02d8e6fdfcac9a8fdd3cee1e32c29bcd53f689d1a6c463 SHA512 d465a7b491046b7a5da6ad1fc6c62b351c69905932e0672263de5a1d3abe1113660cff9fe30c7be1d1695c6170ceca5a11b3f65e9b2d1545f35cc653e4c6ad62
 DIST git-manpages-2.34.1.tar.xz 497280 BLAKE2B aa3c67cec861eb40eda3e7827d3e380fdfb6f189027fb7e5618258b80ac33918cb3c2ca4d2f8dc5fbee959578766564137e9c4818672f5138304270c486658fe SHA512 8f3b56fa477e5aafec3ef29933234c362a372f59ed95694c4fb82ebb82d2a8ebc0ac17ae36caa9185964eef1700ea8732816e73df4ddd918afc949a8371fa0d8
-EBUILD git-2.32.0-r1.ebuild 17990 BLAKE2B 82b6dbbc1e95178bd988f02c37cddec6a0e36489baf73ea3ebc875f8a1c4fbc2bffde169e43cf47042460e7ae15d2c5843d7f97544b90949297f07db835e08a2 SHA512 1c3a49115a87fffcd664ac413601a2c2dad631f7fd6660881d300869c3ea707197b9932d843333749925e9d96fe84c52b1f5202bc256956fa6b303f4517cf787
-EBUILD git-2.33.1.ebuild 17886 BLAKE2B 3e21f1806e2b3ccecf9de213a5edd0c287004ede5e5653469e7575acf928b8e207a7e8b1b660125797b74e539041f66f23f2272896cb32a57f52fd24945e3354 SHA512 dbdcdcd1a508a4bd8423939bb6ee0ce1510f12f2ec8b0fa02752454fdcddc4fbd786b99bb15ea11f4906001ec67b57aefdf9de038a1ccdcff1ab6c1165c67060
-EBUILD git-2.34.1-r1.ebuild 17893 BLAKE2B fa3da8c57ae9571816599eae3d036daba285c7abd213041dc23c5de42dcebc90f5e0b9a0049508f86a3dc88fc112e5d537ced3b19682d31492d3d2a0fc03571f SHA512 8fd18136791a45c7e205aac6a4453d376287daa27abc28f5263bedd986c4e562c78b83c036193583c5145d697b1c3c1df1d36557f5f01cc92b94565efa484f18
-EBUILD git-2.34.1.ebuild 17885 BLAKE2B 016e3535fe918c345f42c0f0eb8d09a523c3c57529ddeb26a677aa0d3a74f78b26ccede54407485642652f64c4df9d1a6bec80f7792d6bfedecb7d52a9529db8 SHA512 401e8dacfc58c8b8b76393473c8ae809b77c088b461e1fb2a4ba148c1811144cd43d40f977ade29d1386f094b76ceb85d7e0f55a1baf2ef95ee7047120c70c4d
-EBUILD git-9999-r1.ebuild 17893 BLAKE2B fa3da8c57ae9571816599eae3d036daba285c7abd213041dc23c5de42dcebc90f5e0b9a0049508f86a3dc88fc112e5d537ced3b19682d31492d3d2a0fc03571f SHA512 8fd18136791a45c7e205aac6a4453d376287daa27abc28f5263bedd986c4e562c78b83c036193583c5145d697b1c3c1df1d36557f5f01cc92b94565efa484f18
-EBUILD git-9999-r2.ebuild 17893 BLAKE2B fa3da8c57ae9571816599eae3d036daba285c7abd213041dc23c5de42dcebc90f5e0b9a0049508f86a3dc88fc112e5d537ced3b19682d31492d3d2a0fc03571f SHA512 8fd18136791a45c7e205aac6a4453d376287daa27abc28f5263bedd986c4e562c78b83c036193583c5145d697b1c3c1df1d36557f5f01cc92b94565efa484f18
-EBUILD git-9999-r3.ebuild 17893 BLAKE2B fa3da8c57ae9571816599eae3d036daba285c7abd213041dc23c5de42dcebc90f5e0b9a0049508f86a3dc88fc112e5d537ced3b19682d31492d3d2a0fc03571f SHA512 8fd18136791a45c7e205aac6a4453d376287daa27abc28f5263bedd986c4e562c78b83c036193583c5145d697b1c3c1df1d36557f5f01cc92b94565efa484f18
-EBUILD git-9999.ebuild 17893 BLAKE2B fa3da8c57ae9571816599eae3d036daba285c7abd213041dc23c5de42dcebc90f5e0b9a0049508f86a3dc88fc112e5d537ced3b19682d31492d3d2a0fc03571f SHA512 8fd18136791a45c7e205aac6a4453d376287daa27abc28f5263bedd986c4e562c78b83c036193583c5145d697b1c3c1df1d36557f5f01cc92b94565efa484f18
+DIST git-manpages-2.35.0.rc1.tar.xz 497540 BLAKE2B 02eef1be106d7d2e13d367d837a8c262f1da9ef4463e8e961048142066e4b5cf0d85cc6d281663a3ac34bf4c90dcc151168b42bea9bfdece45b3179d707ffc15 SHA512 391257f5906703005108d612ad308bf6ad3c54f2efccd908de5ea84bfe06b7259cca8f9ab43b48780a91dc16db986beb6f5606b01a7ee5f5d05c9e6022d379cd
+EBUILD git-2.32.0-r1.ebuild 17992 BLAKE2B 703f1d8fb18c0ec56be69c58bdf6a9048d551b76cf62f914f3f888992c34c394f131d1e104238af55c276170b34f5687e0fa664f8fbd880fdbe70bb00fd749dd SHA512 8d3a490eb7ca1b2202ff4d45453ea1e57631c7abf2d6973f1b24150a6461b880c80702bc0dec756e7cdc4cb6d0102005b346f6b5653d932d046f1a7c68495547
+EBUILD git-2.33.1.ebuild 17888 BLAKE2B 76bf11b57727a9c2a8d9cf30f75a13f9ae5fd6942c974dc53e651e24a3069da5fa311cc44d9c98bcfbb4c07eae50e8910d8903e70eae82d52bb621d9d314886f SHA512 9649794b74c0ab250996806b5336878c44865175b5f81528b9f68992f732b4fe2c45a57826882722b78c1313b6285447b85f48671bb84a981e025d92684c125c
+EBUILD git-2.34.1-r1.ebuild 17895 BLAKE2B 93a38c9adc4d3c681e7c5a03ae541e1369d3dc46bc247bb40d3f82ea30e21cd29dbf54efc492b533541bece6080dac5194d01eb9b4995e223a31cd8ecbe48b4a SHA512 c3c4b9c28775d43a9353a4987a89d28565bfb7b171bfb058086db85635ec75df45f69f3d325e260a6472f0f449f21a49cfd38b02ebbebf61f461bd4f17392478
+EBUILD git-2.34.1.ebuild 17887 BLAKE2B 3823133aa91e9fb11e7ed1f4094cbdc27b94cc8e45bbed46c82d671ada31ec698984cddfd05c81f829ff58b041e5c43bc908e876a2f71ca117d3c00636ef65fa SHA512 2ae6cff9fbbcf4c6b00a5f623685236a41651b17a45d6b850962846202d147702c4aac7c46120b7772464d2b318994a3c68c4bf3323f4b6f01e8f799a5a414ed
+EBUILD git-2.35.0_rc1.ebuild 17895 BLAKE2B 93a38c9adc4d3c681e7c5a03ae541e1369d3dc46bc247bb40d3f82ea30e21cd29dbf54efc492b533541bece6080dac5194d01eb9b4995e223a31cd8ecbe48b4a SHA512 c3c4b9c28775d43a9353a4987a89d28565bfb7b171bfb058086db85635ec75df45f69f3d325e260a6472f0f449f21a49cfd38b02ebbebf61f461bd4f17392478
+EBUILD git-9999-r1.ebuild 17895 BLAKE2B 93a38c9adc4d3c681e7c5a03ae541e1369d3dc46bc247bb40d3f82ea30e21cd29dbf54efc492b533541bece6080dac5194d01eb9b4995e223a31cd8ecbe48b4a SHA512 c3c4b9c28775d43a9353a4987a89d28565bfb7b171bfb058086db85635ec75df45f69f3d325e260a6472f0f449f21a49cfd38b02ebbebf61f461bd4f17392478
+EBUILD git-9999-r2.ebuild 17895 BLAKE2B 93a38c9adc4d3c681e7c5a03ae541e1369d3dc46bc247bb40d3f82ea30e21cd29dbf54efc492b533541bece6080dac5194d01eb9b4995e223a31cd8ecbe48b4a SHA512 c3c4b9c28775d43a9353a4987a89d28565bfb7b171bfb058086db85635ec75df45f69f3d325e260a6472f0f449f21a49cfd38b02ebbebf61f461bd4f17392478
+EBUILD git-9999-r3.ebuild 17895 BLAKE2B 93a38c9adc4d3c681e7c5a03ae541e1369d3dc46bc247bb40d3f82ea30e21cd29dbf54efc492b533541bece6080dac5194d01eb9b4995e223a31cd8ecbe48b4a SHA512 c3c4b9c28775d43a9353a4987a89d28565bfb7b171bfb058086db85635ec75df45f69f3d325e260a6472f0f449f21a49cfd38b02ebbebf61f461bd4f17392478
+EBUILD git-9999.ebuild 17895 BLAKE2B 93a38c9adc4d3c681e7c5a03ae541e1369d3dc46bc247bb40d3f82ea30e21cd29dbf54efc492b533541bece6080dac5194d01eb9b4995e223a31cd8ecbe48b4a SHA512 c3c4b9c28775d43a9353a4987a89d28565bfb7b171bfb058086db85635ec75df45f69f3d325e260a6472f0f449f21a49cfd38b02ebbebf61f461bd4f17392478
 MISC metadata.xml 2225 BLAKE2B 3744d602bb87d31fa9da5a4f6cc78e1d7251024323d1c2ad3f3e0b2ef78de61041fecf7026f0ada5d856139852776e8539b0a9f9fb5b32b3ae742ae6a9d09cda SHA512 3629e08d8ecfe05cc194f3ba03656308da2c7bcac5bd33cbc967b5a4269a60538ff4e119fb9d1a4e59c5d53c31659c55d5fdd0ee52473175147f8fae73a4cd22
diff --git a/dev-vcs/git/git-2.32.0-r1.ebuild b/dev-vcs/git/git-2.32.0-r1.ebuild
index 6c3d422fd38b..c2d24bdf91ed 100644
--- a/dev-vcs/git/git-2.32.0-r1.ebuild
+++ b/dev-vcs/git/git-2.32.0-r1.ebuild
@@ -315,7 +315,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -362,7 +362,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/git/git-2.33.1.ebuild b/dev-vcs/git/git-2.33.1.ebuild
index 26673133f9f9..ab8a8a02552e 100644
--- a/dev-vcs/git/git-2.33.1.ebuild
+++ b/dev-vcs/git/git-2.33.1.ebuild
@@ -311,7 +311,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -358,7 +358,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/git/git-2.34.1-r1.ebuild b/dev-vcs/git/git-2.34.1-r1.ebuild
index c77551019c67..075208f7ce0d 100644
--- a/dev-vcs/git/git-2.34.1-r1.ebuild
+++ b/dev-vcs/git/git-2.34.1-r1.ebuild
@@ -311,7 +311,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -358,7 +358,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/git/git-2.34.1.ebuild b/dev-vcs/git/git-2.34.1.ebuild
index 30f56796419f..99934132cd97 100644
--- a/dev-vcs/git/git-2.34.1.ebuild
+++ b/dev-vcs/git/git-2.34.1.ebuild
@@ -311,7 +311,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -358,7 +358,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/git/git-2.35.0_rc1.ebuild b/dev-vcs/git/git-2.35.0_rc1.ebuild
new file mode 100644
index 000000000000..075208f7ce0d
--- /dev/null
+++ b/dev-vcs/git/git-2.35.0_rc1.ebuild
@@ -0,0 +1,660 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit toolchain-funcs elisp-common perl-module bash-completion-r1 plocale python-single-r1 systemd
+
+PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
+	# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
+	# See https://git-scm.com/docs/gitworkflows#_graduation
+	# In order of stability:
+	# 9999-r0: maint
+	# 9999-r1: master
+	# 9999-r2: next
+	# 9999-r3: seen
+	case "${PVR}" in
+		9999) EGIT_BRANCH=maint ;;
+		9999-r1) EGIT_BRANCH=master ;;
+		9999-r2) EGIT_BRANCH=next;;
+		9999-r3) EGIT_BRANCH=seen ;;
+	esac
+fi
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER="${MY_PV}"
+
+DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
+HOMEPAGE="https://www.git-scm.com/"
+if [[ ${PV} != *9999 ]]; then
+	SRC_URI_SUFFIX="xz"
+	SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
+	[[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
+	SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
+			${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+			doc? (
+			${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+			)"
+	[[ "${PV}" == *_rc* ]] || \
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test"
+
+# Common to both DEPEND and RDEPEND
+DEPEND="
+	gnome-keyring? (
+		app-crypt/libsecret
+		dev-libs/glib:2
+	)
+	dev-libs/openssl:0=
+	sys-libs/zlib
+	pcre? ( dev-libs/libpcre2:= )
+	perl? ( dev-lang/perl:=[-build(-)] )
+	tk? ( dev-lang/tk:0= )
+	curl? (
+		net-misc/curl
+		webdav? ( dev-libs/expat )
+	)
+	iconv? ( virtual/libiconv )
+"
+
+RDEPEND="${DEPEND}
+	gpg? ( app-crypt/gnupg )
+	perl? (
+		dev-perl/Error
+		dev-perl/MailTools
+		dev-perl/Authen-SASL
+		>=virtual/perl-libnet-3.110.0-r4[ssl]
+		cgi? (
+			dev-perl/CGI
+			highlight? ( app-text/highlight )
+		)
+		cvs? (
+			>=dev-vcs/cvsps-2.1:0
+			dev-perl/DBI
+			dev-perl/DBD-SQLite
+		)
+		mediawiki? (
+			dev-perl/DateTime-Format-ISO8601
+			dev-perl/HTML-Tree
+			dev-perl/MediaWiki-API
+		)
+		subversion? (
+			dev-vcs/subversion[-dso(-),perl]
+			dev-perl/libwww-perl
+			dev-perl/TermReadKey
+		)
+	)
+	perforce? ( ${PYTHON_DEPS} )
+"
+
+# This is how info docs are created with Git:
+#   .txt/asciidoc --(asciidoc)---------> .xml/docbook
+#   .xml/docbook  --(docbook2texi.pl)--> .texi
+#   .texi         --(makeinfo)---------> .info
+BDEPEND="
+	doc? (
+		app-text/asciidoc
+		app-text/docbook2X
+		app-text/xmlto
+		sys-apps/texinfo
+	)
+	emacs? ( >=app-editors/emacs-23.1:* )
+	gnome-keyring? ( virtual/pkgconfig )
+	nls? ( sys-devel/gettext )
+	test? (	app-crypt/gnupg	)
+"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+	BDEPEND="${BDEPEND}
+		app-text/asciidoc"
+fi
+
+SITEFILE="50${PN}-gentoo.el"
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+	cgi? ( perl )
+	cvs? ( perl )
+	mediawiki? ( perl )
+	mediawiki-experimental? ( mediawiki )
+	perforce? ( ${PYTHON_REQUIRED_USE} )
+	subversion? ( perl )
+	webdav? ( curl )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+	# bug #350330 - automagic CVS when we don't want it is bad.
+	"${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
+
+	# Make submodule output quiet
+	"${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
+)
+
+pkg_setup() {
+	if use subversion && has_version "dev-vcs/subversion[dso]" ; then
+		ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
+		ewarn "with USE=dso, there may be weird crashes in git-svn. You"
+		ewarn "have been warned."
+	fi
+
+	if use perforce ; then
+		python-single-r1_pkg_setup
+	fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+	local extlibs myopts
+
+	myopts=(
+		ASCIIDOC_NO_ROFF=YesPlease
+		$(usex cvs '' NO_CVS=YesPlease)
+		$(usex elibc_musl NO_REGEX=YesPlease '')
+		$(usex iconv '' NO_ICONV=YesPlease)
+		$(usex nls '' NO_GETTEXT=YesPlease)
+		$(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
+		$(usex perforce '' NO_PYTHON=YesPlease)
+		$(usex subversion '' NO_SVN_TESTS=YesPlease)
+		$(usex threads '' NO_PTHREADS=YesPlease)
+		$(usex tk '' NO_TCLTK=YesPlease)
+	)
+
+	if use blksha1 ; then
+		myopts+=( BLK_SHA1=YesPlease )
+	elif use ppcsha1 ; then
+		myopts+=( PPC_SHA1=YesPlease )
+	fi
+
+	if use curl ; then
+		use webdav || myopts+=( NO_EXPAT=YesPlease )
+	else
+		myopts+=( NO_CURL=YesPlease )
+	fi
+
+	# broken assumptions, because of static build system ...
+	myopts+=(
+		NO_FINK=YesPlease
+		NO_DARWIN_PORTS=YesPlease
+		INSTALL=install
+		TAR=tar
+		SHELL_PATH="${EPREFIX}/bin/sh"
+		SANE_TOOL_PATH=
+		OLD_ICONV=
+		NO_EXTERNAL_GREP=
+	)
+
+	# can't define this to null, since the entire makefile depends on it
+	sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
+
+	if use pcre; then
+		myopts+=( USE_LIBPCRE2=YesPlease )
+		extlibs+=( -lpcre2-8 )
+	fi
+	if [[ ${CHOST} == *-solaris* ]]; then
+		myopts+=(
+			NEEDS_LIBICONV=YesPlease
+			HAVE_CLOCK_MONOTONIC=1
+		)
+		if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
+			myopts+=( HAVE_GETDELIM=1 )
+		fi
+	fi
+
+	if has_version '>=app-text/asciidoc-8.0' ; then
+		myopts+=( ASCIIDOC8=YesPlease )
+	fi
+
+	export MY_MAKEOPTS="${myopts[@]}"
+	export EXTLIBS="${extlibs[@]}"
+}
+
+src_unpack() {
+	if [[ ${PV} != *9999 ]] ; then
+		unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+		cd "${S}" || die
+		unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+		if use doc ; then
+			pushd "${S}"/Documentation &>/dev/null || die
+			unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+			popd &>/dev/null || die
+		fi
+	else
+		git-r3_src_unpack
+		#cp "${FILESDIR}"/GIT-VERSION-GEN .
+	fi
+
+}
+
+src_prepare() {
+	# add experimental patches to improve mediawiki support
+	# see patches for origin
+	if use mediawiki-experimental ; then
+		PATCHES+=(
+			"${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
+			"${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
+			"${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
+		)
+	fi
+
+	default
+
+	if use prefix ; then
+		# bug #757309
+		eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
+	fi
+
+	sed -i \
+		-e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
+		-e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
+		-e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
+		-e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
+		-e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+		-e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
+		Makefile || die
+
+	# Fix docbook2texi command
+	sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
+		Documentation/Makefile || die
+}
+
+git_emake() {
+	# bug #320647: PYTHON_PATH
+	local PYTHON_PATH=""
+	use perforce && PYTHON_PATH="${PYTHON}"
+	emake ${MY_MAKEOPTS} \
+		prefix="${EPREFIX}"/usr \
+		htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+		perllibdir="$(use perl && perl_get_raw_vendorlib)" \
+		sysconfdir="${EPREFIX}"/etc \
+		GIT_TEST_OPTS="--no-color" \
+		OPTAR="$(tc-getAR)" \
+		OPTCC="$(tc-getCC)" \
+		OPTCFLAGS="${CFLAGS}" \
+		OPTLDFLAGS="${LDFLAGS}" \
+		PERL_PATH="${EPREFIX}/usr/bin/perl" \
+		PERL_MM_OPT="" \
+		PYTHON_PATH="${PYTHON_PATH}" \
+		V=1 \
+		"$@"
+}
+
+src_configure() {
+	exportmakeopts
+}
+
+src_compile() {
+	git_emake || die "emake failed"
+
+	if use emacs ; then
+		elisp-compile contrib/emacs/git{,-blame}.el
+	fi
+
+	if use perl && use cgi ; then
+		git_emake gitweb || die "emake gitweb (cgi) failed"
+	fi
+
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
+		pushd contrib/credential/osxkeychain &>/dev/null || die
+		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
+			|| die "emake credential-osxkeychain"
+		popd &>/dev/null || die
+	fi
+
+	pushd Documentation &>/dev/null || die
+	if [[ ${PV} == *9999 ]] ; then
+		git_emake man || die "emake man failed"
+		if use doc ; then
+			git_emake info html || die "emake info html failed"
+		fi
+	else
+		if use doc ; then
+			git_emake info || die "emake info html failed"
+		fi
+	fi
+	popd &>/dev/null || die
+
+	if use gnome-keyring ; then
+		pushd contrib/credential/libsecret &>/dev/null || die
+		git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
+		popd &>/dev/null || die
+	fi
+
+	pushd contrib/subtree &>/dev/null || die
+	git_emake git-subtree || die
+	# git-subtree.1 requires the full USE=doc dependency stack
+	use doc && git_emake git-subtree.html git-subtree.1
+	popd &>/dev/null || die
+
+	pushd contrib/diff-highlight &>/dev/null || die
+	git_emake || die
+	popd &>/dev/null || die
+
+	if use mediawiki ; then
+		pushd contrib/mw-to-git &>/dev/null || die
+		git_emake || die
+		popd &>/dev/null || die
+
+	fi
+}
+
+src_install() {
+	git_emake DESTDIR="${D}" install || die "make install failed"
+
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
+		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
+	fi
+
+	# Depending on the tarball and manual rebuild of the documentation, the
+	# manpages may exist in either OR both of these directories.
+	find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
+	find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
+	dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
+	use doc && dodir /usr/share/doc/${PF}/html
+	local d
+	for d in / /howto/ /technical/ ; do
+		docinto ${d}
+		dodoc Documentation${d}*.txt
+		if use doc ; then
+			docinto ${d}/html
+			dodoc Documentation${d}*.html
+		fi
+	done
+	docinto /
+	# Upstream does not ship this pre-built :-(
+	use doc && doinfo Documentation/{git,gitman}.info
+
+	newbashcomp contrib/completion/git-completion.bash ${PN}
+	bashcomp_alias git gitk
+	# Not really a bash-completion file (bug #477920)
+	# but still needed uncompressed (bug #507480)
+	insinto /usr/share/${PN}
+	doins contrib/completion/git-prompt.sh
+
+	if use emacs ; then
+		elisp-install ${PN} contrib/emacs/git.{el,elc}
+		elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+		#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
+		# don't add automatically to the load-path, so the sitefile
+		# can do a conditional loading
+		touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+	fi
+
+	#dobin contrib/fast-import/git-p4 # Moved upstream
+	#dodoc contrib/fast-import/git-p4.txt # Moved upstream
+	newbin contrib/fast-import/import-tars.perl import-tars
+	exeinto /usr/libexec/git-core/
+	newexe contrib/git-resurrect.sh git-resurrect
+
+	# git-subtree
+	pushd contrib/subtree &>/dev/null || die
+	git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
+	if use doc ; then
+		# Do not move git subtree install-man outside USE=doc!
+		git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
+	fi
+	newdoc README README.git-subtree
+	dodoc git-subtree.txt
+	popd &>/dev/null || die
+
+	if use mediawiki ; then
+		pushd contrib/mw-to-git &>/dev/null || die
+		git_emake DESTDIR="${D}" install
+		popd &>/dev/null || die
+	fi
+
+	# diff-highlight
+	dobin contrib/diff-highlight/diff-highlight
+	newdoc contrib/diff-highlight/README README.diff-highlight
+
+	# git-jump
+	exeinto /usr/libexec/git-core/
+	doexe contrib/git-jump/git-jump
+	newdoc contrib/git-jump/README git-jump.txt
+
+	# git-contacts
+	exeinto /usr/libexec/git-core/
+	doexe contrib/contacts/git-contacts
+	dodoc contrib/contacts/git-contacts.txt
+
+	if use gnome-keyring ; then
+		pushd contrib/credential/libsecret &>/dev/null || die
+		dobin git-credential-libsecret
+		popd &>/dev/null || die
+	fi
+
+	dodir /usr/share/${PN}/contrib
+	# The following are excluded:
+	# completion - installed above
+	# diff-highlight - done above
+	# emacs - installed above
+	# examples - these are stuff that is not used in Git anymore actually
+	# git-jump - done above
+	# gitview - installed above
+	# p4import - excluded because fast-import has a better one
+	# patches - stuff the Git guys made to go upstream to other places
+	# persistent-https - TODO
+	# mw-to-git - TODO
+	# subtree - build  seperately
+	# svnimport - use git-svn
+	# thunderbird-patch-inline - fixes thunderbird
+	local contrib_objects=(
+		buildsystems
+		fast-import
+		hg-to-git
+		hooks
+		remotes2config.sh
+		rerere-train.sh
+		stats
+		workdir
+	)
+	local i
+	for i in "${contrib_objects[@]}" ; do
+		cp -rf \
+			"${S}"/contrib/${i} \
+			"${ED}"/usr/share/${PN}/contrib \
+			|| die "Failed contrib ${i}"
+	done
+
+	if use perl && use cgi ; then
+		# We used to install in /usr/share/${PN}/gitweb
+		# but upstream installs in /usr/share/gitweb
+		# so we will install a symlink and use their location for compat with other
+		# distros
+		dosym ../gitweb /usr/share/${PN}/gitweb
+
+		# INSTALL discusses configuration issues, not just installation
+		docinto /
+		newdoc  "${S}"/gitweb/INSTALL INSTALL.gitweb
+		newdoc  "${S}"/gitweb/README README.gitweb
+
+		for d in "${ED}"/usr/lib{,64}/perl5/ ; do
+			if [[ -d "${d}" ]] ; then
+				find "${d}" -name .packlist -delete || die
+			fi
+		done
+	else
+		rm -rf "${ED}"/usr/share/gitweb
+	fi
+
+	if ! use subversion ; then
+		rm -f "${ED}"/usr/libexec/git-core/git-svn \
+			"${ED}"/usr/share/man/man1/git-svn.1*
+	fi
+
+	if use xinetd ; then
+		insinto /etc/xinetd.d
+		newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+	fi
+
+	if ! use prefix ; then
+		newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
+		newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+		systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
+			"git-daemon@.service"
+		systemd_dounit "${FILESDIR}/git-daemon.socket"
+	fi
+
+	perl_delete_localpod
+
+	# Remove disabled linguas
+	# we could remove sources in src_prepare, but install does not
+	# handle missing locale dir well
+	rm_loc() {
+		if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
+			rm -r "${ED}/usr/share/locale/${1}" || die
+		fi
+	}
+	plocale_for_each_disabled_locale rm_loc
+}
+
+src_test() {
+	local disabled=()
+	local tests_cvs=(
+		t9200-git-cvsexportcommit.sh
+		t9400-git-cvsserver-server.sh
+		t9401-git-cvsserver-crlf.sh
+		t9402-git-cvsserver-refs.sh
+		t9600-cvsimport.sh
+		t9601-cvsimport-vendor-branch.sh
+		t9602-cvsimport-branches-tags.sh
+		t9603-cvsimport-patchsets.sh
+		t9604-cvsimport-timestamps.sh
+	)
+	local tests_perl=(
+		t3701-add-interactive.sh
+		t5502-quickfetch.sh
+		t5512-ls-remote.sh
+		t5520-pull.sh
+		t7106-reset-unborn-branch.sh
+		t7501-commit.sh
+	)
+	# Bug #225601 - t0004 is not suitable for root perm
+	# Bug #219839 - t1004 is not suitable for root perm
+	# t0001-init.sh - check for init notices EPERM*  fails
+	local tests_nonroot=(
+		t0001-init.sh
+		t0004-unwritable.sh
+		t0070-fundamental.sh
+		t1004-read-tree-m-u-wf.sh
+		t3700-add.sh
+		t7300-clean.sh
+	)
+	# t9100 still fails with symlinks in SVN 1.7
+	local test_svn=( t9100-git-svn-basic.sh )
+
+	# Unzip is used only for the testcase code, not by any normal parts of Git.
+	if ! has_version app-arch/unzip ; then
+		einfo "Disabling tar-tree tests"
+		disabled+=( t5000-tar-tree.sh )
+	fi
+
+	local cvs=0
+	use cvs && let cvs=${cvs}+1
+	if [[ ${EUID} -eq 0 ]] ; then
+		if [[ ${cvs} -eq 1 ]] ; then
+			ewarn "Skipping CVS tests because CVS does not work as root!"
+			ewarn "You should retest with FEATURES=userpriv!"
+			disabled+=( ${tests_cvs[@]} )
+		fi
+		einfo "Skipping other tests that require being non-root"
+		disabled+=( ${tests_nonroot[@]} )
+	else
+		[[ ${cvs} -gt 0 ]] && \
+			has_version dev-vcs/cvs && \
+			let cvs=${cvs}+1
+		[[ ${cvs} -gt 1 ]] && \
+			has_version "dev-vcs/cvs[server]" && \
+			let cvs=${cvs}+1
+		if [[ ${cvs} -lt 3 ]] ; then
+			einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
+			disabled+=( ${tests_cvs[@]} )
+		fi
+	fi
+
+	if ! use perl ; then
+		einfo "Disabling tests that need Perl"
+		disabled+=( ${tests_perl[@]} )
+	fi
+
+	einfo "Disabling tests that fail with SVN 1.7"
+	disabled+=( ${test_svn[@]} )
+
+	# Reset all previously disabled tests
+	pushd t &>/dev/null || die
+	local i
+	for i in *.sh.DISABLED ; do
+		[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+	done
+	einfo "Disabled tests:"
+	for i in ${disabled[@]} ; do
+		if [[ -f "${i}" ]] ; then
+			mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
+		fi
+	done
+
+	# Avoid the test system removing the results because we want them ourselves
+	sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
+
+	# Clean old results first, must always run
+	nonfatal git_emake clean
+	popd &>/dev/null || die
+
+	# Now run the tests, keep going if we hit an error, and don't terminate on
+	# failure
+	local rc
+	einfo "Start test run"
+	#MAKEOPTS=-j1
+	nonfatal git_emake --keep-going test
+	rc=$?
+
+	# Display nice results, now print the results
+	pushd t &>/dev/null || die
+	nonfatal git_emake aggregate-results
+
+	# And bail if there was a problem
+	[[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
+}
+
+showpkgdeps() {
+	local pkg=$1
+	shift
+	elog "  $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+	use emacs && elisp-site-regen
+	elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
+	elog "completion."
+	elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+	elog "Note that the prompt bash code is now in that separate script"
+	elog "These additional scripts need some dependencies:"
+	echo
+	showpkgdeps git-quiltimport "dev-util/quilt"
+	showpkgdeps git-instaweb \
+		"|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
+	echo
+	use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
+}
+
+pkg_postrm() {
+	use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild
index c77551019c67..075208f7ce0d 100644
--- a/dev-vcs/git/git-9999-r1.ebuild
+++ b/dev-vcs/git/git-9999-r1.ebuild
@@ -311,7 +311,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -358,7 +358,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild
index c77551019c67..075208f7ce0d 100644
--- a/dev-vcs/git/git-9999-r2.ebuild
+++ b/dev-vcs/git/git-9999-r2.ebuild
@@ -311,7 +311,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -358,7 +358,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild
index c77551019c67..075208f7ce0d 100644
--- a/dev-vcs/git/git-9999-r3.ebuild
+++ b/dev-vcs/git/git-9999-r3.ebuild
@@ -311,7 +311,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -358,7 +358,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild
index c77551019c67..075208f7ce0d 100644
--- a/dev-vcs/git/git-9999.ebuild
+++ b/dev-vcs/git/git-9999.ebuild
@@ -311,7 +311,7 @@ src_compile() {
 		git_emake gitweb || die "emake gitweb (cgi) failed"
 	fi
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		pushd contrib/credential/osxkeychain &>/dev/null || die
 		git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
 			|| die "emake credential-osxkeychain"
@@ -358,7 +358,7 @@ src_compile() {
 src_install() {
 	git_emake DESTDIR="${D}" install || die "make install failed"
 
-	if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
+	if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
 		dobin contrib/credential/osxkeychain/git-credential-osxkeychain
 	fi
 
diff --git a/dev-vcs/mercurial/Manifest b/dev-vcs/mercurial/Manifest
index 78fc1e34a795..7f65b006b2f9 100644
--- a/dev-vcs/mercurial/Manifest
+++ b/dev-vcs/mercurial/Manifest
@@ -1,7 +1,6 @@
 AUX 70mercurial-gentoo.el 76 BLAKE2B 2b9488757b2516dc494ce4f38c89b63669886eefaeb5a867cfcc2c2301dcadd01c54745fca3504460c13546f6947677764c87a2e3f30c1949baa4da4c4fe402c SHA512 2efb67d5f595842ccdb9b9ea0c6b6fbc3a28a77955d7255817309486fac19e7550ee0a545d5824e3f9acaf586d93533e90ccd05e15d76884d6493f50fb390a44
 AUX cacerts.rc 51 BLAKE2B 8b42b2f4514d938b051feb7e59c69e6b06d1ceabe6c5a252a3cb4033555bcccda9375ae1fa9a5607f07296bd094c425077f5788e2c9fbca9b22914da41ddf132 SHA512 39c40c6cc95c54dcae13effb5c23f541f49fd89e0f040e214673afd906c6d5140eb18801d55330f4455507b467f0fae011998e60932e9a2accf37a0e7a047b90
 AUX mercurial-5.8.1-testing-timeout.patch 494 BLAKE2B 010ab51a2bf4963ab8340052c5becee5a4ace471755b97e8d9409a9697a6697ac87bb2a5fc7556948a68f81bd3a78d17a7ec7523a70ca79848b5c175ff4f3515 SHA512 d4a8f05ebc2f8f44f9646fbaebee4f522cd271dcb4f72681fcb53df58b09fd031643dd5644aff80bda0480aaa21daf333245cb5d83d71941fa74d81858f8da33
-AUX mercurial-6.0-testing-bigendian.patch 15551 BLAKE2B 03fccd80642be2f041bbdc905548ff0560857f8d121cf6e5d9a0660e20a80067743751573fc2050ec036440a29c3b7f00e6dcc5ea8e5742e9485d85ef262b485 SHA512 d49c5d4433d435971fc8c4ee593a146001ddd7d01723511e83218e452421b3eaea893af6705078fd146e0d6c970799bf7be647c45551083afb6d9efafe438f44
 DIST adler-0.2.3.crate 12168 BLAKE2B c7743569d700d7ec3185e0459a18181148f8cd7579f4da1fab30eb2e3c3cabbe5a7467f7760f0cba4b2fdeb62f8d988ee1f24637685d76db7acb56f679cfc996 SHA512 565849eba122eb94d240a0cba875035537058cc168f137a8a3b99392d753815d56fa0e1a1e851062632700b0e3d12caf67f5f768b9f727956a2e5b599029e9dc
 DIST aho-corasick-0.7.15.crate 113071 BLAKE2B a22743be74f873b9545648db6a994250e3e39b92ac99601580e3b02194d205e921bff0b1952a4cca3399a3a7828555a1abfb0c1466f3930811c6b95c1a07ec5e SHA512 e67816efa7305937a7cbbb0079b91b8afa3fdab52cfb8eeddeee156f18bbeed26f941cd4cb18ab2bdc1da5a9ff1dcbe9d2090deec68c00287bd99ace18ee8b24
 DIST ansi_term-0.11.0.crate 17087 BLAKE2B 9bd35c045a01ce4c6c4a5db1b4f15e9412bb97426eec19d4421dffbec633de8d13452c13c1dc1b30998690b78d7ed38311aca700087f13a81f66bd1d5d7300c4 SHA512 a637466a380748f939b3af090b8c0333f35581925bc03f4dda9b3f95d338836403cf5487ae3af9ff68f8245a837f8ab061aabe57a126a6a2c20f2e972c77d1fa
@@ -61,7 +60,7 @@ DIST memmap2-0.4.0.crate 19851 BLAKE2B 6bf418db7ad4af69121cc525be4ecb834c6ace06a
 DIST memoffset-0.6.1.crate 7706 BLAKE2B 351e6ff24a61b1016e7749571e1e66dae370c58746baf00b4688bb1e2d8c88621aa6f135468593bcd8ba30acf2c097d06a0dd7243eb06b9825e3fc1ffd31ea52 SHA512 74d081af00b7e442198b786d79e4ef35c243d2e78347ab9cb50e127569aed3fd77b47b95df6f361a716abce27c8cc6cb1dfa12c92b0b2208b21f9eb9527b61be
 DIST mercurial-5.8.1.tar.gz 7988000 BLAKE2B 7805a7141a503f8533a25d0cfd3c58c421c966cb9ec83503c855e02aeb8a7fff98bf529f4807bf6fc5f606ae110c4a0571e0e249441bd4be6b5eefb07284958e SHA512 d17c809fc48c55d646b677ad23b5cf4a1755f5a81790988109cd50ac259acc230edad7bf5ccc7a6384a490aeba4a7492327bb9878a541d5fa7207e2c378be966
 DIST mercurial-5.8.tar.gz 7985326 BLAKE2B 3b64343b692c389368b9c61baf367fe739bb79a7b555308fcd4f09069472b393343f57608954017038c849d6812cd6fe5e1e20bbc6a95974d827d7e402c60bd7 SHA512 79eec3a468a1826d4910d140797f26f281ff5e5fb9a0e09656d458577e05cf11ac6032c0d282aeec2996edbd7af954652c97097ea4485b211dad7424c4d20979
-DIST mercurial-6.0.tar.gz 8137797 BLAKE2B d6b4021e3ee249280c99e4f84f393801ac1feb0560fe20333c2b5c99eac46d704afe6788a1ca27ba22b8fd2a2f363869da05d2880e7ad6a19774a297310b89aa SHA512 342440af75b8e48b75ca604ee4f81298b652413a07f84cb475d9ed3c875a8b69bc22289c2a22d6f07c7bc54fdb1bc25a51a179eb9dcdc299b85fdd0fa4827dad
+DIST mercurial-6.0.1.tar.gz 8072365 BLAKE2B 45c510249580cb175e08096c84889d7f742933bc80321c834c45311e7a22d0867c324f4f02d69189bae828ddec7ebdfe2385b7dd621792c238eaa027b98bcd80 SHA512 dae18c38e7df001177867ed9cb1c9cea6f25fff6c23fd307c56c89bba0e4641d6cf993aabefe1fcb6ab99bd32732b858411f722bea839690fbc04c0a91c1dc53
 DIST micro-timer-0.3.1.crate 3357 BLAKE2B 13c518d2b3de6fa683078b9906b719498da2e2be5a23e7a2511f3d1d69730769031ed6b488927bec845c0405782f55cfe5af8610d56d92e716ff5d9056650f5a SHA512 197beadbdf35dd0892f6e0c1a09b6b57472166ecaec3e10be12c436e1381540100092c9e717684db44b53375390cf2c245fdc6fdb376117fdf5b4405ade73cf7
 DIST micro-timer-macros-0.3.1.crate 2928 BLAKE2B 148639d1f22965c7487fefd19b1413797aad0f9e0c4eb8ee7be181e7b6bd39e03a6d3d68131b05e09f87a3ef653d6eda643952025983b49736a9c6ddb778aafa SHA512 9c9ffc8432c9377d2de3fce931f398d7f77012f496dd6c011718abd46535205766d9f5a7c97ff14ecd87bb172039d8e92a8c45cfd9c14d220a368448da1b7917
 DIST miniz_oxide-0.4.3.crate 50058 BLAKE2B bc7a152a984de061803c11255459ce3d8fa64dd5b38de9f2ed29213abc1922d68746ff523de3b99e0e95a8933ea75448a9fa1e14cbbe248549074cd5ce7b3c1d SHA512 8c0e2b3a585a0986a61977d4459adb1a7c396ab53f4f688dcbeb2a09c60878b0423f54fd1879c190f5c64690a2473ed2a07d4162a650f6c39f402f6b27e863b7
@@ -136,6 +135,6 @@ DIST zstd-safe-2.0.5+zstd.1.4.5.crate 9002 BLAKE2B bf92884b629d5685dd563e481e63c
 DIST zstd-sys-1.4.17+zstd.1.4.5.crate 2046794 BLAKE2B 40584094797d4cc479cff9d1b89abd1f7e800f774725dc03c531b67078027d5b82464984d4e2a76cabcd9d336234d245f93692d0111e2469ef21ca1ea6260d77 SHA512 89439b20e4e0bce6455d982fb7467c45436ee68572395db662d056eb2e09e95ad600947bf11c27ba60b161c2e2511e04cac8dcfacc5f85fcf9222d4a206bdc30
 EBUILD mercurial-5.8.1.ebuild 6925 BLAKE2B 6b596fa90725216369711ad26d3337528e6a566b56e3c3db79db4da7aa3d8340c5e0472e18004b8af1870c4ec1589bad37a36e0ddcd87f3ace4a2e3d1922b11f SHA512 c670e33e09991bf5858d1438ae37d8dd74bf507ecc6ed2d082919530a24696a67fdd5fd9a8ea5f4b5194c892cc58fb9d6074d92cad894a76cd964e7b7bb020c0
 EBUILD mercurial-5.8.ebuild 6747 BLAKE2B a3da7343aa99b86ad639d063e2cfcf573be29e9286dcec2fd105bb0cbd3f51e635ff61bfa977c8d65b64812579ab2de192bdc1de0711be36da3a2e071f188afa SHA512 8005efead82f501f3da9c5caba43237a86e7980e7f8537ed49b684cf227f849b85c90261dbe1dd459555cc3ef26c91fbcd71f76b6a9d8b55dda328c6b7e49ebf
-EBUILD mercurial-6.0.ebuild 6774 BLAKE2B 565474227d90472b5f021b74dfbcb1105bb461acc2fe272c815022d8f9721bb062b5debeab8d5f2ae80cbacfb26d2aa457e6fca811f1ddb66f8ae72495c82b06 SHA512 1013c7d03100ea2a38f9112b544c4684db4ea7bbd29fcf05351d3cd84f65e91a00c0fd023a8b8d747d16c6b77c74afc20324fa93a5526fa4ebf408d00a70229b
-EBUILD mercurial-9999.ebuild 4435 BLAKE2B f3a1ea930b7b824771b32ac4a898098431e1c04956a017abf2a2cb517e89fa31b4c669922c2cf3e32503d214e3b062b06a13200a1dd92ff15691c195a609a93f SHA512 7cea11e2939e44a5be9f1de9f3679e5a4a0b952d1243e39412b0add0419bbcbab50f5957ef12bcc0a6ce7a7f3b44bcb4b5b98330c37938b44d14cdfa4edce178
+EBUILD mercurial-6.0.1.ebuild 6717 BLAKE2B 540bec457992a88a85a373f7e38c39f381da77b5a8449c7e72186c3be94f9996ab5b1c2844e2bd9f65f5f9ed0d27e289190cf61883ec2885c92d4ef48288ee4d SHA512 fe3fbbf192477f3d63da985f1866fd92153b8d86f7ce473669be2088a38f135a2676b6ab2cb7059e8ebb3c6eef3626f4853311f9d96b561c00ed95218aeb8364
+EBUILD mercurial-9999.ebuild 4364 BLAKE2B 4833c149a5066f4601e5241b39b86e04e9b5000899da2588c90d18891c974d94e672993c51426ee47e839e7138e733e02482248ec794417af90e6f64b6d00bf9 SHA512 538b668c903ec40e4142bffcbb3e34ce3f6cd034c2f7019c397f149010397df170406366ab12dc0cdaa200678f2aa043b87afd65150f84e7f17c233dccefeca1
 MISC metadata.xml 532 BLAKE2B c25f7820716a18cf155149294fde42126376d025fa569043d6b7fc25f6d1fe87e37b22424cde59d2437ecd6a6b75f0258b5a06282d3f2eed0b928bd858e0c0a2 SHA512 c4be6ddb455c2464ebbbffcdd0c2545b064e1a2058c41f418ddd96704688e08c48c7ee71cdf005a8b9b90f6deaab595c938a6ba9c8c788559dfc62e6b65a76ba
diff --git a/dev-vcs/mercurial/files/mercurial-6.0-testing-bigendian.patch b/dev-vcs/mercurial/files/mercurial-6.0-testing-bigendian.patch
deleted file mode 100644
index c47eaff7b385..000000000000
--- a/dev-vcs/mercurial/files/mercurial-6.0-testing-bigendian.patch
+++ /dev/null
@@ -1,255 +0,0 @@
-# HG changeset patch
-# User Julien Cristau <jcristau@debian.org>
-# Date 1629904487 -7200
-#      Wed Aug 25 17:14:47 2021 +0200
-# Branch stable
-# Node ID e11f903fd7a6e80b6168c7ef6e28f20349e681e2
-# Parent  132819e1fa1565b45fc09093ebbfbe991b0a0f5d
-tests: allow for variation in zstd output as seen on s390x and powerpc
-
---- a/tests/hghave.py
-+++ b/tests/hghave.py
-@@ -1141,8 +1141,13 @@ def has_lzma():
-         return True
-     except ImportError:
-         return False
- 
- 
- @check("bash", "bash shell")
- def has_bash():
-     return matchoutput("bash -c 'echo hi'", b'^hi$')
-+
-+
-+@check("bigendian", "big-endian CPU")
-+def has_bigendian():
-+    return sys.byteorder == 'big'
---- a/tests/test-clone-stream.t
-+++ b/tests/test-clone-stream.t
-@@ -399,21 +399,23 @@ getbundle requests with stream=1 are unc
-   00b0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
-   00c0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#....Vg.g,|
-   00d0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9............|
-   00e0: 75 30 73 26 45 64 61 74 61 2f 30 30 63 68 61 6e |u0s&Edata/00chan|
-   00f0: 67 65 6c 6f 67 2d 61 62 33 34 39 31 38 30 61 30 |gelog-ab349180a0|
- #endif
- #if zstd no-rust
-   $ f --size --hex --bytes 256 body
--  body: size=116340
-+  body: size=116340 (no-bigendian !)
-+  body: size=116335 (bigendian !)
-   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
-   0010: 9a 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
-   0020: 06 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 31 30 |....^bytecount10|
--  0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109|
-+  0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109| (no-bigendian !)
-+  0030: 31 32 37 31 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1271filecount109| (bigendian !)
-   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |3requirementsdot|
-   0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
-   0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
-   0070: 32 43 72 65 76 6c 6f 67 2d 63 6f 6d 70 72 65 73 |2Crevlog-compres|
-   0080: 73 69 6f 6e 2d 7a 73 74 64 25 32 43 72 65 76 6c |sion-zstd%2Crevl|
-   0090: 6f 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 |ogv1%2Csparserev|
-   00a0: 6c 6f 67 25 32 43 73 74 6f 72 65 00 00 80 00 73 |log%2Cstore....s|
-   00b0: 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 |.Bdata/0.i......|
-@@ -528,17 +530,18 @@ Clone with background file closing enabl
-   1093 files to transfer, 102 KB of data (no-zstd !)
-   1093 files to transfer, 98.9 KB of data (zstd !)
-   starting 4 threads for background file closing
-   starting 4 threads for background file closing
-   updating the branch cache
-   transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
-   bundle2-input-part: total payload size 118984 (no-zstd !)
-   transferred 98.9 KB in * seconds (* */sec) (glob) (zstd !)
--  bundle2-input-part: total payload size 116145 (zstd !)
-+  bundle2-input-part: total payload size 116145 (zstd no-bigendian !)
-+  bundle2-input-part: total payload size 116140 (zstd bigendian !)
-   bundle2-input-part: "listkeys" (params: 1 mandatory) supported
-   bundle2-input-bundle: 2 parts total
-   checking for updated bookmarks
-   updating the branch cache
-   (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
- #endif
- 
- Cannot stream clone when there are secret changesets
---- a/tests/test-generaldelta.t
-+++ b/tests/test-generaldelta.t
-@@ -285,21 +285,24 @@ test maxdeltachainspan
-        47       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
-        48       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
-        49       4        1       -1    base        197        316        197   0.62342       197         0    0.00000 (no-zstd !)
-        50       4        2       49      p1         58        362        255   0.70442       255         0    0.00000 (no-zstd !)
-        51       4        3       50    prev        356        594        611   1.02862       611         0    0.00000 (no-zstd !)
-        52       4        4       51      p1         58        640        669   1.04531       669         0    0.00000 (no-zstd !)
-        49       4        1       -1    base        205        316        205   0.64873       205         0    0.00000 (zstd !)
-        50       4        2       49      p1         58        362        263   0.72652       263         0    0.00000 (zstd !)
--       51       4        3       50    prev        366        594        629   1.05892       629         0    0.00000 (zstd !)
--       52       4        4       51      p1         58        640        687   1.07344       687         0    0.00000 (zstd !)
-+       51       4        3       50    prev        366        594        629   1.05892       629         0    0.00000 (zstd no-bigendian !)
-+       52       4        4       51      p1         58        640        687   1.07344       687         0    0.00000 (zstd no-bigendian !)
-+       51       4        3       50    prev        367        594        630   1.06061       630         0    0.00000 (zstd bigendian !)
-+       52       4        4       51      p1         58        640        688   1.07500       688         0    0.00000 (zstd bigendian !)
-        53       5        1       -1    base          0          0          0   0.00000         0         0    0.00000
-        54       6        1       -1    base        369        640        369   0.57656       369         0    0.00000 (no-zstd !)
--       54       6        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
-+       54       6        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
-+       54       6        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
-   $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes
-   requesting all changes
-   adding changesets
-   adding manifests
-   adding file changes
-   added 55 changesets with 53 changes to 53 files (+2 heads)
-   new changesets 61246295ee1e:c930ac4a5b32
-   updating to branch default
-@@ -357,20 +360,22 @@ test maxdeltachainspan
-        48       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
-        49       4        1       -1    base        197        316        197   0.62342       197         0    0.00000 (no-zstd !)
-        50       4        2       49      p1         58        362        255   0.70442       255         0    0.00000 (no-zstd !)
-        51       2       13       17      p1         58        594        739   1.24411      2781      2042    2.76319 (no-zstd !)
-        52       5        1       -1    base        369        640        369   0.57656       369         0    0.00000 (no-zstd !)
-        49       4        1       -1    base        205        316        205   0.64873       205         0    0.00000 (zstd !)
-        50       4        2       49      p1         58        362        263   0.72652       263         0    0.00000 (zstd !)
-        51       2       13       17      p1         58        594        739   1.24411      2789      2050    2.77402 (zstd !)
--       52       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
-+       52       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
-+       52       5        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
-        53       6        1       -1    base          0          0          0   0.00000         0         0    0.00000
-        54       7        1       -1    base        369        640        369   0.57656       369         0    0.00000 (no-zstd !)
--       54       7        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
-+       54       7        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
-+       54       7        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
-   $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.usegeneraldelta=yes --config storage.revlog.reuse-external-delta-parent=no
-   requesting all changes
-   adding changesets
-   adding manifests
-   adding file changes
-   added 55 changesets with 53 changes to 53 files (+2 heads)
-   new changesets 61246295ee1e:c930ac4a5b32
-   updating to branch default
-@@ -427,9 +432,10 @@ test maxdeltachainspan
-        47       3       30       46      p1         58       1380       1729   1.25290      1729         0    0.00000
-        48       3       31       47      p1         58       1426       1787   1.25316      1787         0    0.00000
-        49       1        7        5      p1         58        316        389   1.23101      2857      2468    6.34447
-        50       1        8       49      p1         58        362        447   1.23481      2915      2468    5.52125
-        51       2       13       17      p1         58        594        739   1.24411      2642      1903    2.57510
-        52       2       14       51      p1         58        640        797   1.24531      2700      1903    2.38770
-        53       4        1       -1    base          0          0          0   0.00000         0         0    0.00000
-        54       5        1       -1    base        369        640        369   0.57656       369         0    0.00000 (no-zstd !)
--       54       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
-+       54       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
-+       54       5        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
---- a/tests/test-persistent-nodemap.t
-+++ b/tests/test-persistent-nodemap.t
-@@ -1017,17 +1017,18 @@ Simple case
- No race condition
- 
-   $ hg clone -U --stream ssh://user@dummy/test-repo stream-clone --debug | egrep '00(changelog|manifest)'
-   adding [s] 00manifest.n (62 bytes)
-   adding [s] 00manifest-*.nd (118 KB) (glob)
-   adding [s] 00changelog.n (62 bytes)
-   adding [s] 00changelog-*.nd (118 KB) (glob)
-   adding [s] 00manifest.d (452 KB) (no-zstd !)
--  adding [s] 00manifest.d (491 KB) (zstd !)
-+  adding [s] 00manifest.d (491 KB) (zstd no-bigendian !)
-+  adding [s] 00manifest.d (492 KB) (zstd bigendian !)
-   adding [s] 00changelog.d (360 KB) (no-zstd !)
-   adding [s] 00changelog.d (368 KB) (zstd !)
-   adding [s] 00manifest.i (313 KB)
-   adding [s] 00changelog.i (313 KB)
-   $ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
-   00changelog-*.nd (glob)
-   00changelog.n
-   00manifest-*.nd (glob)
-@@ -1057,17 +1058,18 @@ setup the step-by-step stream cloning
-   > [extensions]
-   > steps=$RUNTESTDIR/testlib/ext-stream-clone-steps.py
-   > EOF
- 
- Check and record file state beforehand
- 
-   $ f --size test-repo/.hg/store/00changelog*
-   test-repo/.hg/store/00changelog-*.nd: size=121088 (glob)
--  test-repo/.hg/store/00changelog.d: size=376891 (zstd !)
-+  test-repo/.hg/store/00changelog.d: size=376891 (zstd no-bigendian !)
-+  test-repo/.hg/store/00changelog.d: size=376889 (zstd bigendian !)
-   test-repo/.hg/store/00changelog.d: size=368890 (no-zstd !)
-   test-repo/.hg/store/00changelog.i: size=320384
-   test-repo/.hg/store/00changelog.n: size=62
-   $ hg -R test-repo debugnodemap --metadata | tee server-metadata.txt
-   uid: * (glob)
-   tip-rev: 5005
-   tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
-   data-length: 121088
-@@ -1087,28 +1089,30 @@ Do a mix of clone and commit at the same
-   $ touch $HG_TEST_STREAM_WALKED_FILE_2
-   $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
-   $ cat clone-output
-   adding [s] 00manifest.n (62 bytes)
-   adding [s] 00manifest-*.nd (118 KB) (glob)
-   adding [s] 00changelog.n (62 bytes)
-   adding [s] 00changelog-*.nd (118 KB) (glob)
-   adding [s] 00manifest.d (452 KB) (no-zstd !)
--  adding [s] 00manifest.d (491 KB) (zstd !)
-+  adding [s] 00manifest.d (491 KB) (zstd no-bigendian !)
-+  adding [s] 00manifest.d (492 KB) (zstd bigendian !)
-   adding [s] 00changelog.d (360 KB) (no-zstd !)
-   adding [s] 00changelog.d (368 KB) (zstd !)
-   adding [s] 00manifest.i (313 KB)
-   adding [s] 00changelog.i (313 KB)
- 
- Check the result state
- 
-   $ f --size stream-clone-race-1/.hg/store/00changelog*
-   stream-clone-race-1/.hg/store/00changelog-*.nd: size=121088 (glob)
-   stream-clone-race-1/.hg/store/00changelog.d: size=368890 (no-zstd !)
--  stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd !)
-+  stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd no-bigendian !)
-+  stream-clone-race-1/.hg/store/00changelog.d: size=376889 (zstd bigendian !)
-   stream-clone-race-1/.hg/store/00changelog.i: size=320384
-   stream-clone-race-1/.hg/store/00changelog.n: size=62
- 
-   $ hg -R stream-clone-race-1 debugnodemap --metadata | tee client-metadata.txt
-   uid: * (glob)
-   tip-rev: 5005
-   tip-node: 90d5d3ba2fc47db50f712570487cb261a68c8ffe
-   data-length: 121088
-@@ -1152,17 +1156,18 @@ get changed, however to make thing simpl
- this test.
- 
- Check the initial state
- 
-   $ f --size test-repo/.hg/store/00changelog*
-   test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !)
-   test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !)
-   test-repo/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !)
--  test-repo/.hg/store/00changelog.d: size=376950 (zstd !)
-+  test-repo/.hg/store/00changelog.d: size=376950 (zstd no-bigendian !)
-+  test-repo/.hg/store/00changelog.d: size=376948 (zstd bigendian !)
-   test-repo/.hg/store/00changelog.d: size=368949 (no-zstd !)
-   test-repo/.hg/store/00changelog.i: size=320448
-   test-repo/.hg/store/00changelog.n: size=62
-   $ hg -R test-repo debugnodemap --metadata | tee server-metadata-2.txt
-   uid: * (glob)
-   tip-rev: 5006
-   tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b
-   data-length: 121344 (rust !)
-@@ -1203,17 +1208,18 @@ Performe the mix of clone and full refre
-   adding [s] 00changelog.i (313 KB)
- 
- Check the result.
- 
-   $ f --size stream-clone-race-2/.hg/store/00changelog*
-   stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !)
-   stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !)
-   stream-clone-race-2/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !)
--  stream-clone-race-2/.hg/store/00changelog.d: size=376950 (zstd !)
-+  stream-clone-race-2/.hg/store/00changelog.d: size=376950 (zstd no-bigendian !)
-+  stream-clone-race-2/.hg/store/00changelog.d: size=376948 (zstd bigendian !)
-   stream-clone-race-2/.hg/store/00changelog.d: size=368949 (no-zstd !)
-   stream-clone-race-2/.hg/store/00changelog.i: size=320448
-   stream-clone-race-2/.hg/store/00changelog.n: size=62
- 
-   $ hg -R stream-clone-race-2 debugnodemap --metadata | tee client-metadata-2.txt
-   uid: * (glob)
-   tip-rev: 5006
-   tip-node: ed2ec1eef9aa2a0ec5057c51483bc148d03e810b
diff --git a/dev-vcs/mercurial/mercurial-6.0.1.ebuild b/dev-vcs/mercurial/mercurial-6.0.1.ebuild
new file mode 100644
index 000000000000..0f6e2e2856c6
--- /dev/null
+++ b/dev-vcs/mercurial/mercurial-6.0.1.ebuild
@@ -0,0 +1,306 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{7..10} )
+PYTHON_REQ_USE="threads(+)"
+DISTUTILS_USE_SETUPTOOLS=no
+CARGO_OPTIONAL=1
+
+CRATES="
+	adler-0.2.3
+	aho-corasick-0.7.15
+	ansi_term-0.11.0
+	atty-0.2.14
+	autocfg-1.0.1
+	bitflags-1.2.1
+	bitmaps-2.1.0
+	block-buffer-0.9.0
+	byteorder-1.3.4
+	bytes-cast-0.2.0
+	bytes-cast-derive-0.1.0
+	cc-1.0.66
+	cfg-if-0.1.10
+	cfg-if-1.0.0
+	chrono-0.4.19
+	clap-2.33.3
+	const_fn-0.4.4
+	cpufeatures-0.1.4
+	cpython-0.7.0
+	crc32fast-1.2.1
+	crossbeam-channel-0.4.4
+	crossbeam-channel-0.5.0
+	crossbeam-deque-0.8.0
+	crossbeam-epoch-0.9.1
+	crossbeam-utils-0.7.2
+	crossbeam-utils-0.8.1
+	ctor-0.1.16
+	derive_more-0.99.11
+	difference-2.0.0
+	digest-0.9.0
+	either-1.6.1
+	env_logger-0.7.1
+	flate2-1.0.19
+	format-bytes-0.2.2
+	format-bytes-macros-0.3.0
+	generic-array-0.14.4
+	getrandom-0.1.15
+	glob-0.3.0
+	hermit-abi-0.1.17
+	home-0.5.3
+	humantime-1.3.0
+	im-rc-15.0.0
+	itertools-0.9.0
+	jobserver-0.1.21
+	lazy_static-1.4.0
+	libc-0.2.81
+	libz-sys-1.1.2
+	log-0.4.11
+	maybe-uninit-2.0.0
+	memchr-2.3.4
+	memmap2-0.4.0
+	memoffset-0.6.1
+	micro-timer-0.3.1
+	micro-timer-macros-0.3.1
+	miniz_oxide-0.4.3
+	num-integer-0.1.44
+	num-traits-0.2.14
+	num_cpus-1.13.0
+	opaque-debug-0.3.0
+	output_vt100-0.1.2
+	paste-1.0.5
+	pkg-config-0.3.19
+	ppv-lite86-0.2.10
+	pretty_assertions-0.6.1
+	proc-macro-hack-0.5.19
+	proc-macro2-1.0.24
+	python27-sys-0.7.0
+	python3-sys-0.7.0
+	quick-error-1.2.3
+	quote-1.0.7
+	rand-0.7.3
+	rand_chacha-0.2.2
+	rand_core-0.5.1
+	rand_distr-0.2.2
+	rand_hc-0.2.0
+	rand_pcg-0.2.1
+	rand_xoshiro-0.4.0
+	rayon-1.5.0
+	rayon-core-1.9.0
+	redox_syscall-0.1.57
+	regex-1.4.2
+	regex-syntax-0.6.21
+	remove_dir_all-0.5.3
+	same-file-1.0.6
+	scopeguard-1.1.0
+	sha-1-0.9.6
+	sized-chunks-0.6.2
+	stable_deref_trait-1.2.0
+	static_assertions-1.1.0
+	strsim-0.8.0
+	syn-1.0.54
+	tempfile-3.1.0
+	termcolor-1.1.2
+	textwrap-0.11.0
+	thread_local-1.0.1
+	time-0.1.44
+	twox-hash-1.6.0
+	typenum-1.12.0
+	unicode-width-0.1.8
+	unicode-xid-0.2.1
+	users-0.11.0
+	vcpkg-0.2.11
+	vec_map-0.8.2
+	version_check-0.9.2
+	wasi-0.9.0+wasi-snapshot-preview1
+	wasi-0.10.0+wasi-snapshot-preview1
+	winapi-0.3.9
+	winapi-i686-pc-windows-gnu-0.4.0
+	winapi-util-0.1.5
+	winapi-x86_64-pc-windows-gnu-0.4.0
+	zstd-0.5.3+zstd.1.4.5
+	zstd-safe-2.0.5+zstd.1.4.5
+	zstd-sys-1.4.17+zstd.1.4.5
+"
+
+inherit bash-completion-r1 cargo elisp-common distutils-r1 flag-o-matic multiprocessing
+
+DESCRIPTION="Scalable distributed SCM"
+HOMEPAGE="https://www.mercurial-scm.org/"
+SRC_URI="https://www.mercurial-scm.org/release/${P}.tar.gz
+	rust? ( $(cargo_crate_uris ${CRATES}) )"
+
+LICENSE="GPL-2+
+	rust? ( BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 ISC MIT PSF-2 Unlicense )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+chg emacs gpg test tk rust"
+
+BDEPEND="rust? ( ${RUST_DEPEND} )"
+RDEPEND="
+	app-misc/ca-certificates
+	gpg? ( app-crypt/gnupg )
+	tk? ( dev-lang/tk )"
+
+DEPEND="emacs? ( >=app-editors/emacs-23.1:* )
+	test? (
+		app-arch/unzip
+		dev-python/pygments[${PYTHON_USEDEP}]
+		)"
+
+SITEFILE="70${PN}-gentoo.el"
+
+RESTRICT="!test? ( test )"
+
+src_unpack() {
+	default_src_unpack
+	if use rust; then
+		local S="${S}/rust/hg-cpython"
+		cargo_src_unpack
+	fi
+}
+
+python_prepare_all() {
+	# fix up logic that won't work in Gentoo Prefix (also won't outside in
+	# certain cases), bug #362891
+	sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
+	sed -i -e 's/__APPLE__/__NO_APPLE__/g' mercurial/cext/osutil.c || die
+
+	distutils-r1_python_prepare_all
+}
+
+src_compile() {
+	if use rust; then
+		pushd rust/hg-cpython || die
+		cargo_src_compile --no-default-features --features python3 --jobs $(makeopts_jobs)
+		popd
+	fi
+	distutils-r1_src_compile
+}
+
+python_compile() {
+	filter-flags -ftracer -ftree-vectorize
+	if use rust; then
+		local -x HGWITHRUSTEXT="cpython"
+	fi
+	distutils-r1_python_compile build_ext
+}
+
+python_compile_all() {
+	rm -r contrib/win32 || die
+	if use chg; then
+		emake -C contrib/chg
+	fi
+	if use emacs; then
+		cd contrib || die
+		elisp-compile mercurial.el || die "elisp-compile failed!"
+	fi
+}
+
+src_install() {
+	distutils-r1_src_install
+}
+
+python_install() {
+	if use rust; then
+		local -x HGWITHRUSTEXT="cpython"
+	fi
+	distutils-r1_python_install build_ext
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	newbashcomp contrib/bash_completion hg
+
+	insinto /usr/share/zsh/site-functions
+	newins contrib/zsh_completion _hg
+
+	dobin hgeditor
+	if use tk; then
+		dobin contrib/hgk
+	fi
+	python_foreach_impl python_doscript contrib/hg-ssh
+
+	if use emacs; then
+		elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+	fi
+
+	local RM_CONTRIB=( hgk hg-ssh bash_completion zsh_completion plan9 *.el )
+
+	if use chg; then
+		dobin contrib/chg/chg
+		doman contrib/chg/chg.1
+		RM_CONTRIB+=( chg )
+	fi
+
+	for f in ${RM_CONTRIB[@]}; do
+		rm -rf contrib/${f} || die
+	done
+
+	dodoc -r contrib
+	docompress -x /usr/share/doc/${PF}/contrib
+	doman doc/*.?
+	dodoc CONTRIBUTORS hgweb.cgi
+
+	insinto /etc/mercurial/hgrc.d
+	doins "${FILESDIR}/cacerts.rc"
+}
+
+src_test() {
+	pushd tests &>/dev/null || die
+	rm -rf *svn*			# Subversion tests fail with 1.5
+	rm -f test-archive*		# Fails due to verbose tar output changes
+	rm -f test-convert-baz*		# GNU Arch baz
+	rm -f test-convert-cvs*		# CVS
+	rm -f test-convert-darcs*	# Darcs
+	rm -f test-convert-git*		# git
+	rm -f test-convert-mtn*		# monotone
+	rm -f test-convert-tla*		# GNU Arch tla
+	rm -f test-largefiles*		# tends to time out
+	rm -f test-https*			# requires to support tls1.0
+	rm -rf test-removeemptydirs*	# requires access to access parent directories
+	if [[ ${EUID} -eq 0 ]]; then
+		einfo "Removing tests which require user privileges to succeed"
+		rm -f test-convert*
+		rm -f test-lock-badness*
+		rm -f test-permissions*
+		rm -f test-pull-permission*
+		rm -f test-journal-exists*
+		rm -f test-repair-strip*
+	fi
+
+	popd &>/dev/null || die
+	distutils-r1_src_test
+}
+
+python_test() {
+	if [[ ${EPYTHON} == python3.10 ]]; then
+		einfo "Skipping tests for unsupported Python 3.10"
+		return
+	fi
+	distutils_install_for_testing
+	cd tests || die
+	PYTHONWARNINGS=ignore "${PYTHON}" run-tests.py \
+		--jobs $(makeopts_jobs) \
+		--timeout 0 \
+		|| die "Tests fail with ${EPYTHON}"
+}
+
+pkg_postinst() {
+	use emacs && elisp-site-regen
+
+	elog "If you want to convert repositories from other tools using convert"
+	elog "extension please install correct tool:"
+	elog "  dev-vcs/cvs"
+	elog "  dev-vcs/darcs"
+	elog "  dev-vcs/git"
+	elog "  dev-vcs/monotone"
+	elog "  dev-vcs/subversion"
+}
+
+pkg_postrm() {
+	use emacs && elisp-site-regen
+}
diff --git a/dev-vcs/mercurial/mercurial-6.0.ebuild b/dev-vcs/mercurial/mercurial-6.0.ebuild
deleted file mode 100644
index 3fbbe98117a5..000000000000
--- a/dev-vcs/mercurial/mercurial-6.0.ebuild
+++ /dev/null
@@ -1,310 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{7..10} )
-PYTHON_REQ_USE="threads(+)"
-DISTUTILS_USE_SETUPTOOLS=no
-CARGO_OPTIONAL=1
-
-CRATES="
-	adler-0.2.3
-	aho-corasick-0.7.15
-	ansi_term-0.11.0
-	atty-0.2.14
-	autocfg-1.0.1
-	bitflags-1.2.1
-	bitmaps-2.1.0
-	block-buffer-0.9.0
-	byteorder-1.3.4
-	bytes-cast-0.2.0
-	bytes-cast-derive-0.1.0
-	cc-1.0.66
-	cfg-if-0.1.10
-	cfg-if-1.0.0
-	chrono-0.4.19
-	clap-2.33.3
-	const_fn-0.4.4
-	cpufeatures-0.1.4
-	cpython-0.7.0
-	crc32fast-1.2.1
-	crossbeam-channel-0.4.4
-	crossbeam-channel-0.5.0
-	crossbeam-deque-0.8.0
-	crossbeam-epoch-0.9.1
-	crossbeam-utils-0.7.2
-	crossbeam-utils-0.8.1
-	ctor-0.1.16
-	derive_more-0.99.11
-	difference-2.0.0
-	digest-0.9.0
-	either-1.6.1
-	env_logger-0.7.1
-	flate2-1.0.19
-	format-bytes-0.2.2
-	format-bytes-macros-0.3.0
-	generic-array-0.14.4
-	getrandom-0.1.15
-	glob-0.3.0
-	hermit-abi-0.1.17
-	home-0.5.3
-	humantime-1.3.0
-	im-rc-15.0.0
-	itertools-0.9.0
-	jobserver-0.1.21
-	lazy_static-1.4.0
-	libc-0.2.81
-	libz-sys-1.1.2
-	log-0.4.11
-	maybe-uninit-2.0.0
-	memchr-2.3.4
-	memmap2-0.4.0
-	memoffset-0.6.1
-	micro-timer-0.3.1
-	micro-timer-macros-0.3.1
-	miniz_oxide-0.4.3
-	num-integer-0.1.44
-	num-traits-0.2.14
-	num_cpus-1.13.0
-	opaque-debug-0.3.0
-	output_vt100-0.1.2
-	paste-1.0.5
-	pkg-config-0.3.19
-	ppv-lite86-0.2.10
-	pretty_assertions-0.6.1
-	proc-macro-hack-0.5.19
-	proc-macro2-1.0.24
-	python27-sys-0.7.0
-	python3-sys-0.7.0
-	quick-error-1.2.3
-	quote-1.0.7
-	rand-0.7.3
-	rand_chacha-0.2.2
-	rand_core-0.5.1
-	rand_distr-0.2.2
-	rand_hc-0.2.0
-	rand_pcg-0.2.1
-	rand_xoshiro-0.4.0
-	rayon-1.5.0
-	rayon-core-1.9.0
-	redox_syscall-0.1.57
-	regex-1.4.2
-	regex-syntax-0.6.21
-	remove_dir_all-0.5.3
-	same-file-1.0.6
-	scopeguard-1.1.0
-	sha-1-0.9.6
-	sized-chunks-0.6.2
-	stable_deref_trait-1.2.0
-	static_assertions-1.1.0
-	strsim-0.8.0
-	syn-1.0.54
-	tempfile-3.1.0
-	termcolor-1.1.2
-	textwrap-0.11.0
-	thread_local-1.0.1
-	time-0.1.44
-	twox-hash-1.6.0
-	typenum-1.12.0
-	unicode-width-0.1.8
-	unicode-xid-0.2.1
-	users-0.11.0
-	vcpkg-0.2.11
-	vec_map-0.8.2
-	version_check-0.9.2
-	wasi-0.9.0+wasi-snapshot-preview1
-	wasi-0.10.0+wasi-snapshot-preview1
-	winapi-0.3.9
-	winapi-i686-pc-windows-gnu-0.4.0
-	winapi-util-0.1.5
-	winapi-x86_64-pc-windows-gnu-0.4.0
-	zstd-0.5.3+zstd.1.4.5
-	zstd-safe-2.0.5+zstd.1.4.5
-	zstd-sys-1.4.17+zstd.1.4.5
-"
-
-inherit bash-completion-r1 cargo elisp-common distutils-r1 flag-o-matic multiprocessing
-
-DESCRIPTION="Scalable distributed SCM"
-HOMEPAGE="https://www.mercurial-scm.org/"
-SRC_URI="https://www.mercurial-scm.org/release/${P}.tar.gz
-	rust? ( $(cargo_crate_uris ${CRATES}) )"
-
-LICENSE="GPL-2+
-	rust? ( BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 ISC MIT PSF-2 Unlicense )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+chg emacs gpg test tk rust"
-
-BDEPEND="rust? ( ${RUST_DEPEND} )"
-RDEPEND="
-	app-misc/ca-certificates
-	gpg? ( app-crypt/gnupg )
-	tk? ( dev-lang/tk )"
-
-DEPEND="emacs? ( >=app-editors/emacs-23.1:* )
-	test? (
-		app-arch/unzip
-		dev-python/pygments[${PYTHON_USEDEP}]
-		)"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-testing-bigendian.patch
-)
-
-SITEFILE="70${PN}-gentoo.el"
-
-RESTRICT="!test? ( test )"
-
-src_unpack() {
-	default_src_unpack
-	if use rust; then
-		local S="${S}/rust/hg-cpython"
-		cargo_src_unpack
-	fi
-}
-
-python_prepare_all() {
-	# fix up logic that won't work in Gentoo Prefix (also won't outside in
-	# certain cases), bug #362891
-	sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
-	sed -i -e 's/__APPLE__/__NO_APPLE__/g' mercurial/cext/osutil.c || die
-
-	distutils-r1_python_prepare_all
-}
-
-src_compile() {
-	if use rust; then
-		pushd rust/hg-cpython || die
-		cargo_src_compile --no-default-features --features python3 --jobs $(makeopts_jobs)
-		popd
-	fi
-	distutils-r1_src_compile
-}
-
-python_compile() {
-	filter-flags -ftracer -ftree-vectorize
-	if use rust; then
-		local -x HGWITHRUSTEXT="cpython"
-	fi
-	distutils-r1_python_compile build_ext
-}
-
-python_compile_all() {
-	rm -r contrib/win32 || die
-	if use chg; then
-		emake -C contrib/chg
-	fi
-	if use emacs; then
-		cd contrib || die
-		elisp-compile mercurial.el || die "elisp-compile failed!"
-	fi
-}
-
-src_install() {
-	distutils-r1_src_install
-}
-
-python_install() {
-	if use rust; then
-		local -x HGWITHRUSTEXT="cpython"
-	fi
-	distutils-r1_python_install build_ext
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	newbashcomp contrib/bash_completion hg
-
-	insinto /usr/share/zsh/site-functions
-	newins contrib/zsh_completion _hg
-
-	dobin hgeditor
-	if use tk; then
-		dobin contrib/hgk
-	fi
-	python_foreach_impl python_doscript contrib/hg-ssh
-
-	if use emacs; then
-		elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
-		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
-	fi
-
-	local RM_CONTRIB=( hgk hg-ssh bash_completion zsh_completion plan9 *.el )
-
-	if use chg; then
-		dobin contrib/chg/chg
-		doman contrib/chg/chg.1
-		RM_CONTRIB+=( chg )
-	fi
-
-	for f in ${RM_CONTRIB[@]}; do
-		rm -rf contrib/${f} || die
-	done
-
-	dodoc -r contrib
-	docompress -x /usr/share/doc/${PF}/contrib
-	doman doc/*.?
-	dodoc CONTRIBUTORS hgweb.cgi
-
-	insinto /etc/mercurial/hgrc.d
-	doins "${FILESDIR}/cacerts.rc"
-}
-
-src_test() {
-	pushd tests &>/dev/null || die
-	rm -rf *svn*			# Subversion tests fail with 1.5
-	rm -f test-archive*		# Fails due to verbose tar output changes
-	rm -f test-convert-baz*		# GNU Arch baz
-	rm -f test-convert-cvs*		# CVS
-	rm -f test-convert-darcs*	# Darcs
-	rm -f test-convert-git*		# git
-	rm -f test-convert-mtn*		# monotone
-	rm -f test-convert-tla*		# GNU Arch tla
-	rm -f test-largefiles*		# tends to time out
-	rm -f test-https*			# requires to support tls1.0
-	rm -rf test-removeemptydirs*	# requires access to access parent directories
-	if [[ ${EUID} -eq 0 ]]; then
-		einfo "Removing tests which require user privileges to succeed"
-		rm -f test-convert*
-		rm -f test-lock-badness*
-		rm -f test-permissions*
-		rm -f test-pull-permission*
-		rm -f test-journal-exists*
-		rm -f test-repair-strip*
-	fi
-
-	popd &>/dev/null || die
-	distutils-r1_src_test
-}
-
-python_test() {
-	if [[ ${EPYTHON} == python3.10 ]]; then
-		einfo "Skipping tests for unsupported Python 3.10"
-		return
-	fi
-	distutils_install_for_testing
-	cd tests || die
-	PYTHONWARNINGS=ignore "${PYTHON}" run-tests.py \
-		--jobs $(makeopts_jobs) \
-		--timeout 0 \
-		|| die "Tests fail with ${EPYTHON}"
-}
-
-pkg_postinst() {
-	use emacs && elisp-site-regen
-
-	elog "If you want to convert repositories from other tools using convert"
-	elog "extension please install correct tool:"
-	elog "  dev-vcs/cvs"
-	elog "  dev-vcs/darcs"
-	elog "  dev-vcs/git"
-	elog "  dev-vcs/monotone"
-	elog "  dev-vcs/subversion"
-}
-
-pkg_postrm() {
-	use emacs && elisp-site-regen
-}
diff --git a/dev-vcs/mercurial/mercurial-9999.ebuild b/dev-vcs/mercurial/mercurial-9999.ebuild
index d60f93143ed4..beb799473303 100644
--- a/dev-vcs/mercurial/mercurial-9999.ebuild
+++ b/dev-vcs/mercurial/mercurial-9999.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 PYTHON_COMPAT=( python3_{7..10} )
 PYTHON_REQ_USE="threads(+)"
@@ -66,7 +66,6 @@ src_compile() {
 
 python_compile() {
 	filter-flags -ftracer -ftree-vectorize
-	python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
 	if use rust; then
 		local -x HGWITHRUSTEXT="cpython"
 	fi
diff --git a/dev-vcs/qgit/Manifest b/dev-vcs/qgit/Manifest
index d0a63c2b388b..7105bda1f9e5 100644
--- a/dev-vcs/qgit/Manifest
+++ b/dev-vcs/qgit/Manifest
@@ -1,3 +1,5 @@
+DIST qgit-2.10.tar.gz 222077 BLAKE2B df06b8561ece9196b7fc60a542bd636446946641d26cce2ac5bda958108b34e0f767a3a19dd455f76cde7eb924625bfc695a01d24b32cbb4d85c9bd3cd525963 SHA512 ab123aae19a02c91584cca493be2c62c023aa8b2a9bc6e35c46224aed0afab8a669bd33719a0074df3b50e96fe934b9b423bdaef4940eebd785bfd670aeba4bc
 DIST qgit-2.9.tar.gz 263875 BLAKE2B 8ec1235c760f2473a0700e7033ab99f3e72f019dee47761b86999a7de173132cf6592e9f5652b68285cd126adc4efffb5688944f34be2686683727354ab041c5 SHA512 2c91e02d0a7ea1e4620882520c77b47ff9b28fb9c9f9d178bf98b3e728e600e8d86a9e6e4cd60c33dbe63ced3636934fb7cdd6b0d5fa58182873675e3f97cc33
+EBUILD qgit-2.10.ebuild 500 BLAKE2B a2ab9ecf59c10a942d8c5bd9d3895a30a60721eff75e6f1a95f42ebf1258309831dd60c349dc17dcb548352db0982f07c8a81a2a372586caba155804b883abad SHA512 7777c9f7649426654d397a214f7c34e244b5a3db31b2b1405ac03ae065fcfdff7bd7f972d7b94d560291f0e4b70937134f43221da7f39b004d1410bfade6fb19
 EBUILD qgit-2.9.ebuild 516 BLAKE2B 6e728ec47366a0a43c2132067add508df8ffff37a2d698390b3b2ea6090e835595617f808cf88af66da6d7441fc0f49d1ba327e93e7e039be21a3b23b9099ed3 SHA512 3e345192c98f852f106fa60da99c9f00cdaa258f1840289042ce174fae985ba2fdc3c27c01c7662a4b1d00f5331975923eae0c277532668b39f36a11efa3e1de
 MISC metadata.xml 325 BLAKE2B b24275d8759010950ece15cafbcfc6c39541bfc162465e0641f4843dcfae0f1b10989e5c4ba12e98e8bb6b9f51693485811e21358ee10063a832c22ff95ac02c SHA512 571aa8b56ef870d2a72436081952dd4f0cb4be88887a1dd896af3315260ea6c57cf1153afbdcc3a221b38caea6e86f52e4c676e55b825156798ea1413ddc7682
diff --git a/dev-vcs/qgit/qgit-2.10.ebuild b/dev-vcs/qgit/qgit-2.10.ebuild
new file mode 100644
index 000000000000..f593607c918c
--- /dev/null
+++ b/dev-vcs/qgit/qgit-2.10.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg
+
+DESCRIPTION="Qt GUI for git repositories"
+HOMEPAGE="https://github.com/tibirna/qgit"
+SRC_URI="https://github.com/tibirna/qgit/archive/${P}.tar.gz"
+S="${WORKDIR}/${PN}-${P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="
+	dev-qt/qtcore:5
+	dev-qt/qtgui:5
+	dev-qt/qtwidgets:5
+"
+RDEPEND="${DEPEND}
+	dev-vcs/git
+"
+
+DOCS=( README.adoc )
diff --git a/dev-vcs/stgit/Manifest b/dev-vcs/stgit/Manifest
index 1ff3b80a6246..7176c5d22194 100644
--- a/dev-vcs/stgit/Manifest
+++ b/dev-vcs/stgit/Manifest
@@ -1,5 +1,3 @@
-DIST stgit-1.1.tar.gz 313862 BLAKE2B 2d15ba7c2f55ff1211f0d9a3002878102f5023e897d0830daa688a2af8c6a386ec0cf076c728b6f45650ee3382379a32fb4efb25d0da3b28302f158dfca6ef62 SHA512 917c645f219b2725d1e88186674a6184c96f1457d5c7722b4da17931d963f0fe0c675cdaaca435ba7405ba498d6db9a01c9f554d1aa3093cc3205d224d9d9759
 DIST stgit-1.4.tar.gz 390734 BLAKE2B a2c8b6848cacd743022318ebf9a0512c6bd02a2b8c864db2270e5075c82dfd9e6037a3a79978b2061487bf040864077b0f7836c66986d82ff3eb902331589d87 SHA512 5251dc26a7c64dcc83021399f95ea911d6b65cfb2ee5c016c886447740ed48b66d3f0bd92a45b4aed40ae2e77dfe6ba62336dbba6773a1879ab749c95bb99b4b
-EBUILD stgit-1.1.ebuild 1840 BLAKE2B 06b57cfc1df07ac5b62045f765c3d6e03083e1132c12e6d775d5d637a2d4e8fba5a8779e639e9adac07c11c166fa7378d8fe341f53039a4b58a9714d9ed2e9eb SHA512 e365bd59428eef6feb3c71b1282753127f48f49c51408878957a490bf27d426eb70b8d45eb10f92e39dddaeae31f5c3b5eda769d909540994b00631c626c7965
-EBUILD stgit-1.4.ebuild 1820 BLAKE2B 60ea52d5a6c3ccc0c0b580da8901c03ce20ec64f37b5d515da7a408b1f57206635d5b28a95c1e668d3d24c04dc1b1ae3b6bb3e04b600efc6d13f8134ad2a73a9 SHA512 8878c4c2200592eff7384589a737fa79079aae5316d973d0e93128d6ae15470eb13d823bb0cd31df012183354b6269b31bd61a5f977a9f7021194ba9750153c9
+EBUILD stgit-1.4.ebuild 1814 BLAKE2B 40c7993866ef309dfd3e4d517de07d9cc525dc9b3658793dc2b446b7a59907e2161c725bad71d0df6015bd9da180a288b1b0e98b04438d0b58701648c0473341 SHA512 4b4fb8363a90b2b2c5e412fb623d6cc8bad86dac113f3895ae509f9cdecf63f11e16de32eb49dcdc076c1ad0f7927db77413b9843159e87ad4dc577ce0a7e85d
 MISC metadata.xml 347 BLAKE2B 152f011c7facd06cc1c654f388b4a44bbd8486549c07f1329d228e252a411bfb565e4f5b9e37bf9eefc23fda47a774c347d2e82070ac21c0880806bca99a6685 SHA512 04b087c0e6c6ae99128dab9c29e49d55e1cbcac3890f6324d3ea66b14530e92ca9ed32e9a6dfa23f06e23f8b79b3e57ceff2c9cc2995af4e01c91914d50361d0
diff --git a/dev-vcs/stgit/stgit-1.1.ebuild b/dev-vcs/stgit/stgit-1.1.ebuild
deleted file mode 100644
index 09f77c8c71f7..000000000000
--- a/dev-vcs/stgit/stgit-1.1.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-DISTUTILS_USE_SETUPTOOLS=no
-
-inherit bash-completion-r1 distutils-r1
-
-DESCRIPTION="Manage a stack of patches using GIT as a backend"
-HOMEPAGE="https://stacked-git.github.io"
-UPSTREAM_VER=
-[[ -n ${UPSTREAM_VER} ]] && \
-	UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-
-SRC_URI="https://github.com/ctmarinas/stgit/archive/v${PV}.tar.gz -> ${P}.tar.gz
-	${UPSTREAM_PATCHSET_URI}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86 ~amd64-linux ~x86-linux"
-IUSE="doc"
-
-RDEPEND=">=dev-vcs/git-1.6.3.3"
-
-# NOTE: It seems to be quite important which asciidoc version to use.
-# So keep an eye on it for the future.
-DEPEND="${RDEPEND}
-	doc? (
-		app-text/asciidoc
-		app-text/xmlto
-		dev-lang/perl
-	)"
-
-pkg_setup() {
-	if ! use doc; then
-		echo
-		ewarn "Manpages will not be built and installed."
-		ewarn "Enable the 'doc' useflag, if you want them."
-		echo
-	fi
-}
-
-python_prepare_all() {
-	# Upstream's patchset
-	[[ -n ${UPSTREAM_VER} ]] && \
-		eapply "${WORKDIR}"/patches-upstream
-
-	# this will be a noop, as we are working with a tarball,
-	# but throws git errors --> just get rid of it
-	echo "version=\"${PV}\"" > "${S}"/stgit/builtin_version.py
-
-	distutils-r1_python_prepare_all
-}
-
-src_compile() {
-	distutils-r1_src_compile
-
-	# bug 526468
-	if use doc; then
-		emake htmldir="${EPREFIX}/usr/share/doc/${PF}/html/" \
-			mandir="${EPREFIX}/usr/share/man/" \
-			doc
-	fi
-}
-
-src_install() {
-	if use doc; then
-		emake DESTDIR="${D}" \
-			htmldir="${EPREFIX}/usr/share/doc/${PF}/html/" \
-			mandir="${EPREFIX}/usr/share/man/" \
-			install-doc install-html
-	fi
-
-	distutils-r1_src_install
-
-	newbashcomp completion/stgit.bash 'stg'
-}
diff --git a/dev-vcs/stgit/stgit-1.4.ebuild b/dev-vcs/stgit/stgit-1.4.ebuild
index fae3f3498df8..ffb9c6761f48 100644
--- a/dev-vcs/stgit/stgit-1.4.ebuild
+++ b/dev-vcs/stgit/stgit-1.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -18,7 +18,7 @@ SRC_URI="https://github.com/ctmarinas/stgit/archive/v${PV}.tar.gz -> ${P}.tar.gz
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86 ~amd64-linux ~x86-linux"
 IUSE="doc"
 
 RDEPEND=">=dev-vcs/git-1.6.3.3"
diff --git a/dev-vcs/tig/Manifest b/dev-vcs/tig/Manifest
index 0f9033880ea1..0962e6565678 100644
--- a/dev-vcs/tig/Manifest
+++ b/dev-vcs/tig/Manifest
@@ -1,8 +1,10 @@
 DIST tig-2.5.1.tar.gz 1144666 BLAKE2B f8e96b1e27286ebebd3e3f374b28ed31a69b10bab1e831068341a430c36418d6a412b29caa3a44e3fafb3131d93b6d8d62ade4c92dc06fe753f040957b9e64e6 SHA512 e7c27a1e6357ce3cb4c02ff409d40c0ca67d10875eedbf467b9a280d8433cca15d16860256637041003384e7c536aca743ce971e623d3000dceeda598d6d3ae0
 DIST tig-2.5.3.tar.gz 1165632 BLAKE2B 398174578b9723d7825c7162b59d2a1a92da161b3f3b8896c1d121ed36c8a0a1c52f676325b3a3fdd0cea9961c7f4234bd1ac594d9057cf6707cad22a3eda35b SHA512 2339c6c93808b6fbcda4ae29e014e7f4edda5f16df46e466d1d14a9f65dba10bff9df6363f37c369418336f362d5e38dbaf7fc4d99761997cc39722ba6132aec
 DIST tig-2.5.4.tar.gz 1167930 BLAKE2B 620dea0d5c4cd670b11e143195145dd268ba4762ce5b3e56a393bc6af6e508349c5f3581dff9f118d047ab8e7b431b64c85431f5af5719cbb9c63117394b265b SHA512 8c2c1d3aa980d3a6619501a770bb5210db445200e46939e2c122db1fd684ae9857eee4a06a8b6622d5d683457f11629522b121e0b429eec6d11dce4f4020dfb3
+DIST tig-2.5.5.tar.gz 1175752 BLAKE2B c77ff0990e5984df6a247cddb1729532719617178fb89143f1f78817f686cb357bc80678e8a1c245c338a40c20c69473b554d8af83381386821358495ed26f29 SHA512 63f617dfcbd89de715573caa92ca83906cefa6a5229876f1d5390b4b58442b0bec958065b798d4e81729dc87bf6dcd2a392fbbab2cd66ca16df6e2e9d6362ca3
 EBUILD tig-2.5.1-r1.ebuild 1292 BLAKE2B 4d3e05ff64db4eb174d646ae2e560bf3d4b1f3042c0684ead2d4476dd0aace2795b6f028e208e17f70ba02498ecb3ee05e9c92437d9df31ffbd110ab32895925 SHA512 12171f912ba5c1a6defd8d6a5abea086ff7bbed7672d6bb9b11a260eadb8709284c7abdb046c2e29bfca7492dc703a6962c4fae4cf0e0900849094cecc905139
 EBUILD tig-2.5.3-r2.ebuild 1283 BLAKE2B 6ffab61b7f4f4187a7f0b0a1559fe32789dac14caa545055703d8faec6d7ec5f9a8e405aed34f3da28caf902c13f9fca90fff733ae0842f59b4c04cf37d1bad3 SHA512 4ba1422e5e1f2ebabd9bdc8297aacba7910c298fdf2fe91ee3f8bd53fb5fef109574c0f84642a4cdd659864dc79feb009105feba24ed4aa01dd2cfbc9b24f4dc
 EBUILD tig-2.5.4-r1.ebuild 1290 BLAKE2B 8812b950ece1bcf3923758eb5ec6303163f731ec6401736b319eb875c6d9aec6bc052fb93ee7beb6cfe0f5e93eb572fa2849bd647d25c1e0114e930aac373173 SHA512 20baf997a446ceb658474166d6acf4072f7068463040b3b8abbb39a920d628dcf14615db42da21521b943b3699e7b867e64ae48f5c960ae769e3631fdfac9f31
-EBUILD tig-9999.ebuild 1304 BLAKE2B 66644d8a2804c5f2156563a90a68361624e3b9743de11452337824d588385ca3f44fcd5412fcf363e09a59ee2692bc1b445362686456c69bdbff381a272b198c SHA512 e042d94027f1101204ecf32f12d0a6328395c2dce5ee7713e9855213b8089e7bb62b42334bc7786e461cd6b91d71e54750d4e9f930aa9fde2d091139f4cd23a5
+EBUILD tig-2.5.5.ebuild 1387 BLAKE2B d6c8b816650720fec8b55378b82efa8b902f7bfcb956e494042ed1e966bcb8176f67251f374f006fb22b21d294ac6e9952500dad647e35c66b8ebb923afb4299 SHA512 90da86dc0394df0b870e942677a83480c157f798e463dddc63e1ff70d464ffd9632f75d0b509b36eca85ecb89559e3a3159aa09d16c58884ecdd68c2c7c746da
+EBUILD tig-9999.ebuild 1387 BLAKE2B d6c8b816650720fec8b55378b82efa8b902f7bfcb956e494042ed1e966bcb8176f67251f374f006fb22b21d294ac6e9952500dad647e35c66b8ebb923afb4299 SHA512 90da86dc0394df0b870e942677a83480c157f798e463dddc63e1ff70d464ffd9632f75d0b509b36eca85ecb89559e3a3159aa09d16c58884ecdd68c2c7c746da
 MISC metadata.xml 717 BLAKE2B c92a0b14d4fd37479475e347e4157da9c6a6d81e7d0ee6c3cf389745eacf8c3cffb32ea696e89aad73f8fd46ce64f26500c2dc26ca8b1414e76019f1268db6f5 SHA512 b0a832d79a25f6d9d8161967a4b659b32f322c7bdc2a0c0d1001d48505c516c4802f941fb433abf9a027292cf5b0dedce2dd60e5ac68a0992eb309b66cc5db39
diff --git a/dev-vcs/tig/tig-2.5.5.ebuild b/dev-vcs/tig/tig-2.5.5.ebuild
new file mode 100644
index 000000000000..656ca0a2e20b
--- /dev/null
+++ b/dev-vcs/tig/tig-2.5.5.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/jonas/tig.git"
+	inherit git-r3 autotools
+else
+	SRC_URI="https://github.com/jonas/tig/releases/download/${P}/${P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+fi
+
+DESCRIPTION="text mode interface for git"
+HOMEPAGE="https://jonas.github.io/tig/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="pcre test unicode"
+REQUIRED_USE="test? ( unicode )"
+
+DEPEND="
+	sys-libs/ncurses:=[unicode(+)?]
+	sys-libs/readline:0=
+	pcre? ( dev-libs/libpcre2:= )
+"
+RDEPEND="
+	${DEPEND}
+	dev-vcs/git
+"
+[[ ${PV} == "9999" ]] && BDEPEND+=" app-text/asciidoc app-text/xmlto"
+
+# encoding/env issues
+RESTRICT="test"
+
+src_prepare() {
+	default
+	[[ ${PV} == "9999" ]] && eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_with pcre) \
+		$(use_with unicode ncursesw)
+}
+
+src_compile() {
+	emake V=1
+	[[ ${PV} == "9999" ]] && emake V=1 doc-man doc-html
+}
+
+src_test() {
+	# workaround parallel test failures
+	LC_ALL=en_US.utf8 emake -j1 test
+}
+
+src_install() {
+	emake DESTDIR="${D}" install install-doc-man
+	dodoc doc/manual.html README.html NEWS.html
+	newbashcomp contrib/tig-completion.bash ${PN}
+
+	docinto examples
+	dodoc contrib/*.tigrc
+}
diff --git a/dev-vcs/tig/tig-9999.ebuild b/dev-vcs/tig/tig-9999.ebuild
index 3ea9666006a2..656ca0a2e20b 100644
--- a/dev-vcs/tig/tig-9999.ebuild
+++ b/dev-vcs/tig/tig-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit bash-completion-r1
 
@@ -18,14 +18,18 @@ HOMEPAGE="https://jonas.github.io/tig/"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="test unicode"
+IUSE="pcre test unicode"
 REQUIRED_USE="test? ( unicode )"
 
 DEPEND="
 	sys-libs/ncurses:=[unicode(+)?]
-	sys-libs/readline:0="
-RDEPEND="${DEPEND}
-	dev-vcs/git"
+	sys-libs/readline:0=
+	pcre? ( dev-libs/libpcre2:= )
+"
+RDEPEND="
+	${DEPEND}
+	dev-vcs/git
+"
 [[ ${PV} == "9999" ]] && BDEPEND+=" app-text/asciidoc app-text/xmlto"
 
 # encoding/env issues
@@ -37,7 +41,9 @@ src_prepare() {
 }
 
 src_configure() {
-	econf $(use_with unicode ncursesw)
+	econf \
+		$(use_with pcre) \
+		$(use_with unicode ncursesw)
 }
 
 src_compile() {
@@ -47,7 +53,7 @@ src_compile() {
 
 src_test() {
 	# workaround parallel test failures
-	emake -j1 test
+	LC_ALL=en_US.utf8 emake -j1 test
 }
 
 src_install() {
-- 
cgit v1.2.3