Gentoo Archives: gentoo-commits

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