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