Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-vcs/git: ChangeLog git-2.3.1.ebuild
Date: Thu, 26 Feb 2015 12:52:51
Message-Id: 20150226125246.7CB941297F@oystercatcher.gentoo.org
1 polynomial-c 15/02/26 12:52:46
2
3 Modified: ChangeLog
4 Added: git-2.3.1.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.315 dev-vcs/git/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.315&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.315&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?r1=1.314&r2=1.315
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v
20 retrieving revision 1.314
21 retrieving revision 1.315
22 diff -u -r1.314 -r1.315
23 --- ChangeLog 6 Feb 2015 16:58:57 -0000 1.314
24 +++ ChangeLog 26 Feb 2015 12:52:46 -0000 1.315
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-vcs/git
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.314 2015/02/06 16:58:57 polynomial-c Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.315 2015/02/26 12:52:46 polynomial-c Exp $
30 +
31 +*git-2.3.1 (26 Feb 2015)
32 +
33 + 26 Feb 2015; Lars Wendler <polynomial-c@g.o> +git-2.3.1.ebuild:
34 + Version bump.
35
36 *git-2.3.0 (06 Feb 2015)
37
38
39
40
41 1.1 dev-vcs/git/git-2.3.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-2.3.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-2.3.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: git-2.3.1.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-2.3.1.ebuild,v 1.1 2015/02/26 12:52:46 polynomial-c Exp $
51
52 EAPI=5
53
54 GENTOO_DEPEND_ON_PERL=no
55
56 # bug #329479: git-remote-testgit is not multiple-version aware
57 PYTHON_COMPAT=( python2_{6,7} )
58 [[ ${PV} == *9999 ]] && SCM="git-2"
59 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
60 EGIT_MASTER=pu
61
62 inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
63
64 MY_PV="${PV/_rc/.rc}"
65 MY_P="${PN}-${MY_PV}"
66
67 DOC_VER=${MY_PV}
68
69 DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
70 HOMEPAGE="http://www.git-scm.com/"
71 if [[ ${PV} != *9999 ]]; then
72 SRC_URI_SUFFIX="xz"
73 SRC_URI_GOOG="http://git-core.googlecode.com/files"
74 SRC_URI_KORG="mirror://kernel/software/scm/git"
75 SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
76 ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
77 ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
78 ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
79 doc? (
80 ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
81 ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
82 )"
83 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
84 fi
85
86 LICENSE="GPL-2"
87 SLOT="0"
88 IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
89
90 # Common to both DEPEND and RDEPEND
91 CDEPEND="
92 dev-libs/openssl
93 sys-libs/zlib
94 pcre? ( dev-libs/libpcre )
95 perl? ( dev-lang/perl:=[-build(-)] )
96 tk? ( dev-lang/tk )
97 curl? (
98 net-misc/curl
99 webdav? ( dev-libs/expat )
100 )
101 emacs? ( virtual/emacs )
102 gnome-keyring? ( gnome-base/libgnome-keyring )"
103
104 RDEPEND="${CDEPEND}
105 gpg? ( app-crypt/gnupg )
106 mediawiki? (
107 dev-perl/HTML-Tree
108 dev-perl/MediaWiki-API
109 )
110 perl? ( dev-perl/Error
111 dev-perl/Net-SMTP-SSL
112 dev-perl/Authen-SASL
113 cgi? ( virtual/perl-CGI highlight? ( app-text/highlight ) )
114 cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
115 subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
116 )
117 python? ( gtk?
118 (
119 >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
120 >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
121 )
122 ${PYTHON_DEPS} )"
123
124 # This is how info docs are created with Git:
125 # .txt/asciidoc --(asciidoc)---------> .xml/docbook
126 # .xml/docbook --(docbook2texi.pl)--> .texi
127 # .texi --(makeinfo)---------> .info
128 DEPEND="${CDEPEND}
129 app-arch/cpio
130 doc? (
131 app-text/asciidoc
132 app-text/docbook2X
133 sys-apps/texinfo
134 app-text/xmlto
135 )
136 nls? ( sys-devel/gettext )
137 test? ( app-crypt/gnupg )"
138
139 # Live ebuild builds man pages and HTML docs, additionally
140 if [[ ${PV} == *9999 ]]; then
141 DEPEND="${DEPEND}
142 app-text/asciidoc"
143 fi
144
145 SITEFILE=50${PN}-gentoo.el
146 S="${WORKDIR}/${MY_P}"
147
148 REQUIRED_USE="
149 cgi? ( perl )
150 cvs? ( perl )
151 mediawiki? ( perl )
152 subversion? ( perl )
153 webdav? ( curl )
154 gtk? ( python )
155 python? ( ${PYTHON_REQUIRED_USE} )
156 "
157
158 pkg_setup() {
159 if use subversion && has_version "dev-vcs/subversion[dso]"; then
160 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
161 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
162 ewarn "have been warned."
163 fi
164 if use python ; then
165 python-single-r1_pkg_setup
166 fi
167 }
168
169 # This is needed because for some obscure reasons future calls to make don't
170 # pick up these exports if we export them in src_unpack()
171 exportmakeopts() {
172 local myopts
173
174 if use blksha1 ; then
175 myopts+=" BLK_SHA1=YesPlease"
176 elif use ppcsha1 ; then
177 myopts+=" PPC_SHA1=YesPlease"
178 fi
179
180 if use curl ; then
181 use webdav || myopts+=" NO_EXPAT=YesPlease"
182 else
183 myopts+=" NO_CURL=YesPlease"
184 fi
185
186 # broken assumptions, because of broken build system ...
187 myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
188 myopts+=" INSTALL=install TAR=tar"
189 myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
190 myopts+=" SANE_TOOL_PATH="
191 myopts+=" OLD_ICONV="
192 myopts+=" NO_EXTERNAL_GREP="
193
194 # For svn-fe
195 extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
196
197 # can't define this to null, since the entire makefile depends on it
198 sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
199
200 use iconv \
201 || myopts+=" NO_ICONV=YesPlease"
202 use nls \
203 || myopts+=" NO_GETTEXT=YesPlease"
204 use tk \
205 || myopts+=" NO_TCLTK=YesPlease"
206 use pcre \
207 && myopts+=" USE_LIBPCRE=yes" \
208 && extlibs+=" -lpcre"
209 use perl \
210 && myopts+=" INSTALLDIRS=vendor" \
211 || myopts+=" NO_PERL=YesPlease"
212 use python \
213 || myopts+=" NO_PYTHON=YesPlease"
214 use subversion \
215 || myopts+=" NO_SVN_TESTS=YesPlease"
216 use threads \
217 && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
218 || myopts+=" NO_PTHREADS=YesPlease"
219 use cvs \
220 || myopts+=" NO_CVS=YesPlease"
221 # Disabled until ~m68k-mint can be keyworded again
222 # if [[ ${CHOST} == *-mint* ]] ; then
223 # myopts+=" NO_MMAP=YesPlease"
224 # myopts+=" NO_IPV6=YesPlease"
225 # myopts+=" NO_STRLCPY=YesPlease"
226 # myopts+=" NO_MEMMEM=YesPlease"
227 # myopts+=" NO_MKDTEMP=YesPlease"
228 # myopts+=" NO_MKSTEMPS=YesPlease"
229 # fi
230 if [[ ${CHOST} == ia64-*-hpux* ]]; then
231 myopts+=" NO_NSEC=YesPlease"
232 fi
233 if [[ ${CHOST} == *-*-aix* ]]; then
234 myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
235 fi
236 if [[ ${CHOST} == *-solaris* ]]; then
237 myopts+=" NEEDS_LIBICONV=YesPlease"
238 fi
239
240 has_version '>=app-text/asciidoc-8.0' \
241 && myopts+=" ASCIIDOC8=YesPlease"
242 myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
243
244 # Bug 290465:
245 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
246 [[ "${CHOST}" == *-uclibc* ]] && \
247 myopts+=" NO_NSEC=YesPlease"
248
249 export MY_MAKEOPTS="${myopts}"
250 export EXTLIBS="${extlibs}"
251 }
252
253 src_unpack() {
254 if [[ ${PV} != *9999 ]]; then
255 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
256 cd "${S}"
257 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
258 use doc && \
259 cd "${S}"/Documentation && \
260 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
261 cd "${S}"
262 else
263 git-2_src_unpack
264 cd "${S}"
265 #cp "${FILESDIR}"/GIT-VERSION-GEN .
266 fi
267
268 }
269
270 src_prepare() {
271 # bug #350330 - automagic CVS when we don't want it is bad.
272 epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
273
274 # install mediawiki perl modules also in vendor_dir
275 # hack, needs better upstream solution
276 epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
277
278 epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
279
280 epatch_user
281
282 sed -i \
283 -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
284 -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
285 -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
286 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
287 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
288 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
289 Makefile contrib/svn-fe/Makefile || die "sed failed"
290
291 # Never install the private copy of Error.pm (bug #296310)
292 sed -i \
293 -e '/private-Error.pm/s,^,#,' \
294 perl/Makefile.PL
295
296 # Fix docbook2texi command
297 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
298 Documentation/Makefile || die "sed failed"
299
300 # Fix git-subtree missing DESTDIR
301 sed -i \
302 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
303 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
304 contrib/subtree/Makefile
305 }
306
307 git_emake() {
308 # bug #326625: PERL_PATH, PERL_MM_OPT
309 # bug #320647: PYTHON_PATH
310 PYTHON_PATH=""
311 use python && PYTHON_PATH="${PYTHON}"
312 emake ${MY_MAKEOPTS} \
313 DESTDIR="${D}" \
314 OPTCFLAGS="${CFLAGS}" \
315 OPTLDFLAGS="${LDFLAGS}" \
316 OPTCC="$(tc-getCC)" \
317 OPTAR="$(tc-getAR)" \
318 prefix="${EPREFIX}"/usr \
319 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
320 sysconfdir="${EPREFIX}"/etc \
321 PYTHON_PATH="${PYTHON_PATH}" \
322 PERL_MM_OPT="" \
323 GIT_TEST_OPTS="--no-color" \
324 V=1 \
325 "$@"
326 # This is the fix for bug #326625, but it also causes breakage, see bug
327 # #352693.
328 # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
329 }
330
331 src_configure() {
332 exportmakeopts
333 }
334
335 src_compile() {
336 if use perl ; then
337 git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
338 git_emake perl/perl.mak || die "emake perl/perl.mak failed"
339 fi
340 git_emake || die "emake failed"
341
342 if use emacs ; then
343 elisp-compile contrib/emacs/git{,-blame}.el
344 fi
345
346 if use perl && use cgi ; then
347 git_emake \
348 gitweb/gitweb.cgi \
349 || die "emake gitweb/gitweb.cgi failed"
350 fi
351
352 if [[ ${CHOST} == *-darwin* ]]; then
353 cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
354 git_emake || die "emake credential-osxkeychain"
355 fi
356
357 cd "${S}"/Documentation
358 if [[ ${PV} == *9999 ]] ; then
359 git_emake man \
360 || die "emake man failed"
361 if use doc ; then
362 git_emake info html \
363 || die "emake info html failed"
364 fi
365 else
366 if use doc ; then
367 git_emake info \
368 || die "emake info html failed"
369 fi
370 fi
371
372 if use subversion ; then
373 cd "${S}"/contrib/svn-fe
374 # by defining EXTLIBS we override the detection for libintl and
375 # libiconv, bug #516168
376 local nlsiconv=
377 use nls && use !elibc_glibc && nlsiconv+=" -lintl"
378 use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
379 git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
380 if use doc ; then
381 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
382 fi
383 cd "${S}"
384 fi
385
386 if use gnome-keyring ; then
387 cd "${S}"/contrib/credential/gnome-keyring
388 git_emake || die "emake git-credential-gnome-keyring failed"
389 fi
390
391 cd "${S}"/contrib/subtree
392 git_emake
393 use doc && git_emake doc
394
395 if use mediawiki ; then
396 cd "${S}"/contrib/mw-to-git
397 git_emake
398 fi
399 }
400
401 src_install() {
402 git_emake \
403 install || \
404 die "make install failed"
405
406 if [[ ${CHOST} == *-darwin* ]]; then
407 dobin contrib/credential/osxkeychain/git-credential-osxkeychain
408 fi
409
410 # Depending on the tarball and manual rebuild of the documentation, the
411 # manpages may exist in either OR both of these directories.
412 find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
413 find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
414
415 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
416 use doc && dodir /usr/share/doc/${PF}/html
417 for d in / /howto/ /technical/ ; do
418 docinto ${d}
419 dodoc Documentation${d}*.txt
420 use doc && dohtml -p ${d} Documentation${d}*.html
421 done
422 docinto /
423 # Upstream does not ship this pre-built :-(
424 use doc && doinfo Documentation/{git,gitman}.info
425
426 newbashcomp contrib/completion/git-completion.bash ${PN}
427 bashcomp_alias git gitk
428 # Not really a bash-completion file (bug #477920)
429 # but still needed uncompressed (bug #507480)
430 insinto /usr/share/${PN}
431 doins contrib/completion/git-prompt.sh
432
433 if use emacs ; then
434 elisp-install ${PN} contrib/emacs/git.{el,elc}
435 elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
436 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
437 # don't add automatically to the load-path, so the sitefile
438 # can do a conditional loading
439 touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
440 elisp-site-file-install "${FILESDIR}"/${SITEFILE}
441 fi
442
443 if use python && use gtk ; then
444 python_doscript "${S}"/contrib/gitview/gitview
445 dodoc "${S}"/contrib/gitview/gitview.txt
446 fi
447
448 #dobin contrib/fast-import/git-p4 # Moved upstream
449 #dodoc contrib/fast-import/git-p4.txt # Moved upstream
450 newbin contrib/fast-import/import-tars.perl import-tars
451 exeinto /usr/libexec/git-core/
452 newexe contrib/git-resurrect.sh git-resurrect
453
454 # git-subtree
455 cd "${S}"/contrib/subtree
456 git_emake install || die "Failed to emake install git-subtree"
457 if use doc ; then
458 git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
459 fi
460 newdoc README README.git-subtree
461 dodoc git-subtree.txt
462 cd "${S}"
463
464 if use mediawiki ; then
465 cd "${S}"/contrib/mw-to-git
466 git_emake install
467 cd "${S}"
468 fi
469
470 # diff-highlight
471 dobin contrib/diff-highlight/diff-highlight
472 newdoc contrib/diff-highlight/README README.diff-highlight
473
474 # git-jump
475 exeinto /usr/libexec/git-core/
476 doexe contrib/git-jump/git-jump
477 newdoc contrib/git-jump/README git-jump.txt
478
479 # git-contacts
480 exeinto /usr/libexec/git-core/
481 doexe contrib/contacts/git-contacts
482 dodoc contrib/contacts/git-contacts.txt
483
484 if use gnome-keyring ; then
485 cd "${S}"/contrib/credential/gnome-keyring
486 dobin git-credential-gnome-keyring
487 fi
488
489 if use subversion ; then
490 cd "${S}"/contrib/svn-fe
491 dobin svn-fe
492 dodoc svn-fe.txt
493 use doc && doman svn-fe.1 && dohtml svn-fe.html
494 cd "${S}"
495 fi
496
497 dodir /usr/share/${PN}/contrib
498 # The following are excluded:
499 # completion - installed above
500 # credential/gnome-keyring TODO
501 # diff-highlight - done above
502 # emacs - installed above
503 # examples - these are stuff that is not used in Git anymore actually
504 # git-jump - done above
505 # gitview - installed above
506 # p4import - excluded because fast-import has a better one
507 # patches - stuff the Git guys made to go upstream to other places
508 # persistent-https - TODO
509 # mw-to-git - TODO
510 # subtree - build seperately
511 # svnimport - use git-svn
512 # thunderbird-patch-inline - fixes thunderbird
513 for i in \
514 buildsystems convert-objects fast-import \
515 hg-to-git hooks remotes2config.sh rerere-train.sh \
516 stats workdir \
517 ; do
518 cp -rf \
519 "${S}"/contrib/${i} \
520 "${ED}"/usr/share/${PN}/contrib \
521 || die "Failed contrib ${i}"
522 done
523
524 if use perl && use cgi ; then
525 # We used to install in /usr/share/${PN}/gitweb
526 # but upstream installs in /usr/share/gitweb
527 # so we will install a symlink and use their location for compat with other
528 # distros
529 dosym /usr/share/gitweb /usr/share/${PN}/gitweb
530
531 # INSTALL discusses configuration issues, not just installation
532 docinto /
533 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
534 newdoc "${S}"/gitweb/README README.gitweb
535
536 find "${ED}"/usr/lib64/perl5/ \
537 -name .packlist \
538 -exec rm \{\} \;
539 else
540 rm -rf "${ED}"/usr/share/gitweb
541 fi
542
543 if ! use subversion ; then
544 rm -f "${ED}"/usr/libexec/git-core/git-svn \
545 "${ED}"/usr/share/man/man1/git-svn.1*
546 fi
547
548 if use xinetd ; then
549 insinto /etc/xinetd.d
550 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
551 fi
552
553 if use !prefix ; then
554 newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
555 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
556 systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
557 systemd_dounit "${FILESDIR}/git-daemon.socket"
558 fi
559
560 perl_delete_localpod
561 }
562
563 src_test() {
564 local disabled="" #t7004-tag.sh" #520270
565 local tests_cvs="t9200-git-cvsexportcommit.sh \
566 t9400-git-cvsserver-server.sh \
567 t9401-git-cvsserver-crlf.sh \
568 t9402-git-cvsserver-refs.sh \
569 t9600-cvsimport.sh \
570 t9601-cvsimport-vendor-branch.sh \
571 t9602-cvsimport-branches-tags.sh \
572 t9603-cvsimport-patchsets.sh \
573 t9604-cvsimport-timestamps.sh"
574 local tests_perl="t3701-add-interactive.sh \
575 t5502-quickfetch.sh \
576 t5512-ls-remote.sh \
577 t5520-pull.sh \
578 t7106-reset-unborn-branch.sh \
579 t7501-commit.sh"
580 # Bug #225601 - t0004 is not suitable for root perm
581 # Bug #219839 - t1004 is not suitable for root perm
582 # t0001-init.sh - check for init notices EPERM* fails
583 local tests_nonroot="t0001-init.sh \
584 t0004-unwritable.sh \
585 t0070-fundamental.sh \
586 t1004-read-tree-m-u-wf.sh \
587 t3700-add.sh \
588 t7300-clean.sh"
589 # t9100 still fails with symlinks in SVN 1.7
590 local test_svn="t9100-git-svn-basic.sh"
591
592 # Unzip is used only for the testcase code, not by any normal parts of Git.
593 if ! has_version app-arch/unzip ; then
594 einfo "Disabling tar-tree tests"
595 disabled="${disabled} t5000-tar-tree.sh"
596 fi
597
598 cvs=0
599 use cvs && let cvs=$cvs+1
600 if [[ ${EUID} -eq 0 ]]; then
601 if [[ $cvs -eq 1 ]]; then
602 ewarn "Skipping CVS tests because CVS does not work as root!"
603 ewarn "You should retest with FEATURES=userpriv!"
604 disabled="${disabled} ${tests_cvs}"
605 fi
606 einfo "Skipping other tests that require being non-root"
607 disabled="${disabled} ${tests_nonroot}"
608 else
609 [[ $cvs -gt 0 ]] && \
610 has_version dev-vcs/cvs && \
611 let cvs=$cvs+1
612 [[ $cvs -gt 1 ]] && \
613 has_version "dev-vcs/cvs[server]" && \
614 let cvs=$cvs+1
615 if [[ $cvs -lt 3 ]]; then
616 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
617 disabled="${disabled} ${tests_cvs}"
618 fi
619 fi
620
621 if ! use perl ; then
622 einfo "Disabling tests that need Perl"
623 disabled="${disabled} ${tests_perl}"
624 fi
625
626 einfo "Disabling tests that fail with SVN 1.7"
627 disabled="${disabled} ${test_svn}"
628
629 # Reset all previously disabled tests
630 cd "${S}/t"
631 for i in *.sh.DISABLED ; do
632 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
633 done
634 einfo "Disabled tests:"
635 for i in ${disabled} ; do
636 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
637 done
638
639 # Avoid the test system removing the results because we want them ourselves
640 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
641 -i "${S}"/t/Makefile
642
643 # Clean old results first, must always run
644 cd "${S}/t"
645 nonfatal git_emake clean
646
647 # Now run the tests, keep going if we hit an error, and don't terminate on
648 # failure
649 cd "${S}"
650 einfo "Start test run"
651 #MAKEOPTS=-j1
652 nonfatal git_emake --keep-going test
653 rc=$?
654
655 # Display nice results, now print the results
656 cd "${S}/t"
657 nonfatal git_emake aggregate-results
658
659 # And bail if there was a problem
660 [ $rc -eq 0 ] || die "tests failed. Please file a bug."
661 }
662
663 showpkgdeps() {
664 local pkg=$1
665 shift
666 elog " $(printf "%-17s:" ${pkg}) ${@}"
667 }
668
669 pkg_postinst() {
670 use emacs && elisp-site-regen
671 einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
672 einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
673 einfo "Note that the prompt bash code is now in that separate script"
674 elog "These additional scripts need some dependencies:"
675 echo
676 showpkgdeps git-quiltimport "dev-util/quilt"
677 showpkgdeps git-instaweb \
678 "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
679 echo
680 }
681
682 pkg_postrm() {
683 use emacs && elisp-site-regen
684 }