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