Gentoo Archives: gentoo-commits

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