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.1.2.ebuild git-2.1.0.ebuild
Date: Thu, 02 Oct 2014 08:37:29
Message-Id: 20141002083723.E452F6C03@oystercatcher.gentoo.org
1 polynomial-c 14/10/02 08:37:23
2
3 Modified: ChangeLog
4 Added: git-2.1.2.ebuild
5 Removed: git-2.1.0.ebuild
6 Log:
7 Version bump. Removed old
8
9 (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
10
11 Revision Changes Path
12 1.289 dev-vcs/git/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.289&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.289&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?r1=1.288&r2=1.289
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v
21 retrieving revision 1.288
22 retrieving revision 1.289
23 diff -u -r1.288 -r1.289
24 --- ChangeLog 1 Oct 2014 12:54:59 -0000 1.288
25 +++ ChangeLog 2 Oct 2014 08:37:23 -0000 1.289
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.288 2014/10/01 12:54:59 zlogene Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.289 2014/10/02 08:37:23 polynomial-c Exp $
31 +
32 +*git-2.1.2 (02 Oct 2014)
33 +
34 + 02 Oct 2014; Lars Wendler <polynomial-c@g.o> -git-2.1.0.ebuild,
35 + +git-2.1.2.ebuild:
36 + Version bump. Removed old.
37
38 01 Oct 2014; Mikle Kolyada <zlogene@g.o> git-2.0.4.ebuild:
39 ia64 stable wrt bug #519736
40
41
42
43 1.1 dev-vcs/git/git-2.1.2.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-2.1.2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-2.1.2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: git-2.1.2.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.1.2.ebuild,v 1.1 2014/10/02 08:37:23 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:0 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 # 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 fixlocalpod
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 }