commit:     ca89ea025d5dd3a54ae910a4f9fe0eaf5202fb06
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 23 09:26:58 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar 23 11:23:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca89ea02

dev-vcs/git: Bump to version 2.17.0_rc1

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-vcs/git/Manifest                               |   3 +
 .../git/files/git-2.17.0_rc1-optional-cvs.patch    | 451 +++++++++++++
 dev-vcs/git/git-2.17.0_rc1.ebuild                  | 711 +++++++++++++++++++++
 3 files changed, 1165 insertions(+)

diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
index da30cf6fc66..ac19aac37a1 100644
--- a/dev-vcs/git/Manifest
+++ b/dev-vcs/git/Manifest
@@ -1,9 +1,12 @@
 DIST git-2.16.1.tar.xz 4961656 BLAKE2B 
d94328da5d027cb82f1f23804a12dfc5df1577bf2c28cc376d4bb5c9e34d317886437f7eee2ac4503b8e2639d2e24c35660ab82a50207f500b7ed6fb104d3624
 SHA512 
09e30ada7bcf41f78f15784908062c10162d58d2fd7a68ad27e42fd49dc37eb0e82c19ad21db31034a189a8cdd009013a29f943e1ae5d5ab5688c913d2a4d42a
 DIST git-2.16.2.tar.xz 4963204 BLAKE2B 
346405b765bb542f0e51e539163c18c47dbd2ce1d4ccd98cdc4ddd226ec14a4895f7b82168fdca90e1828813421d24d5436fb01e9e9a57eb98a80984bab13bda
 SHA512 
ff1bf4b94c09de26acf85b97003582002c232e5861a896d8c2d8dc011cb3d4966b1eb0e74ef94f80426d50bb465bf6c9b6edda13b1e4143f0eb38ee01f4890e4
 DIST git-2.16.3.tar.xz 4966248 BLAKE2B 
cd4d2573afd02a23766c4dd0da8397ac36193f68e18c162fc85d60d7595a50da7707f592ccc3a9f00a22fdcb8a8cada82139fe30f97af193fb367a4e392cbaa8
 SHA512 
73520cf3500b2d13b77eb1e5ec0d60263aad07732d25631732f0d986abd023f97b8a6db4abff64d342cb053018289b5f7a3e32f10b86bd9092a37ee0585adc8a
+DIST git-2.17.0.rc1.tar.xz 4998084 BLAKE2B 
35ddaf63ee4d19bb8023148359791a844261215617e057156066826cf0322500b4485e7864dbe472c3fab553696709ff622f16466b4df874e60e7307f20c0337
 SHA512 
9ee9f917ff9a8398ae08cc7767be63605f9edc6a86ccdcd1a2238703b170e14a358e27d43d126317461bdb0f4ba9ad67fdcd77fcae69bf1d82f5341ce59d1bf5
 DIST git-htmldocs-2.16.1.tar.xz 1160372 BLAKE2B 
d426fbc85772e5f04550071dea50a75e6d581fd040e8b37b3b342a8d6569d0dcf456445bab1dec3d84e254e82468c900afff7c6be1ebd6771e7fad5884b92515
 SHA512 
f2bb8b88ab5aa3d6204874aae583249d5137193c5fe3925df7ae1bcdaec0564b496df9a648c180bebb0c8ff4573f27e330802020d3c9207c2738ddd5c52d99c9
 DIST git-htmldocs-2.16.2.tar.xz 1162556 BLAKE2B 
71b71b914b438cb3eee417c5bbcb30faa10b0a154efa378e8e3b5521a4902f26a038ab884ffdac1756d07e3afcaeafe915d6c64f9503ff65f1fa58bbbd7fffde
 SHA512 
adc7a95fc7a7a46c92c8735ad5b89f236905b770fa66682e0234addc2107f46de65724c577c8fc512e13cd8d306fff992ad7c6c495100cb645674604836e0768
 DIST git-htmldocs-2.16.3.tar.xz 1164252 BLAKE2B 
43d5b0317d3cb181c24347933b6ee3ce586f7be7e38ae30555bc732b369287f080879ff0408601db125a4104b665956f6bcef3f243496008d3ec1601110b06df
 SHA512 
6271ff7780053347ceba47754db00fa8a0a39ff622c490e273ed286faa6ade3f7d6580fa396c913b4485a942b2ad0cdd898de467fde497de1d850fb6d3debd1e
+DIST git-htmldocs-2.17.0.rc1.tar.xz 1172580 BLAKE2B 
d2c27d893faafe92ade9aa0d8bd77b4ff336c9ee8b678feed4e8f3323fcf6daea72a62af556a2f3556d5e21d4107f52d4090a5f5477c03bca50c6ef81656eaaf
 SHA512 
56f47203c1240a82c28d9de47d8d1b5a73b11c9529fd2ddeff303c03d828b738423035803ebcccc4c49459d7056d0b8f3924698ac9966f4083687221d11ae4a3
 DIST git-manpages-2.16.1.tar.xz 417188 BLAKE2B 
239fb33967d17c8b10efb2e0d1963f7be3404b7f262b49f89b3f4a538135d80268fbe7fe0e561c9cb2d86840eb46b61653ed363d8da27d1169c435d8e1d5e851
 SHA512 
20c7646b5f1e3c633ce6aae5ee5fcbe4ca1e59fc9253ec9a9e45c7cd8a8ac7a5e71e36258eb747e3bd6d51b3b7971137315dcdbdff493e0f8774ecd3e309735a
 DIST git-manpages-2.16.2.tar.xz 416500 BLAKE2B 
af9ccf18280c23e54e11cf76f891d5613db8c8f9ef84394266ad9c614ddb2181acab4cbb3998b4d5d01aa7b0d8f8cfbe090e77bb5b0297e4a7ed341a8d1fb3de
 SHA512 
38d560955a025761f256e598f87c6b1122b474cc7bfeeee8fffb48b353ab3d8d969f6cd55da326daa61a4079dfd68f931b2e0eae11d6e8d5549e69de17c7f537
 DIST git-manpages-2.16.3.tar.xz 417152 BLAKE2B 
2719a9a603dc49db1a61a2cec42427bdcdc96fab9d21d16c5a8c70d7dba271a1e5b29f4f83f32c525c4866e3497352017af3777a769893c9543e65d625972375
 SHA512 
b34a3658412a144fed6f818acc05c0b4be2453ae63f9430dcd53cda750f737bd3da50390bd3f4266e69befa521eddd222985fd531acca1ebd4ca62c6c5b2a85c
+DIST git-manpages-2.17.0.rc1.tar.xz 419416 BLAKE2B 
5437e60951a552f271e7a3b0d45178a02cec29495ef83cada860e2aa66af9ba40b3a55cebbfc65c0dfafb837610d5984cd0b65cb894301684e29a03584605513
 SHA512 
456321ca2eabdef08359f22e775729d408843c1f1647dd37f6e1603ba2a6785321b12fb3fbfd320c02743a499ed8bc76fee3da6d53c858e0dabd0855a57ef491

diff --git a/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch 
b/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch
new file mode 100644
index 00000000000..60cebcbb4d6
--- /dev/null
+++ b/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch
@@ -0,0 +1,451 @@
+From 3baea661143aaddb285f1ac7c50f6e4af76c8aed Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robb...@gentoo.org>
+Date: Fri, 23 Mar 2018 10:05:05 +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
+Forward-ported from v2.12.0 to v2.17.0-rc1
+
+Signed-off-by: Lars Wendler <polynomia...@gentoo.org>
+---
+ Makefile                           | 50 ++++++++++++++++++++++++++++----------
+ 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, 119 insertions(+), 34 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a1d8775adb..4264475ad1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -312,6 +312,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'.
+@@ -543,6 +545,7 @@ LIB_OBJS =
+ PROGRAM_OBJS =
+ PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -579,12 +582,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
+@@ -592,24 +596,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)'
+@@ -618,12 +624,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
+ 
+@@ -1972,13 +1979,26 @@ 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):
++_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_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
+-$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
++$(_SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
+       $(QUIET_GEN)$(RM) $@ $@+ && \
+       INSTLIBDIR='$(perllibdir_SQ)' && \
+       INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
+@@ -2012,14 +2032,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
+@@ -2258,7 +2282,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 1319415ba8..34ac8e28e2 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 06742748e9..51d474d94b 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 84787eee9a..eecba88527 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 804ce3850f..c53c50e432 100755
+--- a/t/t9600-cvsimport.sh
++++ b/t/t9600-cvsimport.sh
+@@ -8,14 +8,25 @@ if ! test_have_prereq NOT_ROOT; then
+       test_done
+ fi
+ 
+-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 &&
+@@ -47,23 +58,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,
+@@ -91,7 +102,7 @@ EOF
+       )
+ '
+ 
+-test_expect_success PERL 'update git module' '
++test_expect_success 'update git module' '
+ 
+       (cd module-git &&
+       git config cvsimport.trackRevisions true &&
+@@ -102,7 +113,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^ &&
+@@ -110,7 +121,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 &&
+@@ -119,7 +130,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 &&
+@@ -131,7 +142,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^^ &&
+@@ -140,7 +151,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 &&
+@@ -153,12 +164,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 827d39f5bf..d730a41f67 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 e1db323f54..68f097401f 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 c4c3c49546..9b2957d4f0 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 7740d511d2..9b26b78359 100644
+--- a/t/test-lib.sh
++++ b/t/test-lib.sh
+@@ -1062,6 +1062,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_PTHREADS" && test_set_prereq PTHREADS
+ test -z "$NO_PYTHON" && test_set_prereq PYTHON
+-- 
+2.16.3
+

diff --git a/dev-vcs/git/git-2.17.0_rc1.ebuild 
b/dev-vcs/git/git-2.17.0_rc1.ebuild
new file mode 100644
index 00000000000..29ff3e4669d
--- /dev/null
+++ b/dev-vcs/git/git-2.17.0_rc1.ebuild
@@ -0,0 +1,711 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+GENTOO_DEPEND_ON_PERL=no
+
+# bug #329479: git-remote-testgit is not multiple-version aware
+PYTHON_COMPAT=( python2_7 )
+PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
+if [[ ${PV} == *9999 ]]; then
+       SCM="git-r3"
+       EGIT_REPO_URI="git://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: pu
+       case "${PVR}" in
+               9999) EGIT_BRANCH=maint ;;
+               9999-r1) EGIT_BRANCH=master ;;
+               9999-r2) EGIT_BRANCH=next;;
+               9999-r3) EGIT_BRANCH=pu ;;
+       esac
+fi
+
+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="https://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}
+                       )"
+       [[ "${PV}" = *_rc* ]] || \
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-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 gnome-keyring +gpg highlight +iconv 
libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit +perl +python 
ppcsha1 tk +threads +webdav xinetd cvs subversion test"
+
+# Common to both DEPEND and RDEPEND
+CDEPEND="
+       gnome-keyring? ( app-crypt/libsecret )
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:= )
+       sys-libs/zlib
+       pcre? (
+               pcre-jit? ( dev-libs/libpcre2[jit(+)] )
+               !pcre-jit? ( 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 )
+       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
+               )
+               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
+               )
+       )
+       python? ( ${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 )
+       pcre-jit? ( pcre )
+       python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+PATCHES=(
+       # bug #350330 - automagic CVS when we don't want it is bad.
+       "${FILESDIR}"/git-2.17.0_rc1-optional-cvs.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=(
+               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 python '' NO_PYTHON=YesPlease)
+               $(usex subversion '' NO_SVN_TESTS=YesPlease)
+               $(usex threads THREADED_DELTA_SEARCH=YesPlease 
NO_PTHREAD=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=
+       )
+
+       # 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 || die
+
+       if use pcre; then
+               if use pcre-jit; then
+                       myopts+=( USE_LIBPCRE2=YesPlease )
+                       extlibs+=" -lpcre2-8"
+               else
+                       myopts+=(
+                               USE_LIBPCRE1=YesPlease
+                               NO_LIBPCRE1_JIT=YesPlease
+                       )
+                       extlibs+=" -lpcre"
+               fi
+       fi
+# Disabled until ~m68k-mint can be keyworded again
+#      if [[ ${CHOST} == *-mint* ]] ; then
+#              myopts+=(
+#                      NO_MMAP=YesPlease
+#                      NO_IPV6=YesPlease
+#                      NO_STRLCPY=YesPlease
+#                      NO_MEMMEM=YesPlease
+#                      NO_MKDTEMP=YesPlease
+#                      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
+                       HAVE_CLOCK_MONOTONIC=1
+               )
+               grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
+                       myopts+=( HAVE_GETDELIM=1 )
+       fi
+
+       has_version '>=app-text/asciidoc-8.0' \
+               && myopts+=( ASCIIDOC8=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}
+               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
+
+       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
+
+       # Fix docbook2texi command
+       sed -r -i 
's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = 
docbook2texi.pl/' \
+               Documentation/Makefile || die
+
+       # Fix git-subtree missing DESTDIR
+       sed -i \
+               -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
+               -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g'  \
+               contrib/subtree/Makefile || die
+}
+
+git_emake() {
+       # bug #320647: PYTHON_PATH
+       local PYTHON_PATH=""
+       use python && PYTHON_PATH="${PYTHON}"
+       emake ${MY_MAKEOPTS} \
+               prefix="${EPREFIX}"/usr \
+               htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+               perllibdir="$(perl_get_raw_vendorlib)" \
+               sysconfdir="${EPREFIX}"/etc \
+               DESTDIR="${D}" \
+               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* ]]; 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 subversion ; then
+               pushd contrib/svn-fe &>/dev/null || die
+               # 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
+               popd &>/dev/null || die
+       fi
+
+       if use gnome-keyring ; then
+               pushd contrib/credential/libsecret &>/dev/null || die
+               git_emake || die "emake git-credential-libsecret failed"
+               popd &>/dev/null || die
+       fi
+
+       pushd contrib/subtree &>/dev/null || die
+       git_emake
+       use doc && git_emake doc
+       popd &>/dev/null || die
+
+       pushd contrib/diff-highlight &>/dev/null || die
+       git_emake
+       popd &>/dev/null || die
+
+       if use mediawiki ; then
+               pushd contrib/mw-to-git &>/dev/null || die
+               git_emake
+               popd &>/dev/null || die
+
+       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
+
+       #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 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
+       popd &>/dev/null || die
+
+       if use mediawiki ; then
+               pushd contrib/mw-to-git &>/dev/null || die
+               git_emake 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
+
+       if use subversion ; then
+               pushd contrib/svn-fe &>/dev/null || die
+               dobin svn-fe
+               dodoc svn-fe.txt
+               if use doc ; then
+                       doman svn-fe.1
+                       docinto html
+                       dodoc svn-fe.html
+               fi
+               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
+       )
+       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 \
+                       -delete \
+                       || die
+       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=()
+       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
+               [[ -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 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
+       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
+}

Reply via email to