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