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