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