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