/[gentoo-x86]/dev-vcs/git/git-9999.ebuild
Gentoo

Contents of /dev-vcs/git/git-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.40 - (hide annotations) (download)
Thu Dec 6 18:59:29 2012 UTC (5 years, 10 months ago) by robbat2
Branch: MAIN
Changes since 1.39: +3 -3 lines
Bug #441740: Update doc build deps.

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, unsigned Manifest commit)

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

  ViewVC Help
Powered by ViewVC 1.1.20