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