Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git/files/, dev-vcs/git/
Date: Fri, 23 Mar 2018 11:24:02
Message-Id: 1521804230.ca89ea025d5dd3a54ae910a4f9fe0eaf5202fb06.polynomial-c@gentoo
1 commit: ca89ea025d5dd3a54ae910a4f9fe0eaf5202fb06
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 23 09:26:58 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 23 11:23:50 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca89ea02
7
8 dev-vcs/git: Bump to version 2.17.0_rc1
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 dev-vcs/git/Manifest | 3 +
13 .../git/files/git-2.17.0_rc1-optional-cvs.patch | 451 +++++++++++++
14 dev-vcs/git/git-2.17.0_rc1.ebuild | 711 +++++++++++++++++++++
15 3 files changed, 1165 insertions(+)
16
17 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
18 index da30cf6fc66..ac19aac37a1 100644
19 --- a/dev-vcs/git/Manifest
20 +++ b/dev-vcs/git/Manifest
21 @@ -1,9 +1,12 @@
22 DIST git-2.16.1.tar.xz 4961656 BLAKE2B d94328da5d027cb82f1f23804a12dfc5df1577bf2c28cc376d4bb5c9e34d317886437f7eee2ac4503b8e2639d2e24c35660ab82a50207f500b7ed6fb104d3624 SHA512 09e30ada7bcf41f78f15784908062c10162d58d2fd7a68ad27e42fd49dc37eb0e82c19ad21db31034a189a8cdd009013a29f943e1ae5d5ab5688c913d2a4d42a
23 DIST git-2.16.2.tar.xz 4963204 BLAKE2B 346405b765bb542f0e51e539163c18c47dbd2ce1d4ccd98cdc4ddd226ec14a4895f7b82168fdca90e1828813421d24d5436fb01e9e9a57eb98a80984bab13bda SHA512 ff1bf4b94c09de26acf85b97003582002c232e5861a896d8c2d8dc011cb3d4966b1eb0e74ef94f80426d50bb465bf6c9b6edda13b1e4143f0eb38ee01f4890e4
24 DIST git-2.16.3.tar.xz 4966248 BLAKE2B cd4d2573afd02a23766c4dd0da8397ac36193f68e18c162fc85d60d7595a50da7707f592ccc3a9f00a22fdcb8a8cada82139fe30f97af193fb367a4e392cbaa8 SHA512 73520cf3500b2d13b77eb1e5ec0d60263aad07732d25631732f0d986abd023f97b8a6db4abff64d342cb053018289b5f7a3e32f10b86bd9092a37ee0585adc8a
25 +DIST git-2.17.0.rc1.tar.xz 4998084 BLAKE2B 35ddaf63ee4d19bb8023148359791a844261215617e057156066826cf0322500b4485e7864dbe472c3fab553696709ff622f16466b4df874e60e7307f20c0337 SHA512 9ee9f917ff9a8398ae08cc7767be63605f9edc6a86ccdcd1a2238703b170e14a358e27d43d126317461bdb0f4ba9ad67fdcd77fcae69bf1d82f5341ce59d1bf5
26 DIST git-htmldocs-2.16.1.tar.xz 1160372 BLAKE2B d426fbc85772e5f04550071dea50a75e6d581fd040e8b37b3b342a8d6569d0dcf456445bab1dec3d84e254e82468c900afff7c6be1ebd6771e7fad5884b92515 SHA512 f2bb8b88ab5aa3d6204874aae583249d5137193c5fe3925df7ae1bcdaec0564b496df9a648c180bebb0c8ff4573f27e330802020d3c9207c2738ddd5c52d99c9
27 DIST git-htmldocs-2.16.2.tar.xz 1162556 BLAKE2B 71b71b914b438cb3eee417c5bbcb30faa10b0a154efa378e8e3b5521a4902f26a038ab884ffdac1756d07e3afcaeafe915d6c64f9503ff65f1fa58bbbd7fffde SHA512 adc7a95fc7a7a46c92c8735ad5b89f236905b770fa66682e0234addc2107f46de65724c577c8fc512e13cd8d306fff992ad7c6c495100cb645674604836e0768
28 DIST git-htmldocs-2.16.3.tar.xz 1164252 BLAKE2B 43d5b0317d3cb181c24347933b6ee3ce586f7be7e38ae30555bc732b369287f080879ff0408601db125a4104b665956f6bcef3f243496008d3ec1601110b06df SHA512 6271ff7780053347ceba47754db00fa8a0a39ff622c490e273ed286faa6ade3f7d6580fa396c913b4485a942b2ad0cdd898de467fde497de1d850fb6d3debd1e
29 +DIST git-htmldocs-2.17.0.rc1.tar.xz 1172580 BLAKE2B d2c27d893faafe92ade9aa0d8bd77b4ff336c9ee8b678feed4e8f3323fcf6daea72a62af556a2f3556d5e21d4107f52d4090a5f5477c03bca50c6ef81656eaaf SHA512 56f47203c1240a82c28d9de47d8d1b5a73b11c9529fd2ddeff303c03d828b738423035803ebcccc4c49459d7056d0b8f3924698ac9966f4083687221d11ae4a3
30 DIST git-manpages-2.16.1.tar.xz 417188 BLAKE2B 239fb33967d17c8b10efb2e0d1963f7be3404b7f262b49f89b3f4a538135d80268fbe7fe0e561c9cb2d86840eb46b61653ed363d8da27d1169c435d8e1d5e851 SHA512 20c7646b5f1e3c633ce6aae5ee5fcbe4ca1e59fc9253ec9a9e45c7cd8a8ac7a5e71e36258eb747e3bd6d51b3b7971137315dcdbdff493e0f8774ecd3e309735a
31 DIST git-manpages-2.16.2.tar.xz 416500 BLAKE2B af9ccf18280c23e54e11cf76f891d5613db8c8f9ef84394266ad9c614ddb2181acab4cbb3998b4d5d01aa7b0d8f8cfbe090e77bb5b0297e4a7ed341a8d1fb3de SHA512 38d560955a025761f256e598f87c6b1122b474cc7bfeeee8fffb48b353ab3d8d969f6cd55da326daa61a4079dfd68f931b2e0eae11d6e8d5549e69de17c7f537
32 DIST git-manpages-2.16.3.tar.xz 417152 BLAKE2B 2719a9a603dc49db1a61a2cec42427bdcdc96fab9d21d16c5a8c70d7dba271a1e5b29f4f83f32c525c4866e3497352017af3777a769893c9543e65d625972375 SHA512 b34a3658412a144fed6f818acc05c0b4be2453ae63f9430dcd53cda750f737bd3da50390bd3f4266e69befa521eddd222985fd531acca1ebd4ca62c6c5b2a85c
33 +DIST git-manpages-2.17.0.rc1.tar.xz 419416 BLAKE2B 5437e60951a552f271e7a3b0d45178a02cec29495ef83cada860e2aa66af9ba40b3a55cebbfc65c0dfafb837610d5984cd0b65cb894301684e29a03584605513 SHA512 456321ca2eabdef08359f22e775729d408843c1f1647dd37f6e1603ba2a6785321b12fb3fbfd320c02743a499ed8bc76fee3da6d53c858e0dabd0855a57ef491
34
35 diff --git a/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch b/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch
36 new file mode 100644
37 index 00000000000..60cebcbb4d6
38 --- /dev/null
39 +++ b/dev-vcs/git/files/git-2.17.0_rc1-optional-cvs.patch
40 @@ -0,0 +1,451 @@
41 +From 3baea661143aaddb285f1ac7c50f6e4af76c8aed Mon Sep 17 00:00:00 2001
42 +From: Robin Johnson <robbat2@g.o>
43 +Date: Fri, 23 Mar 2018 10:05:05 +0100
44 +Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
45 + utilities
46 +
47 +Forward-ported from 1.7.12 to current git.git v1.8.4
48 +Forward-ported from v1.8.4 to v1.8.5.1
49 +Forward-ported from v1.8.5.3 to v1.9.0_rc3
50 +Forward-ported from 1.9.0_rc3 to current git.git v2.0.0_rc0
51 +Forward-ported from v2.0.0_rc0 to v2.0.0
52 +Forward-ported from v2.0.0 to v2.2.2
53 +Forward-ported from v2.2.2 to v2.8.4
54 +Forward-ported from v2.8.4 to v2.10.0
55 +Forward-ported from v2.10.0 to v2.12.0
56 +Forward-ported from v2.12.0 to v2.17.0-rc1
57 +
58 +Signed-off-by: Lars Wendler <polynomial-c@g.o>
59 +---
60 + Makefile | 50 ++++++++++++++++++++++++++++----------
61 + t/t9200-git-cvsexportcommit.sh | 5 ++++
62 + t/t9400-git-cvsserver-server.sh | 8 +++++-
63 + t/t9401-git-cvsserver-crlf.sh | 15 ++++++++----
64 + t/t9600-cvsimport.sh | 41 +++++++++++++++++++------------
65 + t/t9601-cvsimport-vendor-branch.sh | 11 +++++++++
66 + t/t9602-cvsimport-branches-tags.sh | 11 +++++++++
67 + t/t9603-cvsimport-patchsets.sh | 11 +++++++++
68 + t/test-lib.sh | 1 +
69 + 9 files changed, 119 insertions(+), 34 deletions(-)
70 +
71 +diff --git a/Makefile b/Makefile
72 +index a1d8775adb..4264475ad1 100644
73 +--- a/Makefile
74 ++++ b/Makefile
75 +@@ -312,6 +312,8 @@ all::
76 + # Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep
77 + # and egrep that are pickier when their input contains non-ASCII data.
78 + #
79 ++# Define NO_CVS if you do not want any CVS interface utilities.
80 ++#
81 + # The TCL_PATH variable governs the location of the Tcl interpreter
82 + # used to optimize git-gui for your system. Only used if NO_TCLTK
83 + # is not set. Defaults to the bare 'tclsh'.
84 +@@ -543,6 +545,7 @@ LIB_OBJS =
85 + PROGRAM_OBJS =
86 + PROGRAMS =
87 + SCRIPT_PERL =
88 ++SCRIPT_PERL_CVS =
89 + SCRIPT_PYTHON =
90 + SCRIPT_SH =
91 + SCRIPT_LIB =
92 +@@ -579,12 +582,13 @@ SCRIPT_LIB += git-sh-i18n
93 +
94 + SCRIPT_PERL += git-add--interactive.perl
95 + SCRIPT_PERL += git-archimport.perl
96 +-SCRIPT_PERL += git-cvsexportcommit.perl
97 +-SCRIPT_PERL += git-cvsimport.perl
98 +-SCRIPT_PERL += git-cvsserver.perl
99 + SCRIPT_PERL += git-send-email.perl
100 + SCRIPT_PERL += git-svn.perl
101 +
102 ++SCRIPT_PERL_CVS += git-cvsexportcommit.perl
103 ++SCRIPT_PERL_CVS += git-cvsimport.perl
104 ++SCRIPT_PERL_CVS += git-cvsserver.perl
105 ++
106 + SCRIPT_PYTHON += git-p4.py
107 +
108 + NO_INSTALL += git-remote-testgit
109 +@@ -592,24 +596,26 @@ NO_INSTALL += git-remote-testgit
110 + # Generated files for scripts
111 + SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
112 + SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
113 ++SCRIPT_PERL_CVS_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL_CVS))
114 + SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
115 +
116 + SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))
117 + SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN))
118 ++SCRIPT_PERL_CVS_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_CVS_GEN))
119 + SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN))
120 +
121 + # Individual rules to allow e.g.
122 + # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
123 + # from subdirectories like contrib/*/
124 + .PHONY: build-perl-script build-sh-script build-python-script
125 +-build-perl-script: $(SCRIPT_PERL_GEN)
126 ++build-perl-script: $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
127 + build-sh-script: $(SCRIPT_SH_GEN)
128 + build-python-script: $(SCRIPT_PYTHON_GEN)
129 +
130 + .PHONY: install-perl-script install-sh-script install-python-script
131 + install-sh-script: $(SCRIPT_SH_INS)
132 + $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
133 +-install-perl-script: $(SCRIPT_PERL_INS)
134 ++install-perl-script: $(SCRIPT_PERL_INS) $(SCRIPT_PERL_CVS_INS)
135 + $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
136 + install-python-script: $(SCRIPT_PYTHON_INS)
137 + $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
138 +@@ -618,12 +624,13 @@ install-python-script: $(SCRIPT_PYTHON_INS)
139 + clean-sh-script:
140 + $(RM) $(SCRIPT_SH_GEN)
141 + clean-perl-script:
142 +- $(RM) $(SCRIPT_PERL_GEN)
143 ++ $(RM) $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN)
144 + clean-python-script:
145 + $(RM) $(SCRIPT_PYTHON_GEN)
146 +
147 + SCRIPTS = $(SCRIPT_SH_INS) \
148 + $(SCRIPT_PERL_INS) \
149 ++ $(SCRIPT_PERL_CVS_INS) \
150 + $(SCRIPT_PYTHON_INS) \
151 + git-instaweb
152 +
153 +@@ -1972,13 +1979,26 @@ git.res: git.rc GIT-VERSION-FILE
154 + -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@
155 +
156 + # This makes sure we depend on the NO_PERL setting itself.
157 +-$(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
158 ++$(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN): GIT-BUILD-OPTIONS
159 ++
160 ++_SCRIPT_PERL_GEN =
161 ++_SCRIPT_PERL_NOGEN =
162 +
163 + ifndef NO_PERL
164 +-$(SCRIPT_PERL_GEN):
165 ++_SCRIPT_PERL_GEN = $(SCRIPT_PERL_GEN)
166 ++
167 ++ifndef NO_CVS
168 ++_SCRIPT_PERL_GEN += $(SCRIPT_PERL_CVS_GEN)
169 ++else
170 ++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_CVS_GEN)
171 ++_REASON = NO_CVS
172 ++_REASON_CONTENT = $(NO_CVS)
173 ++endif # NO_CVS
174 ++
175 ++$(_SCRIPT_PERL_GEN):
176 +
177 + PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
178 +-$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
179 ++$(_SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
180 + $(QUIET_GEN)$(RM) $@ $@+ && \
181 + INSTLIBDIR='$(perllibdir_SQ)' && \
182 + INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
183 +@@ -2012,14 +2032,18 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES
184 + chmod +x $@+ && \
185 + mv $@+ $@
186 + else # NO_PERL
187 +-$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
188 ++_SCRIPT_PERL_NOGEN += $(SCRIPT_PERL_GEN) $(SCRIPT_PERL_CVS_GEN) git-instaweb
189 ++_REASON = NO_PERL
190 ++_REASON_CONTENT = $(NO_PERL)
191 ++endif # NO_PERL
192 ++
193 ++$(_SCRIPT_PERL_NOGEN): % : unimplemented.sh
194 + $(QUIET_GEN)$(RM) $@ $@+ && \
195 + sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
196 +- -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
197 ++ -e 's|@@REASON@@|$(_REASON)=$(_REASON_CONTENT)|g' \
198 + unimplemented.sh >$@+ && \
199 + chmod +x $@+ && \
200 + mv $@+ $@
201 +-endif # NO_PERL
202 +
203 + # This makes sure we depend on the NO_PYTHON setting itself.
204 + $(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
205 +@@ -2258,7 +2282,7 @@ LOCALIZED_SH = $(SCRIPT_SH)
206 + LOCALIZED_SH += git-parse-remote.sh
207 + LOCALIZED_SH += git-rebase--interactive.sh
208 + LOCALIZED_SH += git-sh-setup.sh
209 +-LOCALIZED_PERL = $(SCRIPT_PERL)
210 ++LOCALIZED_PERL = $(SCRIPT_PERL) $(SCRIPT_PERL_CVS)
211 +
212 + ifdef XGETTEXT_INCLUDE_TESTS
213 + LOCALIZED_C += t/t0200/test.c
214 +diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
215 +index 1319415ba8..34ac8e28e2 100755
216 +--- a/t/t9200-git-cvsexportcommit.sh
217 ++++ b/t/t9200-git-cvsexportcommit.sh
218 +@@ -11,6 +11,11 @@ if ! test_have_prereq PERL; then
219 + test_done
220 + fi
221 +
222 ++if ! test_have_prereq CVS; then
223 ++ skip_all='skipping git cvsexportcommit tests, cvs not available'
224 ++ test_done
225 ++fi
226 ++
227 + cvs >/dev/null 2>&1
228 + if test $? -ne 1
229 + then
230 +diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
231 +index 06742748e9..51d474d94b 100755
232 +--- a/t/t9400-git-cvsserver-server.sh
233 ++++ b/t/t9400-git-cvsserver-server.sh
234 +@@ -11,9 +11,15 @@ cvs CLI client via git-cvsserver server'
235 + . ./test-lib.sh
236 +
237 + if ! test_have_prereq PERL; then
238 +- skip_all='skipping git cvsserver tests, perl not available'
239 ++ skip_all='skipping git-cvsserver tests, perl not available'
240 + test_done
241 + fi
242 ++
243 ++if ! test_have_prereq CVS; then
244 ++ skip_all='skipping git-cvsserver tests, cvs not available'
245 ++ test_done
246 ++fi
247 ++
248 + cvs >/dev/null 2>&1
249 + if test $? -ne 1
250 + then
251 +diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
252 +index 84787eee9a..eecba88527 100755
253 +--- a/t/t9401-git-cvsserver-crlf.sh
254 ++++ b/t/t9401-git-cvsserver-crlf.sh
255 +@@ -57,15 +57,20 @@ check_status_options() {
256 + return $stat
257 + }
258 +
259 +-cvs >/dev/null 2>&1
260 +-if test $? -ne 1
261 ++if ! test_have_prereq PERL
262 + then
263 +- skip_all='skipping git-cvsserver tests, cvs not found'
264 ++ skip_all='skipping git-cvsserver tests, perl not available'
265 + test_done
266 + fi
267 +-if ! test_have_prereq PERL
268 ++if ! test_have_prereq CVS
269 + then
270 +- skip_all='skipping git-cvsserver tests, perl not available'
271 ++ skip_all='skipping git-cvsserver tests, cvs not available'
272 ++ test_done
273 ++fi
274 ++cvs >/dev/null 2>&1
275 ++if test $? -ne 1
276 ++then
277 ++ skip_all='skipping git-cvsserver tests, cvs not found'
278 + test_done
279 + fi
280 + perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
281 +diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
282 +index 804ce3850f..c53c50e432 100755
283 +--- a/t/t9600-cvsimport.sh
284 ++++ b/t/t9600-cvsimport.sh
285 +@@ -8,14 +8,25 @@ if ! test_have_prereq NOT_ROOT; then
286 + test_done
287 + fi
288 +
289 +-test_expect_success PERL 'setup cvsroot environment' '
290 ++if ! test_have_prereq PERL
291 ++then
292 ++ skip_all='skipping git cvsimport tests, perl not available'
293 ++ test_done
294 ++fi
295 ++if ! test_have_prereq CVS
296 ++then
297 ++ skip_all='skipping git cvsimport tests, cvs not available'
298 ++ test_done
299 ++fi
300 ++
301 ++test_expect_success 'setup cvsroot environment' '
302 + CVSROOT=$(pwd)/cvsroot &&
303 + export CVSROOT
304 + '
305 +
306 +-test_expect_success PERL 'setup cvsroot' '$CVS init'
307 ++test_expect_success 'setup cvsroot' '$CVS init'
308 +
309 +-test_expect_success PERL 'setup a cvs module' '
310 ++test_expect_success 'setup a cvs module' '
311 +
312 + mkdir "$CVSROOT/module" &&
313 + $CVS co -d module-cvs module &&
314 +@@ -47,23 +58,23 @@ EOF
315 + )
316 + '
317 +
318 +-test_expect_success PERL 'import a trivial module' '
319 ++test_expect_success 'import a trivial module' '
320 +
321 + git cvsimport -a -R -z 0 -C module-git module &&
322 + test_cmp module-cvs/o_fortuna module-git/o_fortuna
323 +
324 + '
325 +
326 +-test_expect_success PERL 'pack refs' '(cd module-git && git gc)'
327 ++test_expect_success 'pack refs' '(cd module-git && git gc)'
328 +
329 +-test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
330 ++test_expect_success 'initial import has correct .git/cvs-revisions' '
331 +
332 + (cd module-git &&
333 + git log --format="o_fortuna 1.1 %H" -1) > expected &&
334 + test_cmp expected module-git/.git/cvs-revisions
335 + '
336 +
337 +-test_expect_success PERL 'update cvs module' '
338 ++test_expect_success 'update cvs module' '
339 + (cd module-cvs &&
340 + cat <<EOF >o_fortuna &&
341 + O Fortune,
342 +@@ -91,7 +102,7 @@ EOF
343 + )
344 + '
345 +
346 +-test_expect_success PERL 'update git module' '
347 ++test_expect_success 'update git module' '
348 +
349 + (cd module-git &&
350 + git config cvsimport.trackRevisions true &&
351 +@@ -102,7 +113,7 @@ test_expect_success PERL 'update git module' '
352 +
353 + '
354 +
355 +-test_expect_success PERL 'update has correct .git/cvs-revisions' '
356 ++test_expect_success 'update has correct .git/cvs-revisions' '
357 +
358 + (cd module-git &&
359 + git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
360 +@@ -110,7 +121,7 @@ test_expect_success PERL 'update has correct .git/cvs-revisions' '
361 + test_cmp expected module-git/.git/cvs-revisions
362 + '
363 +
364 +-test_expect_success PERL 'update cvs module' '
365 ++test_expect_success 'update cvs module' '
366 +
367 + (cd module-cvs &&
368 + echo 1 >tick &&
369 +@@ -119,7 +130,7 @@ test_expect_success PERL 'update cvs module' '
370 + )
371 + '
372 +
373 +-test_expect_success PERL 'cvsimport.module config works' '
374 ++test_expect_success 'cvsimport.module config works' '
375 +
376 + (cd module-git &&
377 + git config cvsimport.module module &&
378 +@@ -131,7 +142,7 @@ test_expect_success PERL 'cvsimport.module config works' '
379 +
380 + '
381 +
382 +-test_expect_success PERL 'second update has correct .git/cvs-revisions' '
383 ++test_expect_success 'second update has correct .git/cvs-revisions' '
384 +
385 + (cd module-git &&
386 + git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
387 +@@ -140,7 +151,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '
388 + test_cmp expected module-git/.git/cvs-revisions
389 + '
390 +
391 +-test_expect_success PERL 'import from a CVS working tree' '
392 ++test_expect_success 'import from a CVS working tree' '
393 +
394 + $CVS co -d import-from-wt module &&
395 + (cd import-from-wt &&
396 +@@ -153,12 +164,12 @@ test_expect_success PERL 'import from a CVS working tree' '
397 +
398 + '
399 +
400 +-test_expect_success PERL 'no .git/cvs-revisions created by default' '
401 ++test_expect_success 'no .git/cvs-revisions created by default' '
402 +
403 + ! test -e import-from-wt/.git/cvs-revisions
404 +
405 + '
406 +
407 +-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
408 ++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
409 +
410 + test_done
411 +diff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh
412 +index 827d39f5bf..d730a41f67 100755
413 +--- a/t/t9601-cvsimport-vendor-branch.sh
414 ++++ b/t/t9601-cvsimport-vendor-branch.sh
415 +@@ -34,6 +34,17 @@
416 + test_description='git cvsimport handling of vendor branches'
417 + . ./lib-cvs.sh
418 +
419 ++if ! test_have_prereq PERL
420 ++then
421 ++ skip_all='skipping git cvsimport tests, perl not available'
422 ++ test_done
423 ++fi
424 ++if ! test_have_prereq CVS
425 ++then
426 ++ skip_all='skipping git cvsimport tests, cvs not available'
427 ++ test_done
428 ++fi
429 ++
430 + setup_cvs_test_repository t9601
431 +
432 + test_expect_success PERL 'import a module with a vendor branch' '
433 +diff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh
434 +index e1db323f54..68f097401f 100755
435 +--- a/t/t9602-cvsimport-branches-tags.sh
436 ++++ b/t/t9602-cvsimport-branches-tags.sh
437 +@@ -6,6 +6,17 @@
438 + test_description='git cvsimport handling of branches and tags'
439 + . ./lib-cvs.sh
440 +
441 ++if ! test_have_prereq PERL
442 ++then
443 ++ skip_all='skipping git cvsimport tests, perl not available'
444 ++ test_done
445 ++fi
446 ++if ! test_have_prereq CVS
447 ++then
448 ++ skip_all='skipping git cvsimport tests, cvs not available'
449 ++ test_done
450 ++fi
451 ++
452 + setup_cvs_test_repository t9602
453 +
454 + test_expect_success PERL 'import module' '
455 +diff --git a/t/t9603-cvsimport-patchsets.sh b/t/t9603-cvsimport-patchsets.sh
456 +index c4c3c49546..9b2957d4f0 100755
457 +--- a/t/t9603-cvsimport-patchsets.sh
458 ++++ b/t/t9603-cvsimport-patchsets.sh
459 +@@ -14,6 +14,17 @@
460 + test_description='git cvsimport testing for correct patchset estimation'
461 + . ./lib-cvs.sh
462 +
463 ++if ! test_have_prereq PERL
464 ++then
465 ++ skip_all='skipping git cvsimport tests, perl not available'
466 ++ test_done
467 ++fi
468 ++if ! test_have_prereq CVS
469 ++then
470 ++ skip_all='skipping git cvsimport tests, cvs not available'
471 ++ test_done
472 ++fi
473 ++
474 + setup_cvs_test_repository t9603
475 +
476 + test_expect_failure PERL 'import with criss cross times on revisions' '
477 +diff --git a/t/test-lib.sh b/t/test-lib.sh
478 +index 7740d511d2..9b26b78359 100644
479 +--- a/t/test-lib.sh
480 ++++ b/t/test-lib.sh
481 +@@ -1062,6 +1062,7 @@ case $uname_s in
482 + esac
483 +
484 + ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
485 ++test -z "$NO_CVS" && test_set_prereq CVS
486 + test -z "$NO_PERL" && test_set_prereq PERL
487 + test -z "$NO_PTHREADS" && test_set_prereq PTHREADS
488 + test -z "$NO_PYTHON" && test_set_prereq PYTHON
489 +--
490 +2.16.3
491 +
492
493 diff --git a/dev-vcs/git/git-2.17.0_rc1.ebuild b/dev-vcs/git/git-2.17.0_rc1.ebuild
494 new file mode 100644
495 index 00000000000..29ff3e4669d
496 --- /dev/null
497 +++ b/dev-vcs/git/git-2.17.0_rc1.ebuild
498 @@ -0,0 +1,711 @@
499 +# Copyright 1999-2018 Gentoo Foundation
500 +# Distributed under the terms of the GNU General Public License v2
501 +
502 +EAPI=6
503 +
504 +GENTOO_DEPEND_ON_PERL=no
505 +
506 +# bug #329479: git-remote-testgit is not multiple-version aware
507 +PYTHON_COMPAT=( python2_7 )
508 +PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
509 +if [[ ${PV} == *9999 ]]; then
510 + SCM="git-r3"
511 + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
512 + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
513 + # See https://git-scm.com/docs/gitworkflows#_graduation
514 + # In order of stability:
515 + # 9999-r0: maint
516 + # 9999-r1: master
517 + # 9999-r2: next
518 + # 9999-r3: pu
519 + case "${PVR}" in
520 + 9999) EGIT_BRANCH=maint ;;
521 + 9999-r1) EGIT_BRANCH=master ;;
522 + 9999-r2) EGIT_BRANCH=next;;
523 + 9999-r3) EGIT_BRANCH=pu ;;
524 + esac
525 +fi
526 +
527 +inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
528 +
529 +MY_PV="${PV/_rc/.rc}"
530 +MY_P="${PN}-${MY_PV}"
531 +
532 +DOC_VER=${MY_PV}
533 +
534 +DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
535 +HOMEPAGE="https://www.git-scm.com/"
536 +if [[ ${PV} != *9999 ]]; then
537 + SRC_URI_SUFFIX="xz"
538 + SRC_URI_KORG="mirror://kernel/software/scm/git"
539 + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
540 + SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
541 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
542 + doc? (
543 + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
544 + )"
545 + [[ "${PV}" = *_rc* ]] || \
546 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
547 +fi
548 +
549 +LICENSE="GPL-2"
550 +SLOT="0"
551 +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"
552 +
553 +# Common to both DEPEND and RDEPEND
554 +CDEPEND="
555 + gnome-keyring? ( app-crypt/libsecret )
556 + !libressl? ( dev-libs/openssl:0= )
557 + libressl? ( dev-libs/libressl:= )
558 + sys-libs/zlib
559 + pcre? (
560 + pcre-jit? ( dev-libs/libpcre2[jit(+)] )
561 + !pcre-jit? ( dev-libs/libpcre )
562 + )
563 + perl? ( dev-lang/perl:=[-build(-)] )
564 + tk? ( dev-lang/tk:0= )
565 + curl? (
566 + net-misc/curl
567 + webdav? ( dev-libs/expat )
568 + )
569 + emacs? ( virtual/emacs )
570 +"
571 +
572 +RDEPEND="${CDEPEND}
573 + gpg? ( app-crypt/gnupg )
574 + perl? (
575 + dev-perl/Error
576 + dev-perl/Net-SMTP-SSL
577 + dev-perl/Authen-SASL
578 + cgi? (
579 + dev-perl/CGI
580 + highlight? ( app-text/highlight )
581 + )
582 + cvs? (
583 + >=dev-vcs/cvsps-2.1:0
584 + dev-perl/DBI
585 + dev-perl/DBD-SQLite
586 + )
587 + mediawiki? (
588 + dev-perl/DateTime-Format-ISO8601
589 + dev-perl/HTML-Tree
590 + dev-perl/MediaWiki-API
591 + )
592 + subversion? (
593 + dev-vcs/subversion[-dso,perl]
594 + dev-perl/libwww-perl
595 + dev-perl/TermReadKey
596 + )
597 + )
598 + python? ( ${PYTHON_DEPS} )
599 +"
600 +
601 +# This is how info docs are created with Git:
602 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
603 +# .xml/docbook --(docbook2texi.pl)--> .texi
604 +# .texi --(makeinfo)---------> .info
605 +DEPEND="${CDEPEND}
606 + doc? (
607 + app-text/asciidoc
608 + app-text/docbook2X
609 + sys-apps/texinfo
610 + app-text/xmlto
611 + )
612 + nls? ( sys-devel/gettext )
613 + test? ( app-crypt/gnupg )"
614 +
615 +# Live ebuild builds man pages and HTML docs, additionally
616 +if [[ ${PV} == *9999 ]]; then
617 + DEPEND="${DEPEND}
618 + app-text/asciidoc"
619 +fi
620 +
621 +SITEFILE="50${PN}-gentoo.el"
622 +S="${WORKDIR}/${MY_P}"
623 +
624 +REQUIRED_USE="
625 + cgi? ( perl )
626 + cvs? ( perl )
627 + mediawiki? ( perl )
628 + mediawiki-experimental? ( mediawiki )
629 + subversion? ( perl )
630 + webdav? ( curl )
631 + pcre-jit? ( pcre )
632 + python? ( ${PYTHON_REQUIRED_USE} )
633 +"
634 +
635 +PATCHES=(
636 + # bug #350330 - automagic CVS when we don't want it is bad.
637 + "${FILESDIR}"/git-2.17.0_rc1-optional-cvs.patch
638 +
639 + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
640 +
641 + # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
642 + "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch
643 +)
644 +
645 +pkg_setup() {
646 + if use subversion && has_version "dev-vcs/subversion[dso]"; then
647 + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
648 + ewarn "with USE=dso, there may be weird crashes in git-svn. You"
649 + ewarn "have been warned."
650 + fi
651 + if use python ; then
652 + python-single-r1_pkg_setup
653 + fi
654 +}
655 +
656 +# This is needed because for some obscure reasons future calls to make don't
657 +# pick up these exports if we export them in src_unpack()
658 +exportmakeopts() {
659 + local myopts=(
660 + ASCIIDOC_NO_ROFF=YesPlease
661 + $(usex cvs '' NO_CVS=YesPlease)
662 + $(usex elibc_musl NO_REGEX=YesPlease '')
663 + $(usex iconv '' NO_ICONV=YesPlease)
664 + $(usex nls '' NO_GETTEXT=YesPlease)
665 + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
666 + $(usex python '' NO_PYTHON=YesPlease)
667 + $(usex subversion '' NO_SVN_TESTS=YesPlease)
668 + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease)
669 + $(usex tk '' NO_TCLTK=YesPlease)
670 + )
671 +
672 + if use blksha1 ; then
673 + myopts+=( BLK_SHA1=YesPlease )
674 + elif use ppcsha1 ; then
675 + myopts+=( PPC_SHA1=YesPlease )
676 + fi
677 +
678 + if use curl ; then
679 + use webdav || myopts+=( NO_EXPAT=YesPlease )
680 + else
681 + myopts+=( NO_CURL=YesPlease )
682 + fi
683 +
684 + # broken assumptions, because of static build system ...
685 + myopts+=(
686 + NO_FINK=YesPlease
687 + NO_DARWIN_PORTS=YesPlease
688 + INSTALL=install
689 + TAR=tar
690 + SHELL_PATH="${EPREFIX}/bin/sh"
691 + SANE_TOOL_PATH=
692 + OLD_ICONV=
693 + NO_EXTERNAL_GREP=
694 + )
695 +
696 + # For svn-fe
697 + extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
698 +
699 + # can't define this to null, since the entire makefile depends on it
700 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
701 +
702 + if use pcre; then
703 + if use pcre-jit; then
704 + myopts+=( USE_LIBPCRE2=YesPlease )
705 + extlibs+=" -lpcre2-8"
706 + else
707 + myopts+=(
708 + USE_LIBPCRE1=YesPlease
709 + NO_LIBPCRE1_JIT=YesPlease
710 + )
711 + extlibs+=" -lpcre"
712 + fi
713 + fi
714 +# Disabled until ~m68k-mint can be keyworded again
715 +# if [[ ${CHOST} == *-mint* ]] ; then
716 +# myopts+=(
717 +# NO_MMAP=YesPlease
718 +# NO_IPV6=YesPlease
719 +# NO_STRLCPY=YesPlease
720 +# NO_MEMMEM=YesPlease
721 +# NO_MKDTEMP=YesPlease
722 +# NO_MKSTEMPS=YesPlease
723 +# )
724 +# fi
725 + if [[ ${CHOST} == ia64-*-hpux* ]]; then
726 + myopts+=( NO_NSEC=YesPlease )
727 + fi
728 + if [[ ${CHOST} == *-*-aix* ]]; then
729 + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
730 + fi
731 + if [[ ${CHOST} == *-solaris* ]]; then
732 + myopts+=(
733 + NEEDS_LIBICONV=YesPlease
734 + HAVE_CLOCK_MONOTONIC=1
735 + )
736 + grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
737 + myopts+=( HAVE_GETDELIM=1 )
738 + fi
739 +
740 + has_version '>=app-text/asciidoc-8.0' \
741 + && myopts+=( ASCIIDOC8=YesPlease )
742 +
743 + # Bug 290465:
744 + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
745 + [[ "${CHOST}" == *-uclibc* ]] && \
746 + myopts+=( NO_NSEC=YesPlease )
747 +
748 + export MY_MAKEOPTS="${myopts[@]}"
749 + export EXTLIBS="${extlibs}"
750 +}
751 +
752 +src_unpack() {
753 + if [[ ${PV} != *9999 ]]; then
754 + unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
755 + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
756 + if use doc ; then
757 + pushd "${S}"/Documentation &>/dev/null || die
758 + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
759 + popd &>/dev/null || die
760 + fi
761 + else
762 + git-r3_src_unpack
763 + #cp "${FILESDIR}"/GIT-VERSION-GEN .
764 + fi
765 +
766 +}
767 +
768 +src_prepare() {
769 + # add experimental patches to improve mediawiki support
770 + # see patches for origin
771 + if use mediawiki-experimental ; then
772 + PATCHES+=(
773 + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
774 + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
775 + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
776 + )
777 + fi
778 +
779 + default
780 +
781 + sed -i \
782 + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
783 + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
784 + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
785 + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
786 + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
787 + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
788 + Makefile contrib/svn-fe/Makefile || die
789 +
790 + # Fix docbook2texi command
791 + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
792 + Documentation/Makefile || die
793 +
794 + # Fix git-subtree missing DESTDIR
795 + sed -i \
796 + -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
797 + -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
798 + contrib/subtree/Makefile || die
799 +}
800 +
801 +git_emake() {
802 + # bug #320647: PYTHON_PATH
803 + local PYTHON_PATH=""
804 + use python && PYTHON_PATH="${PYTHON}"
805 + emake ${MY_MAKEOPTS} \
806 + prefix="${EPREFIX}"/usr \
807 + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
808 + perllibdir="$(perl_get_raw_vendorlib)" \
809 + sysconfdir="${EPREFIX}"/etc \
810 + DESTDIR="${D}" \
811 + GIT_TEST_OPTS="--no-color" \
812 + OPTAR="$(tc-getAR)" \
813 + OPTCC="$(tc-getCC)" \
814 + OPTCFLAGS="${CFLAGS}" \
815 + OPTLDFLAGS="${LDFLAGS}" \
816 + PERL_PATH="${EPREFIX}/usr/bin/perl" \
817 + PERL_MM_OPT="" \
818 + PYTHON_PATH="${PYTHON_PATH}" \
819 + V=1 \
820 + "$@"
821 +}
822 +
823 +src_configure() {
824 + exportmakeopts
825 +}
826 +
827 +src_compile() {
828 + git_emake || die "emake failed"
829 +
830 + if use emacs ; then
831 + elisp-compile contrib/emacs/git{,-blame}.el
832 + fi
833 +
834 + if use perl && use cgi ; then
835 + git_emake \
836 + gitweb \
837 + || die "emake gitweb (cgi) failed"
838 + fi
839 +
840 + if [[ ${CHOST} == *-darwin* ]]; then
841 + pushd contrib/credential/osxkeychain &>/dev/null || die
842 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
843 + || die "emake credential-osxkeychain"
844 + popd &>/dev/null || die
845 + fi
846 +
847 + pushd Documentation &>/dev/null || die
848 + if [[ ${PV} == *9999 ]] ; then
849 + git_emake man \
850 + || die "emake man failed"
851 + if use doc ; then
852 + git_emake info html \
853 + || die "emake info html failed"
854 + fi
855 + else
856 + if use doc ; then
857 + git_emake info \
858 + || die "emake info html failed"
859 + fi
860 + fi
861 + popd &>/dev/null || die
862 +
863 + if use subversion ; then
864 + pushd contrib/svn-fe &>/dev/null || die
865 + # by defining EXTLIBS we override the detection for libintl and
866 + # libiconv, bug #516168
867 + local nlsiconv=
868 + use nls && use !elibc_glibc && nlsiconv+=" -lintl"
869 + use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
870 + git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
871 + if use doc ; then
872 + git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
873 + fi
874 + popd &>/dev/null || die
875 + fi
876 +
877 + if use gnome-keyring ; then
878 + pushd contrib/credential/libsecret &>/dev/null || die
879 + git_emake || die "emake git-credential-libsecret failed"
880 + popd &>/dev/null || die
881 + fi
882 +
883 + pushd contrib/subtree &>/dev/null || die
884 + git_emake
885 + use doc && git_emake doc
886 + popd &>/dev/null || die
887 +
888 + pushd contrib/diff-highlight &>/dev/null || die
889 + git_emake
890 + popd &>/dev/null || die
891 +
892 + if use mediawiki ; then
893 + pushd contrib/mw-to-git &>/dev/null || die
894 + git_emake
895 + popd &>/dev/null || die
896 +
897 + fi
898 +}
899 +
900 +src_install() {
901 + git_emake \
902 + install || \
903 + die "make install failed"
904 +
905 + if [[ ${CHOST} == *-darwin* ]]; then
906 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
907 + fi
908 +
909 + # Depending on the tarball and manual rebuild of the documentation, the
910 + # manpages may exist in either OR both of these directories.
911 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
912 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
913 + dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
914 + use doc && dodir /usr/share/doc/${PF}/html
915 + for d in / /howto/ /technical/ ; do
916 + docinto ${d}
917 + dodoc Documentation${d}*.txt
918 + if use doc ; then
919 + docinto ${d}/html
920 + dodoc Documentation${d}*.html
921 + fi
922 + done
923 + docinto /
924 + # Upstream does not ship this pre-built :-(
925 + use doc && doinfo Documentation/{git,gitman}.info
926 +
927 + newbashcomp contrib/completion/git-completion.bash ${PN}
928 + bashcomp_alias git gitk
929 + # Not really a bash-completion file (bug #477920)
930 + # but still needed uncompressed (bug #507480)
931 + insinto /usr/share/${PN}
932 + doins contrib/completion/git-prompt.sh
933 +
934 + if use emacs ; then
935 + elisp-install ${PN} contrib/emacs/git.{el,elc}
936 + elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
937 + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
938 + # don't add automatically to the load-path, so the sitefile
939 + # can do a conditional loading
940 + touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
941 + elisp-site-file-install "${FILESDIR}"/${SITEFILE}
942 + fi
943 +
944 + #dobin contrib/fast-import/git-p4 # Moved upstream
945 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
946 + newbin contrib/fast-import/import-tars.perl import-tars
947 + exeinto /usr/libexec/git-core/
948 + newexe contrib/git-resurrect.sh git-resurrect
949 +
950 + # git-subtree
951 + pushd contrib/subtree &>/dev/null || die
952 + git_emake install || die "Failed to emake install git-subtree"
953 + if use doc ; then
954 + git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
955 + fi
956 + newdoc README README.git-subtree
957 + dodoc git-subtree.txt
958 + popd &>/dev/null || die
959 +
960 + if use mediawiki ; then
961 + pushd contrib/mw-to-git &>/dev/null || die
962 + git_emake install
963 + popd &>/dev/null || die
964 + fi
965 +
966 + # diff-highlight
967 + dobin contrib/diff-highlight/diff-highlight
968 + newdoc contrib/diff-highlight/README README.diff-highlight
969 +
970 + # git-jump
971 + exeinto /usr/libexec/git-core/
972 + doexe contrib/git-jump/git-jump
973 + newdoc contrib/git-jump/README git-jump.txt
974 +
975 + # git-contacts
976 + exeinto /usr/libexec/git-core/
977 + doexe contrib/contacts/git-contacts
978 + dodoc contrib/contacts/git-contacts.txt
979 +
980 + if use gnome-keyring ; then
981 + pushd contrib/credential/libsecret &>/dev/null || die
982 + dobin git-credential-libsecret
983 + popd &>/dev/null || die
984 + fi
985 +
986 + if use subversion ; then
987 + pushd contrib/svn-fe &>/dev/null || die
988 + dobin svn-fe
989 + dodoc svn-fe.txt
990 + if use doc ; then
991 + doman svn-fe.1
992 + docinto html
993 + dodoc svn-fe.html
994 + fi
995 + popd &>/dev/null || die
996 + fi
997 +
998 + dodir /usr/share/${PN}/contrib
999 + # The following are excluded:
1000 + # completion - installed above
1001 + # diff-highlight - done above
1002 + # emacs - installed above
1003 + # examples - these are stuff that is not used in Git anymore actually
1004 + # git-jump - done above
1005 + # gitview - installed above
1006 + # p4import - excluded because fast-import has a better one
1007 + # patches - stuff the Git guys made to go upstream to other places
1008 + # persistent-https - TODO
1009 + # mw-to-git - TODO
1010 + # subtree - build seperately
1011 + # svnimport - use git-svn
1012 + # thunderbird-patch-inline - fixes thunderbird
1013 + local contrib_objects=(
1014 + buildsystems
1015 + fast-import
1016 + hg-to-git
1017 + hooks
1018 + remotes2config.sh
1019 + rerere-train.sh
1020 + stats
1021 + workdir
1022 + )
1023 + for i in "${contrib_objects[@]}" ; do
1024 + cp -rf \
1025 + "${S}"/contrib/${i} \
1026 + "${ED%/}"/usr/share/${PN}/contrib \
1027 + || die "Failed contrib ${i}"
1028 + done
1029 +
1030 + if use perl && use cgi ; then
1031 + # We used to install in /usr/share/${PN}/gitweb
1032 + # but upstream installs in /usr/share/gitweb
1033 + # so we will install a symlink and use their location for compat with other
1034 + # distros
1035 + dosym /usr/share/gitweb /usr/share/${PN}/gitweb
1036 +
1037 + # INSTALL discusses configuration issues, not just installation
1038 + docinto /
1039 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
1040 + newdoc "${S}"/gitweb/README README.gitweb
1041 +
1042 + find "${ED%/}"/usr/lib64/perl5/ \
1043 + -name .packlist \
1044 + -delete \
1045 + || die
1046 + else
1047 + rm -rf "${ED%/}"/usr/share/gitweb
1048 + fi
1049 +
1050 + if ! use subversion ; then
1051 + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \
1052 + "${ED%/}"/usr/share/man/man1/git-svn.1*
1053 + fi
1054 +
1055 + if use xinetd ; then
1056 + insinto /etc/xinetd.d
1057 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
1058 + fi
1059 +
1060 + if use !prefix ; then
1061 + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
1062 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
1063 + systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
1064 + systemd_dounit "${FILESDIR}/git-daemon.socket"
1065 + fi
1066 +
1067 + perl_delete_localpod
1068 +
1069 + # Remove disabled linguas
1070 + # we could remove sources in src_prepare, but install does not
1071 + # handle missing locale dir well
1072 + rm_loc() {
1073 + if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then
1074 + rm -r "${ED%/}/usr/share/locale/${1}" || die
1075 + fi
1076 + }
1077 + l10n_for_each_disabled_locale_do rm_loc
1078 +}
1079 +
1080 +src_test() {
1081 + local disabled=()
1082 + local tests_cvs=(
1083 + t9200-git-cvsexportcommit.sh
1084 + t9400-git-cvsserver-server.sh
1085 + t9401-git-cvsserver-crlf.sh
1086 + t9402-git-cvsserver-refs.sh
1087 + t9600-cvsimport.sh
1088 + t9601-cvsimport-vendor-branch.sh
1089 + t9602-cvsimport-branches-tags.sh
1090 + t9603-cvsimport-patchsets.sh
1091 + t9604-cvsimport-timestamps.sh
1092 + )
1093 + local tests_perl=(
1094 + t3701-add-interactive.sh
1095 + t5502-quickfetch.sh
1096 + t5512-ls-remote.sh
1097 + t5520-pull.sh
1098 + t7106-reset-unborn-branch.sh
1099 + t7501-commit.sh
1100 + )
1101 + # Bug #225601 - t0004 is not suitable for root perm
1102 + # Bug #219839 - t1004 is not suitable for root perm
1103 + # t0001-init.sh - check for init notices EPERM* fails
1104 + local tests_nonroot=(
1105 + t0001-init.sh
1106 + t0004-unwritable.sh
1107 + t0070-fundamental.sh
1108 + t1004-read-tree-m-u-wf.sh
1109 + t3700-add.sh
1110 + t7300-clean.sh
1111 + )
1112 + # t9100 still fails with symlinks in SVN 1.7
1113 + local test_svn=( t9100-git-svn-basic.sh )
1114 +
1115 + # Unzip is used only for the testcase code, not by any normal parts of Git.
1116 + if ! has_version app-arch/unzip ; then
1117 + einfo "Disabling tar-tree tests"
1118 + disabled+=( t5000-tar-tree.sh )
1119 + fi
1120 +
1121 + local cvs=0
1122 + use cvs && let cvs=${cvs}+1
1123 + if [[ ${EUID} -eq 0 ]]; then
1124 + if [[ ${cvs} -eq 1 ]]; then
1125 + ewarn "Skipping CVS tests because CVS does not work as root!"
1126 + ewarn "You should retest with FEATURES=userpriv!"
1127 + disabled+=( ${tests_cvs[@]} )
1128 + fi
1129 + einfo "Skipping other tests that require being non-root"
1130 + disabled+=( ${tests_nonroot[@]} )
1131 + else
1132 + [[ ${cvs} -gt 0 ]] && \
1133 + has_version dev-vcs/cvs && \
1134 + let cvs=${cvs}+1
1135 + [[ ${cvs} -gt 1 ]] && \
1136 + has_version "dev-vcs/cvs[server]" && \
1137 + let cvs=${cvs}+1
1138 + if [[ ${cvs} -lt 3 ]]; then
1139 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
1140 + disabled+=( ${tests_cvs[@]} )
1141 + fi
1142 + fi
1143 +
1144 + if ! use perl ; then
1145 + einfo "Disabling tests that need Perl"
1146 + disabled+=( ${tests_perl[@]} )
1147 + fi
1148 +
1149 + einfo "Disabling tests that fail with SVN 1.7"
1150 + disabled+=( ${test_svn[@]} )
1151 +
1152 + # Reset all previously disabled tests
1153 + pushd t &>/dev/null || die
1154 + local i
1155 + for i in *.sh.DISABLED ; do
1156 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
1157 + done
1158 + einfo "Disabled tests:"
1159 + for i in ${disabled[@]} ; do
1160 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
1161 + done
1162 +
1163 + # Avoid the test system removing the results because we want them ourselves
1164 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
1165 + -i Makefile || die
1166 +
1167 + # Clean old results first, must always run
1168 + nonfatal git_emake clean
1169 + popd &>/dev/null || die
1170 +
1171 + # Now run the tests, keep going if we hit an error, and don't terminate on
1172 + # failure
1173 + local rc
1174 + einfo "Start test run"
1175 + #MAKEOPTS=-j1
1176 + nonfatal git_emake --keep-going test
1177 + rc=$?
1178 +
1179 + # Display nice results, now print the results
1180 + pushd t &>/dev/null || die
1181 + nonfatal git_emake aggregate-results
1182 +
1183 + # And bail if there was a problem
1184 + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug."
1185 +}
1186 +
1187 +showpkgdeps() {
1188 + local pkg=$1
1189 + shift
1190 + elog " $(printf "%-17s:" ${pkg}) ${@}"
1191 +}
1192 +
1193 +pkg_postinst() {
1194 + use emacs && elisp-site-regen
1195 + einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
1196 + einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
1197 + einfo "Note that the prompt bash code is now in that separate script"
1198 + elog "These additional scripts need some dependencies:"
1199 + echo
1200 + showpkgdeps git-quiltimport "dev-util/quilt"
1201 + showpkgdeps git-instaweb \
1202 + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
1203 + echo
1204 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
1205 +}
1206 +
1207 +pkg_postrm() {
1208 + use emacs && elisp-site-regen
1209 +}