commit:     47221e92e3f18268bc18b30db6d9e9037e8463c2
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Nov  9 19:25:38 2016 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Nov  9 19:25:38 2016 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=47221e92

dev-vcs/git: Add Latest.

2.10.1 and later set a configuration option by default that uses non-POSIX
compliant regex.

 dev-vcs/git/Manifest                               |  18 +
 dev-vcs/git/files/50git-gentoo.el                  |  13 +
 dev-vcs/git/files/git-1.8.5-mw-vendor.patch        |  39 ++
 dev-vcs/git/files/git-2.10.0-optional-cvs.patch    | 456 ++++++++++++++
 dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch   |  11 +
 .../files/git-2.5.1-freebsd-10.x-no-iconv.patch    |  14 +
 .../git/files/git-2.7.0-mediawiki-500pages.patch   |  46 ++
 .../git/files/git-2.7.0-mediawiki-namespaces.patch |  97 +++
 .../git/files/git-2.7.0-mediawiki-subpages.patch   |  48 ++
 dev-vcs/git/files/git-daemon-r1.initd              |  13 +
 dev-vcs/git/files/git-daemon.confd                 |  19 +
 dev-vcs/git/files/git-daemon.socket                |   9 +
 dev-vcs/git/files/git-daemon.xinetd                |  13 +
 dev-vcs/git/files/git-daemon_at-r1.service         |  12 +
 dev-vcs/git/git-2.10.2.ebuild                      | 680 +++++++++++++++++++++
 dev-vcs/git/metadata.xml                           |  40 ++
 16 files changed, 1528 insertions(+)

diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
new file mode 100644
index 0000000..832435a
--- /dev/null
+++ b/dev-vcs/git/Manifest
@@ -0,0 +1,18 @@
+AUX 50git-gentoo.el 472 SHA256 
7cd37e8db7eaeee8d822d38851eb69771b0f09c79883a8e51309a9add85fdbe2 SHA512 
0435d7d67f2b64460a62c6a95c65a722c0f8d5d50d064a81e690de84a761ba518d32db545ee70c0fa3ad7803d77d5dab100689888bc92c9d82f2d6d5073623b3
 WHIRLPOOL 
887682f79182f6728af3c0fd2ee0e81319d49761a987559684be5e4acae4af579a5b8d1197ddba31452cec179de3c8f5784cc85ad61f78b400e42c204c93f642
+AUX git-1.8.5-mw-vendor.patch 1160 SHA256 
e613f8874beec8d11644ad8d12c43cccb6585f96e99485d7d8ead6618321e8c0 SHA512 
6513104f28eff36c18840f90e56fb21e8e04055e4e9a304ef15e5d7e1c13c8b45c4be0380b7781e776ce3b8ee9f7371ed2200e01174cc257125a613aef43ac9b
 WHIRLPOOL 
6a5dcb28dc40590cf4e4b1369b0d770b40f1060bf933366f252edafbb9781f39d7f46dc218c16d429f507c7d5a9479bafce2df7309178071bcb782095809ed69
+AUX git-2.10.0-optional-cvs.patch 14373 SHA256 
ca1fdbca8488ed700073075a3bd52bd20d239afb93e8a913e0d1f4f08da230cf SHA512 
be1d75789424d49dfcdf87c9e8016e86aeab945bf68c9d82cf77ed1f032622b14194b3f472d21a450748d3c6cf108bbe089e7289e360f30078941a2fdcc8a001
 WHIRLPOOL 
005b2012486639e5d51930644482ea8cd24ca4d5ec98e04e1a657e3762235c0e971499f1e4d5852887037e38b96290b3e7d46b8364090ff74a7fb327d9f562b3
+AUX git-2.2.0-svn-fe-linking.patch 418 SHA256 
45b89e10bec13fd7b29f7b530bf5ef57d3263581930ff338bf2105b3a96e6df0 SHA512 
ac312e7da4c548073d4dfa5d9bb6823ed48ea70a30d7993da190cfc4cc4b17124e15326748d79e59ca0772675619b29221a57c5af45b7b6c7196dae218772ecd
 WHIRLPOOL 
d31618b8012b2b9eca5ae5c4317c893a21697b182aa877e236a34eefc17869b0c659c35617d70e7cd316d430de5d093fe18bce947996f8c6aade7cd8c60a4c38
+AUX git-2.5.1-freebsd-10.x-no-iconv.patch 568 SHA256 
f5f96e35b9d3138a0806aa2298d00ee0138c453eebd3f325f58ff3d07dabe361 SHA512 
9f7334b2c5b69c5a6a94e198a522b176470b0ae9d428694b9a404e4bcf33d269f43c8d2d9b5834e36f9a875d12a7b21f59caaaffad6d05cb6267ab2967e64567
 WHIRLPOOL 
d40617ebd5b7e3ff7b7fd2948178741f427bf505233a3f2d0b3ffa0408218ea39aa5e04c94e2810c4db153ef4a3244ad0af48f8f2b785885f1f2ce81758728eb
+AUX git-2.7.0-mediawiki-500pages.patch 1317 SHA256 
2a3ca7e73ea0b1575c4646a8cf9b2b7bcac74f5fa9c7c5e6b8fc9d320ee2cc89 SHA512 
efe580f288c6fdb6d55b742a3e4335ac32ed96cb12c10b959a5f283e505ab0aeed039d0d19d9dbf148a07ac6c7aec075ecea0c0be68456fdbe23dcad77ca01be
 WHIRLPOOL 
e890b6c529e007dc1fbb8f6188b9c23f16856d65a38ce702657eea2f065a4ff52b6ee8bd284726582db765222dfefb31da71c14217b3c15968050e093bc14a6f
+AUX git-2.7.0-mediawiki-namespaces.patch 3188 SHA256 
7205e94a95c9e9027b2a8472854e0d76dfb3053b8e7f139836d90b3555c62b89 SHA512 
f1597fcb8e771917561d92bf428825e28477ed792be7494e34754434c73422dc52fdf99d981656b291f7eb91a199abe54038ae87e9b5229c9a382a4ea88e9d4f
 WHIRLPOOL 
674de2ded34bf2d1d05c3e606b881e00a92ae7958a45e481d51d8766b0429d0054149017a5f21c024f466b62fffb6dddce64c7569caacfc0aa34c3c2b20d3610
+AUX git-2.7.0-mediawiki-subpages.patch 2091 SHA256 
322aeee855c163c0e0cd5048b36bf464052fbbbd98fc23257b6e5c525d9057c5 SHA512 
e294c0d4588499961632bcc6ea20474984c4bcc7a804ff3cd9d12584cecad3c36f5772c21cf7a884b517370eb7d87542f7bdc3b2c5482c18dbc623abe5e7c73e
 WHIRLPOOL 
3731669811ec1cce64890afb5e0ee3add808d1da8f32a5061ed6d15c7a54aaf0bd4a350f35c4d78565132fe736bf02119fe51ef641fedf02f546e2b3fcc23655
+AUX git-daemon-r1.initd 375 SHA256 
efa30f5db5b837ed9febd09af29f3740a9d479d098d5c3f8e4dcf334e01f77a3 SHA512 
5a962ef717bb761fc113991c6f23264ffa6c7c5d50f261efe04cc2c429be2fcf249e48c56c1587c429472146a780753f9d570e5031d3dbec119eea48d0829244
 WHIRLPOOL 
c2b83f41fde646757d7149ff4daa27ef1aa7a1ef44be8ef180632b184221be10ccd8ca7093d8b8a8142fd4c1b752ac660c180b22a496cb3c2a31ca16d1482356
+AUX git-daemon.confd 710 SHA256 
4703ba2372c661fb674a29fea7f64983f8b1b3136d971663509249655bca6e21 SHA512 
fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec
 WHIRLPOOL 
1ce085e6f8580824f96517ae8d49f0a22124cb8d6cfa740dc041e0800bfe9541fa6d2a6ddb5dc23f96186ddfe4a539f4a72bb87deded2d7af37569957b52b4e5
+AUX git-daemon.socket 116 SHA256 
66a064b67e441306bf765d3d3115ac55bafa2098400af134f852d4aecf8608d7 SHA512 
e383d358999ea0c7201c1709015a9b7c4dd9dd71287605640aca837fac1e2ee33a5a1684e1c3414c08742605f185b722f4864afd5be8b79a9f0d8f7ae0f9b701
 WHIRLPOOL 
1098e46b6d2be3c8d758a087408aed91e0c01625542dfc90fbff80ed8b40d2a54ea4ab45b4d003ef0b0b8ed1411e1146a58076b68096389412a61fe2d09214dd
+AUX git-daemon.xinetd 260 SHA256 
5025efbceed83835378cada3728448cbf445a1584e7cbd7736f568f4b6b52a67 SHA512 
5e0c85004e7e2b89fd191350022b9970a6ca03129b4c913e159570b99b5797ab924f667cd3dc5693a9d4916b7b5cf36814eda015dbdf46a1354eb50d1c081f9c
 WHIRLPOOL 
155bfca2c071d5368de09412d1d937cefd3b5cd28a991b99845551738440b92791c33a67ef41be711dbf06fc4faf4a299cbaf1f410b119fe5deb5a4cd741803d
+AUX git-daemon_at-r1.service 340 SHA256 
980b2b2234fc672065286244cd4e690c92865d39a02001936801cb013b7d2dce SHA512 
073d8752dc224ff1130a5290e0f965a04b19f2a8dbd5d50172101099386ad3af0fd5e1abf57030960b750a2adf36a7ae69d18ddc990bab4e694486e65424cfa9
 WHIRLPOOL 
fd89d61e15bf499404b0a17a2e47257962c671cab09a3af53cb378758cf7a5f979026831a8da2270ea54fa8897e132def17307d03729ef2e30dfe7950c59b1b3
+DIST git-2.10.2.tar.xz 4106108 SHA256 
94802903dd707d85ca3b9a2be35e936a54ce86375f52c6a789efe7ce7e238671 SHA512 
0ab09de481dbb31c3304382afaa5d3fc9f861115c9954c65b11a8a1c34b939118c7ed3ff60ac329145888596388e3e4d2b2fb677fe109d33a57206d531b5ee6a
 WHIRLPOOL 
808404fa13f908d149028f64aaf5b73400448fff6393dabfaa874d750065e86ff5dae4903724cbca4e59fb74b3ff30b8b8f0a0f1435a0a90c18267c7a0550de6
+DIST git-htmldocs-2.10.2.tar.xz 1068436 SHA256 
dd43111c3518a92a7fe64ac5cd32a5d4d77d49c67f7d89dce3e8293bc3d6b491 SHA512 
8ef57218d7eef285ac427414d92bd5e8eba5c85c2a2a9ec0e423705ee2cb6f26dd33ad780d1b4237e7534dbe5cc3b4d8eea5780d0acc49066d78fc1893df2525
 WHIRLPOOL 
160fe3446d959d0f2315c9b2be182925619a4d89343602038e92283abdb393805eb5252799c502b83641d9e23a157332033baaa1ef2f1d9401cbbf372d8e86d7
+DIST git-manpages-2.10.2.tar.xz 395556 SHA256 
83b0a317f6039ad95ef6af6a182cf659c2d053eed5d8f70b06710eb787f8aa6f SHA512 
0dc5df8441601865511983b85762102396cbf7c704fd831eb6666ef7b7639252b971f6b4080b8a57226a86124edcdd77acf24374da22047bd315769a09109bef
 WHIRLPOOL 
e1d6b9cb4479b584c16a25a4f3b0528d96d483307e768efea3d7bd8156d74e1c59b61a641dfe5671f4cb01a02f10322262d133cb76f85194ac97ee74c6195d0e
+EBUILD git-2.10.2.ebuild 19225 SHA256 
e14b49bdbf1fc760f2462d25e4304ee5f3a2e997aae989b021e8e2fbd409fc32 SHA512 
72006157df4bf3a104412d78ce28f5c847d1db1395742e9ec3e2e63c331fe6430a1e34328995caf5130705df5d5cb63aae79fdf4bd5ac03c20ff0f66e316fb28
 WHIRLPOOL 
2ed837d13ee25aa90fc77f010f515db96661ad0995f05eef69f0b67fca91a83516ee41be6b5a05c45aec9403cb299a12cbb35ae35880f20a59c7ac6ca0db62d3
+MISC metadata.xml 2074 SHA256 
e1527bc0d2dc4c23f6c757ee229240f979ee7af2aabb2dd5a49f13f7112c9fc5 SHA512 
f5f040ea6db33e7e325c995994c82f92d727d2a6a5f7841a9fb3e28d1ac66fea3d153b09d3a66122ba6365bf7e76a2cb411757f5a706b5525414bda4f504b635
 WHIRLPOOL 
ceff2ccac4564156e3c333b36c056129ea28ef30890d0be4394caa8f734d9e987e33a89a6903dd29d6b010a36b09bc87fa0303c905aff3bb4224b6860e10f283

diff --git a/dev-vcs/git/files/50git-gentoo.el 
b/dev-vcs/git/files/50git-gentoo.el
new file mode 100644
index 0000000..1646a39
--- /dev/null
+++ b/dev-vcs/git/files/50git-gentoo.el
@@ -0,0 +1,13 @@
+
+;;; dev-vcs/git site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'git-status "git" "Entry point into git-status mode." t)
+;;(autoload 'git-blame-mode "git-blame"
+;;  "Minor mode for incremental blame for Git." t)
+
+;; GNU Emacs >=22.2 already includes vc-git.el.
+;; Enable the following only if Emacs has no GIT support.
+(unless (fboundp 'vc-git-registered)
+  (add-to-list 'load-path "@SITELISP@/compat")
+  (add-to-list 'vc-handled-backends 'GIT))

diff --git a/dev-vcs/git/files/git-1.8.5-mw-vendor.patch 
b/dev-vcs/git/files/git-1.8.5-mw-vendor.patch
new file mode 100644
index 0000000..54302ef
--- /dev/null
+++ b/dev-vcs/git/files/git-1.8.5-mw-vendor.patch
@@ -0,0 +1,39 @@
+diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
+index a4b6f7a..d83df2c 100644
+--- a/contrib/mw-to-git/Makefile
++++ b/contrib/mw-to-git/Makefile
+@@ -22,7 +22,7 @@ INSTALL = install
+ 
+ SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
+ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
+-                -s --no-print-directory instlibdir)
++                -s --no-print-directory instvendorlibdir)
+ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+ INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
+ 
+diff --git a/perl/Makefile b/perl/Makefile
+index 15d96fc..91348c6 100644
+--- a/perl/Makefile
++++ b/perl/Makefile
+@@ -12,7 +12,7 @@ ifndef V
+       QUIET = @
+ endif
+ 
+-all install instlibdir: $(makfile)
++all install instlibdir instvendorlibdir: $(makfile)
+       $(QUIET)$(MAKE) -f $(makfile) $@
+ 
+ clean:
+diff --git a/perl/Makefile.PL b/perl/Makefile.PL
+index 3f29ba9..c0b3508 100644
+--- a/perl/Makefile.PL
++++ b/perl/Makefile.PL
+@@ -17,6 +17,8 @@ sub MY::postamble {
+       return <<'MAKE_FRAG';
+ instlibdir:
+       @echo '$(INSTALLSITELIB)'
++instvendorlibdir:
++      @echo '$(INSTALLVENDORLIB)'
+ 
+ ifneq (,$(DESTDIR))
+ ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))

diff --git a/dev-vcs/git/files/git-2.10.0-optional-cvs.patch 
b/dev-vcs/git/files/git-2.10.0-optional-cvs.patch
new file mode 100644
index 0000000..d14aeff
--- /dev/null
+++ b/dev-vcs/git/files/git-2.10.0-optional-cvs.patch
@@ -0,0 +1,456 @@
+From ef6d24be825b2d1d9666c1fc64ce5351d572b3f4 Mon Sep 17 00:00:00 2001
+From: Robin Johnson <robb...@gentoo.org>
+Date: Sat, 3 Sep 2016 21:02:10 +0200
+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
+
+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 d96ecb7..ced6b12 100644
+--- a/Makefile
++++ b/Makefile
+@@ -267,6 +267,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'.
+@@ -484,6 +486,7 @@ LIB_OBJS =
+ PROGRAM_OBJS =
+ PROGRAMS =
+ SCRIPT_PERL =
++SCRIPT_PERL_CVS =
+ SCRIPT_PYTHON =
+ SCRIPT_SH =
+ SCRIPT_LIB =
+@@ -521,13 +524,14 @@ SCRIPT_LIB += git-sh-i18n
+ SCRIPT_PERL += git-add--interactive.perl
+ SCRIPT_PERL += git-difftool.perl
+ SCRIPT_PERL += git-archimport.perl
+-SCRIPT_PERL += git-cvsexportcommit.perl
+-SCRIPT_PERL += git-cvsimport.perl
+-SCRIPT_PERL += git-cvsserver.perl
+ SCRIPT_PERL += git-relink.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
+@@ -535,24 +539,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)'
+@@ -561,12 +567,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
+ 
+@@ -1811,10 +1818,24 @@ git.res: git.rc GIT-VERSION-FILE
+         -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -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
+ 
+@@ -1827,7 +1848,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)' && \
+@@ -1861,14 +1882,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
+@@ -2103,7 +2128,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 bb879a5..17be197 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 432c61d..6907b3f 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 84787ee..eecba88 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 4c384ff..d601f32 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 827d39f..d730a41 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 e1db323..68f0974 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 c4c3c49..9b2957d 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 d731d66..fcee67a 100644
+--- a/t/test-lib.sh
++++ b/t/test-lib.sh
+@@ -972,6 +972,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.9.3
+

diff --git a/dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch 
b/dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch
new file mode 100644
index 0000000..b20b889
--- /dev/null
+++ b/dev-vcs/git/files/git-2.2.0-svn-fe-linking.patch
@@ -0,0 +1,11 @@
+--- git-2.2.0/contrib/svn-fe/Makefile
++++ git-2.2.0/contrib/svn-fe/Makefile
+@@ -74,7 +74,7 @@
+ endif
+ 
+ svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)
+-      $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o 
$(LIBS)
++      $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ svn-fe.o $(LIBS) 
$(EXTLIBS)
+ 
+ svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h
+       $(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<

diff --git a/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch 
b/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch
new file mode 100644
index 0000000..a874236
--- /dev/null
+++ b/dev-vcs/git/files/git-2.5.1-freebsd-10.x-no-iconv.patch
@@ -0,0 +1,14 @@
+diff -Naurp git-2.5.1.orig/config.mak.uname git-2.5.1/config.mak.uname
+--- git-2.5.1.orig/config.mak.uname    2015-08-28 15:37:13.000000000 -0400
++++ git-2.5.1/config.mak.uname 2015-09-06 18:54:28.538437000 -0400
+@@ -189,7 +189,9 @@ ifeq ($(uname_O),Cygwin)
+       SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
+ endif
+ ifeq ($(uname_S),FreeBSD)
+-      NEEDS_LIBICONV = YesPlease
++      ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2)
++              NEEDS_LIBICONV = YesPlease
++      endif
+       OLD_ICONV = YesPlease
+       NO_MEMMEM = YesPlease
+       BASIC_CFLAGS += -I/usr/local/include

diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch 
b/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch
new file mode 100644
index 0000000..0ce706d
--- /dev/null
+++ b/dev-vcs/git/files/git-2.7.0-mediawiki-500pages.patch
@@ -0,0 +1,46 @@
+Searching for pages using the MediaWiki API returns at most 500 results
+(hi Patrick). To get a list of all pages in a larger wiki, we need to run
+repeated searches...
+
+Source: https://github.com/moy/Git-Mediawiki/issues/32
+Author: anarcat https://github.com/anarcat
+
+diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl 
b/contrib/mw-to-git/git-remote-mediawiki.perl
+index 8dd74a9..f2ce311 100755
+--- a/contrib/mw-to-git/git-remote-mediawiki.perl
++++ b/contrib/mw-to-git/git-remote-mediawiki.perl
+@@ -259,16 +259,29 @@ sub get_mw_tracked_categories {
+ sub get_mw_all_pages {
+       my $pages = shift;
+       # No user-provided list, get the list of pages from the API.
+-      my $mw_pages = $mediawiki->list({
++      my $query = {
+               action => 'query',
+               list => 'allpages',
+               aplimit => 'max'
+-      });
+-      if (!defined($mw_pages)) {
++      };
++      my $curpage;
++      my $oldpage = '';
++      while (1) {
++      if (defined($curpage)) {
++              if ($oldpage eq $curpage) {
++                  last;
++              }
++              $query->{apfrom} = $curpage;
++              $oldpage = $curpage;
++          }
++          my $mw_pages = $mediawiki->list($query);
++          if (!defined($mw_pages)) {
+               fatal_mw_error("get the list of wiki pages");
+-      }
+-      foreach my $page (@{$mw_pages}) {
++          }
++          foreach my $page (@{$mw_pages}) {
+               $pages->{$page->{title}} = $page;
++              $curpage = $page->{title};
++          }
+       }
+       return;
+ }

diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch 
b/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch
new file mode 100644
index 0000000..72ab212
--- /dev/null
+++ b/dev-vcs/git/files/git-2.7.0-mediawiki-namespaces.patch
@@ -0,0 +1,97 @@
+source:
+https://gist.github.com/anarcat/f821fa285c6b8b6b16a5
+https://github.com/moy/Git-Mediawiki/issues/10
+
+
+From 147224cfe6143c44b16aec0bb6d6a506a6b96ced Mon Sep 17 00:00:00 2001
+From: Kevin <ke...@ki-ai.org>
+Date: Fri, 28 Aug 2015 15:53:37 -0500
+Subject: [PATCH] Add namespace support to git-mediawiki
+
+Signed-off-by: Kevin <ke...@ki-ai.org>
+---
+ contrib/mw-to-git/git-remote-mediawiki.perl | 34 +++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl 
b/contrib/mw-to-git/git-remote-mediawiki.perl
+index 8dd74a9..662a5b5 100755
+--- a/contrib/mw-to-git/git-remote-mediawiki.perl
++++ b/contrib/mw-to-git/git-remote-mediawiki.perl
+@@ -17,6 +17,7 @@ use Git;
+ use Git::Mediawiki qw(clean_filename smudge_filename connect_maybe
+                                       EMPTY HTTP_CODE_OK);
+ use DateTime::Format::ISO8601;
++use Scalar::Util;
+ use warnings;
+ 
+ # By default, use UTF-8 to communicate with Git and the user
+@@ -63,6 +64,10 @@ chomp(@tracked_pages);
+ my @tracked_categories = split(/[ \n]/, run_git("config --get-all 
remote.${remotename}.categories"));
+ chomp(@tracked_categories);
+ 
++# Just like @tracked_categories, but for MediaWiki namespaces.
++my @tracked_namespaces = split(/[ \n]/, run_git("config --get-all 
remote.${remotename}.namespaces"));
++chomp(@tracked_namespaces);
++
+ # Import media files on pull
+ my $import_media = run_git("config --get --bool 
remote.${remotename}.mediaimport");
+ chomp($import_media);
+@@ -256,6 +261,23 @@ sub get_mw_tracked_categories {
+       return;
+ }
+ 
++sub get_mw_tracked_namespaces {
++    my $pages = shift;
++    foreach my $local_namespace (@tracked_namespaces) {
++        my $mw_pages = $mediawiki->list( {
++            action => 'query',
++            list => 'allpages',
++            apnamespace => get_mw_namespace_id($local_namespace),
++            aplimit => 'max' } )
++            || die $mediawiki->{error}->{code} . ': '
++                . $mediawiki->{error}->{details} . "\n";
++        foreach my $page (@{$mw_pages}) {
++            $pages->{$page->{title}} = $page;
++        }
++    }
++    return;
++}
++
+ sub get_mw_all_pages {
+       my $pages = shift;
+       # No user-provided list, get the list of pages from the API.
+@@ -319,6 +341,10 @@ sub get_mw_pages {
+               $user_defined = 1;
+               get_mw_tracked_categories(\%pages);
+       }
++    if (@tracked_namespaces) {
++        $user_defined = 1;
++        get_mw_tracked_namespaces(\%pages);
++    }
+       if (!$user_defined) {
+               get_mw_all_pages(\%pages);
+       }
+@@ -1263,7 +1289,6 @@ my %cached_mw_namespace_id;
+ sub get_mw_namespace_id {
+       $mediawiki = connect_maybe($mediawiki, $remotename, $url);
+       my $name = shift;
+-
+       if (!exists $namespace_id{$name}) {
+               # Look at configuration file, if the record for that namespace 
is
+               # already cached. Namespaces are stored in form:
+@@ -1331,7 +1356,12 @@ sub get_mw_namespace_id {
+ sub get_mw_namespace_id_for_page {
+       my $namespace = shift;
+       if ($namespace =~ /^([^:]*):/) {
+-              return get_mw_namespace_id($namespace);
++              my ($ns, $id) = split(/:/, $namespace);
++              if (Scalar::Util::looks_like_number($id)) {
++                      return get_mw_namespace_id($ns);
++              } else{
++                      return
++              }
+       } else {
+               return;
+       }
+-- 
+2.5.0

diff --git a/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch 
b/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch
new file mode 100644
index 0000000..c798a89
--- /dev/null
+++ b/dev-vcs/git/files/git-2.7.0-mediawiki-subpages.patch
@@ -0,0 +1,48 @@
+From 2593304723c6def159c10b9060dafa78a775a057 Mon Sep 17 00:00:00 2001
+From: Lyubomyr Shaydariv <lyubomyr-shayda...@users.noreply.github.com>
+Date: Fri, 11 Sep 2015 00:41:17 +0300
+Subject: [PATCH] git-remote-mediawiki: support subpages as subdirectories
+
+This is a fix for https://github.com/moy/Git-Mediawiki/issues/22
+The subdirectories option is enabled using -c remote.origin.subpageDirs=true
+during the cloning and it is not recommended to be modified in or
+removed from .git/config after the cloning.
+---
+ contrib/mw-to-git/git-remote-mediawiki.perl | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl 
b/contrib/mw-to-git/git-remote-mediawiki.perl
+index 8dd74a9..f3624be 100755
+--- a/contrib/mw-to-git/git-remote-mediawiki.perl
++++ b/contrib/mw-to-git/git-remote-mediawiki.perl
+@@ -63,6 +63,11 @@
+ my @tracked_categories = split(/[ \n]/, run_git("config --get-all 
remote.${remotename}.categories"));
+ chomp(@tracked_categories);
+ 
++# Use subdirectories for subpages
++my $use_subpage_dirs = run_git("config --get --bool 
remote.${remotename}.subpageDirs");
++chomp($use_subpage_dirs);
++$use_subpage_dirs = ($use_subpage_dirs eq 'true');
++
+ # Import media files on pull
+ my $import_media = run_git("config --get --bool 
remote.${remotename}.mediaimport");
+ chomp($import_media);
+@@ -689,6 +694,9 @@ sub fe_escape_path {
+     $path =~ s/\\/\\\\/g;
+     $path =~ s/"/\\"/g;
+     $path =~ s/\n/\\n/g;
++    if ($use_subpage_dirs) {
++        $path =~ s/%2F/\//g;
++    }
+     return qq("${path}");
+ }
+ 
+@@ -927,7 +935,7 @@ sub mw_import_revids {
+               # If this is a revision of the media page for new version
+               # of a file do one common commit for both file and media page.
+               # Else do commit only for that page.
+-              print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision 
#$rev->{revid} of $commit{title}\n";
++              print {*STDERR} "${n}/", scalar(@{$revision_ids}), ": Revision 
#$rev->{revid} of ", fe_escape_path($commit{title}), "\n";
+               import_file_revision(\%commit, ($fetch_from == 1), $n_actual, 
\%mediafile);
+       }
+ 

diff --git a/dev-vcs/git/files/git-daemon-r1.initd 
b/dev-vcs/git/files/git-daemon-r1.initd
new file mode 100644
index 0000000..df03162
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon-r1.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/git-daemon.pid"
+command="/usr/bin/git"
+command_args="daemon ${GITDAEMON_OPTS}"
+start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME= -b -m -p ${pidfile} -u 
${GIT_USER:-nobody}:${GIT_GROUP:-nobody}"
+
+depend() {
+       use logger
+}

diff --git a/dev-vcs/git/files/git-daemon.confd 
b/dev-vcs/git/files/git-daemon.confd
new file mode 100644
index 0000000..69b209f
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon.confd
@@ -0,0 +1,19 @@
+# conf.d file for git-daemon
+#
+# Please check man 1 git-daemon for more information about the options
+# git-daemon accepts. You MUST edit this to include your repositories you wish
+# to serve.
+#
+# Some of the meaningful options are:
+#   --syslog      --- Enables syslog logging
+#   --verbose     --- Enables verbose logging
+#   --export-all  --- Exports all repositories
+#   --port=XXXX   --- Starts in port XXXX instead of 9418
+#
+GITDAEMON_OPTS="--syslog --base-path=/var/git"
+
+# To run an anonymous git safely, the following user should be able to only
+# read your Git repositories. It should not be able to write to anywhere on
+# your system, esp. not the repositories.
+GIT_USER="nobody"
+GIT_GROUP="nobody"

diff --git a/dev-vcs/git/files/git-daemon.socket 
b/dev-vcs/git/files/git-daemon.socket
new file mode 100644
index 0000000..3dec01d
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Git Activation Socket
+
+[Socket]
+ListenStream=9418
+Accept=true
+
+[Install]
+WantedBy=sockets.target

diff --git a/dev-vcs/git/files/git-daemon.xinetd 
b/dev-vcs/git/files/git-daemon.xinetd
new file mode 100644
index 0000000..02c938d
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon.xinetd
@@ -0,0 +1,13 @@
+service git-daemon
+{
+       disable         = yes
+       socket_type     = stream
+       wait            = no
+       user            = nobody
+       type            = UNLISTED
+       protocol        = tcp
+       log_on_failure  += USERID
+       port            = 9418
+       server          = /usr/bin/git
+       server_args     = daemon --inetd --syslog --export-all 
--base-path=/var/git
+}

diff --git a/dev-vcs/git/files/git-daemon_at-r1.service 
b/dev-vcs/git/files/git-daemon_at-r1.service
new file mode 100644
index 0000000..0a1bd14
--- /dev/null
+++ b/dev-vcs/git/files/git-daemon_at-r1.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Git Repositories Server Daemon
+Documentation=man:git-daemon(1)
+
+[Service]
+User=nobody
+Group=nobody
+# Ignore non-zero exit status, access error makes git-daemon return them
+ExecStart=-/usr/libexec/git-core/git-daemon --inetd --base-path=/var/git 
--verbose
+StandardInput=socket
+StandardOutput=inherit
+StandardError=journal

diff --git a/dev-vcs/git/git-2.10.2.ebuild b/dev-vcs/git/git-2.10.2.ebuild
new file mode 100644
index 0000000..3ea17d6
--- /dev/null
+++ b/dev-vcs/git/git-2.10.2.ebuild
@@ -0,0 +1,680 @@
+# Copyright 1999-2016 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"
+       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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd 
~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-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 gtk highlight +iconv 
libressl 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:= )
+       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 )
+       gnome-keyring? ( gnome-base/libgnome-keyring )"
+
+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.10.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_glibc \
+               || 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 gnome-keyring ; then
+               cd "${S}"/contrib/credential/gnome-keyring
+               git_emake || die "emake git-credential-gnome-keyring failed"
+       fi
+
+       cd "${S}"/contrib/subtree
+       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 gnome-keyring ; then
+               cd "${S}"/contrib/credential/gnome-keyring
+               dobin git-credential-gnome-keyring
+       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
+       # credential/gnome-keyring TODO
+       # 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
+       for i in \
+               buildsystems convert-objects fast-import \
+               hg-to-git hooks remotes2config.sh rerere-train.sh \
+               stats workdir \
+               ; 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=""
+       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
new file mode 100644
index 0000000..88c7b6c
--- /dev/null
+++ b/dev-vcs/git/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>robb...@gentoo.org</email>
+    <name>Robin H. Johnson</name>
+  </maintainer>
+  <maintainer type="person">
+    <email>polynomia...@gentoo.org</email>
+    <name>Lars Wendler</name>
+  </maintainer>
+  <longdescription lang="en">
+    Git - Fast Version Control System. Official titled
+    "GIT - the stupid content tracker". 
+
+    Git is a popular version control system designed to handle very large
+    projects with speed and efficiency; it is used mainly for various open
+    source projects, most notably the Linux kernel.
+
+    Git falls in the category of distributed source code management tools,
+    similar to e.g. GNU Arch or Monotone (or BitKeeper in the proprietary
+    world). Every Git working directory is a full-fledged repository with full
+    revision tracking capabilities, not dependent on network access or a 
central
+    server.
+  </longdescription>
+  <use>
+    <flag name="blksha1">Use the new optimized SHA1 implementation</flag>
+    <flag name="cgi">Install gitweb too</flag>
+    <flag name="curl">Support fetching and pushing (requires webdav too) over 
http:// and https:// protocols</flag>
+    <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="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>
+    <flag name="subversion">Include git-svn for <pkg>dev-vcs/subversion</pkg> 
support</flag>
+    <flag name="tk">Include the 'gitk' and 'git gui' tools</flag>
+    <flag name="webdav">Adds support for push'ing to HTTP/HTTPS repositories 
via DAV</flag>
+  </use>
+</pkgmetadata>

Reply via email to