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/
Date: Mon, 10 Jan 2022 22:41:09
Message-Id: 1641854455.7a5ed571c8e7490ca248ed95977298407c574148.polynomial-c@gentoo
1 commit: 7a5ed571c8e7490ca248ed95977298407c574148
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 10 22:33:59 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 10 22:40:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a5ed571
7
8 dev-vcs/git: Bump to version 2.35.0_rc0
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 dev-vcs/git/Manifest | 3 +
13 dev-vcs/git/git-2.35.0_rc0.ebuild | 660 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 663 insertions(+)
15
16 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
17 index e99d4f4575a1..14e098530fb7 100644
18 --- a/dev-vcs/git/Manifest
19 +++ b/dev-vcs/git/Manifest
20 @@ -1,9 +1,12 @@
21 DIST git-2.32.0.tar.xz 6551348 BLAKE2B 546203ce3f749ba806866a9e9767bc807794cec435fd0b60306ae6cd2b1b17a0159ef9774c79c4f59d0dba45b36941085b55f103e1820450d560bffa41d1058f SHA512 1ab3e7022ccee411d14a7da5c37d6259ef5c0f85ebed8f49698e25c65cbc7a46f8096919fcb6568360bfe284dd7475b596eee1a167db966096255a405853837c
22 DIST git-2.33.1.tar.xz 6558636 BLAKE2B f4959d5309f85e063448673a3f06f1d3cdd65ced5f5173cfe5a38df3b5547cae1c08275bda02e48307e8290628735e2ea1ff49222262e7cd29b252a6aa4d4a15 SHA512 16d417183232e1057bea754d59cdf4bbacc5f1527d1de6ee04cdd293a2512bfa7208e20f6130816605528b59cb1bc3188c5bddf1a42c1413095ee74e44dd2f91
23 DIST git-2.34.1.tar.xz 6623760 BLAKE2B 9b5d7a450ec495898bcc0e1f6ae87c0ad102d039cf7c4106cdfe3ada501d9bfaf22b83c522de383d3c01f7d5a29dbfd7fc44b371efa8fc3a418ab3c609a692c1 SHA512 a1a8e9e6f64b1da25508fbd2f783564dcdbe181fb5ff1ebab3bdac6db6094e18acc334479a1abf22ac17ce4f733cc3e10a664db9ab234cd523735a3f027b42db
24 +DIST git-2.35.0.rc0.tar.xz 6614736 BLAKE2B b2207adb76f5e43ac97ad61a37aa0e9dd8c6faccca43d3c7c7560764b11e0851669e88d31ccd776e5298a07c8d875c5649492a0abd509ad0da8ad30da87cb54e SHA512 9aa5d89d7981c73d32e9023dfc61a62e63688c3172cba4bee145b2ff4f5f7bc497435d1b4b535089c698893feabc6057a6522676e52bd3355327dfc0b6b8ba56
25 DIST git-htmldocs-2.32.0.tar.xz 1381664 BLAKE2B d1b47aa99d32a252fd20df26eff44a558044f3a389379b161bb43621eb28375eb0621969849a31938ba7fc9fc58b140d27d703559ea5735d0a0ffd2e93cd9692 SHA512 12b84e342f0d19afe385ab8a685ae625e86c3295d1555992e0c427b361aa2cdfc89a679e7dbc468d3568a325dafbf699468aadcdb02f93e372eff3dd96a7cf7f
26 DIST git-htmldocs-2.33.1.tar.xz 1396744 BLAKE2B cbd65cf08fc7ea466fcd72820ba3e2135ade37f69c436a4ee7276dc71fb62f6270b71e2f46d981f5681a0fd3c30613d61680c2ef2460d0d7d292f7455e114128 SHA512 5b856b919067e1f644539d43a85aab6f602537ea0970b6248b471e3fa6756a8494f0525a69d22ad3795fcf9e106ff8439e0f6716ba0b8c895d7aad8c59e5bd74
27 DIST git-htmldocs-2.34.1.tar.xz 1406464 BLAKE2B 6ee2f58df3c1622d96ac4b1a70d4dc3d0c973635774dd6bb89fea3e502dd82d99d676e2f9cb33c14c429c3d4680cd6020213154099b3f7fe71ad67602ca9bc6c SHA512 cf9fa952d43e477528deece9f22d1bb63fa50b3a831fae20812c6af31c1dbaf193abe2fed48ac9966bcf1787442ceed19f00c00e524a1911f0ea31952a52fc8f
28 +DIST git-htmldocs-2.35.0.rc0.tar.xz 1405384 BLAKE2B 06293752aba85cfaf5b9a5eb7f63bd553e736f28c6a3764f9de7a9e0ba4f060cdbe803ff6710ae625964b17078b72ff6a95c012226889238c0cd0b7b23704196 SHA512 a41ca05e0c314c0922bf0070a71f0eb9946a48f26598ad950c0e84e1a1021c81a3c75a042601abe2c7d91cd277d2e24fd234f6faedd71d2975fb8a7e24da737a
29 DIST git-manpages-2.32.0.tar.xz 491868 BLAKE2B 7598a864246aed771371924604ee13d3f51b839b10b254bb1159dd47266513f5cd6484aab200a7b4ed427edc76538a98e39a040a17201483965175f5e1c5f484 SHA512 5c9950bd5d6904972cddf4afad534197d843c0dee8198d14ec5a3448873cab37dac88295b2a4df3658749f048bda4800b54fdc850517be7208906c911832c66e
30 DIST git-manpages-2.33.1.tar.xz 494288 BLAKE2B 1f8bd4f23de31a285d3f4327e562dddafdf9f28e8b36334e54f5e280c81fc8170e8b153ca42baa642d02d8e6fdfcac9a8fdd3cee1e32c29bcd53f689d1a6c463 SHA512 d465a7b491046b7a5da6ad1fc6c62b351c69905932e0672263de5a1d3abe1113660cff9fe30c7be1d1695c6170ceca5a11b3f65e9b2d1545f35cc653e4c6ad62
31 DIST git-manpages-2.34.1.tar.xz 497280 BLAKE2B aa3c67cec861eb40eda3e7827d3e380fdfb6f189027fb7e5618258b80ac33918cb3c2ca4d2f8dc5fbee959578766564137e9c4818672f5138304270c486658fe SHA512 8f3b56fa477e5aafec3ef29933234c362a372f59ed95694c4fb82ebb82d2a8ebc0ac17ae36caa9185964eef1700ea8732816e73df4ddd918afc949a8371fa0d8
32 +DIST git-manpages-2.35.0.rc0.tar.xz 497520 BLAKE2B a7f8ddfc8a9711dcf25fdda447b1e61e054e213a933f31ed56b959ba9ae1f1a3f2978b3868d6a9146642b6ebe6df022d31f72b147c3c61c9489d2d442e81bc26 SHA512 eeeace33390dcd30d2baeb7f0fca622854180e27a33eaa1b6dc10d0e3c5fa7b14f9ecc5622683e9dd0d3da1ed5561ddfaffe29f32aebc2e60418cb967796074e
33
34 diff --git a/dev-vcs/git/git-2.35.0_rc0.ebuild b/dev-vcs/git/git-2.35.0_rc0.ebuild
35 new file mode 100644
36 index 000000000000..c77551019c67
37 --- /dev/null
38 +++ b/dev-vcs/git/git-2.35.0_rc0.ebuild
39 @@ -0,0 +1,660 @@
40 +# Copyright 1999-2022 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=8
44 +
45 +GENTOO_DEPEND_ON_PERL=no
46 +
47 +# bug #329479: git-remote-testgit is not multiple-version aware
48 +PYTHON_COMPAT=( python3_{8..10} )
49 +
50 +inherit toolchain-funcs elisp-common perl-module bash-completion-r1 plocale python-single-r1 systemd
51 +
52 +PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
53 +if [[ ${PV} == *9999 ]]; then
54 + inherit git-r3
55 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git"
56 + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
57 + # See https://git-scm.com/docs/gitworkflows#_graduation
58 + # In order of stability:
59 + # 9999-r0: maint
60 + # 9999-r1: master
61 + # 9999-r2: next
62 + # 9999-r3: seen
63 + case "${PVR}" in
64 + 9999) EGIT_BRANCH=maint ;;
65 + 9999-r1) EGIT_BRANCH=master ;;
66 + 9999-r2) EGIT_BRANCH=next;;
67 + 9999-r3) EGIT_BRANCH=seen ;;
68 + esac
69 +fi
70 +
71 +MY_PV="${PV/_rc/.rc}"
72 +MY_P="${PN}-${MY_PV}"
73 +
74 +DOC_VER="${MY_PV}"
75 +
76 +DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
77 +HOMEPAGE="https://www.git-scm.com/"
78 +if [[ ${PV} != *9999 ]]; then
79 + SRC_URI_SUFFIX="xz"
80 + SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
81 + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
82 + SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
83 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
84 + doc? (
85 + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
86 + )"
87 + [[ "${PV}" == *_rc* ]] || \
88 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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"
89 +fi
90 +
91 +LICENSE="GPL-2"
92 +SLOT="0"
93 +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv mediawiki mediawiki-experimental +nls +pcre perforce +perl +ppcsha1 subversion tk +threads +webdav xinetd cvs test"
94 +
95 +# Common to both DEPEND and RDEPEND
96 +DEPEND="
97 + gnome-keyring? (
98 + app-crypt/libsecret
99 + dev-libs/glib:2
100 + )
101 + dev-libs/openssl:0=
102 + sys-libs/zlib
103 + pcre? ( dev-libs/libpcre2:= )
104 + perl? ( dev-lang/perl:=[-build(-)] )
105 + tk? ( dev-lang/tk:0= )
106 + curl? (
107 + net-misc/curl
108 + webdav? ( dev-libs/expat )
109 + )
110 + iconv? ( virtual/libiconv )
111 +"
112 +
113 +RDEPEND="${DEPEND}
114 + gpg? ( app-crypt/gnupg )
115 + perl? (
116 + dev-perl/Error
117 + dev-perl/MailTools
118 + dev-perl/Authen-SASL
119 + >=virtual/perl-libnet-3.110.0-r4[ssl]
120 + cgi? (
121 + dev-perl/CGI
122 + highlight? ( app-text/highlight )
123 + )
124 + cvs? (
125 + >=dev-vcs/cvsps-2.1:0
126 + dev-perl/DBI
127 + dev-perl/DBD-SQLite
128 + )
129 + mediawiki? (
130 + dev-perl/DateTime-Format-ISO8601
131 + dev-perl/HTML-Tree
132 + dev-perl/MediaWiki-API
133 + )
134 + subversion? (
135 + dev-vcs/subversion[-dso(-),perl]
136 + dev-perl/libwww-perl
137 + dev-perl/TermReadKey
138 + )
139 + )
140 + perforce? ( ${PYTHON_DEPS} )
141 +"
142 +
143 +# This is how info docs are created with Git:
144 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
145 +# .xml/docbook --(docbook2texi.pl)--> .texi
146 +# .texi --(makeinfo)---------> .info
147 +BDEPEND="
148 + doc? (
149 + app-text/asciidoc
150 + app-text/docbook2X
151 + app-text/xmlto
152 + sys-apps/texinfo
153 + )
154 + emacs? ( >=app-editors/emacs-23.1:* )
155 + gnome-keyring? ( virtual/pkgconfig )
156 + nls? ( sys-devel/gettext )
157 + test? ( app-crypt/gnupg )
158 +"
159 +
160 +# Live ebuild builds man pages and HTML docs, additionally
161 +if [[ ${PV} == *9999 ]]; then
162 + BDEPEND="${BDEPEND}
163 + app-text/asciidoc"
164 +fi
165 +
166 +SITEFILE="50${PN}-gentoo.el"
167 +S="${WORKDIR}/${MY_P}"
168 +
169 +REQUIRED_USE="
170 + cgi? ( perl )
171 + cvs? ( perl )
172 + mediawiki? ( perl )
173 + mediawiki-experimental? ( mediawiki )
174 + perforce? ( ${PYTHON_REQUIRED_USE} )
175 + subversion? ( perl )
176 + webdav? ( curl )
177 +"
178 +
179 +RESTRICT="!test? ( test )"
180 +
181 +PATCHES=(
182 + # bug #350330 - automagic CVS when we don't want it is bad.
183 + "${FILESDIR}"/git-2.33.0_rc0-optional-cvs.patch
184 +
185 + # Make submodule output quiet
186 + "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
187 +)
188 +
189 +pkg_setup() {
190 + if use subversion && has_version "dev-vcs/subversion[dso]" ; then
191 + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
192 + ewarn "with USE=dso, there may be weird crashes in git-svn. You"
193 + ewarn "have been warned."
194 + fi
195 +
196 + if use perforce ; then
197 + python-single-r1_pkg_setup
198 + fi
199 +}
200 +
201 +# This is needed because for some obscure reasons future calls to make don't
202 +# pick up these exports if we export them in src_unpack()
203 +exportmakeopts() {
204 + local extlibs myopts
205 +
206 + myopts=(
207 + ASCIIDOC_NO_ROFF=YesPlease
208 + $(usex cvs '' NO_CVS=YesPlease)
209 + $(usex elibc_musl NO_REGEX=YesPlease '')
210 + $(usex iconv '' NO_ICONV=YesPlease)
211 + $(usex nls '' NO_GETTEXT=YesPlease)
212 + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
213 + $(usex perforce '' NO_PYTHON=YesPlease)
214 + $(usex subversion '' NO_SVN_TESTS=YesPlease)
215 + $(usex threads '' NO_PTHREADS=YesPlease)
216 + $(usex tk '' NO_TCLTK=YesPlease)
217 + )
218 +
219 + if use blksha1 ; then
220 + myopts+=( BLK_SHA1=YesPlease )
221 + elif use ppcsha1 ; then
222 + myopts+=( PPC_SHA1=YesPlease )
223 + fi
224 +
225 + if use curl ; then
226 + use webdav || myopts+=( NO_EXPAT=YesPlease )
227 + else
228 + myopts+=( NO_CURL=YesPlease )
229 + fi
230 +
231 + # broken assumptions, because of static build system ...
232 + myopts+=(
233 + NO_FINK=YesPlease
234 + NO_DARWIN_PORTS=YesPlease
235 + INSTALL=install
236 + TAR=tar
237 + SHELL_PATH="${EPREFIX}/bin/sh"
238 + SANE_TOOL_PATH=
239 + OLD_ICONV=
240 + NO_EXTERNAL_GREP=
241 + )
242 +
243 + # can't define this to null, since the entire makefile depends on it
244 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
245 +
246 + if use pcre; then
247 + myopts+=( USE_LIBPCRE2=YesPlease )
248 + extlibs+=( -lpcre2-8 )
249 + fi
250 + if [[ ${CHOST} == *-solaris* ]]; then
251 + myopts+=(
252 + NEEDS_LIBICONV=YesPlease
253 + HAVE_CLOCK_MONOTONIC=1
254 + )
255 + if grep -Fq getdelim "${EROOT}"/usr/include/stdio.h ; then
256 + myopts+=( HAVE_GETDELIM=1 )
257 + fi
258 + fi
259 +
260 + if has_version '>=app-text/asciidoc-8.0' ; then
261 + myopts+=( ASCIIDOC8=YesPlease )
262 + fi
263 +
264 + export MY_MAKEOPTS="${myopts[@]}"
265 + export EXTLIBS="${extlibs[@]}"
266 +}
267 +
268 +src_unpack() {
269 + if [[ ${PV} != *9999 ]] ; then
270 + unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
271 + cd "${S}" || die
272 + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
273 + if use doc ; then
274 + pushd "${S}"/Documentation &>/dev/null || die
275 + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
276 + popd &>/dev/null || die
277 + fi
278 + else
279 + git-r3_src_unpack
280 + #cp "${FILESDIR}"/GIT-VERSION-GEN .
281 + fi
282 +
283 +}
284 +
285 +src_prepare() {
286 + # add experimental patches to improve mediawiki support
287 + # see patches for origin
288 + if use mediawiki-experimental ; then
289 + PATCHES+=(
290 + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
291 + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
292 + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
293 + )
294 + fi
295 +
296 + default
297 +
298 + if use prefix ; then
299 + # bug #757309
300 + eapply "${FILESDIR}"/git-2.31.0-darwin-prefix-gettext.patch
301 + fi
302 +
303 + sed -i \
304 + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
305 + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
306 + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
307 + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
308 + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
309 + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
310 + Makefile || die
311 +
312 + # Fix docbook2texi command
313 + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
314 + Documentation/Makefile || die
315 +}
316 +
317 +git_emake() {
318 + # bug #320647: PYTHON_PATH
319 + local PYTHON_PATH=""
320 + use perforce && PYTHON_PATH="${PYTHON}"
321 + emake ${MY_MAKEOPTS} \
322 + prefix="${EPREFIX}"/usr \
323 + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
324 + perllibdir="$(use perl && perl_get_raw_vendorlib)" \
325 + sysconfdir="${EPREFIX}"/etc \
326 + GIT_TEST_OPTS="--no-color" \
327 + OPTAR="$(tc-getAR)" \
328 + OPTCC="$(tc-getCC)" \
329 + OPTCFLAGS="${CFLAGS}" \
330 + OPTLDFLAGS="${LDFLAGS}" \
331 + PERL_PATH="${EPREFIX}/usr/bin/perl" \
332 + PERL_MM_OPT="" \
333 + PYTHON_PATH="${PYTHON_PATH}" \
334 + V=1 \
335 + "$@"
336 +}
337 +
338 +src_configure() {
339 + exportmakeopts
340 +}
341 +
342 +src_compile() {
343 + git_emake || die "emake failed"
344 +
345 + if use emacs ; then
346 + elisp-compile contrib/emacs/git{,-blame}.el
347 + fi
348 +
349 + if use perl && use cgi ; then
350 + git_emake gitweb || die "emake gitweb (cgi) failed"
351 + fi
352 +
353 + if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
354 + pushd contrib/credential/osxkeychain &>/dev/null || die
355 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
356 + || die "emake credential-osxkeychain"
357 + popd &>/dev/null || die
358 + fi
359 +
360 + pushd Documentation &>/dev/null || die
361 + if [[ ${PV} == *9999 ]] ; then
362 + git_emake man || die "emake man failed"
363 + if use doc ; then
364 + git_emake info html || die "emake info html failed"
365 + fi
366 + else
367 + if use doc ; then
368 + git_emake info || die "emake info html failed"
369 + fi
370 + fi
371 + popd &>/dev/null || die
372 +
373 + if use gnome-keyring ; then
374 + pushd contrib/credential/libsecret &>/dev/null || die
375 + git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
376 + popd &>/dev/null || die
377 + fi
378 +
379 + pushd contrib/subtree &>/dev/null || die
380 + git_emake git-subtree || die
381 + # git-subtree.1 requires the full USE=doc dependency stack
382 + use doc && git_emake git-subtree.html git-subtree.1
383 + popd &>/dev/null || die
384 +
385 + pushd contrib/diff-highlight &>/dev/null || die
386 + git_emake || die
387 + popd &>/dev/null || die
388 +
389 + if use mediawiki ; then
390 + pushd contrib/mw-to-git &>/dev/null || die
391 + git_emake || die
392 + popd &>/dev/null || die
393 +
394 + fi
395 +}
396 +
397 +src_install() {
398 + git_emake DESTDIR="${D}" install || die "make install failed"
399 +
400 + if [[ ${CHOST} == *-darwin* && ! tc-is-gcc ]]; then
401 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
402 + fi
403 +
404 + # Depending on the tarball and manual rebuild of the documentation, the
405 + # manpages may exist in either OR both of these directories.
406 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
407 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
408 + dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
409 + use doc && dodir /usr/share/doc/${PF}/html
410 + local d
411 + for d in / /howto/ /technical/ ; do
412 + docinto ${d}
413 + dodoc Documentation${d}*.txt
414 + if use doc ; then
415 + docinto ${d}/html
416 + dodoc Documentation${d}*.html
417 + fi
418 + done
419 + docinto /
420 + # Upstream does not ship this pre-built :-(
421 + use doc && doinfo Documentation/{git,gitman}.info
422 +
423 + newbashcomp contrib/completion/git-completion.bash ${PN}
424 + bashcomp_alias git gitk
425 + # Not really a bash-completion file (bug #477920)
426 + # but still needed uncompressed (bug #507480)
427 + insinto /usr/share/${PN}
428 + doins contrib/completion/git-prompt.sh
429 +
430 + if use emacs ; then
431 + elisp-install ${PN} contrib/emacs/git.{el,elc}
432 + elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
433 + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
434 + # don't add automatically to the load-path, so the sitefile
435 + # can do a conditional loading
436 + touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
437 + elisp-site-file-install "${FILESDIR}"/${SITEFILE}
438 + fi
439 +
440 + #dobin contrib/fast-import/git-p4 # Moved upstream
441 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
442 + newbin contrib/fast-import/import-tars.perl import-tars
443 + exeinto /usr/libexec/git-core/
444 + newexe contrib/git-resurrect.sh git-resurrect
445 +
446 + # git-subtree
447 + pushd contrib/subtree &>/dev/null || die
448 + git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
449 + if use doc ; then
450 + # Do not move git subtree install-man outside USE=doc!
451 + git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
452 + fi
453 + newdoc README README.git-subtree
454 + dodoc git-subtree.txt
455 + popd &>/dev/null || die
456 +
457 + if use mediawiki ; then
458 + pushd contrib/mw-to-git &>/dev/null || die
459 + git_emake DESTDIR="${D}" install
460 + popd &>/dev/null || die
461 + fi
462 +
463 + # diff-highlight
464 + dobin contrib/diff-highlight/diff-highlight
465 + newdoc contrib/diff-highlight/README README.diff-highlight
466 +
467 + # git-jump
468 + exeinto /usr/libexec/git-core/
469 + doexe contrib/git-jump/git-jump
470 + newdoc contrib/git-jump/README git-jump.txt
471 +
472 + # git-contacts
473 + exeinto /usr/libexec/git-core/
474 + doexe contrib/contacts/git-contacts
475 + dodoc contrib/contacts/git-contacts.txt
476 +
477 + if use gnome-keyring ; then
478 + pushd contrib/credential/libsecret &>/dev/null || die
479 + dobin git-credential-libsecret
480 + popd &>/dev/null || die
481 + fi
482 +
483 + dodir /usr/share/${PN}/contrib
484 + # The following are excluded:
485 + # completion - installed above
486 + # diff-highlight - done above
487 + # emacs - installed above
488 + # examples - these are stuff that is not used in Git anymore actually
489 + # git-jump - done above
490 + # gitview - installed above
491 + # p4import - excluded because fast-import has a better one
492 + # patches - stuff the Git guys made to go upstream to other places
493 + # persistent-https - TODO
494 + # mw-to-git - TODO
495 + # subtree - build seperately
496 + # svnimport - use git-svn
497 + # thunderbird-patch-inline - fixes thunderbird
498 + local contrib_objects=(
499 + buildsystems
500 + fast-import
501 + hg-to-git
502 + hooks
503 + remotes2config.sh
504 + rerere-train.sh
505 + stats
506 + workdir
507 + )
508 + local i
509 + for i in "${contrib_objects[@]}" ; do
510 + cp -rf \
511 + "${S}"/contrib/${i} \
512 + "${ED}"/usr/share/${PN}/contrib \
513 + || die "Failed contrib ${i}"
514 + done
515 +
516 + if use perl && use cgi ; then
517 + # We used to install in /usr/share/${PN}/gitweb
518 + # but upstream installs in /usr/share/gitweb
519 + # so we will install a symlink and use their location for compat with other
520 + # distros
521 + dosym ../gitweb /usr/share/${PN}/gitweb
522 +
523 + # INSTALL discusses configuration issues, not just installation
524 + docinto /
525 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
526 + newdoc "${S}"/gitweb/README README.gitweb
527 +
528 + for d in "${ED}"/usr/lib{,64}/perl5/ ; do
529 + if [[ -d "${d}" ]] ; then
530 + find "${d}" -name .packlist -delete || die
531 + fi
532 + done
533 + else
534 + rm -rf "${ED}"/usr/share/gitweb
535 + fi
536 +
537 + if ! use subversion ; then
538 + rm -f "${ED}"/usr/libexec/git-core/git-svn \
539 + "${ED}"/usr/share/man/man1/git-svn.1*
540 + fi
541 +
542 + if use xinetd ; then
543 + insinto /etc/xinetd.d
544 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
545 + fi
546 +
547 + if ! use prefix ; then
548 + newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
549 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
550 + systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
551 + "git-daemon@.service"
552 + systemd_dounit "${FILESDIR}/git-daemon.socket"
553 + fi
554 +
555 + perl_delete_localpod
556 +
557 + # Remove disabled linguas
558 + # we could remove sources in src_prepare, but install does not
559 + # handle missing locale dir well
560 + rm_loc() {
561 + if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
562 + rm -r "${ED}/usr/share/locale/${1}" || die
563 + fi
564 + }
565 + plocale_for_each_disabled_locale rm_loc
566 +}
567 +
568 +src_test() {
569 + local disabled=()
570 + local tests_cvs=(
571 + t9200-git-cvsexportcommit.sh
572 + t9400-git-cvsserver-server.sh
573 + t9401-git-cvsserver-crlf.sh
574 + t9402-git-cvsserver-refs.sh
575 + t9600-cvsimport.sh
576 + t9601-cvsimport-vendor-branch.sh
577 + t9602-cvsimport-branches-tags.sh
578 + t9603-cvsimport-patchsets.sh
579 + t9604-cvsimport-timestamps.sh
580 + )
581 + local tests_perl=(
582 + t3701-add-interactive.sh
583 + t5502-quickfetch.sh
584 + t5512-ls-remote.sh
585 + t5520-pull.sh
586 + t7106-reset-unborn-branch.sh
587 + t7501-commit.sh
588 + )
589 + # Bug #225601 - t0004 is not suitable for root perm
590 + # Bug #219839 - t1004 is not suitable for root perm
591 + # t0001-init.sh - check for init notices EPERM* fails
592 + local tests_nonroot=(
593 + t0001-init.sh
594 + t0004-unwritable.sh
595 + t0070-fundamental.sh
596 + t1004-read-tree-m-u-wf.sh
597 + t3700-add.sh
598 + t7300-clean.sh
599 + )
600 + # t9100 still fails with symlinks in SVN 1.7
601 + local test_svn=( t9100-git-svn-basic.sh )
602 +
603 + # Unzip is used only for the testcase code, not by any normal parts of Git.
604 + if ! has_version app-arch/unzip ; then
605 + einfo "Disabling tar-tree tests"
606 + disabled+=( t5000-tar-tree.sh )
607 + fi
608 +
609 + local cvs=0
610 + use cvs && let cvs=${cvs}+1
611 + if [[ ${EUID} -eq 0 ]] ; then
612 + if [[ ${cvs} -eq 1 ]] ; then
613 + ewarn "Skipping CVS tests because CVS does not work as root!"
614 + ewarn "You should retest with FEATURES=userpriv!"
615 + disabled+=( ${tests_cvs[@]} )
616 + fi
617 + einfo "Skipping other tests that require being non-root"
618 + disabled+=( ${tests_nonroot[@]} )
619 + else
620 + [[ ${cvs} -gt 0 ]] && \
621 + has_version dev-vcs/cvs && \
622 + let cvs=${cvs}+1
623 + [[ ${cvs} -gt 1 ]] && \
624 + has_version "dev-vcs/cvs[server]" && \
625 + let cvs=${cvs}+1
626 + if [[ ${cvs} -lt 3 ]] ; then
627 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
628 + disabled+=( ${tests_cvs[@]} )
629 + fi
630 + fi
631 +
632 + if ! use perl ; then
633 + einfo "Disabling tests that need Perl"
634 + disabled+=( ${tests_perl[@]} )
635 + fi
636 +
637 + einfo "Disabling tests that fail with SVN 1.7"
638 + disabled+=( ${test_svn[@]} )
639 +
640 + # Reset all previously disabled tests
641 + pushd t &>/dev/null || die
642 + local i
643 + for i in *.sh.DISABLED ; do
644 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
645 + done
646 + einfo "Disabled tests:"
647 + for i in ${disabled[@]} ; do
648 + if [[ -f "${i}" ]] ; then
649 + mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
650 + fi
651 + done
652 +
653 + # Avoid the test system removing the results because we want them ourselves
654 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
655 +
656 + # Clean old results first, must always run
657 + nonfatal git_emake clean
658 + popd &>/dev/null || die
659 +
660 + # Now run the tests, keep going if we hit an error, and don't terminate on
661 + # failure
662 + local rc
663 + einfo "Start test run"
664 + #MAKEOPTS=-j1
665 + nonfatal git_emake --keep-going test
666 + rc=$?
667 +
668 + # Display nice results, now print the results
669 + pushd t &>/dev/null || die
670 + nonfatal git_emake aggregate-results
671 +
672 + # And bail if there was a problem
673 + [[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
674 +}
675 +
676 +showpkgdeps() {
677 + local pkg=$1
678 + shift
679 + elog " $(printf "%-17s:" ${pkg}) ${@}"
680 +}
681 +
682 +pkg_postinst() {
683 + use emacs && elisp-site-regen
684 + elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
685 + elog "completion."
686 + elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
687 + elog "Note that the prompt bash code is now in that separate script"
688 + elog "These additional scripts need some dependencies:"
689 + echo
690 + showpkgdeps git-quiltimport "dev-util/quilt"
691 + showpkgdeps git-instaweb \
692 + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
693 + echo
694 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
695 +}
696 +
697 +pkg_postrm() {
698 + use emacs && elisp-site-regen
699 +}