Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git/
Date: Tue, 26 Sep 2017 17:03:26
Message-Id: 1506445393.e62b37dd27a9bb9574fcfb3fe98fae76776e90e2.robbat2@gentoo
1 commit: e62b37dd27a9bb9574fcfb3fe98fae76776e90e2
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 26 17:01:48 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 26 17:03:13 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e62b37dd
7
8 dev-vcs/git: security bump.
9
10 Bug: https://bugs.gentoo.org/632036
11 Package-Manager: Portage-2.3.8, Repoman-2.3.3
12
13 dev-vcs/git/Manifest | 6 +
14 dev-vcs/git/git-2.13.6.ebuild | 680 ++++++++++++++++++++++++++++++++++++++++
15 dev-vcs/git/git-2.14.2.ebuild | 699 ++++++++++++++++++++++++++++++++++++++++++
16 3 files changed, 1385 insertions(+)
17
18 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
19 index a8e29160392..db0acd91968 100644
20 --- a/dev-vcs/git/Manifest
21 +++ b/dev-vcs/git/Manifest
22 @@ -2,17 +2,23 @@ DIST git-2.13.0.tar.xz 4744388 SHA256 4bbf2ab6f2341253a38f95306ec7936833eb1c4257
23 DIST git-2.13.3.tar.xz 4754532 SHA256 91aa23be428f67eb19616f43fa0229d567e9acf4f08fba33eb0b627e4d323e62 SHA512 8a8db4d675c9d8d0e834620c5c7ce7937edd7f4bf1d8a176e1218e5773960e2635c48cb931dfe206b237e2da8371e521acf9c2776847605bea13f8a7304c9f9b WHIRLPOOL 117f84d13f9a6366f5323c136df0ae7aef7d038bb34c392f9852c5e38d2b98535a5ea9e77985aa0b25939eafc4a1441655bd38af007bb832e847ec4c6bcf4c69
24 DIST git-2.13.4.tar.xz 4755472 SHA256 371a592a52d240a6350d4ec6b63cd8301e1fab6dd03388a339a8c7429305afda SHA512 dbe6c08a6cb4931f0d1c16dabc23595c8e328a397552817ceb29cb1bf38f546e3a6ec9943db06e3adb39b15772f9e79e94c08fb4cd1f1807663602cb132983f5 WHIRLPOOL 449426e629fb722a77bbaf4ca1a11d3712e82e31286f27d67b682cab9e712850e21db5f76beaa201a82c5e9dbf246a6008deeeb20c2b568f0280f8d33731fbcb
25 DIST git-2.13.5.tar.xz 4756436 SHA256 21c9e29caac86d244ac7af78bc3422746dabb903cb3952a1ceefd801020ad1a1 SHA512 4a0b55d19f15cf0ca388d43b650c1ccadbc32964925e5d0a3107ae84c38506af957335ceb0cbb5468ffbe0f5283f8e188aa51c9e915b3249126eb37c304be9ec WHIRLPOOL 7a3c9971f37de366801be6a6d1d28a1d02b2f3fe98a508465c01d600913efd0ae4d241fb690686beb2ae9b0321ba4f7eb5b313ec47fb04eb7d0e0e51170c6750
26 +DIST git-2.13.6.tar.xz 4756820 SHA256 bce97e403bea34f50378e90ade10c12666b2382cc247551b63dc5604e03b2523 SHA512 ed39784205e1077f886eebdfb34a205fb0433071de29f673a79ea32bca31a2ba9bdabba208c9679ea2f6f295bafad52a7e7852b5bd2ccb1e6c99a1d2e76e8ada WHIRLPOOL aeadb595a3fc9b74b143478436f4511d15735e5e01bbaf84bc60ef6c3bb91d94aa29ea1bd700a08d3aea3341de4cee5c4d5ced0b550a223faaadd37774cd3492
27 DIST git-2.14.0.tar.xz 4790932 SHA256 f93e6e6a307d2e953cccafd9f4003c62992628fa508d07586476c953c1655975 SHA512 4410ec9c40fed8efeba26ae57412975cfc4c78a43d89b0f1a2412e578a14b12e24ac7537f6b5efe83087006f27a49911facb4a9007fbc59e1548d15fd5f22dd9 WHIRLPOOL c2033fec557552b6fb18c921593dd444b6a427ba96912fd1516dd7a3dbda10cf47b8639d0fb50c403defeb12bf715458d5c34e6890317f50be40df99cbf2e051
28 DIST git-2.14.1.tar.xz 4791876 SHA256 6f724c6d0e9e13114ab35db6f67e1b2c1934b641e89366e6a0e37618231f2cc6 SHA512 bee35ad9c6a0d0588045ec2fe5f6987cb1eeb3961cdf33cd9b51ae52017969131ea4ec09908f9b30944f85b0daa99614fb42c248c9c8dac5f21a90e2866c33b4 WHIRLPOOL 4ca338a3b39f3a787bc4054f26a4510918ef8dd1bad834e6fc0889358b56e22a4eb98a642fe7d96e60e210aa0e946da160d1716a1ee14e8c853ea6af15b609b7
29 +DIST git-2.14.2.tar.xz 4800208 SHA256 50e9723996114ad1eec4dda89960d9fe34461749ae42031008a261fedd03c7a1 SHA512 fe99486e0aef8d73dace3081bbd62bc6d08bc13868b98c905f7833458fdfc464eea504ae2961f4a2f38892cb0e76b533a50a2cacdf07c9ad9f8106e7ac1c353c WHIRLPOOL af0d166fc00aea8a4a77984e8bf92f6fb3abc854263316961683e5e27c8adbe1d73a3384b4d14c2ce762d75fd95f67da9a95a3fd3eca4d6747eb1850ab7b084e
30 DIST git-htmldocs-2.13.0.tar.xz 1107480 SHA256 d5ddfb8eedd5a53c0e46e183ed1513dbdd4f5d5e7ef6624040ba0b7381221e3a SHA512 053b3584b1bdb6968ce54d97d9c58ec221c604f90c3953c9e850009e9263e71bf970f0f268a35769ea4f0e617811297bc771c20eefab8e600a22d1f4efe7f675 WHIRLPOOL fb5f37a95fc459dd96a8d811103886c0c308df38f57a63fa5b3db3e9d51c6024cab79df7a9e86772ce6a6b388546166a39a531e47773459482aa97502733dc2e
31 DIST git-htmldocs-2.13.3.tar.xz 1109392 SHA256 c5f8ad546724b8712286dd7814ea46abf829b14f2de8f6e565b8775469880c66 SHA512 6ac9bd2f401bc3330d5a23a4f48afbe224c6d558154281737f6cd83b8ae6b73c32e7fcb491c642f926a9c5f95019964cbe7902c0ec18456b53847fd6c3b7e292 WHIRLPOOL cef80aa25644993fc95458fedcfde2672da22b8d9e5853e4149cc0196782812008f2876c32f6e857abc65d30545767c9b822913f42b1470342b72a7573347d90
32 DIST git-htmldocs-2.13.4.tar.xz 1109720 SHA256 1dbb459cf47f0023456fde9d0155aa858540479e258fbf2c808c5c4fd9f44f93 SHA512 571c3366f35265e041403300dee37e518cd6a5812eeb670b7297b0c29c8fe4eaba405c5f68b38ff3dbd672b5697c5524c025106fb24df156644e73cf792e4708 WHIRLPOOL c9ec8b2dfbb22b4227e7032cd1ed8da6a52653b6e30cd8802320f160afda12d754927f9f388bfd32a1760f18aff06c834d9516ac74c08b6b26b3d3b1ea2446c8
33 DIST git-htmldocs-2.13.5.tar.xz 1110236 SHA256 f5f10d821544446547dc91798772f36d7515a824c9a28f22521f0094e1a4dc08 SHA512 0ba006ddc35325052be4d969a3a966ec1be7954dcc1676b9914953720e56f3c9a4522541d964c6ff08a921c35f983213eacd00b99db5d97b97ea8f5c1181ed73 WHIRLPOOL 020963c8544dba6acc4b0e681a844b6a9f332b3b3469c056d678791afacab54f4badd956137b21d3a5d2ea465a83f05d815a2c066f71fade41a58e8f802088bd
34 +DIST git-htmldocs-2.13.6.tar.xz 1110668 SHA256 cdc39ecc8d1ce09f7b865832ebbc466441beb61d1aad4c7796514520220dabf0 SHA512 9eb26f04836620bf4486d3bb2a170ab2b0af319f7f53e2677f4c1445767f5c3521cfdbb274dcc4df2bfd2fc5bf0ca18c6a4a9ca0b9f957c53f66e530684af6cc WHIRLPOOL 126d8ae25c71dc4e6a6eb20ba611cd2eaf94ea8f4f89fde82b2d05044e93f425d9812559db5599b557a1a8f5832cc41d0651b421d265219c257351fe7fb41f2b
35 DIST git-htmldocs-2.14.0.tar.xz 1114504 SHA256 51d6d51041bbfa4a5aab5762f1f87d630179ed30dc32773b38573258e1700de0 SHA512 e9d807073e22e72f3a0ca4c2bddb8df2f024c766b8e436c066dc3808e23f339322dceddfb9b16d25def511d46f7a9382dafd8280a2a8c5ebf24cba73f2da7cc7 WHIRLPOOL 63c1220ced7999ef1d1fdd1db80d7eeb7be8d287ac2c58bed06115ad9b3035926953b3e8ad9a2e74c56497e5645ad4059b96988fce4bfe6452f98015fee896ce
36 DIST git-htmldocs-2.14.1.tar.xz 1115176 SHA256 9c1970c7f87f37c8b3044e01e0500d84d8bc4eb4dfa5ca881c32c351f20769fb SHA512 c4d8de9d402b00c6856936bbd1fffc213e156a7dee09d740159ee5de3231bcc3dee426c640e2dac6c837b7a3f69779be4093664fd55ef18e671f76e2d11280b5 WHIRLPOOL 1a85338c397ddedd5db01a65b0b173f4876551348b7892872c10b706e59419a2eb5937ca43df1018102a56e973ce756b6ca128e3df4e0e99adc1a9ba7719be52
37 +DIST git-htmldocs-2.14.2.tar.xz 1115940 SHA256 a36661e81e5b21e788cd84e11860bcd0cafa402eff06e6371415a5a0e0b80dfb SHA512 c5dda319713a98b9f655a04fbb4dfcba4cc60fe22586bae73a88111d96cd8da989060b8450549a32a5c5bf5bc8ce735e73055ce72b8bf5d3b4fcec2040fa196b WHIRLPOOL 1b47b798ae00f29e84862b973f4e284076eba84992f52b92903b56d50f0a463aac011fdcb3ea0b4859d2cf8661eb24c5faf4569ed22de952e293df95ca9a0438
38 DIST git-manpages-2.13.0.tar.xz 407460 SHA256 8414f9c62e2b099cd0ea2ca22c55fb6538b13fc7a3ed1508fb9881aae42a97c9 SHA512 175ec2cd9293eedfbdb70445e19966f1dabdbf86beb220b3ed74862a36036101497bf9f322c3635e57bfcb7d2ce9d5efe8bdd6bb3ad73563dfa283c48da6bd1c WHIRLPOOL 11ba557437a2a93327406d3dfb69586668a0a34e20265bbb3053c10b1b37b5ad19fa66d9b0c2188268837acb5d56bd211bb763e0dc1ee8edfda5422b60cb4ed2
39 DIST git-manpages-2.13.3.tar.xz 407640 SHA256 1128db0302a41b55132bfd507863a7921b995d9ad308396ff2c4ca91177481c2 SHA512 9c81335f3d882df1220801ea6fdedea90533c904a1e4dd0394b42721aa31392e6c923568a81c05479fe77a89a974e02fd40b4bcff397c4f739306ba4cb874501 WHIRLPOOL f735c2657fd63a2b7b8bca5e511c789680b615f519ac1d9aa7b67c0aead5607f534021494a03ade9752274c932a22eb82457d243c5328d3dbe8613ac44e8c595
40 DIST git-manpages-2.13.4.tar.xz 407656 SHA256 674fa9a299cbcb91e49affd7dfd69952be1ee88cb7a3d5ee5b294e7da29b5d52 SHA512 ac6bb226a9425f8b949fe6eaf82ccc620264bf866308557906bff49e9c894c7ab9cb13351461db2fd073bb5835653dbaa6bb32487e40033d943d8f16e9a55701 WHIRLPOOL c873be52695a6b9df75b783331620ad98c3b2db9ed74e204250cff1f6807157f063fb6c25da86f9aeb66fcf0978d9d0693d4f286c8f68e6efa4473ea6dde2f21
41 DIST git-manpages-2.13.5.tar.xz 407640 SHA256 1dde688dda9162605ae27e4ad1b55c65c056b3e7cd70972b7e1d6bd2b743394d SHA512 42637b264b4a1a73defe22f314cb8ca0bc171fd722252cd926a9fd74a8f89d129da0648ed85b72f44948795c6ae1f33f4f141f11b07688533c8654be0983fbc0 WHIRLPOOL 9b4a3440c4d1da7089d020e146de7401502cdbae0d82a0052f665cfab84d48de5aa5602d78b8d2f29507e280a16ab4bc2ea4a753fc948a7102eef0240ab3ab2d
42 +DIST git-manpages-2.13.6.tar.xz 407660 SHA256 9c92ed09c3343c770a1afd9dbb1192b00ebb1b3d3e25e21a2dcb1a4e9a494d1d SHA512 b24a96053e348e1d2ebf5c66d968074bc73471f07ac3a680d8b16fd211b69b5fdfad6a087473edf9941ad08493e4d7ff0a916b85ce40ebe19b3e3dad6a4baf5f WHIRLPOOL f25b4b20462806a722067aecb7aa0526f00536630c8f71bd7be1ecc0ff4fec07db2fa79d69d911f3e1a2eaca9fe73ad76e76e7ef7afbb83698db42a540e4cfef
43 DIST git-manpages-2.14.0.tar.xz 410364 SHA256 7d653c68a27eb7878ad92c0ab4d4fbcf112b69b67d4c8a180779651a96b1824d SHA512 6979cb513d769debc12adb197d44e7334b174a8be6dfc9b20b457f247786691f1a18802d8f5247e1c8ecf42d05c42a03929cb5770990b181ee3476fa9a755a5c WHIRLPOOL 467c901cbd875ca16b44361e3da8c3edd4528bb893b6dae57650884c16b51aab3eb0bd16d47a4cf794ea3cb08380e228966353918558087bfcd931a0cafebfa1
44 DIST git-manpages-2.14.1.tar.xz 410400 SHA256 7ebce1e0e862af1367e24f14765c7b67f08b63fb01b80949f55479c562d414f2 SHA512 53641232a4fa7c8e5da14f7ba46d84e6cc4281ed8e9979153e9de13ae6550d863e823c3a2f71ab9232a57314fb19b9443913518a3a072d227c2067430d5108f7 WHIRLPOOL 6b4796ebd3070c66404920091298717d1c743403454a62c5e49bd8f8af16b3dc47345a8c8e64fec670b8bd9ed34ddbfa3916f904696e9209522cbc8ae5dcfdb1
45 +DIST git-manpages-2.14.2.tar.xz 411160 SHA256 6dd350d1e9d00159a549f0fad08a9f954b1d12576fc8d5865fbed9dee15105fc SHA512 64f9e22ed98cde1dec9afb719c2f7254d5da1eceab2e7d3291d37792fa1b9fc83633ac42a4f47961a6721b325d58818e67ffb14085d5e8f9bed1b691f22d79d7 WHIRLPOOL 902889bed82289773c029ac7c9625f4972559e0365cc04dfb661ae14fd7e1757d3820d75b3591d72dded98107ad7a1e2e31590452699858ca3a94fcc375ac0eb
46
47 diff --git a/dev-vcs/git/git-2.13.6.ebuild b/dev-vcs/git/git-2.13.6.ebuild
48 new file mode 100644
49 index 00000000000..2b0d92a449d
50 --- /dev/null
51 +++ b/dev-vcs/git/git-2.13.6.ebuild
52 @@ -0,0 +1,680 @@
53 +# Copyright 1999-2017 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=6
57 +
58 +GENTOO_DEPEND_ON_PERL=no
59 +
60 +# bug #329479: git-remote-testgit is not multiple-version aware
61 +PYTHON_COMPAT=( python2_7 )
62 +[[ ${PV} == *9999 ]] && SCM="git-r3"
63 +# Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
64 +# See https://git-scm.com/docs/gitworkflows#_graduation
65 +# In order of stability:
66 +# 9999-r0: maint
67 +# 9999-r1: master
68 +# 9999-r2: next
69 +# 9999-r3: pu
70 +EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
71 +EGIT_BRANCH=maint
72 +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN"
73 +
74 +inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
75 +
76 +MY_PV="${PV/_rc/.rc}"
77 +MY_P="${PN}-${MY_PV}"
78 +
79 +DOC_VER=${MY_PV}
80 +
81 +DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
82 +HOMEPAGE="http://www.git-scm.com/"
83 +if [[ ${PV} != *9999 ]]; then
84 + SRC_URI_SUFFIX="xz"
85 + SRC_URI_KORG="mirror://kernel/software/scm/git"
86 + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
87 + SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
88 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
89 + doc? (
90 + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
91 + )"
92 + [[ "${PV}" = *_rc* ]] || \
93 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
94 +fi
95 +
96 +LICENSE="GPL-2"
97 +SLOT="0"
98 +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
99 +
100 +# Common to both DEPEND and RDEPEND
101 +CDEPEND="
102 + gnome-keyring? ( app-crypt/libsecret )
103 + !libressl? ( dev-libs/openssl:0= )
104 + libressl? ( dev-libs/libressl:= )
105 + sys-libs/zlib
106 + pcre? ( dev-libs/libpcre )
107 + perl? ( dev-lang/perl:=[-build(-)] )
108 + tk? ( dev-lang/tk:0= )
109 + curl? (
110 + net-misc/curl
111 + webdav? ( dev-libs/expat )
112 + )
113 + emacs? ( virtual/emacs )
114 +"
115 +
116 +RDEPEND="${CDEPEND}
117 + gpg? ( app-crypt/gnupg )
118 + mediawiki? (
119 + dev-perl/DateTime-Format-ISO8601
120 + dev-perl/HTML-Tree
121 + dev-perl/MediaWiki-API
122 + )
123 + perl? ( dev-perl/Error
124 + dev-perl/Net-SMTP-SSL
125 + dev-perl/Authen-SASL
126 + cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
127 + cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
128 + subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
129 + )
130 + python? ( ${PYTHON_DEPS} )
131 +"
132 +
133 +# This is how info docs are created with Git:
134 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
135 +# .xml/docbook --(docbook2texi.pl)--> .texi
136 +# .texi --(makeinfo)---------> .info
137 +DEPEND="${CDEPEND}
138 + doc? (
139 + app-text/asciidoc
140 + app-text/docbook2X
141 + sys-apps/texinfo
142 + app-text/xmlto
143 + )
144 + nls? ( sys-devel/gettext )
145 + test? ( app-crypt/gnupg )"
146 +
147 +# Live ebuild builds man pages and HTML docs, additionally
148 +if [[ ${PV} == *9999 ]]; then
149 + DEPEND="${DEPEND}
150 + app-text/asciidoc"
151 +fi
152 +
153 +SITEFILE=50${PN}-gentoo.el
154 +S="${WORKDIR}/${MY_P}"
155 +
156 +REQUIRED_USE="
157 + cgi? ( perl )
158 + cvs? ( perl )
159 + mediawiki? ( perl )
160 + mediawiki-experimental? ( mediawiki )
161 + subversion? ( perl )
162 + webdav? ( curl )
163 + python? ( ${PYTHON_REQUIRED_USE} )
164 +"
165 +
166 +PATCHES=(
167 + # bug #350330 - automagic CVS when we don't want it is bad.
168 + "${FILESDIR}"/git-2.12.0-optional-cvs.patch
169 +
170 + # install mediawiki perl modules also in vendor_dir
171 + # hack, needs better upstream solution
172 + "${FILESDIR}"/git-1.8.5-mw-vendor.patch
173 +
174 + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
175 +
176 + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
177 + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch
178 +)
179 +
180 +pkg_setup() {
181 + if use subversion && has_version "dev-vcs/subversion[dso]"; then
182 + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
183 + ewarn "with USE=dso, there may be weird crashes in git-svn. You"
184 + ewarn "have been warned."
185 + fi
186 + if use python ; then
187 + python-single-r1_pkg_setup
188 + fi
189 +}
190 +
191 +# This is needed because for some obscure reasons future calls to make don't
192 +# pick up these exports if we export them in src_unpack()
193 +exportmakeopts() {
194 + local myopts
195 +
196 + if use blksha1 ; then
197 + myopts+=" BLK_SHA1=YesPlease"
198 + elif use ppcsha1 ; then
199 + myopts+=" PPC_SHA1=YesPlease"
200 + fi
201 +
202 + if use curl ; then
203 + use webdav || myopts+=" NO_EXPAT=YesPlease"
204 + else
205 + myopts+=" NO_CURL=YesPlease"
206 + fi
207 +
208 + # broken assumptions, because of broken build system ...
209 + myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
210 + myopts+=" INSTALL=install TAR=tar"
211 + myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
212 + myopts+=" SANE_TOOL_PATH="
213 + myopts+=" OLD_ICONV="
214 + myopts+=" NO_EXTERNAL_GREP="
215 +
216 + # For svn-fe
217 + extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
218 +
219 + # can't define this to null, since the entire makefile depends on it
220 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
221 +
222 + use iconv \
223 + || myopts+=" NO_ICONV=YesPlease"
224 + use nls \
225 + || myopts+=" NO_GETTEXT=YesPlease"
226 + use tk \
227 + || myopts+=" NO_TCLTK=YesPlease"
228 + use pcre \
229 + && myopts+=" USE_LIBPCRE=yes" \
230 + && extlibs+=" -lpcre"
231 + use perl \
232 + && myopts+=" INSTALLDIRS=vendor" \
233 + || myopts+=" NO_PERL=YesPlease"
234 + use python \
235 + || myopts+=" NO_PYTHON=YesPlease"
236 + use subversion \
237 + || myopts+=" NO_SVN_TESTS=YesPlease"
238 + use threads \
239 + && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
240 + || myopts+=" NO_PTHREADS=YesPlease"
241 + use cvs \
242 + || myopts+=" NO_CVS=YesPlease"
243 + use elibc_musl \
244 + && myopts+=" NO_REGEX=YesPlease"
245 +# Disabled until ~m68k-mint can be keyworded again
246 +# if [[ ${CHOST} == *-mint* ]] ; then
247 +# myopts+=" NO_MMAP=YesPlease"
248 +# myopts+=" NO_IPV6=YesPlease"
249 +# myopts+=" NO_STRLCPY=YesPlease"
250 +# myopts+=" NO_MEMMEM=YesPlease"
251 +# myopts+=" NO_MKDTEMP=YesPlease"
252 +# myopts+=" NO_MKSTEMPS=YesPlease"
253 +# fi
254 + if [[ ${CHOST} == ia64-*-hpux* ]]; then
255 + myopts+=" NO_NSEC=YesPlease"
256 + fi
257 + if [[ ${CHOST} == *-*-aix* ]]; then
258 + myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
259 + fi
260 + if [[ ${CHOST} == *-solaris* ]]; then
261 + myopts+=" NEEDS_LIBICONV=YesPlease"
262 + myopts+=" HAVE_CLOCK_MONOTONIC=1"
263 + myopts+=" HAVE_GETDELIM=1"
264 + fi
265 +
266 + has_version '>=app-text/asciidoc-8.0' \
267 + && myopts+=" ASCIIDOC8=YesPlease"
268 + myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
269 +
270 + # Bug 290465:
271 + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
272 + [[ "${CHOST}" == *-uclibc* ]] && \
273 + myopts+=" NO_NSEC=YesPlease"
274 +
275 + export MY_MAKEOPTS="${myopts}"
276 + export EXTLIBS="${extlibs}"
277 +}
278 +
279 +src_unpack() {
280 + if [[ ${PV} != *9999 ]]; then
281 + unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
282 + cd "${S}"
283 + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
284 + use doc && \
285 + cd "${S}"/Documentation && \
286 + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
287 + cd "${S}"
288 + else
289 + git-r3_src_unpack
290 + cd "${S}"
291 + #cp "${FILESDIR}"/GIT-VERSION-GEN .
292 + fi
293 +
294 +}
295 +
296 +src_prepare() {
297 + # add experimental patches to improve mediawiki support
298 + # see patches for origin
299 + if use mediawiki-experimental ; then
300 + PATCHES+=(
301 + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
302 + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
303 + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
304 + )
305 + fi
306 +
307 + default
308 +
309 + sed -i \
310 + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
311 + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
312 + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
313 + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
314 + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
315 + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
316 + Makefile contrib/svn-fe/Makefile || die "sed failed"
317 +
318 + # Never install the private copy of Error.pm (bug #296310)
319 + sed -i \
320 + -e '/private-Error.pm/s,^,#,' \
321 + perl/Makefile.PL
322 +
323 + # Fix docbook2texi command
324 + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
325 + Documentation/Makefile || die "sed failed"
326 +
327 + # Fix git-subtree missing DESTDIR
328 + sed -i \
329 + -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
330 + -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
331 + contrib/subtree/Makefile
332 +}
333 +
334 +git_emake() {
335 + # bug #326625: PERL_PATH, PERL_MM_OPT
336 + # bug #320647: PYTHON_PATH
337 + PYTHON_PATH=""
338 + use python && PYTHON_PATH="${PYTHON}"
339 + emake ${MY_MAKEOPTS} \
340 + DESTDIR="${D}" \
341 + OPTCFLAGS="${CFLAGS}" \
342 + OPTLDFLAGS="${LDFLAGS}" \
343 + OPTCC="$(tc-getCC)" \
344 + OPTAR="$(tc-getAR)" \
345 + prefix="${EPREFIX}"/usr \
346 + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
347 + sysconfdir="${EPREFIX}"/etc \
348 + PYTHON_PATH="${PYTHON_PATH}" \
349 + PERL_MM_OPT="" \
350 + GIT_TEST_OPTS="--no-color" \
351 + V=1 \
352 + "$@"
353 + # This is the fix for bug #326625, but it also causes breakage, see bug
354 + # #352693.
355 + # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
356 +}
357 +
358 +src_configure() {
359 + exportmakeopts
360 +}
361 +
362 +src_compile() {
363 + if use perl ; then
364 + git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
365 + git_emake perl/perl.mak || die "emake perl/perl.mak failed"
366 + fi
367 + git_emake || die "emake failed"
368 +
369 + if use emacs ; then
370 + elisp-compile contrib/emacs/git{,-blame}.el
371 + fi
372 +
373 + if use perl && use cgi ; then
374 + git_emake \
375 + gitweb \
376 + || die "emake gitweb (cgi) failed"
377 + fi
378 +
379 + if [[ ${CHOST} == *-darwin* ]]; then
380 + cd "${S}"/contrib/credential/osxkeychain || die
381 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
382 + || die "emake credential-osxkeychain"
383 + fi
384 +
385 + cd "${S}"/Documentation
386 + if [[ ${PV} == *9999 ]] ; then
387 + git_emake man \
388 + || die "emake man failed"
389 + if use doc ; then
390 + git_emake info html \
391 + || die "emake info html failed"
392 + fi
393 + else
394 + if use doc ; then
395 + git_emake info \
396 + || die "emake info html failed"
397 + fi
398 + fi
399 +
400 + if use subversion ; then
401 + cd "${S}"/contrib/svn-fe
402 + # by defining EXTLIBS we override the detection for libintl and
403 + # libiconv, bug #516168
404 + local nlsiconv=
405 + use nls && use !elibc_glibc && nlsiconv+=" -lintl"
406 + use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
407 + git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
408 + if use doc ; then
409 + git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
410 + fi
411 + cd "${S}"
412 + fi
413 +
414 + if use gnome-keyring ; then
415 + cd "${S}"/contrib/credential/libsecret
416 + git_emake || die "emake git-credential-libsecret failed"
417 + fi
418 +
419 + cd "${S}"/contrib/subtree || die
420 + git_emake
421 + use doc && git_emake doc
422 +
423 + cd "${S}"/contrib/diff-highlight || die
424 + git_emake
425 +
426 + if use mediawiki ; then
427 + cd "${S}"/contrib/mw-to-git
428 + git_emake
429 + fi
430 +}
431 +
432 +src_install() {
433 + git_emake \
434 + install || \
435 + die "make install failed"
436 +
437 + if [[ ${CHOST} == *-darwin* ]]; then
438 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
439 + fi
440 +
441 + # Depending on the tarball and manual rebuild of the documentation, the
442 + # manpages may exist in either OR both of these directories.
443 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
444 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
445 + dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
446 + use doc && dodir /usr/share/doc/${PF}/html
447 + for d in / /howto/ /technical/ ; do
448 + docinto ${d}
449 + dodoc Documentation${d}*.txt
450 + if use doc ; then
451 + docinto ${d}/html
452 + dodoc Documentation${d}*.html
453 + fi
454 + done
455 + docinto /
456 + # Upstream does not ship this pre-built :-(
457 + use doc && doinfo Documentation/{git,gitman}.info
458 +
459 + newbashcomp contrib/completion/git-completion.bash ${PN}
460 + bashcomp_alias git gitk
461 + # Not really a bash-completion file (bug #477920)
462 + # but still needed uncompressed (bug #507480)
463 + insinto /usr/share/${PN}
464 + doins contrib/completion/git-prompt.sh
465 +
466 + if use emacs ; then
467 + elisp-install ${PN} contrib/emacs/git.{el,elc}
468 + elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
469 + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
470 + # don't add automatically to the load-path, so the sitefile
471 + # can do a conditional loading
472 + touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
473 + elisp-site-file-install "${FILESDIR}"/${SITEFILE}
474 + fi
475 +
476 + #dobin contrib/fast-import/git-p4 # Moved upstream
477 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
478 + newbin contrib/fast-import/import-tars.perl import-tars
479 + exeinto /usr/libexec/git-core/
480 + newexe contrib/git-resurrect.sh git-resurrect
481 +
482 + # git-subtree
483 + cd "${S}"/contrib/subtree
484 + git_emake install || die "Failed to emake install git-subtree"
485 + if use doc ; then
486 + git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
487 + fi
488 + newdoc README README.git-subtree
489 + dodoc git-subtree.txt
490 + cd "${S}"
491 +
492 + if use mediawiki ; then
493 + cd "${S}"/contrib/mw-to-git
494 + git_emake install
495 + cd "${S}"
496 + fi
497 +
498 + # diff-highlight
499 + dobin contrib/diff-highlight/diff-highlight
500 + newdoc contrib/diff-highlight/README README.diff-highlight
501 +
502 + # git-jump
503 + exeinto /usr/libexec/git-core/
504 + doexe contrib/git-jump/git-jump
505 + newdoc contrib/git-jump/README git-jump.txt
506 +
507 + # git-contacts
508 + exeinto /usr/libexec/git-core/
509 + doexe contrib/contacts/git-contacts
510 + dodoc contrib/contacts/git-contacts.txt
511 +
512 + if use gnome-keyring ; then
513 + cd "${S}"/contrib/credential/libsecret
514 + dobin git-credential-libsecret
515 + fi
516 +
517 + if use subversion ; then
518 + cd "${S}"/contrib/svn-fe
519 + dobin svn-fe
520 + dodoc svn-fe.txt
521 + if use doc ; then
522 + doman svn-fe.1
523 + docinto html
524 + dodoc svn-fe.html
525 + fi
526 + cd "${S}"
527 + fi
528 +
529 + dodir /usr/share/${PN}/contrib
530 + # The following are excluded:
531 + # completion - installed above
532 + # diff-highlight - done above
533 + # emacs - installed above
534 + # examples - these are stuff that is not used in Git anymore actually
535 + # git-jump - done above
536 + # gitview - installed above
537 + # p4import - excluded because fast-import has a better one
538 + # patches - stuff the Git guys made to go upstream to other places
539 + # persistent-https - TODO
540 + # mw-to-git - TODO
541 + # subtree - build seperately
542 + # svnimport - use git-svn
543 + # thunderbird-patch-inline - fixes thunderbird
544 + local contrib_objects=(
545 + buildsystems
546 + fast-import
547 + hg-to-git
548 + hooks
549 + remotes2config.sh
550 + rerere-train.sh
551 + stats
552 + workdir
553 + )
554 + for i in "${contrib_objects[@]}" ; do
555 + cp -rf \
556 + "${S}"/contrib/${i} \
557 + "${ED}"/usr/share/${PN}/contrib \
558 + || die "Failed contrib ${i}"
559 + done
560 +
561 + if use perl && use cgi ; then
562 + # We used to install in /usr/share/${PN}/gitweb
563 + # but upstream installs in /usr/share/gitweb
564 + # so we will install a symlink and use their location for compat with other
565 + # distros
566 + dosym /usr/share/gitweb /usr/share/${PN}/gitweb
567 +
568 + # INSTALL discusses configuration issues, not just installation
569 + docinto /
570 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
571 + newdoc "${S}"/gitweb/README README.gitweb
572 +
573 + find "${ED}"/usr/lib64/perl5/ \
574 + -name .packlist \
575 + -exec rm \{\} \;
576 + else
577 + rm -rf "${ED}"/usr/share/gitweb
578 + fi
579 +
580 + if ! use subversion ; then
581 + rm -f "${ED}"/usr/libexec/git-core/git-svn \
582 + "${ED}"/usr/share/man/man1/git-svn.1*
583 + fi
584 +
585 + if use xinetd ; then
586 + insinto /etc/xinetd.d
587 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
588 + fi
589 +
590 + if use !prefix ; then
591 + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
592 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
593 + systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
594 + systemd_dounit "${FILESDIR}/git-daemon.socket"
595 + fi
596 +
597 + perl_delete_localpod
598 +
599 + # Remove disabled linguas
600 + # we could remove sources in src_prepare, but install does not
601 + # handle missing locale dir well
602 + rm_loc() {
603 + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
604 + rm -r "${ED}/usr/share/locale/${1}" || die
605 + fi
606 + }
607 + l10n_for_each_disabled_locale_do rm_loc
608 +}
609 +
610 +src_test() {
611 + local disabled=""
612 + local tests_cvs="t9200-git-cvsexportcommit.sh \
613 + t9400-git-cvsserver-server.sh \
614 + t9401-git-cvsserver-crlf.sh \
615 + t9402-git-cvsserver-refs.sh \
616 + t9600-cvsimport.sh \
617 + t9601-cvsimport-vendor-branch.sh \
618 + t9602-cvsimport-branches-tags.sh \
619 + t9603-cvsimport-patchsets.sh \
620 + t9604-cvsimport-timestamps.sh"
621 + local tests_perl="t3701-add-interactive.sh \
622 + t5502-quickfetch.sh \
623 + t5512-ls-remote.sh \
624 + t5520-pull.sh \
625 + t7106-reset-unborn-branch.sh \
626 + t7501-commit.sh"
627 + # Bug #225601 - t0004 is not suitable for root perm
628 + # Bug #219839 - t1004 is not suitable for root perm
629 + # t0001-init.sh - check for init notices EPERM* fails
630 + local tests_nonroot="t0001-init.sh \
631 + t0004-unwritable.sh \
632 + t0070-fundamental.sh \
633 + t1004-read-tree-m-u-wf.sh \
634 + t3700-add.sh \
635 + t7300-clean.sh"
636 + # t9100 still fails with symlinks in SVN 1.7
637 + local test_svn="t9100-git-svn-basic.sh"
638 +
639 + # Unzip is used only for the testcase code, not by any normal parts of Git.
640 + if ! has_version app-arch/unzip ; then
641 + einfo "Disabling tar-tree tests"
642 + disabled="${disabled} t5000-tar-tree.sh"
643 + fi
644 +
645 + cvs=0
646 + use cvs && let cvs=$cvs+1
647 + if [[ ${EUID} -eq 0 ]]; then
648 + if [[ $cvs -eq 1 ]]; then
649 + ewarn "Skipping CVS tests because CVS does not work as root!"
650 + ewarn "You should retest with FEATURES=userpriv!"
651 + disabled="${disabled} ${tests_cvs}"
652 + fi
653 + einfo "Skipping other tests that require being non-root"
654 + disabled="${disabled} ${tests_nonroot}"
655 + else
656 + [[ $cvs -gt 0 ]] && \
657 + has_version dev-vcs/cvs && \
658 + let cvs=$cvs+1
659 + [[ $cvs -gt 1 ]] && \
660 + has_version "dev-vcs/cvs[server]" && \
661 + let cvs=$cvs+1
662 + if [[ $cvs -lt 3 ]]; then
663 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
664 + disabled="${disabled} ${tests_cvs}"
665 + fi
666 + fi
667 +
668 + if ! use perl ; then
669 + einfo "Disabling tests that need Perl"
670 + disabled="${disabled} ${tests_perl}"
671 + fi
672 +
673 + einfo "Disabling tests that fail with SVN 1.7"
674 + disabled="${disabled} ${test_svn}"
675 +
676 + # Reset all previously disabled tests
677 + cd "${S}/t"
678 + for i in *.sh.DISABLED ; do
679 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
680 + done
681 + einfo "Disabled tests:"
682 + for i in ${disabled} ; do
683 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
684 + done
685 +
686 + # Avoid the test system removing the results because we want them ourselves
687 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
688 + -i "${S}"/t/Makefile
689 +
690 + # Clean old results first, must always run
691 + cd "${S}/t"
692 + nonfatal git_emake clean
693 +
694 + # Now run the tests, keep going if we hit an error, and don't terminate on
695 + # failure
696 + cd "${S}"
697 + einfo "Start test run"
698 + #MAKEOPTS=-j1
699 + nonfatal git_emake --keep-going test
700 + rc=$?
701 +
702 + # Display nice results, now print the results
703 + cd "${S}/t"
704 + nonfatal git_emake aggregate-results
705 +
706 + # And bail if there was a problem
707 + [ $rc -eq 0 ] || die "tests failed. Please file a bug."
708 +}
709 +
710 +showpkgdeps() {
711 + local pkg=$1
712 + shift
713 + elog " $(printf "%-17s:" ${pkg}) ${@}"
714 +}
715 +
716 +pkg_postinst() {
717 + use emacs && elisp-site-regen
718 + einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
719 + einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
720 + einfo "Note that the prompt bash code is now in that separate script"
721 + elog "These additional scripts need some dependencies:"
722 + echo
723 + showpkgdeps git-quiltimport "dev-util/quilt"
724 + showpkgdeps git-instaweb \
725 + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
726 + echo
727 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
728 +}
729 +
730 +pkg_postrm() {
731 + use emacs && elisp-site-regen
732 +}
733
734 diff --git a/dev-vcs/git/git-2.14.2.ebuild b/dev-vcs/git/git-2.14.2.ebuild
735 new file mode 100644
736 index 00000000000..d079a65a75e
737 --- /dev/null
738 +++ b/dev-vcs/git/git-2.14.2.ebuild
739 @@ -0,0 +1,699 @@
740 +# Copyright 1999-2017 Gentoo Foundation
741 +# Distributed under the terms of the GNU General Public License v2
742 +
743 +EAPI=6
744 +
745 +GENTOO_DEPEND_ON_PERL=no
746 +
747 +# bug #329479: git-remote-testgit is not multiple-version aware
748 +PYTHON_COMPAT=( python2_7 )
749 +PLOCALES="bg ca de fr is it ko pt_PT ru sv vi zh_CN"
750 +if [[ ${PV} == *9999 ]]; then
751 + SCM="git-r3"
752 + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
753 + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
754 + # See https://git-scm.com/docs/gitworkflows#_graduation
755 + # In order of stability:
756 + # 9999-r0: maint
757 + # 9999-r1: master
758 + # 9999-r2: next
759 + # 9999-r3: pu
760 + case "${PVR}" in
761 + 9999) EGIT_BRANCH=maint ;;
762 + 9999-r1) EGIT_BRANCH=master ;;
763 + 9999-r2) EGIT_BRANCH=next;;
764 + 9999-r3) EGIT_BRANCH=pu ;;
765 + esac
766 +fi
767 +
768 +inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
769 +
770 +MY_PV="${PV/_rc/.rc}"
771 +MY_P="${PN}-${MY_PV}"
772 +
773 +DOC_VER=${MY_PV}
774 +
775 +DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
776 +HOMEPAGE="http://www.git-scm.com/"
777 +if [[ ${PV} != *9999 ]]; then
778 + SRC_URI_SUFFIX="xz"
779 + SRC_URI_KORG="mirror://kernel/software/scm/git"
780 + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
781 + SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
782 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
783 + doc? (
784 + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
785 + )"
786 + [[ "${PV}" = *_rc* ]] || \
787 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
788 +fi
789 +
790 +LICENSE="GPL-2"
791 +SLOT="0"
792 +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"
793 +
794 +# Common to both DEPEND and RDEPEND
795 +CDEPEND="
796 + gnome-keyring? ( app-crypt/libsecret )
797 + !libressl? ( dev-libs/openssl:0= )
798 + libressl? ( dev-libs/libressl:= )
799 + sys-libs/zlib
800 + pcre? (
801 + pcre-jit? ( dev-libs/libpcre2[jit(+)] )
802 + !pcre-jit? ( dev-libs/libpcre )
803 + )
804 + perl? ( dev-lang/perl:=[-build(-)] )
805 + tk? ( dev-lang/tk:0= )
806 + curl? (
807 + net-misc/curl
808 + webdav? ( dev-libs/expat )
809 + )
810 + emacs? ( virtual/emacs )
811 +"
812 +
813 +RDEPEND="${CDEPEND}
814 + gpg? ( app-crypt/gnupg )
815 + mediawiki? (
816 + dev-perl/DateTime-Format-ISO8601
817 + dev-perl/HTML-Tree
818 + dev-perl/MediaWiki-API
819 + )
820 + perl? ( dev-perl/Error
821 + dev-perl/Net-SMTP-SSL
822 + dev-perl/Authen-SASL
823 + cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
824 + cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
825 + subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
826 + )
827 + python? ( ${PYTHON_DEPS} )
828 +"
829 +
830 +# This is how info docs are created with Git:
831 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
832 +# .xml/docbook --(docbook2texi.pl)--> .texi
833 +# .texi --(makeinfo)---------> .info
834 +DEPEND="${CDEPEND}
835 + doc? (
836 + app-text/asciidoc
837 + app-text/docbook2X
838 + sys-apps/texinfo
839 + app-text/xmlto
840 + )
841 + nls? ( sys-devel/gettext )
842 + test? ( app-crypt/gnupg )"
843 +
844 +# Live ebuild builds man pages and HTML docs, additionally
845 +if [[ ${PV} == *9999 ]]; then
846 + DEPEND="${DEPEND}
847 + app-text/asciidoc"
848 +fi
849 +
850 +SITEFILE=50${PN}-gentoo.el
851 +S="${WORKDIR}/${MY_P}"
852 +
853 +REQUIRED_USE="
854 + cgi? ( perl )
855 + cvs? ( perl )
856 + mediawiki? ( perl )
857 + mediawiki-experimental? ( mediawiki )
858 + subversion? ( perl )
859 + webdav? ( curl )
860 + pcre-jit? ( pcre )
861 + python? ( ${PYTHON_REQUIRED_USE} )
862 +"
863 +
864 +PATCHES=(
865 + # bug #350330 - automagic CVS when we don't want it is bad.
866 + "${FILESDIR}"/git-2.12.0-optional-cvs.patch
867 +
868 + # install mediawiki perl modules also in vendor_dir
869 + # hack, needs better upstream solution
870 + "${FILESDIR}"/git-1.8.5-mw-vendor.patch
871 +
872 + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
873 +
874 + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
875 + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch
876 +)
877 +
878 +pkg_setup() {
879 + if use subversion && has_version "dev-vcs/subversion[dso]"; then
880 + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
881 + ewarn "with USE=dso, there may be weird crashes in git-svn. You"
882 + ewarn "have been warned."
883 + fi
884 + if use python ; then
885 + python-single-r1_pkg_setup
886 + fi
887 +}
888 +
889 +# This is needed because for some obscure reasons future calls to make don't
890 +# pick up these exports if we export them in src_unpack()
891 +exportmakeopts() {
892 + local myopts
893 +
894 + if use blksha1 ; then
895 + myopts+=" BLK_SHA1=YesPlease"
896 + elif use ppcsha1 ; then
897 + myopts+=" PPC_SHA1=YesPlease"
898 + fi
899 +
900 + if use curl ; then
901 + use webdav || myopts+=" NO_EXPAT=YesPlease"
902 + else
903 + myopts+=" NO_CURL=YesPlease"
904 + fi
905 +
906 + # broken assumptions, because of static build system ...
907 + myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
908 + myopts+=" INSTALL=install TAR=tar"
909 + myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
910 + myopts+=" SANE_TOOL_PATH="
911 + myopts+=" OLD_ICONV="
912 + myopts+=" NO_EXTERNAL_GREP="
913 +
914 + # For svn-fe
915 + extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
916 +
917 + # can't define this to null, since the entire makefile depends on it
918 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
919 +
920 + use iconv \
921 + || myopts+=" NO_ICONV=YesPlease"
922 + use nls \
923 + || myopts+=" NO_GETTEXT=YesPlease"
924 + use tk \
925 + || myopts+=" NO_TCLTK=YesPlease"
926 + if use pcre; then
927 + if use pcre-jit; then
928 + myopts+=" USE_LIBPCRE2=YesPlease"
929 + extlibs+=" -lpcre2-8"
930 + else
931 + myopts+=" USE_LIBPCRE1=YesPlease"
932 + myopts+=" NO_LIBPCRE1_JIT=YesPlease"
933 + extlibs+=" -lpcre"
934 + fi
935 + fi
936 + use perl \
937 + && myopts+=" INSTALLDIRS=vendor" \
938 + || myopts+=" NO_PERL=YesPlease"
939 + use python \
940 + || myopts+=" NO_PYTHON=YesPlease"
941 + use subversion \
942 + || myopts+=" NO_SVN_TESTS=YesPlease"
943 + use threads \
944 + && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
945 + || myopts+=" NO_PTHREADS=YesPlease"
946 + use cvs \
947 + || myopts+=" NO_CVS=YesPlease"
948 + use elibc_musl \
949 + && myopts+=" NO_REGEX=YesPlease"
950 +# Disabled until ~m68k-mint can be keyworded again
951 +# if [[ ${CHOST} == *-mint* ]] ; then
952 +# myopts+=" NO_MMAP=YesPlease"
953 +# myopts+=" NO_IPV6=YesPlease"
954 +# myopts+=" NO_STRLCPY=YesPlease"
955 +# myopts+=" NO_MEMMEM=YesPlease"
956 +# myopts+=" NO_MKDTEMP=YesPlease"
957 +# myopts+=" NO_MKSTEMPS=YesPlease"
958 +# fi
959 + if [[ ${CHOST} == ia64-*-hpux* ]]; then
960 + myopts+=" NO_NSEC=YesPlease"
961 + fi
962 + if [[ ${CHOST} == *-*-aix* ]]; then
963 + myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
964 + fi
965 + if [[ ${CHOST} == *-solaris* ]]; then
966 + myopts+=" NEEDS_LIBICONV=YesPlease"
967 + myopts+=" HAVE_CLOCK_MONOTONIC=1"
968 + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
969 + myopts+=" HAVE_GETDELIM=1"
970 + fi
971 +
972 + has_version '>=app-text/asciidoc-8.0' \
973 + && myopts+=" ASCIIDOC8=YesPlease"
974 + myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
975 +
976 + # Bug 290465:
977 + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
978 + [[ "${CHOST}" == *-uclibc* ]] && \
979 + myopts+=" NO_NSEC=YesPlease"
980 +
981 + export MY_MAKEOPTS="${myopts}"
982 + export EXTLIBS="${extlibs}"
983 +}
984 +
985 +src_unpack() {
986 + if [[ ${PV} != *9999 ]]; then
987 + unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
988 + cd "${S}"
989 + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
990 + use doc && \
991 + cd "${S}"/Documentation && \
992 + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
993 + cd "${S}"
994 + else
995 + git-r3_src_unpack
996 + cd "${S}"
997 + #cp "${FILESDIR}"/GIT-VERSION-GEN .
998 + fi
999 +
1000 +}
1001 +
1002 +src_prepare() {
1003 + # add experimental patches to improve mediawiki support
1004 + # see patches for origin
1005 + if use mediawiki-experimental ; then
1006 + PATCHES+=(
1007 + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
1008 + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
1009 + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
1010 + )
1011 + fi
1012 +
1013 + default
1014 +
1015 + sed -i \
1016 + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
1017 + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
1018 + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
1019 + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
1020 + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
1021 + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
1022 + Makefile contrib/svn-fe/Makefile || die "sed failed"
1023 +
1024 + # Never install the private copy of Error.pm (bug #296310)
1025 + sed -i \
1026 + -e '/private-Error.pm/s,^,#,' \
1027 + perl/Makefile.PL
1028 +
1029 + # Fix docbook2texi command
1030 + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
1031 + Documentation/Makefile || die "sed failed"
1032 +
1033 + # Fix git-subtree missing DESTDIR
1034 + sed -i \
1035 + -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
1036 + -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
1037 + contrib/subtree/Makefile
1038 +}
1039 +
1040 +git_emake() {
1041 + # bug #326625: PERL_PATH, PERL_MM_OPT
1042 + # bug #320647: PYTHON_PATH
1043 + PYTHON_PATH=""
1044 + use python && PYTHON_PATH="${PYTHON}"
1045 + emake ${MY_MAKEOPTS} \
1046 + DESTDIR="${D}" \
1047 + OPTCFLAGS="${CFLAGS}" \
1048 + OPTLDFLAGS="${LDFLAGS}" \
1049 + OPTCC="$(tc-getCC)" \
1050 + OPTAR="$(tc-getAR)" \
1051 + prefix="${EPREFIX}"/usr \
1052 + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
1053 + sysconfdir="${EPREFIX}"/etc \
1054 + PYTHON_PATH="${PYTHON_PATH}" \
1055 + PERL_MM_OPT="" \
1056 + GIT_TEST_OPTS="--no-color" \
1057 + V=1 \
1058 + "$@"
1059 + # This is the fix for bug #326625, but it also causes breakage, see bug
1060 + # #352693.
1061 + # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
1062 +}
1063 +
1064 +src_configure() {
1065 + exportmakeopts
1066 +}
1067 +
1068 +src_compile() {
1069 + if use perl ; then
1070 + git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
1071 + git_emake perl/perl.mak || die "emake perl/perl.mak failed"
1072 + fi
1073 + git_emake || die "emake failed"
1074 +
1075 + if use emacs ; then
1076 + elisp-compile contrib/emacs/git{,-blame}.el
1077 + fi
1078 +
1079 + if use perl && use cgi ; then
1080 + git_emake \
1081 + gitweb \
1082 + || die "emake gitweb (cgi) failed"
1083 + fi
1084 +
1085 + if [[ ${CHOST} == *-darwin* ]]; then
1086 + cd "${S}"/contrib/credential/osxkeychain || die
1087 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
1088 + || die "emake credential-osxkeychain"
1089 + fi
1090 +
1091 + cd "${S}"/Documentation
1092 + if [[ ${PV} == *9999 ]] ; then
1093 + git_emake man \
1094 + || die "emake man failed"
1095 + if use doc ; then
1096 + git_emake info html \
1097 + || die "emake info html failed"
1098 + fi
1099 + else
1100 + if use doc ; then
1101 + git_emake info \
1102 + || die "emake info html failed"
1103 + fi
1104 + fi
1105 +
1106 + if use subversion ; then
1107 + cd "${S}"/contrib/svn-fe
1108 + # by defining EXTLIBS we override the detection for libintl and
1109 + # libiconv, bug #516168
1110 + local nlsiconv=
1111 + use nls && use !elibc_glibc && nlsiconv+=" -lintl"
1112 + use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
1113 + git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
1114 + if use doc ; then
1115 + git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
1116 + fi
1117 + cd "${S}"
1118 + fi
1119 +
1120 + if use gnome-keyring ; then
1121 + cd "${S}"/contrib/credential/libsecret
1122 + git_emake || die "emake git-credential-libsecret failed"
1123 + fi
1124 +
1125 + cd "${S}"/contrib/subtree || die
1126 + git_emake
1127 + use doc && git_emake doc
1128 +
1129 + cd "${S}"/contrib/diff-highlight || die
1130 + git_emake
1131 +
1132 + if use mediawiki ; then
1133 + cd "${S}"/contrib/mw-to-git
1134 + git_emake
1135 + fi
1136 +}
1137 +
1138 +src_install() {
1139 + git_emake \
1140 + install || \
1141 + die "make install failed"
1142 +
1143 + if [[ ${CHOST} == *-darwin* ]]; then
1144 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
1145 + fi
1146 +
1147 + # Depending on the tarball and manual rebuild of the documentation, the
1148 + # manpages may exist in either OR both of these directories.
1149 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
1150 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
1151 + dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
1152 + use doc && dodir /usr/share/doc/${PF}/html
1153 + for d in / /howto/ /technical/ ; do
1154 + docinto ${d}
1155 + dodoc Documentation${d}*.txt
1156 + if use doc ; then
1157 + docinto ${d}/html
1158 + dodoc Documentation${d}*.html
1159 + fi
1160 + done
1161 + docinto /
1162 + # Upstream does not ship this pre-built :-(
1163 + use doc && doinfo Documentation/{git,gitman}.info
1164 +
1165 + newbashcomp contrib/completion/git-completion.bash ${PN}
1166 + bashcomp_alias git gitk
1167 + # Not really a bash-completion file (bug #477920)
1168 + # but still needed uncompressed (bug #507480)
1169 + insinto /usr/share/${PN}
1170 + doins contrib/completion/git-prompt.sh
1171 +
1172 + if use emacs ; then
1173 + elisp-install ${PN} contrib/emacs/git.{el,elc}
1174 + elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
1175 + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
1176 + # don't add automatically to the load-path, so the sitefile
1177 + # can do a conditional loading
1178 + touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
1179 + elisp-site-file-install "${FILESDIR}"/${SITEFILE}
1180 + fi
1181 +
1182 + #dobin contrib/fast-import/git-p4 # Moved upstream
1183 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
1184 + newbin contrib/fast-import/import-tars.perl import-tars
1185 + exeinto /usr/libexec/git-core/
1186 + newexe contrib/git-resurrect.sh git-resurrect
1187 +
1188 + # git-subtree
1189 + cd "${S}"/contrib/subtree
1190 + git_emake install || die "Failed to emake install git-subtree"
1191 + if use doc ; then
1192 + git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
1193 + fi
1194 + newdoc README README.git-subtree
1195 + dodoc git-subtree.txt
1196 + cd "${S}"
1197 +
1198 + if use mediawiki ; then
1199 + cd "${S}"/contrib/mw-to-git
1200 + git_emake install
1201 + cd "${S}"
1202 + fi
1203 +
1204 + # diff-highlight
1205 + dobin contrib/diff-highlight/diff-highlight
1206 + newdoc contrib/diff-highlight/README README.diff-highlight
1207 +
1208 + # git-jump
1209 + exeinto /usr/libexec/git-core/
1210 + doexe contrib/git-jump/git-jump
1211 + newdoc contrib/git-jump/README git-jump.txt
1212 +
1213 + # git-contacts
1214 + exeinto /usr/libexec/git-core/
1215 + doexe contrib/contacts/git-contacts
1216 + dodoc contrib/contacts/git-contacts.txt
1217 +
1218 + if use gnome-keyring ; then
1219 + cd "${S}"/contrib/credential/libsecret
1220 + dobin git-credential-libsecret
1221 + fi
1222 +
1223 + if use subversion ; then
1224 + cd "${S}"/contrib/svn-fe
1225 + dobin svn-fe
1226 + dodoc svn-fe.txt
1227 + if use doc ; then
1228 + doman svn-fe.1
1229 + docinto html
1230 + dodoc svn-fe.html
1231 + fi
1232 + cd "${S}"
1233 + fi
1234 +
1235 + dodir /usr/share/${PN}/contrib
1236 + # The following are excluded:
1237 + # completion - installed above
1238 + # diff-highlight - done above
1239 + # emacs - installed above
1240 + # examples - these are stuff that is not used in Git anymore actually
1241 + # git-jump - done above
1242 + # gitview - installed above
1243 + # p4import - excluded because fast-import has a better one
1244 + # patches - stuff the Git guys made to go upstream to other places
1245 + # persistent-https - TODO
1246 + # mw-to-git - TODO
1247 + # subtree - build seperately
1248 + # svnimport - use git-svn
1249 + # thunderbird-patch-inline - fixes thunderbird
1250 + local contrib_objects=(
1251 + buildsystems
1252 + fast-import
1253 + hg-to-git
1254 + hooks
1255 + remotes2config.sh
1256 + rerere-train.sh
1257 + stats
1258 + workdir
1259 + )
1260 + for i in "${contrib_objects[@]}" ; do
1261 + cp -rf \
1262 + "${S}"/contrib/${i} \
1263 + "${ED}"/usr/share/${PN}/contrib \
1264 + || die "Failed contrib ${i}"
1265 + done
1266 +
1267 + if use perl && use cgi ; then
1268 + # We used to install in /usr/share/${PN}/gitweb
1269 + # but upstream installs in /usr/share/gitweb
1270 + # so we will install a symlink and use their location for compat with other
1271 + # distros
1272 + dosym /usr/share/gitweb /usr/share/${PN}/gitweb
1273 +
1274 + # INSTALL discusses configuration issues, not just installation
1275 + docinto /
1276 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
1277 + newdoc "${S}"/gitweb/README README.gitweb
1278 +
1279 + find "${ED}"/usr/lib64/perl5/ \
1280 + -name .packlist \
1281 + -exec rm \{\} \;
1282 + else
1283 + rm -rf "${ED}"/usr/share/gitweb
1284 + fi
1285 +
1286 + if ! use subversion ; then
1287 + rm -f "${ED}"/usr/libexec/git-core/git-svn \
1288 + "${ED}"/usr/share/man/man1/git-svn.1*
1289 + fi
1290 +
1291 + if use xinetd ; then
1292 + insinto /etc/xinetd.d
1293 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
1294 + fi
1295 +
1296 + if use !prefix ; then
1297 + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
1298 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
1299 + systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
1300 + systemd_dounit "${FILESDIR}/git-daemon.socket"
1301 + fi
1302 +
1303 + perl_delete_localpod
1304 +
1305 + # Remove disabled linguas
1306 + # we could remove sources in src_prepare, but install does not
1307 + # handle missing locale dir well
1308 + rm_loc() {
1309 + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
1310 + rm -r "${ED}/usr/share/locale/${1}" || die
1311 + fi
1312 + }
1313 + l10n_for_each_disabled_locale_do rm_loc
1314 +}
1315 +
1316 +src_test() {
1317 + local disabled="t9128-git-svn-cmd-branch.sh"
1318 + local tests_cvs="t9200-git-cvsexportcommit.sh \
1319 + t9400-git-cvsserver-server.sh \
1320 + t9401-git-cvsserver-crlf.sh \
1321 + t9402-git-cvsserver-refs.sh \
1322 + t9600-cvsimport.sh \
1323 + t9601-cvsimport-vendor-branch.sh \
1324 + t9602-cvsimport-branches-tags.sh \
1325 + t9603-cvsimport-patchsets.sh \
1326 + t9604-cvsimport-timestamps.sh"
1327 + local tests_perl="t3701-add-interactive.sh \
1328 + t5502-quickfetch.sh \
1329 + t5512-ls-remote.sh \
1330 + t5520-pull.sh \
1331 + t7106-reset-unborn-branch.sh \
1332 + t7501-commit.sh"
1333 + # Bug #225601 - t0004 is not suitable for root perm
1334 + # Bug #219839 - t1004 is not suitable for root perm
1335 + # t0001-init.sh - check for init notices EPERM* fails
1336 + local tests_nonroot="t0001-init.sh \
1337 + t0004-unwritable.sh \
1338 + t0070-fundamental.sh \
1339 + t1004-read-tree-m-u-wf.sh \
1340 + t3700-add.sh \
1341 + t7300-clean.sh"
1342 + # t9100 still fails with symlinks in SVN 1.7
1343 + local test_svn="t9100-git-svn-basic.sh"
1344 +
1345 + # Unzip is used only for the testcase code, not by any normal parts of Git.
1346 + if ! has_version app-arch/unzip ; then
1347 + einfo "Disabling tar-tree tests"
1348 + disabled="${disabled} t5000-tar-tree.sh"
1349 + fi
1350 +
1351 + cvs=0
1352 + use cvs && let cvs=$cvs+1
1353 + if [[ ${EUID} -eq 0 ]]; then
1354 + if [[ $cvs -eq 1 ]]; then
1355 + ewarn "Skipping CVS tests because CVS does not work as root!"
1356 + ewarn "You should retest with FEATURES=userpriv!"
1357 + disabled="${disabled} ${tests_cvs}"
1358 + fi
1359 + einfo "Skipping other tests that require being non-root"
1360 + disabled="${disabled} ${tests_nonroot}"
1361 + else
1362 + [[ $cvs -gt 0 ]] && \
1363 + has_version dev-vcs/cvs && \
1364 + let cvs=$cvs+1
1365 + [[ $cvs -gt 1 ]] && \
1366 + has_version "dev-vcs/cvs[server]" && \
1367 + let cvs=$cvs+1
1368 + if [[ $cvs -lt 3 ]]; then
1369 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
1370 + disabled="${disabled} ${tests_cvs}"
1371 + fi
1372 + fi
1373 +
1374 + if ! use perl ; then
1375 + einfo "Disabling tests that need Perl"
1376 + disabled="${disabled} ${tests_perl}"
1377 + fi
1378 +
1379 + einfo "Disabling tests that fail with SVN 1.7"
1380 + disabled="${disabled} ${test_svn}"
1381 +
1382 + # Reset all previously disabled tests
1383 + cd "${S}/t"
1384 + for i in *.sh.DISABLED ; do
1385 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
1386 + done
1387 + einfo "Disabled tests:"
1388 + for i in ${disabled} ; do
1389 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
1390 + done
1391 +
1392 + # Avoid the test system removing the results because we want them ourselves
1393 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
1394 + -i "${S}"/t/Makefile
1395 +
1396 + # Clean old results first, must always run
1397 + cd "${S}/t"
1398 + nonfatal git_emake clean
1399 +
1400 + # Now run the tests, keep going if we hit an error, and don't terminate on
1401 + # failure
1402 + cd "${S}"
1403 + einfo "Start test run"
1404 + #MAKEOPTS=-j1
1405 + nonfatal git_emake --keep-going test
1406 + rc=$?
1407 +
1408 + # Display nice results, now print the results
1409 + cd "${S}/t"
1410 + nonfatal git_emake aggregate-results
1411 +
1412 + # And bail if there was a problem
1413 + [ $rc -eq 0 ] || die "tests failed. Please file a bug."
1414 +}
1415 +
1416 +showpkgdeps() {
1417 + local pkg=$1
1418 + shift
1419 + elog " $(printf "%-17s:" ${pkg}) ${@}"
1420 +}
1421 +
1422 +pkg_postinst() {
1423 + use emacs && elisp-site-regen
1424 + einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
1425 + einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
1426 + einfo "Note that the prompt bash code is now in that separate script"
1427 + elog "These additional scripts need some dependencies:"
1428 + echo
1429 + showpkgdeps git-quiltimport "dev-util/quilt"
1430 + showpkgdeps git-instaweb \
1431 + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
1432 + echo
1433 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
1434 +}
1435 +
1436 +pkg_postrm() {
1437 + use emacs && elisp-site-regen
1438 +}