Gentoo Archives: gentoo-commits

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