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