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: git-1.8.5.4.ebuild ChangeLog
Date: Thu, 06 Feb 2014 08:41:57
Message-Id: 20140206084152.D3EA52004C@flycatcher.gentoo.org
1 polynomial-c 14/02/06 08:41:52
2
3 Modified: ChangeLog
4 Added: git-1.8.5.4.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.244 dev-vcs/git/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.244&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.244&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?r1=1.243&r2=1.244
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v
20 retrieving revision 1.243
21 retrieving revision 1.244
22 diff -u -r1.243 -r1.244
23 --- ChangeLog 4 Feb 2014 09:38:56 -0000 1.243
24 +++ ChangeLog 6 Feb 2014 08:41:52 -0000 1.244
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.243 2014/02/04 09:38:56 polynomial-c Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.244 2014/02/06 08:41:52 polynomial-c Exp $
30 +
31 +*git-1.8.5.4 (06 Feb 2014)
32 +
33 + 06 Feb 2014; Lars Wendler <polynomial-c@g.o> +git-1.8.5.4.ebuild:
34 + Version bump.
35
36 04 Feb 2014; Lars Wendler <polynomial-c@g.o> git-1.8.1.5.ebuild,
37 git-1.8.1.5-r1.ebuild, git-1.8.2.1.ebuild, git-1.8.4.5.ebuild,
38
39
40
41 1.1 dev-vcs/git/git-1.8.5.4.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.8.5.4.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.8.5.4.ebuild?rev=1.1&content-type=text/plain
45
46 Index: git-1.8.5.4.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-1.8.5.4.ebuild,v 1.1 2014/02/06 08:41:52 polynomial-c 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
61 inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${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 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
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 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 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 test? (
139 app-crypt/gnupg
140 )"
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-1.8.5-optional-cvs.patch
276
277 # honor and correctly quote DISTDIR (from upstream git master)
278 epatch "${FILESDIR}"/git-1.8.5-mw-destdir.patch
279
280 # install mediawiki perl modules also in vendor_dir
281 # hack, needs better upstream solution
282 epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
283
284 epatch_user
285
286 sed -i \
287 -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
288 -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
289 -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
290 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
291 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
292 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
293 Makefile contrib/svn-fe/Makefile || die "sed failed"
294
295 # Never install the private copy of Error.pm (bug #296310)
296 sed -i \
297 -e '/private-Error.pm/s,^,#,' \
298 perl/Makefile.PL
299
300 # Fix docbook2texi command
301 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
302 Documentation/Makefile || die "sed failed"
303
304 # Fix git-subtree missing DESTDIR
305 sed -i \
306 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
307 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
308 contrib/subtree/Makefile
309 }
310
311 git_emake() {
312 # bug #326625: PERL_PATH, PERL_MM_OPT
313 # bug #320647: PYTHON_PATH
314 PYTHON_PATH=""
315 use python && PYTHON_PATH="${PYTHON}"
316 emake ${MY_MAKEOPTS} \
317 DESTDIR="${D}" \
318 OPTCFLAGS="${CFLAGS}" \
319 OPTLDFLAGS="${LDFLAGS}" \
320 OPTCC="$(tc-getCC)" \
321 OPTAR="$(tc-getAR)" \
322 prefix="${EPREFIX}"/usr \
323 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
324 sysconfdir="${EPREFIX}"/etc \
325 PYTHON_PATH="${PYTHON_PATH}" \
326 PERL_MM_OPT="" \
327 GIT_TEST_OPTS="--no-color" \
328 V=1 \
329 "$@"
330 # This is the fix for bug #326625, but it also causes breakage, see bug
331 # #352693.
332 # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
333 }
334
335 src_configure() {
336 exportmakeopts
337 }
338
339 src_compile() {
340 if use perl ; then
341 git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
342 git_emake perl/perl.mak || die "emake perl/perl.mak failed"
343 fi
344 git_emake || die "emake failed"
345
346 if use emacs ; then
347 elisp-compile contrib/emacs/git{,-blame}.el
348 fi
349
350 if use perl && use cgi ; then
351 git_emake \
352 gitweb/gitweb.cgi \
353 || die "emake gitweb/gitweb.cgi failed"
354 fi
355
356 if [[ ${CHOST} == *-darwin* ]]; then
357 cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
358 git_emake || die "emake credential-osxkeychain"
359 fi
360
361 cd "${S}"/Documentation
362 if [[ ${PV} == *9999 ]] ; then
363 git_emake man \
364 || die "emake man failed"
365 if use doc ; then
366 git_emake info html \
367 || die "emake info html failed"
368 fi
369 else
370 if use doc ; then
371 git_emake info \
372 || die "emake info html failed"
373 fi
374 fi
375
376 if use subversion ; then
377 cd "${S}"/contrib/svn-fe
378 git_emake EXTLIBS="${EXTLIBS}" || die "emake svn-fe failed"
379 if use doc ; then
380 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
381 fi
382 cd "${S}"
383 fi
384
385 if use gnome-keyring ; then
386 cd "${S}"/contrib/credential/gnome-keyring
387 git_emake || die "emake git-credential-gnome-keyring failed"
388 fi
389
390 cd "${S}"/contrib/subtree
391 git_emake
392 use doc && git_emake doc
393
394 if use mediawiki ; then
395 cd "${S}"/contrib/mw-to-git
396 git_emake
397 fi
398 }
399
400 src_install() {
401 git_emake \
402 install || \
403 die "make install failed"
404
405 if [[ ${CHOST} == *-darwin* ]]; then
406 dobin contrib/credential/osxkeychain/git-credential-osxkeychain
407 fi
408
409 # Depending on the tarball and manual rebuild of the documentation, the
410 # manpages may exist in either OR both of these directories.
411 find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
412 find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
413
414 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
415 use doc && dodir /usr/share/doc/${PF}/html
416 for d in / /howto/ /technical/ ; do
417 docinto ${d}
418 dodoc Documentation${d}*.txt
419 use doc && dohtml -p ${d} Documentation${d}*.html
420 done
421 docinto /
422 # Upstream does not ship this pre-built :-(
423 use doc && doinfo Documentation/{git,gitman}.info
424
425 newbashcomp contrib/completion/git-completion.bash ${PN}
426 # Not really a bash-completion file (bug #477920)
427 dodoc 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 }