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: Tue, 30 Aug 2022 19:36:41
Message-Id: 1661888053.2c5b1e758ac04af2697edcad8d4532cb61d26f58.sam@gentoo
1 commit: 2c5b1e758ac04af2697edcad8d4532cb61d26f58
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 30 19:33:08 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 30 19:34:13 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c5b1e75
7
8 dev-vcs/git: add 2.37.3
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.3.ebuild | 648 ++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 651 insertions(+)
15
16 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
17 index 17a2eeb7b230..621d0673fa49 100644
18 --- a/dev-vcs/git/Manifest
19 +++ b/dev-vcs/git/Manifest
20 @@ -9,6 +9,7 @@ DIST git-2.36.1.tar.xz 7004044 BLAKE2B 99f54efb4ea1d8db0e3afd3dc9780cb37fc853e47
21 DIST git-2.37.0.tar.xz 6978796 BLAKE2B 204a06a6d35f4f1960d031c09eeef43273982e95c5825ab813899de3d30018c9e8d88425a51ce9447d4ae6183de1270017c6e0ecc9d601df897281e107def145 SHA512 2ae3c845c9d0e0f5245e47f95c958c86a4aa2c47dfe31bff6fc81b2434d2e9402b7eced18700c04ba7158ed6a72807a81c4cde6a26dd30c969b4267b8fce4d0a
22 DIST git-2.37.1.tar.xz 6980388 BLAKE2B b5423e4628f8c727aa74b3f7c7da12d46814eb45adfe84bf57e87a33e85a0a793ff690f4c1f7d2da4824bc8dd7d1df1c06cbe96adae857177d3fb204941b53ef SHA512 3c9cad6b4757f425ee53996d8d80db2226b246513cbcec9011022e02e4235d7ec38c7c1aada73bb3c9279a91d1aaf8664633356ce1dce847e0d371f702a5b766
23 DIST git-2.37.2.tar.xz 6985408 BLAKE2B dcc25fe1691b43e439e11a270d35d17cd5dbf255e11579ef1ebbfcfb46fac65ca9faca6db5713a4d239a02df4e50902dea8eb94720ce0bd83b461f318812af44 SHA512 a26d83f4eeb71d49c427ced9509861f7677e13e806da729f369ca39b795f8417b789a0adec859f44716f7fbc1190f7d1e6e518e774ad95c89e88442ac125b9c2
24 +DIST git-2.37.3.tar.xz 6987464 BLAKE2B b672ed0a99532b2e2e69babbea9155e39f05590a76f55791ffed6ce4ef8b68d8e306a0a23819af26f34fcf3d16211c3a10ec58d86d81262f7a1261d0e51b1305 SHA512 9120050b01d8ac8d9f9e85f19cb84dc90c28f3beadc3ea94da94845f2eb5e35aa83eee8447a7ecef5190b8eb5d01be621be2e82bb3020e51e05037cd1fa9b58f
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 @@ -20,6 +21,7 @@ DIST git-htmldocs-2.36.1.tar.xz 1426284 BLAKE2B 2213f870b7fe35cc76ce8654ed8c50c0
29 DIST git-htmldocs-2.37.0.tar.xz 1444540 BLAKE2B 9249de4b49d0812cf5f3ceb0a062b396ca4f9482232c69c75177201d19c4094ca79acb61d47c9a80f9db8749ac634bb2cc3bb2fa96bd6b4a34798cf1da2dd74c SHA512 8f9ff2bfdb55db41805f4366c6eb6f116e37774b7dbbac193c4a817357c47c44664eb69eb1b55acfaabc513dbbd2393d7a93295b4443630f65bd6791fc742a87
30 DIST git-htmldocs-2.37.1.tar.xz 1445040 BLAKE2B a2f748787f8008d67ae065b3efb34b04df76d2d96ec933f4e7af8d4d2580bf9d163c52a6bfe81c030af59a61ac8e02edfca30a988f1e24b1044271869e9426df SHA512 0aba312ff889875873f91e86689b7e02f4a9953e2f9339f84a94a41ba185503dbe265547c8b4bb7f128519ae8f9f0a288903e0490af23387a5bf81e7cf3b4ddd
31 DIST git-htmldocs-2.37.2.tar.xz 1447008 BLAKE2B fc9df5e4af5ca0ec0a085cc0e2d520763eafe7a18fcfcbe9b1b254fc1eb0ee1974145872b2914ccaab67a607c0fc68fe6551d2f0baec9de2ed9cb3e69a394cdf SHA512 d54573a66153db448f1d776f8d855e2471d60733f8ed2ebf84b428a81b4e37417d53e05ca74730e2ab4119cd08844fd4a4e4e5361b5cd8fddb33f45c3f633d59
32 +DIST git-htmldocs-2.37.3.tar.xz 1447620 BLAKE2B 4efb86fb5431fd96ec4bcad7ecd9d5ae1d3f81f57f17dab4d8343948758f66b549b2442330b20cdb4ecd96f2029f4e7a376de5561fd9eda70acc46d2cffd7090 SHA512 ecc483a1fecf8c056a57e14a59950dc8a00f7940453dd5e2ccfd8dab966a9fee47178a7bbf8988e2c9a67ea6d84ffc33be790c49f812fb0ba661b57b7ff7b6ef
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 @@ -31,3 +33,4 @@ DIST git-manpages-2.36.1.tar.xz 503680 BLAKE2B d43fc90584b2f9e3bae30460f0c545b4f
37 DIST git-manpages-2.37.0.tar.xz 509992 BLAKE2B 67a1bc6e3a92b69d30b5e977b170cf11ac37d85dc318b35e12b728b8e17d6cfaaca7bbd343da8745be2547be8ad3dd9d930a24c0ba716dcb96aaf0610e25b11d SHA512 d739670caa11b70f3ed50665764e78a5b4c3d3d912976898d22d10d45ba3e2599b9e13d2a2502f97076a9d88b5f9e67bb11d204c8c43149b81e8243d28981711
38 DIST git-manpages-2.37.1.tar.xz 510044 BLAKE2B f1f79dcbb72d05258dd30ccaf76c2726de5400555d189a112786c2cecbe5cdd27879f27335ed48c84315c496bc28aa0f95e7498ee3c2672dea3071e274a1693b SHA512 5dec5aa33e707a3c3520c6391dddc8812c3c5d5f72c13a7a5f194dac08c5b73dd59b3ab777d699fba7ef5088767ee796b12de936f196224fee0ffdc31c8b8f62
39 DIST git-manpages-2.37.2.tar.xz 510004 BLAKE2B f31cd031bead56a97a9ec9dc42ee3be9873e1df6f60cf00a26944f994d948b05555daf67cf3935b9cff636774dafb638aa07608536360c710f2d6a6a3d5e02f3 SHA512 c53cb4d1629e0d19c7523f9a072fee981cfce40363bf62dc090fcc54471e9e27f6da851b10a90274dcef1790301f402e72640fd21347cde895b051de4909c584
40 +DIST git-manpages-2.37.3.tar.xz 510096 BLAKE2B 0bc0b8c1818a06a6c7126119c04d2936bd38e997027bb31be5ad6bea2b43d71c5e9a76a29c576d84bd00c11f09bca7a67aa78a72f0171b41b93f6322c3b23808 SHA512 b25d4925f64e4de220dc9133d6e3ed13a397b160c27550c8700b76226f2b3a1611aec9ee24110ae16ebaceedc6617c6a04aa1b44270c7a0f166dd40d8f2f1132
41
42 diff --git a/dev-vcs/git/git-2.37.3.ebuild b/dev-vcs/git/git-2.37.3.ebuild
43 new file mode 100644
44 index 000000000000..cdfdd0b66a85
45 --- /dev/null
46 +++ b/dev-vcs/git/git-2.37.3.ebuild
47 @@ -0,0 +1,648 @@
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 +safe-directory 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 + if ! use safe-directory ; then
304 + # This patch neuters the "safe directory" detection.
305 + # bugs #838271, #838223
306 + PATCHES+=(
307 + "${FILESDIR}"/git-2.37.2-unsafe-directory.patch
308 + )
309 + fi
310 +
311 + default
312 +
313 + if use prefix ; then
314 + # bug #757309
315 + eapply "${FILESDIR}"/git-2.37.2-darwin-prefix-gettext.patch
316 + fi
317 +
318 + sed -i \
319 + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
320 + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
321 + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
322 + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
323 + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
324 + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
325 + Makefile || die
326 +
327 + # Fix docbook2texi command
328 + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
329 + Documentation/Makefile || die
330 +}
331 +
332 +git_emake() {
333 + # bug #320647: PYTHON_PATH
334 + local PYTHON_PATH=""
335 + use perforce && PYTHON_PATH="${PYTHON}"
336 + emake ${MY_MAKEOPTS} \
337 + prefix="${EPREFIX}"/usr \
338 + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
339 + perllibdir="$(use perl && perl_get_raw_vendorlib)" \
340 + sysconfdir="${EPREFIX}"/etc \
341 + GIT_TEST_OPTS="--no-color" \
342 + OPTAR="$(tc-getAR)" \
343 + OPTCC="$(tc-getCC)" \
344 + OPTCFLAGS="${CFLAGS}" \
345 + OPTLDFLAGS="${LDFLAGS}" \
346 + PERL_PATH="${EPREFIX}/usr/bin/perl" \
347 + PERL_MM_OPT="" \
348 + PYTHON_PATH="${PYTHON_PATH}" \
349 + V=1 \
350 + "$@"
351 +}
352 +
353 +src_configure() {
354 + exportmakeopts
355 +}
356 +
357 +src_compile() {
358 + git_emake || die "emake failed"
359 +
360 + if use perl && use cgi ; then
361 + git_emake gitweb || die "emake gitweb (cgi) failed"
362 + fi
363 +
364 + if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
365 + pushd contrib/credential/osxkeychain &>/dev/null || die
366 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
367 + || die "emake credential-osxkeychain"
368 + popd &>/dev/null || die
369 + fi
370 +
371 + pushd Documentation &>/dev/null || die
372 + if [[ ${PV} == *9999 ]] ; then
373 + git_emake man || die "emake man failed"
374 + if use doc ; then
375 + git_emake info html || die "emake info html failed"
376 + fi
377 + else
378 + if use doc ; then
379 + git_emake info || die "emake info html failed"
380 + fi
381 + fi
382 + popd &>/dev/null || die
383 +
384 + if use gnome-keyring ; then
385 + pushd contrib/credential/libsecret &>/dev/null || die
386 + git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
387 + popd &>/dev/null || die
388 + fi
389 +
390 + pushd contrib/subtree &>/dev/null || die
391 + git_emake git-subtree || die
392 + # git-subtree.1 requires the full USE=doc dependency stack
393 + use doc && git_emake git-subtree.html git-subtree.1
394 + popd &>/dev/null || die
395 +
396 + pushd contrib/diff-highlight &>/dev/null || die
397 + git_emake || die
398 + popd &>/dev/null || die
399 +
400 + if use mediawiki ; then
401 + pushd contrib/mw-to-git &>/dev/null || die
402 + git_emake || die
403 + popd &>/dev/null || die
404 +
405 + fi
406 +}
407 +
408 +src_install() {
409 + git_emake DESTDIR="${D}" install || die "make install failed"
410 +
411 + if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then
412 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
413 + fi
414 +
415 + # Depending on the tarball and manual rebuild of the documentation, the
416 + # manpages may exist in either OR both of these directories.
417 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
418 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
419 + dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
420 + use doc && dodir /usr/share/doc/${PF}/html
421 + local d
422 + for d in / /howto/ /technical/ ; do
423 + docinto ${d}
424 + dodoc Documentation${d}*.txt
425 + if use doc ; then
426 + docinto ${d}/html
427 + dodoc Documentation${d}*.html
428 + fi
429 + done
430 + docinto /
431 + # Upstream does not ship this pre-built :-(
432 + use doc && doinfo Documentation/{git,gitman}.info
433 +
434 + newbashcomp contrib/completion/git-completion.bash ${PN}
435 + bashcomp_alias git gitk
436 + # Not really a bash-completion file (bug #477920)
437 + # but still needed uncompressed (bug #507480)
438 + insinto /usr/share/${PN}
439 + doins contrib/completion/git-prompt.sh
440 +
441 + #dobin contrib/fast-import/git-p4 # Moved upstream
442 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
443 + newbin contrib/fast-import/import-tars.perl import-tars
444 + exeinto /usr/libexec/git-core/
445 + newexe contrib/git-resurrect.sh git-resurrect
446 +
447 + # git-subtree
448 + pushd contrib/subtree &>/dev/null || die
449 + git_emake DESTDIR="${D}" install || die "Failed to emake install for git-subtree"
450 + if use doc ; then
451 + # Do not move git subtree install-man outside USE=doc!
452 + git_emake DESTDIR="${D}" install-man install-html || die "Failed to emake install-html install-man for git-subtree"
453 + fi
454 + newdoc README README.git-subtree
455 + dodoc git-subtree.txt
456 + popd &>/dev/null || die
457 +
458 + if use mediawiki ; then
459 + pushd contrib/mw-to-git &>/dev/null || die
460 + git_emake DESTDIR="${D}" install
461 + popd &>/dev/null || die
462 + fi
463 +
464 + # diff-highlight
465 + dobin contrib/diff-highlight/diff-highlight
466 + newdoc contrib/diff-highlight/README README.diff-highlight
467 +
468 + # git-jump
469 + exeinto /usr/libexec/git-core/
470 + doexe contrib/git-jump/git-jump
471 + newdoc contrib/git-jump/README git-jump.txt
472 +
473 + # git-contacts
474 + exeinto /usr/libexec/git-core/
475 + doexe contrib/contacts/git-contacts
476 + dodoc contrib/contacts/git-contacts.txt
477 +
478 + if use gnome-keyring ; then
479 + pushd contrib/credential/libsecret &>/dev/null || die
480 + dobin git-credential-libsecret
481 + popd &>/dev/null || die
482 + fi
483 +
484 + dodir /usr/share/${PN}/contrib
485 + # The following are excluded:
486 + # completion - installed above
487 + # diff-highlight - done above
488 + # emacs - removed upstream
489 + # examples - these are stuff that is not used in Git anymore actually
490 + # git-jump - done above
491 + # gitview - installed above
492 + # p4import - excluded because fast-import has a better one
493 + # patches - stuff the Git guys made to go upstream to other places
494 + # persistent-https - TODO
495 + # mw-to-git - TODO
496 + # subtree - build seperately
497 + # svnimport - use git-svn
498 + # thunderbird-patch-inline - fixes thunderbird
499 + local contrib_objects=(
500 + buildsystems
501 + fast-import
502 + hg-to-git
503 + hooks
504 + remotes2config.sh
505 + rerere-train.sh
506 + stats
507 + workdir
508 + )
509 + local i
510 + for i in "${contrib_objects[@]}" ; do
511 + cp -rf \
512 + "${S}"/contrib/${i} \
513 + "${ED}"/usr/share/${PN}/contrib \
514 + || die "Failed contrib ${i}"
515 + done
516 +
517 + if use perl && use cgi ; then
518 + # We used to install in /usr/share/${PN}/gitweb
519 + # but upstream installs in /usr/share/gitweb
520 + # so we will install a symlink and use their location for compat with other
521 + # distros
522 + dosym ../gitweb /usr/share/${PN}/gitweb
523 +
524 + # INSTALL discusses configuration issues, not just installation
525 + docinto /
526 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
527 + newdoc "${S}"/gitweb/README README.gitweb
528 +
529 + for d in "${ED}"/usr/lib{,64}/perl5/ ; do
530 + if [[ -d "${d}" ]] ; then
531 + find "${d}" -name .packlist -delete || die
532 + fi
533 + done
534 + else
535 + rm -rf "${ED}"/usr/share/gitweb
536 + fi
537 +
538 + if ! use subversion ; then
539 + rm -f "${ED}"/usr/libexec/git-core/git-svn \
540 + "${ED}"/usr/share/man/man1/git-svn.1*
541 + fi
542 +
543 + if use xinetd ; then
544 + insinto /etc/xinetd.d
545 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
546 + fi
547 +
548 + if ! use prefix ; then
549 + newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon
550 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
551 + systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" \
552 + "git-daemon@.service"
553 + systemd_dounit "${FILESDIR}/git-daemon.socket"
554 + fi
555 +
556 + perl_delete_localpod
557 +
558 + # Remove disabled linguas
559 + # we could remove sources in src_prepare, but install does not
560 + # handle missing locale dir well
561 + rm_loc() {
562 + if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then
563 + rm -r "${ED}/usr/share/locale/${1}" || die
564 + fi
565 + }
566 + plocale_for_each_disabled_locale rm_loc
567 +}
568 +
569 +src_test() {
570 + local disabled=()
571 + local tests_cvs=(
572 + t9200-git-cvsexportcommit.sh
573 + t9400-git-cvsserver-server.sh
574 + t9401-git-cvsserver-crlf.sh
575 + t9402-git-cvsserver-refs.sh
576 + t9600-cvsimport.sh
577 + t9601-cvsimport-vendor-branch.sh
578 + t9602-cvsimport-branches-tags.sh
579 + t9603-cvsimport-patchsets.sh
580 + t9604-cvsimport-timestamps.sh
581 + )
582 + local tests_perl=(
583 + t3701-add-interactive.sh
584 + t5502-quickfetch.sh
585 + t5512-ls-remote.sh
586 + t5520-pull.sh
587 + t7106-reset-unborn-branch.sh
588 + t7501-commit.sh
589 + )
590 + # Bug #225601 - t0004 is not suitable for root perm
591 + # Bug #219839 - t1004 is not suitable for root perm
592 + # t0001-init.sh - check for init notices EPERM* fails
593 + local tests_nonroot=(
594 + t0001-init.sh
595 + t0004-unwritable.sh
596 + t0070-fundamental.sh
597 + t1004-read-tree-m-u-wf.sh
598 + t3700-add.sh
599 + t7300-clean.sh
600 + )
601 + # t9100 still fails with symlinks in SVN 1.7
602 + local test_svn=( t9100-git-svn-basic.sh )
603 +
604 + # Unzip is used only for the testcase code, not by any normal parts of Git.
605 + if ! has_version app-arch/unzip ; then
606 + einfo "Disabling tar-tree tests"
607 + disabled+=( t5000-tar-tree.sh )
608 + fi
609 +
610 + local cvs=0
611 + use cvs && let cvs=${cvs}+1
612 + if [[ ${EUID} -eq 0 ]] ; then
613 + if [[ ${cvs} -eq 1 ]] ; then
614 + ewarn "Skipping CVS tests because CVS does not work as root!"
615 + ewarn "You should retest with FEATURES=userpriv!"
616 + disabled+=( ${tests_cvs[@]} )
617 + fi
618 + einfo "Skipping other tests that require being non-root"
619 + disabled+=( ${tests_nonroot[@]} )
620 + else
621 + [[ ${cvs} -gt 0 ]] && \
622 + has_version dev-vcs/cvs && \
623 + let cvs=${cvs}+1
624 + [[ ${cvs} -gt 1 ]] && \
625 + has_version "dev-vcs/cvs[server]" && \
626 + let cvs=${cvs}+1
627 + if [[ ${cvs} -lt 3 ]] ; then
628 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
629 + disabled+=( ${tests_cvs[@]} )
630 + fi
631 + fi
632 +
633 + if ! use perl ; then
634 + einfo "Disabling tests that need Perl"
635 + disabled+=( ${tests_perl[@]} )
636 + fi
637 +
638 + einfo "Disabling tests that fail with SVN 1.7"
639 + disabled+=( ${test_svn[@]} )
640 +
641 + # Reset all previously disabled tests
642 + pushd t &>/dev/null || die
643 + local i
644 + for i in *.sh.DISABLED ; do
645 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
646 + done
647 + einfo "Disabled tests:"
648 + for i in ${disabled[@]} ; do
649 + if [[ -f "${i}" ]] ; then
650 + mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
651 + fi
652 + done
653 +
654 + # Avoid the test system removing the results because we want them ourselves
655 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die
656 +
657 + # Clean old results first, must always run
658 + nonfatal git_emake clean
659 + popd &>/dev/null || die
660 +
661 + # Now run the tests, keep going if we hit an error, and don't terminate on
662 + # failure
663 + local rc
664 + einfo "Start test run"
665 + #MAKEOPTS=-j1
666 + nonfatal git_emake --keep-going test
667 + rc=$?
668 +
669 + # Display nice results, now print the results
670 + pushd t &>/dev/null || die
671 + nonfatal git_emake aggregate-results
672 +
673 + # And bail if there was a problem
674 + [[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
675 +}
676 +
677 +showpkgdeps() {
678 + local pkg=$1
679 + shift
680 + elog " $(printf "%-17s:" ${pkg}) ${@}"
681 +}
682 +
683 +pkg_postinst() {
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 +}