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