commit:     48fa0f33ae76bc7b515fda6d2c22d966cb607d62
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 25 20:37:08 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Feb 25 20:38:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48fa0f33

dev-vcs/git: Bump to version 2.12.0

Replaced gnome-keyring support with libsecret (bug #610376).
Dropped hppa keyword because libsecret is not keyworded for hppa.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-vcs/git/Manifest                            |   3 +
 dev-vcs/git/files/git-2.12.0-optional-cvs.patch | 456 ++++++++++++++++
 dev-vcs/git/git-2.12.0.ebuild                   | 687 ++++++++++++++++++++++++
 dev-vcs/git/metadata.xml                        |   1 +
 4 files changed, 1147 insertions(+)

diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
index e0a50c284b..24d15e5dd6 100644
--- a/dev-vcs/git/Manifest
+++ b/dev-vcs/git/Manifest
@@ -2,6 +2,7 @@ DIST git-2.10.1.tar.xz 4102452 SHA256 
a9c32df9061cfc2c194ecaa0357ba273c1f24a0dbf
 DIST git-2.10.2.tar.xz 4106108 SHA256 
94802903dd707d85ca3b9a2be35e936a54ce86375f52c6a789efe7ce7e238671 SHA512 
0ab09de481dbb31c3304382afaa5d3fc9f861115c9954c65b11a8a1c34b939118c7ed3ff60ac329145888596388e3e4d2b2fb677fe109d33a57206d531b5ee6a
 WHIRLPOOL 
808404fa13f908d149028f64aaf5b73400448fff6393dabfaa874d750065e86ff5dae4903724cbca4e59fb74b3ff30b8b8f0a0f1435a0a90c18267c7a0550de6
 DIST git-2.11.0.tar.xz 4197984 SHA256 
7e7e8d69d494892373b87007674be5820a4bc1ef596a0117d03ea3169119fd0b SHA512 
f9588dfcb4ae38adc46300b8ef65ee51343fc4685f9e43bffff10839a492e6a54c7f7a774687fef3ebb8a30108775aa472cda2378aa202905f8555bfb9d4ede2
 WHIRLPOOL 
73ce3c2cb083906b1e55245935a01b27881be48d2c4c3cace8353a4c2baf87fe3ce338553f66407cb629fa9c8c63d396ef09f4d6aa18803d487af4dd3fef8f10
 DIST git-2.11.1.tar.xz 4208132 SHA256 
c0a779cae325d48a1d5ba08b6ee1febcc31d0657a6da01fd1dec1c6e10976415 SHA512 
c9d4196ad9c4f656b5a25fe688c06248bfce4fadac38e9bc835e5e9063ab95e3d4b3db4174acea0b3b64c5455adc93d39870f2b6009d2dd6aa0edb5a5f5bda40
 WHIRLPOOL 
c91d7d096348cacd5a691d12406acb98d7fd703ac06e4d4fc31d85eead29c87860a96d43df06c1e3610837b4eb34adccb5b7b259531e064d495347fd2b14914e
+DIST git-2.12.0.tar.xz 4269944 SHA256 
1821766479062d052cc1897d0ded95212e81e5c7f1039786bc4aec2225a32027 SHA512 
8696de600f6800748096de9ccb54a0ba59a9128617fc6c9a5bc48857798a775209b99ad484aef777d5d6b5c3ac172e5e5071740d073e0ac8d52c54561a9bed0b
 WHIRLPOOL 
58b31af59bd63ee0bed3c65815822eb86cee515d5ca34ee83e7d4096b2b199259933c8051abc27bd978cbc7c3d669503bc6b491a82dd696ee7d8b567b003755a
 DIST 
git-2.7.3-00-9831e92bfa833ee9c0ce464bbc2f941ae6c2698d-lose-name-path.patch 
28198 SHA256 b6bf7d67b9cc4d34550a10933af63b665b136b869dbbe23ad3ece0d463f027f9 
SHA512 
3fd64b0d6b53d5b08b791195e6edc162db682fc8a1bafc04aab7a7a4e61e2db4b3b84d9f769e0d7756da2739bdd900e30a233c228706c39817e42e309c36684c
 WHIRLPOOL 
7e1d9337d46222ea4ae2164429a6a220adb0f763bdde6722c0f2adf79789e092f5cfb74b932597b8d3971af4fc27dede1fea51b9cb72b44ec8e30bd78bdaaa8d
 DIST git-2.7.3.tar.xz 3909636 SHA256 
89c467912d4740da2b40288f956251f0a1e276e28eecd28a6d776067103629b6 SHA512 
f7acbf52d12f39d323bd90a82c7135aa2aacf2661f7087c71b41dbfbec688342e0a2fc061fc0f216848a538a0dbc4fce68e24ea2a26e747f5eb92f763fa5bc72
 WHIRLPOOL 
5cc261749f91c2e0b0509d2fac1bc7426b3ddcc37e859d4f524838e1dd471071ad430886751933bae57aafc20bdcf3f9a43f4c018cc9c89610134a5203b22447
 DIST git-2.7.4.tar.xz 3909636 SHA256 
dee574defbe05ec7356a0842ddbda51315926f2fa7e39c2539f2c3dcc52e457b SHA512 
82a646140834e909bf1748a017e86f37f0711c759fe0a6ad03529beb57c79742cb7bf77c2dba29ccd84fcf3d5f18ad9c85c00f002d3b257be42e058750423da7
 WHIRLPOOL 
74532038b6ba95a5354f43ebad00a9c159c495d46e7dc1b8a2a59f5a86e149538190d9800144a719dcc00e28cfea1039cd5dbfb67fd5aac5e7d0998d3231bae3
@@ -11,6 +12,7 @@ DIST git-htmldocs-2.10.1.tar.xz 1067144 SHA256 
40f9ce980f91c0391438e5d04a1bb11b1
 DIST git-htmldocs-2.10.2.tar.xz 1068436 SHA256 
dd43111c3518a92a7fe64ac5cd32a5d4d77d49c67f7d89dce3e8293bc3d6b491 SHA512 
8ef57218d7eef285ac427414d92bd5e8eba5c85c2a2a9ec0e423705ee2cb6f26dd33ad780d1b4237e7534dbe5cc3b4d8eea5780d0acc49066d78fc1893df2525
 WHIRLPOOL 
160fe3446d959d0f2315c9b2be182925619a4d89343602038e92283abdb393805eb5252799c502b83641d9e23a157332033baaa1ef2f1d9401cbbf372d8e86d7
 DIST git-htmldocs-2.11.0.tar.xz 1080584 SHA256 
3975399f1be3d959edf0fded03eab8fbf94787bfd0318b7644c77cf61e4a7b48 SHA512 
50250028030b1b277c17f27bc8bc0aa35938e7ae690d59bfff0a2d1f91c60564b254ce5b242f9ca081bfae60a9fb70cef538586abc0878bab6105e904748ee63
 WHIRLPOOL 
0839629b8f2fa08e22b69fe3638d67ae08d78dceaa008d8f35932ff361a1c1d8dbcd1262d4e469b5cd511a5dfb1848061d8e3491051188d0f90a6f0f98fa8003
 DIST git-htmldocs-2.11.1.tar.xz 1083264 SHA256 
1a5f1e4a5eadad89b0783efa08bb1f7e3802d4a4d0a135bf5f61fd672ea3846e SHA512 
dee37cfa0870f7289c66c3c58bb86d01324bfd30f4d4a05dedebef98ddb38339c7937bb2caee0e1d35ef579de414e5f280d5fd9f48fb427f497fe2f7d62f7d2a
 WHIRLPOOL 
0ec4856405dbbc89547ab6d7236a787516fb7b8a8d2a3ff190b310c6b83cccfd080a5e9bac0523c99b34849b14a0eb96ffc16348643f65b38ebcdc3c8d8cd17e
+DIST git-htmldocs-2.12.0.tar.xz 1091612 SHA256 
bd548faa2c9e63403e528ce4f4e87561e78949a0349a9e2a27e0d6e581d3a8bd SHA512 
818e9ea13195aaa61768b5f3257591a178b4bc4eb25cf9b426b2b2ce6a1b97956eef5f1d4a99fbd5b730f7cf813d29b0a8a019793b9ff1383b607179eaf3089f
 WHIRLPOOL 
d49d17177477e9e4fb3e5e4f4526dec86903b150626f67cc50e25c86870b7d7fec91cc9b61d5e2def0fbb26d9b39f129363eb2d9fc48bc9659dc5d65c315cce7
 DIST git-htmldocs-2.7.3.tar.xz 1031848 SHA256 
f71f5e8e1a6103e83ea794f367bc419a1d14ba0f79ebacdc81b3b9430714adea SHA512 
50de5d9d3c0f6d874a6a4bc3b247a1795b1bcf154a276b546f88c3b5f5fb2eb27212d207a4bb50c04cba36d8537853afd25816addfb87c9a50e18528d93586fe
 WHIRLPOOL 
057d9bebfe51c29a0a7f689baa9873cb6a54feb1d2869c541396902b160379c9220c5de79a4cb59c6e804e5c7557c0fd141b89621b97d3b495dc6e0a77c67a9f
 DIST git-htmldocs-2.7.4.tar.xz 1032428 SHA256 
3fae21e2e68104621ea1405be73192b46bf3ef29bbc248a81b1e7e6fcf5acfad SHA512 
f05b7b8a4dd4abe23f7e51982e9c33026aa31610ac8640028aeae6b310b70b764aee9a81fa702ed0712ccf1b7ad897e06163eb5c5246c14f6cce7c5f4e462682
 WHIRLPOOL 
87fc486d182a4b72fd906105fefcc53b722c4ae6832b290cd6f759ac1eca7ebfbbe7c0e72c1d7b5ef3581d19d7576f1d0387d6e5b0a33d960d57f59ee61a7869
 DIST git-htmldocs-2.8.4.tar.xz 1042260 SHA256 
78135be591e3a68d1030a76e343d59622e5e40f6990667f4385a01d9dafe9bbd SHA512 
5da40db4421f94a969b83bfa0ea6e5ccf3fce8c2085ea2271a2eb3e1b4fc496c36ae8790207cd1814ff747b7633bb27fd53bb9c012f866ea1e7f1cc8065379dd
 WHIRLPOOL 
4f80041ad4ef8b178a6b91313680433a7e07b0ecb15354304436d70880063b2f9cdd875fcd95684a817272d05a57485e1863e9e06c3788eddf0e5f031279ea9a
@@ -19,6 +21,7 @@ DIST git-manpages-2.10.1.tar.xz 395560 SHA256 
89ff7aae275252d6b01cac6479e10e1be2
 DIST git-manpages-2.10.2.tar.xz 395556 SHA256 
83b0a317f6039ad95ef6af6a182cf659c2d053eed5d8f70b06710eb787f8aa6f SHA512 
0dc5df8441601865511983b85762102396cbf7c704fd831eb6666ef7b7639252b971f6b4080b8a57226a86124edcdd77acf24374da22047bd315769a09109bef
 WHIRLPOOL 
e1d6b9cb4479b584c16a25a4f3b0528d96d483307e768efea3d7bd8156d74e1c59b61a641dfe5671f4cb01a02f10322262d133cb76f85194ac97ee74c6195d0e
 DIST git-manpages-2.11.0.tar.xz 399992 SHA256 
b3d3e78829c0b69b727aaca407ecfe239a46db3f354f16189f7a7c10af9528d8 SHA512 
5b72b2dd7e151bde0fdc5ca5044391ebd9943ee8313133fdea1e0cb13b90ddd9164ee46f9c49ca2a70f636da7bcb54651a6389ed1c0a8693cf8eb31bfea49079
 WHIRLPOOL 
93fd5b6819ab0942421368d9c0e4723d6f5d2650e94ad8cab225499bb616f162e754a5e08a8f7f0ec74e378069cec0109047c72b67fa9d5c2d244399127b942a
 DIST git-manpages-2.11.1.tar.xz 400812 SHA256 
69486ed339ee0591001ae83d43c888aa26351b9680b6ceb59e06b593051bca31 SHA512 
ffa197ed163031f14882f85124399a7de3b1cadee089cb3d85a6b936215b23243102fd99fdf877f0a8b9d660711e994022cce8893ae27c0295a12dceb41c7f6b
 WHIRLPOOL 
072416db28149c4531f05183ad515bc030611d68c1e7975dcf3f173aeedfb96607262ed120fcf8bea74a1c95b18ec98580cc2ae5e825b8f359e9b24021de7218
+DIST git-manpages-2.12.0.tar.xz 403112 SHA256 
8b8356f8d50eff6499c5d05e87c106a7b1b48bd16de1742fa022631909804773 SHA512 
07e7e85bc165b8c128d9a0192f3a75b36346dd45e0f2d17604e0df83dece79f300141d8c798059a15da441f62cb535d3e2da7c15a975c34d3557542e6f608298
 WHIRLPOOL 
cc66c9a62ef682b8d249061697287cacb0a96f89eca87c8053f78c5616d436a0ecfd2f2e2ab5daad282e1b0c27ce36c097b7681cfe2458bd22684a4d15e6a0f5
 DIST git-manpages-2.7.3.tar.xz 384544 SHA256 
9f088427c61a9e0a840007c7f50fc6f7caba36ac8c403460c49210983090496d SHA512 
883441df049bfaf0f22cf9d17041125dc9c8f0e7d94efa7a4188a68c2242d1b4c3d34fd3bd3ecdd2af905ee2f8fb5fefd0ce6328dd76c665f7ec20e3b9c87d1b
 WHIRLPOOL 
7ee013444665366ecb8f3df507a3c5af8a9f48d3185783a94db827b192c32ac6998157eb42bcbfe397f96d452451b2416c32e2dffbabc71062422e7c5e25c184
 DIST git-manpages-2.7.4.tar.xz 384460 SHA256 
d04fd81ab8aa32efbe54acd27ab5c88ef4ab615313e4cdfa793dd0065899ce25 SHA512 
1af6f0d9fc3945a5a215092caabd0963f3eaa35c5f3b0270861b625bf7bd88e4fdea9b3e50ce1b10c79a12ee2b06b203fab4aa9d566560535c1decf7b2d987cd
 WHIRLPOOL 
38306b6e198336dd3c75a9fd032b636e0e43a3b75eba2746d2d42c3752cf7405b1f8572199748509974d68bfc77c74fbea52626884f9b509d8b593cefce4aad5
 DIST git-manpages-2.8.4.tar.xz 387168 SHA256 
d2ddfc302e5b3c0ad182916b27c28d95bc667ea8b9db8dc099bf3d8d62b8b7f5 SHA512 
d4ffca6ad8ff0b6bfab984eb06ad5c6c0cf73cfb4beaff4e924b2bd117a4a369e928faa2ca09f11903ebc52249ad24e2b68e7b571965a2ef48f5731ad94b9bef
 WHIRLPOOL 
a22d7ad38ccfb399325e321cecc7255fdf4ca05f14e92acfe94e74b816199d2e057a559f6e3eede2df768d762457eb2a43f1e9c76e8b6e76c7498dc9547dcf25

diff --git a/dev-vcs/git/files/git-2.12.0-optional-cvs.patch 
b/dev-vcs/git/files/git-2.12.0-optional-cvs.patch
new file mode 100644
index 0000000000..d158b65d30
--- /dev/null
+++ b/dev-vcs/git/files/git-2.12.0-optional-cvs.patch
@@ -0,0 +1,456 @@
+From 1e1bacf32568cc24dbd24444ed4025fc80a96ff3 Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robb...@gentoo.org>
+Date: Sat, 25 Feb 2017 20:48:14 +0100
+Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
+ utilities
+
+Forward-ported from 1.7.12 to current git.git v1.8.4
+Forward-ported from v1.8.4 to v1.8.5.1
+Forward-ported from v1.8.5.3 to v1.9.0_rc3
+Forward-ported from 1.9.0_rc3 to current git.git v2.0.0_rc0
+Forward-ported from v2.0.0_rc0 to v2.0.0
+Forward-ported from v2.0.0 to v2.2.2
+Forward-ported from v2.2.2 to v2.8.4
+Forward-ported from v2.8.4 to v2.10.0
+Forward-ported from v2.10.0 to v2.12.0
+
+Signed-off-by: Lars Wendler <polynomia...@gentoo.org>
+---
+ Makefile                           | 51 ++++++++++++++++++++++++++++----------
+ t/t9200-git-cvsexportcommit.sh     |  5 ++++
+ t/t9400-git-cvsserver-server.sh    |  8 +++++-
+ t/t9401-git-cvsserver-crlf.sh      | 15 +++++++----
+ t/t9600-cvsimport.sh               | 41 +++++++++++++++++++-----------
+ t/t9601-cvsimport-vendor-branch.sh | 11 ++++++++
+ t/t9602-cvsimport-branches-tags.sh | 11 ++++++++
+ t/t9603-cvsimport-patchsets.sh     | 11 ++++++++
+ t/test-lib.sh                      |  1 +
+ 9 files changed, 120 insertions(+), 34 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8e4081e06..f14a4ad37 100644
+--- a/Makefile
++++ b/Makefile
+@@ -273,6 +273,8 @@ all::
+ # Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep
+ # and egrep that are pickier when their input contains non-ASCII data.
+ #
++# Define NO_CVS if you do not want any CVS interface utilities.
++#
+ # The TCL_PATH variable governs the location of the Tcl interpreter
+ # used to optimize git-gui for your system.  Only used if NO_TCLTK
+ # is not set.  Defaults to the bare 'tclsh'.
+@@ -496,6 +498,7 @@ LIB_OBJS =
+ PROGRAM_OBJS =
+ PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -532,12 +535,13 @@ SCRIPT_LIB += git-sh-i18n
+ 
+ SCRIPT_PERL += git-add--interactive.perl
+ SCRIPT_PERL += git-archimport.perl
+-SCRIPT_PERL += git-cvsexportcommit.perl
+-SCRIPT_PERL += git-cvsimport.perl
+-SCRIPT_PERL += git-cvsserver.perl
+ SCRIPT_PERL += git-send-email.perl
+ SCRIPT_PERL += git-svn.perl
+ 
++SCRIPT_PERL_CVS += git-cvsexportcommit.perl
++SCRIPT_PERL_CVS += git-cvsimport.perl
++SCRIPT_PERL_CVS += git-cvsserver.perl
++
+ SCRIPT_PYTHON += git-p4.py
+ 
+ NO_INSTALL += git-remote-testgit
+@@ -545,24 +549,26 @@ NO_INSTALL += git-remote-testgit
+ # Generated files for scripts
+ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+ SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
++SCRIPT_PERL_CVS_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL_CVS))
+ SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
+ 
+ SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))
+ SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN))
++SCRIPT_PERL_CVS_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_CVS_GEN))
+ SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN))
+ 
+ # Individual rules to allow e.g.
+ # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
+ # from subdirectories like contrib/*/
+ .PHONY: build-perl-script build-sh-script build-python-script
+-build-perl-script: $(SCRIPT_PERL_GEN)
++build-perl-script: $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
+ build-sh-script: $(SCRIPT_SH_GEN)
+ build-python-script: $(SCRIPT_PYTHON_GEN)
+ 
+ .PHONY: install-perl-script install-sh-script install-python-script
+ install-sh-script: $(SCRIPT_SH_INS)
+       $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+-install-perl-script: $(SCRIPT_PERL_INS)
++install-perl-script: $(SCRIPT_PERL_INS) $(SCRIPT_PERL_CVS_INS)
+       $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+ install-python-script: $(SCRIPT_PYTHON_INS)
+       $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+@@ -571,12 +577,13 @@ install-python-script: $(SCRIPT_PYTHON_INS)
+ clean-sh-script:
+       $(RM) $(SCRIPT_SH_GEN)
+ clean-perl-script:
+-      $(RM) $(SCRIPT_PERL_GEN)
++      $(RM) $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
+ clean-python-script:
+       $(RM) $(SCRIPT_PYTHON_GEN)
+ 
+ SCRIPTS = $(SCRIPT_SH_INS) \
+         $(SCRIPT_PERL_INS) \
++        $(SCRIPT_PERL_CVS_INS) \
+         $(SCRIPT_PYTHON_INS) \
+         git-instaweb
+ 
+@@ -1832,10 +1839,24 @@ git.res: git.rc GIT-VERSION-FILE
+         -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@
+ 
+ # This makes sure we depend on the NO_PERL setting itself.
+-$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
++$(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN): GIT-BUILD-OPTIONS
++
++_SCRIPT_PERL_GEN =
++_SCRIPT_PERL_NOGEN =
+ 
+ ifndef NO_PERL
+-$(SCRIPT_PERL_GEN): perl/perl.mak
++
++_SCRIPT_PERL_GEN = $(SCRIPT_PERL_GEN)
++
++ifndef NO_CVS
++_SCRIPT_PERL_GEN += $(SCRIPT_PERL_CVS_GEN)
++else
++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_CVS_GEN)
++_REASON = NO_CVS
++_REASON_CONTENT = $(NO_CVS)
++endif # NO_CVS
++
++$(_SCRIPT_PERL_GEN): perl/perl.mak
+ 
+ perl/perl.mak: perl/PM.stamp
+ 
+@@ -1848,7 +1869,7 @@ perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile 
perl/Makefile.PL
+       $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' 
prefix='$(prefix_SQ)' $(@F)
+ 
+ PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
+-$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
++$(_SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES 
GIT-VERSION-FILE
+       $(QUIET_GEN)$(RM) $@ $@+ && \
+       INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory 
instlibdir` && \
+       INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
+@@ -1882,14 +1903,18 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES
+       chmod +x $@+ && \
+       mv $@+ $@
+ else # NO_PERL
+-$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN) git-instaweb
++_REASON = NO_PERL
++_REASON_CONTENT = $(NO_PERL)
++endif # NO_PERL
++
++$(_SCRIPT_PERL_NOGEN): % : unimplemented.sh
+       $(QUIET_GEN)$(RM) $@ $@+ && \
+       sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+-          -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
++          -e 's|@@REASON@@|$(_REASON)=$(_REASON_CONTENT)|g' \
+           unimplemented.sh >$@+ && \
+       chmod +x $@+ && \
+       mv $@+ $@
+-endif # NO_PERL
+ 
+ # This makes sure we depend on the NO_PYTHON setting itself.
+ $(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
+@@ -2125,7 +2150,7 @@ LOCALIZED_SH = $(SCRIPT_SH)
+ LOCALIZED_SH += git-parse-remote.sh
+ LOCALIZED_SH += git-rebase--interactive.sh
+ LOCALIZED_SH += git-sh-setup.sh
+-LOCALIZED_PERL = $(SCRIPT_PERL)
++LOCALIZED_PERL = $(SCRIPT_PERL) $(SCRIPT_PERL_CVS)
+ 
+ ifdef XGETTEXT_INCLUDE_TESTS
+ LOCALIZED_C += t/t0200/test.c
+diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
+index bb879a527..17be19729 100755
+--- a/t/t9200-git-cvsexportcommit.sh
++++ b/t/t9200-git-cvsexportcommit.sh
+@@ -11,6 +11,11 @@ if ! test_have_prereq PERL; then
+       test_done
+ fi
+ 
++if ! test_have_prereq CVS; then
++      skip_all='skipping git cvsexportcommit tests, cvs not available'
++      test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
+index 432c61d24..6907b3f52 100755
+--- a/t/t9400-git-cvsserver-server.sh
++++ b/t/t9400-git-cvsserver-server.sh
+@@ -11,9 +11,15 @@ cvs CLI client via git-cvsserver server'
+ . ./test-lib.sh
+ 
+ if ! test_have_prereq PERL; then
+-      skip_all='skipping git cvsserver tests, perl not available'
++      skip_all='skipping git-cvsserver tests, perl not available'
+       test_done
+ fi
++
++if ! test_have_prereq CVS; then
++      skip_all='skipping git-cvsserver tests, cvs not available'
++      test_done
++fi
++
+ cvs >/dev/null 2>&1
+ if test $? -ne 1
+ then
+diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
+index 84787eee9..eecba8852 100755
+--- a/t/t9401-git-cvsserver-crlf.sh
++++ b/t/t9401-git-cvsserver-crlf.sh
+@@ -57,15 +57,20 @@ check_status_options() {
+     return $stat
+ }
+ 
+-cvs >/dev/null 2>&1
+-if test $? -ne 1
++if ! test_have_prereq PERL
+ then
+-    skip_all='skipping git-cvsserver tests, cvs not found'
++    skip_all='skipping git-cvsserver tests, perl not available'
+     test_done
+ fi
+-if ! test_have_prereq PERL
++if ! test_have_prereq CVS
+ then
+-    skip_all='skipping git-cvsserver tests, perl not available'
++    skip_all='skipping git-cvsserver tests, cvs not available'
++    test_done
++fi
++cvs >/dev/null 2>&1
++if test $? -ne 1
++then
++    skip_all='skipping git-cvsserver tests, cvs not found'
+     test_done
+ fi
+ perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
+index 4c384ff02..d601f32c5 100755
+--- a/t/t9600-cvsimport.sh
++++ b/t/t9600-cvsimport.sh
+@@ -3,14 +3,25 @@
+ test_description='git cvsimport basic tests'
+ . ./lib-cvs.sh
+ 
+-test_expect_success PERL 'setup cvsroot environment' '
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
++test_expect_success 'setup cvsroot environment' '
+       CVSROOT=$(pwd)/cvsroot &&
+       export CVSROOT
+ '
+ 
+-test_expect_success PERL 'setup cvsroot' '$CVS init'
++test_expect_success 'setup cvsroot' '$CVS init'
+ 
+-test_expect_success PERL 'setup a cvs module' '
++test_expect_success 'setup a cvs module' '
+ 
+       mkdir "$CVSROOT/module" &&
+       $CVS co -d module-cvs module &&
+@@ -42,23 +53,23 @@ EOF
+       )
+ '
+ 
+-test_expect_success PERL 'import a trivial module' '
++test_expect_success 'import a trivial module' '
+ 
+       git cvsimport -a -R -z 0 -C module-git module &&
+       test_cmp module-cvs/o_fortuna module-git/o_fortuna
+ 
+ '
+ 
+-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
++test_expect_success 'pack refs' '(cd module-git && git gc)'
+ 
+-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
++test_expect_success 'initial import has correct .git/cvs-revisions' '
+ 
+       (cd module-git &&
+        git log --format="o_fortuna 1.1 %H" -1) > expected &&
+       test_cmp expected module-git/.git/cvs-revisions
+ '
+ 
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+       (cd module-cvs &&
+       cat <<EOF >o_fortuna &&
+ O Fortune,
+@@ -86,7 +97,7 @@ EOF
+       )
+ '
+ 
+-test_expect_success PERL 'update git module' '
++test_expect_success 'update git module' '
+ 
+       (cd module-git &&
+       git config cvsimport.trackRevisions true &&
+@@ -97,7 +108,7 @@ test_expect_success PERL 'update git module' '
+ 
+ '
+ 
+-test_expect_success PERL 'update has correct .git/cvs-revisions' '
++test_expect_success 'update has correct .git/cvs-revisions' '
+ 
+       (cd module-git &&
+        git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
+@@ -105,7 +116,7 @@ test_expect_success PERL 'update has correct 
.git/cvs-revisions' '
+       test_cmp expected module-git/.git/cvs-revisions
+ '
+ 
+-test_expect_success PERL 'update cvs module' '
++test_expect_success 'update cvs module' '
+ 
+       (cd module-cvs &&
+               echo 1 >tick &&
+@@ -114,7 +125,7 @@ test_expect_success PERL 'update cvs module' '
+       )
+ '
+ 
+-test_expect_success PERL 'cvsimport.module config works' '
++test_expect_success 'cvsimport.module config works' '
+ 
+       (cd module-git &&
+               git config cvsimport.module module &&
+@@ -126,7 +137,7 @@ test_expect_success PERL 'cvsimport.module config works' '
+ 
+ '
+ 
+-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
++test_expect_success 'second update has correct .git/cvs-revisions' '
+ 
+       (cd module-git &&
+        git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
+@@ -135,7 +146,7 @@ test_expect_success PERL 'second update has correct 
.git/cvs-revisions' '
+       test_cmp expected module-git/.git/cvs-revisions
+ '
+ 
+-test_expect_success PERL 'import from a CVS working tree' '
++test_expect_success 'import from a CVS working tree' '
+ 
+       $CVS co -d import-from-wt module &&
+       (cd import-from-wt &&
+@@ -148,12 +159,12 @@ test_expect_success PERL 'import from a CVS working 
tree' '
+ 
+ '
+ 
+-test_expect_success PERL 'no .git/cvs-revisions created by default' '
++test_expect_success 'no .git/cvs-revisions created by default' '
+ 
+       ! test -e import-from-wt/.git/cvs-revisions
+ 
+ '
+ 
+-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
+ 
+ test_done
+diff --git a/t/t9601-cvsimport-vendor-branch.sh 
b/t/t9601-cvsimport-vendor-branch.sh
+index 827d39f5b..d730a41f6 100755
+--- a/t/t9601-cvsimport-vendor-branch.sh
++++ b/t/t9601-cvsimport-vendor-branch.sh
+@@ -34,6 +34,17 @@
+ test_description='git cvsimport handling of vendor branches'
+ . ./lib-cvs.sh
+ 
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
+ setup_cvs_test_repository t9601
+ 
+ test_expect_success PERL 'import a module with a vendor branch' '
+diff --git a/t/t9602-cvsimport-branches-tags.sh 
b/t/t9602-cvsimport-branches-tags.sh
+index e1db323f5..68f097401 100755
+--- a/t/t9602-cvsimport-branches-tags.sh
++++ b/t/t9602-cvsimport-branches-tags.sh
+@@ -6,6 +6,17 @@
+ test_description='git cvsimport handling of branches and tags'
+ . ./lib-cvs.sh
+ 
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
+ setup_cvs_test_repository t9602
+ 
+ test_expect_success PERL 'import module' '
+diff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh
+index c4c3c4954..9b2957d4f 100755
+--- a/t/t9603-cvsimport-patchsets.sh
++++ b/t/t9603-cvsimport-patchsets.sh
+@@ -14,6 +14,17 @@
+ test_description='git cvsimport testing for correct patchset estimation'
+ . ./lib-cvs.sh
+ 
++if ! test_have_prereq PERL
++then
++    skip_all='skipping git cvsimport tests, perl not available'
++    test_done
++fi
++if ! test_have_prereq CVS
++then
++    skip_all='skipping git cvsimport tests, cvs not available'
++    test_done
++fi
++
+ setup_cvs_test_repository t9603
+ 
+ test_expect_failure PERL 'import with criss cross times on revisions' '
+diff --git a/t/test-lib.sh b/t/test-lib.sh
+index 86d77c16d..1fb51f149 100644
+--- a/t/test-lib.sh
++++ b/t/test-lib.sh
+@@ -1007,6 +1007,7 @@ case $uname_s in
+ esac
+ 
+ ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
++test -z "$NO_CVS" && test_set_prereq CVS
+ test -z "$NO_PERL" && test_set_prereq PERL
+ test -z "$NO_PYTHON" && test_set_prereq PYTHON
+ test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE
+-- 
+2.11.1
+

diff --git a/dev-vcs/git/git-2.12.0.ebuild b/dev-vcs/git/git-2.12.0.ebuild
new file mode 100644
index 0000000000..a1f5e74e5a
--- /dev/null
+++ b/dev-vcs/git/git-2.12.0.ebuild
@@ -0,0 +1,687 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+[[ ${PV} == *9999 ]] && SCM="git-r3"
+# 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: pu
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
+EGIT_BRANCH=maint
+PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN"
+
+inherit toolchain-funcs eutils elisp-common l10n perl-module 
bash-completion-r1 python-single-r1 systemd ${SCM}
+
+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="http://www.git-scm.com/";
+if [[ ${PV} != *9999 ]]; then
+       SRC_URI_SUFFIX="xz"
+       SRC_URI_KORG="mirror://kernel/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}
+                       )"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh 
~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris 
~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+blksha1 +curl cgi doc emacs +gpg gtk highlight +iconv libressl 
libsecret mediawiki mediawiki-experimental +nls +pcre +perl +python ppcsha1 tk 
+threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:= )
+       libsecret? ( app-crypt/libsecret )
+       sys-libs/zlib
+       pcre? ( dev-libs/libpcre )
+       perl? ( dev-lang/perl:=[-build(-)] )
+       tk? ( dev-lang/tk:0= )
+       curl? (
+               net-misc/curl
+               webdav? ( dev-libs/expat )
+       )
+       emacs? ( virtual/emacs )
+"
+
+RDEPEND="${CDEPEND}
+       gpg? ( app-crypt/gnupg )
+       mediawiki? (
+               dev-perl/DateTime-Format-ISO8601
+               dev-perl/HTML-Tree
+               dev-perl/MediaWiki-API
+       )
+       perl? ( dev-perl/Error
+                       dev-perl/Net-SMTP-SSL
+                       dev-perl/Authen-SASL
+                       cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
+                       cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI 
dev-perl/DBD-SQLite )
+                       subversion? ( dev-vcs/subversion[-dso,perl] 
dev-perl/libwww-perl dev-perl/TermReadKey )
+                       )
+       python? ( gtk?
+       (
+               >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+               >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+       )
+               ${PYTHON_DEPS} )"
+
+# This is how info docs are created with Git:
+#   .txt/asciidoc --(asciidoc)---------> .xml/docbook
+#   .xml/docbook  --(docbook2texi.pl)--> .texi
+#   .texi         --(makeinfo)---------> .info
+DEPEND="${CDEPEND}
+       doc? (
+               app-text/asciidoc
+               app-text/docbook2X
+               sys-apps/texinfo
+               app-text/xmlto
+       )
+       nls? ( sys-devel/gettext )
+       test? ( app-crypt/gnupg )"
+
+# Live ebuild builds man pages and HTML docs, additionally
+if [[ ${PV} == *9999 ]]; then
+       DEPEND="${DEPEND}
+               app-text/asciidoc"
+fi
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+       cgi? ( perl )
+       cvs? ( perl )
+       mediawiki? ( perl )
+       mediawiki-experimental? ( mediawiki )
+       subversion? ( perl )
+       webdav? ( curl )
+       gtk? ( python )
+       python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+PATCHES=(
+       # bug #350330 - automagic CVS when we don't want it is bad.
+       "${FILESDIR}"/git-2.12.0-optional-cvs.patch
+
+       # install mediawiki perl modules also in vendor_dir
+       # hack, needs better upstream solution
+       "${FILESDIR}"/git-1.8.5-mw-vendor.patch
+
+       "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
+
+       # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
+       "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.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 python ; 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 myopts
+
+       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 broken build system ...
+       myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
+       myopts+=" INSTALL=install TAR=tar"
+       myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
+       myopts+=" SANE_TOOL_PATH="
+       myopts+=" OLD_ICONV="
+       myopts+=" NO_EXTERNAL_GREP="
+
+       # For svn-fe
+       extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
+       # can't define this to null, since the entire makefile depends on it
+       sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
+
+       use iconv \
+               || myopts+=" NO_ICONV=YesPlease"
+       use nls \
+               || myopts+=" NO_GETTEXT=YesPlease"
+       use tk \
+               || myopts+=" NO_TCLTK=YesPlease"
+       use pcre \
+               && myopts+=" USE_LIBPCRE=yes" \
+               && extlibs+=" -lpcre"
+       use perl \
+               && myopts+=" INSTALLDIRS=vendor" \
+               || myopts+=" NO_PERL=YesPlease"
+       use python \
+               || myopts+=" NO_PYTHON=YesPlease"
+       use subversion \
+               || myopts+=" NO_SVN_TESTS=YesPlease"
+       use threads \
+               && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
+               || myopts+=" NO_PTHREADS=YesPlease"
+       use cvs \
+               || myopts+=" NO_CVS=YesPlease"
+       use elibc_musl \
+               && myopts+=" NO_REGEX=YesPlease"
+# Disabled until ~m68k-mint can be keyworded again
+#      if [[ ${CHOST} == *-mint* ]] ; then
+#              myopts+=" NO_MMAP=YesPlease"
+#              myopts+=" NO_IPV6=YesPlease"
+#              myopts+=" NO_STRLCPY=YesPlease"
+#              myopts+=" NO_MEMMEM=YesPlease"
+#              myopts+=" NO_MKDTEMP=YesPlease"
+#              myopts+=" NO_MKSTEMPS=YesPlease"
+#      fi
+       if [[ ${CHOST} == ia64-*-hpux* ]]; then
+               myopts+=" NO_NSEC=YesPlease"
+       fi
+       if [[ ${CHOST} == *-*-aix* ]]; then
+               myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
+       fi
+       if [[ ${CHOST} == *-solaris* ]]; then
+               myopts+=" NEEDS_LIBICONV=YesPlease"
+               myopts+=" HAVE_CLOCK_MONOTONIC=1"
+               myopts+=" HAVE_GETDELIM=1"
+       fi
+
+       has_version '>=app-text/asciidoc-8.0' \
+               && myopts+=" ASCIIDOC8=YesPlease"
+       myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
+
+       # Bug 290465:
+       # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 
'st_mtim'
+       [[ "${CHOST}" == *-uclibc* ]] && \
+               myopts+=" NO_NSEC=YesPlease"
+
+       export MY_MAKEOPTS="${myopts}"
+       export EXTLIBS="${extlibs}"
+}
+
+src_unpack() {
+       if [[ ${PV} != *9999 ]]; then
+               unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
+               cd "${S}"
+               unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+               use doc && \
+                       cd "${S}"/Documentation && \
+                       unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
+               cd "${S}"
+       else
+               git-r3_src_unpack
+               cd "${S}"
+               #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
+
+       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 contrib/svn-fe/Makefile || die "sed failed"
+
+       # Never install the private copy of Error.pm (bug #296310)
+       sed -i \
+               -e '/private-Error.pm/s,^,#,' \
+               perl/Makefile.PL
+
+       # Fix docbook2texi command
+       sed -r -i 
's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = 
docbook2texi.pl/' \
+               Documentation/Makefile || die "sed failed"
+
+       # Fix git-subtree missing DESTDIR
+       sed -i \
+               -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+               -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g'  \
+               contrib/subtree/Makefile
+}
+
+git_emake() {
+       # bug #326625: PERL_PATH, PERL_MM_OPT
+       # bug #320647: PYTHON_PATH
+       PYTHON_PATH=""
+       use python && PYTHON_PATH="${PYTHON}"
+       emake ${MY_MAKEOPTS} \
+               DESTDIR="${D}" \
+               OPTCFLAGS="${CFLAGS}" \
+               OPTLDFLAGS="${LDFLAGS}" \
+               OPTCC="$(tc-getCC)" \
+               OPTAR="$(tc-getAR)" \
+               prefix="${EPREFIX}"/usr \
+               htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+               sysconfdir="${EPREFIX}"/etc \
+               PYTHON_PATH="${PYTHON_PATH}" \
+               PERL_MM_OPT="" \
+               GIT_TEST_OPTS="--no-color" \
+               V=1 \
+               "$@"
+       # This is the fix for bug #326625, but it also causes breakage, see bug
+       # #352693.
+       # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
+}
+
+src_configure() {
+       exportmakeopts
+}
+
+src_compile() {
+       if use perl ; then
+       git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
+       git_emake perl/perl.mak || die "emake perl/perl.mak failed"
+       fi
+       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* ]]; then
+               cd "${S}"/contrib/credential/osxkeychain || die
+               git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
+                       || die "emake credential-osxkeychain"
+       fi
+
+       cd "${S}"/Documentation
+       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
+
+       if use subversion ; then
+               cd "${S}"/contrib/svn-fe
+               # by defining EXTLIBS we override the detection for libintl and
+               # libiconv, bug #516168
+               local nlsiconv=
+               use nls && use !elibc_glibc && nlsiconv+=" -lintl"
+               use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
+               git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe 
failed"
+               if use doc ; then
+                       git_emake svn-fe.{1,html} || die "emake svn-fe.1 
svn-fe.html failed"
+               fi
+               cd "${S}"
+       fi
+
+       if use libsecret ; then
+               cd "${S}"/contrib/credential/libsecret
+               git_emake || die "emake git-credential-libsecret failed"
+       fi
+
+       cd "${S}"/contrib/subtree || die
+       git_emake
+       use doc && git_emake doc
+
+       if use mediawiki ; then
+               cd "${S}"/contrib/mw-to-git
+               git_emake
+       fi
+}
+
+src_install() {
+       git_emake \
+               install || \
+               die "make install failed"
+
+       if [[ ${CHOST} == *-darwin* ]]; 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
+       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
+
+       if use python && use gtk ; then
+               python_doscript "${S}"/contrib/gitview/gitview
+               dodoc "${S}"/contrib/gitview/gitview.txt
+       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
+       cd "${S}"/contrib/subtree
+       git_emake install || die "Failed to emake install git-subtree"
+       if use doc ; then
+               git_emake install-man install-doc || die "Failed to emake 
install-doc install-mangit-subtree"
+       fi
+       newdoc README README.git-subtree
+       dodoc git-subtree.txt
+       cd "${S}"
+
+       if use mediawiki ; then
+               cd "${S}"/contrib/mw-to-git
+               git_emake install
+               cd "${S}"
+       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 libsecret ; then
+               cd "${S}"/contrib/credential/libsecret
+               dobin git-credential-libsecret
+       fi
+
+       if use subversion ; then
+               cd "${S}"/contrib/svn-fe
+               dobin svn-fe
+               dodoc svn-fe.txt
+               if use doc ; then
+                       doman svn-fe.1
+                       docinto html
+                       dodoc svn-fe.html
+               fi
+               cd "${S}"
+       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
+       )
+       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 /usr/share/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
+
+               find "${ED}"/usr/lib64/perl5/ \
+                       -name .packlist \
+                       -exec rm \{\} \;
+       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-r1.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
+       }
+       l10n_for_each_disabled_locale_do rm_loc
+}
+
+src_test() {
+       local disabled="t9128-git-svn-cmd-branch.sh"
+       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="${disabled} t5000-tar-tree.sh"
+       fi
+
+       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="${disabled} ${tests_cvs}"
+               fi
+               einfo "Skipping other tests that require being non-root"
+               disabled="${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="${disabled} ${tests_cvs}"
+               fi
+       fi
+
+       if ! use perl ; then
+               einfo "Disabling tests that need Perl"
+               disabled="${disabled} ${tests_perl}"
+       fi
+
+       einfo "Disabling tests that fail with SVN 1.7"
+       disabled="${disabled} ${test_svn}"
+
+       # Reset all previously disabled tests
+       cd "${S}/t"
+       for i in *.sh.DISABLED ; do
+               [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+       done
+       einfo "Disabled tests:"
+       for i in ${disabled} ; do
+               [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo 
"Disabled $i"
+       done
+
+       # Avoid the test system removing the results because we want them 
ourselves
+       sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
+               -i "${S}"/t/Makefile
+
+       # Clean old results first, must always run
+       cd "${S}/t"
+       nonfatal git_emake clean
+
+       # Now run the tests, keep going if we hit an error, and don't terminate 
on
+       # failure
+       cd "${S}"
+       einfo "Start test run"
+       #MAKEOPTS=-j1
+       nonfatal git_emake --keep-going test
+       rc=$?
+
+       # Display nice results, now print the results
+       cd "${S}/t"
+       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
+       einfo "Please read /usr/share/bash-completion/git for Git bash command 
completion"
+       einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
+       einfo "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/metadata.xml b/dev-vcs/git/metadata.xml
index 88c7b6c3e8..724729c157 100644
--- a/dev-vcs/git/metadata.xml
+++ b/dev-vcs/git/metadata.xml
@@ -30,6 +30,7 @@
     <flag name="gpg">Pull in gnupg for signing -- without gnupg, attempts at 
signing will fail at runtime!</flag>
     <flag name="gtk">Include the gitview contrib tool</flag>
     <flag name="highlight">GitWeb support for app-text/highlight</flag>
+    <flag name="libsecret">Enable libsecret support to store login 
credentials</flag>
     <flag name="mediawiki">Support pulling and pushing from MediaWiki</flag>
     <flag name="mediawiki-experimental">Add experimental patches for improved 
MediaWiki support</flag>
     <flag name="ppcsha1">Make use of a bundled routine that is optimized for 
the PPC arch</flag>

Reply via email to