Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/git: ChangeLog git-9999.ebuild git-1.6.2.2-r1.ebuild
Date: Fri, 03 Apr 2009 09:02:21
Message-Id: E1LpfI2-0002rP-Q3@stork.gentoo.org
1 robbat2 09/04/03 09:02:18
2
3 Modified: ChangeLog
4 Added: git-9999.ebuild git-1.6.2.2-r1.ebuild
5 Log:
6 Bug #238023 - add an scm-capable ebuild for Git, use it to tidy up the ebuild a bit too.
7 (Portage version: 2.2_rc27/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.327 dev-util/git/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?rev=1.327&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?rev=1.327&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?r1=1.326&r2=1.327
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v
19 retrieving revision 1.326
20 retrieving revision 1.327
21 diff -p -w -b -B -u -u -r1.326 -r1.327
22 --- ChangeLog 3 Apr 2009 06:15:09 -0000 1.326
23 +++ ChangeLog 3 Apr 2009 09:02:18 -0000 1.327
24 @@ -1,6 +1,14 @@
25 # ChangeLog for dev-util/git
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.326 2009/04/03 06:15:09 robbat2 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.327 2009/04/03 09:02:18 robbat2 Exp $
29 +
30 +*git-9999 (03 Apr 2009)
31 +*git-1.6.2.2-r1 (03 Apr 2009)
32 +
33 + 03 Apr 2009; Robin H. Johnson <robbat2@g.o> +git-1.6.2.2-r1.ebuild,
34 + +git-9999.ebuild:
35 + Bug #238023 - add an scm-capable ebuild for Git, use it to tidy up the
36 + ebuild a bit too.
37
38 *git-1.6.2.2 (03 Apr 2009)
39
40
41
42
43 1.1 dev-util/git/git-9999.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-9999.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-9999.ebuild?rev=1.1&content-type=text/plain
47
48 Index: git-9999.ebuild
49 ===================================================================
50 # Copyright 1999-2009 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-9999.ebuild,v 1.1 2009/04/03 09:02:18 robbat2 Exp $
53
54 EAPI=2
55
56 inherit toolchain-funcs eutils elisp-common perl-module bash-completion
57 [ "$PV" == "9999" ] && inherit git
58
59 MY_PV="${PV/_rc/.rc}"
60 MY_P="${PN}-${MY_PV}"
61
62 DOC_VER=${MY_PV}
63
64 DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
65 HOMEPAGE="http://www.git-scm.com/"
66 if [ "$PV" != "9999" ]; then
67 SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2
68 mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2
69 doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )"
70 else
71 SRC_URI=""
72 EGIT_BRANCH="master"
73 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
74 # EGIT_REPO_URI="http://www.kernel.org/pub/scm/git/git.git"
75 fi
76
77 LICENSE="GPL-2"
78 SLOT="0"
79 KEYWORDS=""
80 IUSE="curl cgi doc emacs gtk iconv mozsha1 perl ppcsha1 tk threads webdav xinetd cvs subversion"
81
82 # Common to both DEPEND and RDEPEND
83 CDEPEND="
84 !app-misc/git
85 dev-libs/openssl
86 sys-libs/zlib
87 app-arch/cpio
88 perl? ( dev-lang/perl )
89 tk? ( dev-lang/tk )
90 curl? (
91 net-misc/curl
92 webdav? ( dev-libs/expat )
93 )
94 emacs? ( virtual/emacs )"
95
96 RDEPEND="${CDEPEND}
97 perl? ( dev-perl/Error
98 dev-perl/Net-SMTP-SSL
99 dev-perl/Authen-SASL
100 cgi? ( virtual/perl-CGI )
101 cvs? ( >=dev-util/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
102 subversion? ( dev-util/subversion[-dso] dev-perl/libwww-perl dev-perl/TermReadKey )
103 )
104 gtk? ( >=dev-python/pygtk-2.8 )"
105
106 DEPEND="${CDEPEND}"
107
108 # These are needed to build the docs
109 if [ "$PV" == "9999" ]; then
110 DEPEND="${DEPEND}
111 doc? (
112 app-text/asciidoc
113 app-text/xmlto
114 app-text/docbook2X
115 )"
116 fi
117
118
119 SITEFILE=50${PN}-gentoo.el
120 S="${WORKDIR}/${MY_P}"
121
122 pkg_setup() {
123 if ! use perl ; then
124 use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi"
125 use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs"
126 use subversion && ewarn "git-svn needs USE=perl, it won't work"
127 fi
128 if use webdav && ! use curl ; then
129 ewarn "USE=webdav needs USE=curl. Ignoring"
130 fi
131 if use subversion && has_version dev-util/subversion && built_with_use --missing false dev-util/subversion dso ; then
132 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
133 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
134 ewarn "have been warned."
135 fi
136 }
137
138 # This is needed because for some obscure reasons future calls to make don't
139 # pick up these exports if we export them in src_unpack()
140 exportmakeopts() {
141 local myopts
142
143 if use mozsha1 ; then
144 myopts="${myopts} MOZILLA_SHA1=YesPlease"
145 elif use ppcsha1 ; then
146 myopts="${myopts} PPC_SHA1=YesPlease"
147 fi
148
149 if use curl ; then
150 use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
151 else
152 myopts="${myopts} NO_CURL=YesPlease"
153 fi
154
155 use iconv || myopts="${myopts} NO_ICONV=YesPlease"
156 use tk || myopts="${myopts} NO_TCLTK=YesPlease"
157 use perl || myopts="${myopts} NO_PERL=YesPlease"
158 use threads && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
159 use subversion || myopts="${myopts} NO_SVN_TESTS=YesPlease"
160
161 export MY_MAKEOPTS="${myopts}"
162 }
163
164 src_unpack() {
165 if [ "${PV}" != "9999" ]; then
166 unpack ${MY_P}.tar.bz2
167 cd "${S}"
168 unpack ${PN}-manpages-${DOC_VER}.tar.bz2
169 use doc && \
170 cd "${S}"/Documentation && \
171 unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2
172 cd "${S}"
173 else
174 git_src_unpack
175 cd "${S}"
176 #cp "${FILESDIR}"/GIT-VERSION-GEN .
177 fi
178
179 epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch
180
181 sed -i \
182 -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
183 -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
184 -e 's:^\(CC = \).*$:\1$(OPTCC):' \
185 -e 's:^\(AR = \).*$:\1$(OPTAR):' \
186 Makefile || die "sed failed"
187
188 # Fix docbook2texi command
189 sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \
190 Documentation/Makefile || die "sed failed"
191 }
192
193 git_emake() {
194 emake ${MY_MAKEOPTS} \
195 DESTDIR="${D}" \
196 OPTCFLAGS="${CFLAGS}" \
197 OPTLDFLAGS="${LDFLAGS}" \
198 OPTCC="$(tc-getCC)" \
199 OPTAR="$(tc-getAR)" \
200 prefix=/usr \
201 htmldir=/usr/share/doc/${PF}/html \
202 "$@"
203 }
204
205 src_configure() {
206 exportmakeopts
207 }
208
209 src_compile() {
210 git_emake || die "emake failed"
211
212 if use emacs ; then
213 elisp-compile contrib/emacs/git.el \
214 || die "emacs modules failed"
215 fi
216
217 if use perl && use cgi ; then
218 git_emake \
219 gitweb/gitweb.cgi \
220 || die "emake gitweb/gitweb.cgi failed"
221 fi
222
223 if [[ "$PV" == "9999" ]] && use doc; then
224 cd Documentation
225 git_emake man info html \
226 || die "emake man html info failed"
227 fi
228 }
229
230 src_install() {
231 git_emake \
232 install || \
233 die "make install failed"
234
235 doman man?/*
236
237 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
238 use doc && dodir /usr/share/doc/${PF}/html
239 for d in / /howto/ /technical/ ; do
240 docinto ${d}
241 dodoc Documentation${d}*.txt
242 use doc && dohtml -p ${d} Documentation${d}*.html
243 done
244 docinto /
245
246 dobashcompletion contrib/completion/git-completion.bash ${PN}
247
248 if use emacs ; then
249 elisp-install ${PN} contrib/emacs/git.{el,elc} || die
250 elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
251 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
252 # don't add automatically to the load-path, so the sitefile
253 # can do a conditional loading
254 touch "${D}${SITELISP}/${PN}/compat/.nosearch"
255 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
256 fi
257
258 if use gtk ; then
259 dobin "${S}"/contrib/gitview/gitview
260 dodoc "${S}"/contrib/gitview/gitview.txt
261 fi
262
263 dobin contrib/fast-import/git-p4
264 dodoc contrib/fast-import/git-p4.txt
265 newbin contrib/fast-import/import-tars.perl import-tars
266
267 dodir /usr/share/${PN}/contrib
268 # The following are excluded:
269 # svnimport - use git-svn
270 # p4import - excluded because fast-import has a better one
271 # examples - these are stuff that is not used in Git anymore actually
272 # patches - stuff the Git guys made to go upstream to other places
273 for i in continuous fast-import hg-to-git \
274 hooks remotes2config.sh stats \
275 workdir convert-objects blameview ; do
276 cp -rf \
277 "${S}"/contrib/${i} \
278 "${D}"/usr/share/${PN}/contrib \
279 || die "Failed contrib ${i}"
280 done
281
282 if use perl && use cgi ; then
283 dodir /usr/share/${PN}/gitweb
284 insinto /usr/share/${PN}/gitweb
285 doins "${S}"/gitweb/gitweb.cgi
286 doins "${S}"/gitweb/gitweb.css
287 doins "${S}"/gitweb/git-{favicon,logo}.png
288
289 # Make sure it can run
290 fperms 0755 /usr/share/${PN}/gitweb/gitweb.cgi
291
292 # INSTALL discusses configuration issues, not just installation
293 docinto /
294 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
295 newdoc "${S}"/gitweb/README README.gitweb
296 fi
297 if ! use subversion ; then
298 rm -f "${D}"/usr/libexec/git-core/git-svn \
299 "${D}"/usr/share/man/man1/git-svn.1*
300 fi
301
302 if use xinetd ; then
303 insinto /etc/xinetd.d
304 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
305 fi
306
307 newinitd "${FILESDIR}"/git-daemon.initd git-daemon
308 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
309
310 fixlocalpod
311 }
312
313 src_test() {
314 local disabled=""
315 local tests_cvs="t9200-git-cvsexportcommit.sh \
316 t9400-git-cvsserver-server.sh \
317 t9600-cvsimport.sh"
318 local tests_perl="t5502-quickfetch.sh \
319 t5512-ls-remote.sh \
320 t5520-pull.sh"
321
322 # Unzip is used only for the testcase code, not by any normal parts of Git.
323 if ! has_version app-arch/unzip ; then
324 einfo "Disabling tar-tree tests"
325 disabled="${disabled} t5000-tar-tree.sh"
326 fi
327
328 cvs=0
329 use cvs && let cvs=$cvs+1
330 if ! has userpriv "${FEATURES}"; then
331 if [[ $cvs -eq 1 ]]; then
332 ewarn "Skipping CVS tests because CVS does not work as root!"
333 ewarn "You should retest with FEATURES=userpriv!"
334 disabled="${disabled} ${tests_cvs}"
335 fi
336 # Bug #225601 - t0004 is not suitable for root perm
337 # Bug #219839 - t1004 is not suitable for root perm
338 disabled="${disabled} t0004-unwritable.sh t1004-read-tree-m-u-wf.sh"
339 else
340 [[ $cvs -gt 0 ]] && \
341 has_version dev-util/cvs && \
342 let cvs=$cvs+1
343 [[ $cvs -gt 0 ]] && \
344 built_with_use dev-util/cvs server && \
345 let cvs=$cvs+1
346 if [[ $cvs -lt 3 ]]; then
347 einfo "Disabling CVS tests (needs dev-util/cvs[USE=server])"
348 disabled="${disabled} ${tests_cvs}"
349 fi
350 fi
351
352 if ! use perl ; then
353 einfo "Disabling tests that need Perl"
354 disabled="${disabled} ${tests_perl}"
355 fi
356
357 # Reset all previously disabled tests
358 cd "${S}/t"
359 for i in *.sh.DISABLED ; do
360 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
361 done
362 einfo "Disabled tests:"
363 for i in ${disabled} ; do
364 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
365 done
366 cd "${S}"
367 # Now run the tests
368 einfo "Start test run"
369 git_emake \
370 test || die "tests failed"
371 }
372
373 showpkgdeps() {
374 local pkg=$1
375 shift
376 elog " $(printf "%-17s:" ${pkg}) ${@}"
377 }
378
379 pkg_postinst() {
380 use emacs && elisp-site-regen
381 if use subversion && has_version dev-util/subversion && ! built_with_use --missing false dev-util/subversion perl ; then
382 ewarn "You must build dev-util/subversion with USE=perl"
383 ewarn "to get the full functionality of git-svn!"
384 fi
385 elog "These additional scripts need some dependencies:"
386 echo
387 showpkgdeps git-quiltimport "dev-util/quilt"
388 showpkgdeps git-instaweb \
389 "|| ( www-servers/lighttpd www-servers/apache )"
390 echo
391 }
392
393 pkg_postrm() {
394 use emacs && elisp-site-regen
395 }
396
397
398
399 1.1 dev-util/git/git-1.6.2.2-r1.ebuild
400
401 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-1.6.2.2-r1.ebuild?rev=1.1&view=markup
402 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-1.6.2.2-r1.ebuild?rev=1.1&content-type=text/plain
403
404 Index: git-1.6.2.2-r1.ebuild
405 ===================================================================
406 # Copyright 1999-2009 Gentoo Foundation
407 # Distributed under the terms of the GNU General Public License v2
408 # $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-1.6.2.2-r1.ebuild,v 1.1 2009/04/03 09:02:18 robbat2 Exp $
409
410 EAPI=2
411
412 inherit toolchain-funcs eutils elisp-common perl-module bash-completion
413 [ "$PV" == "9999" ] && inherit git
414
415 MY_PV="${PV/_rc/.rc}"
416 MY_P="${PN}-${MY_PV}"
417
418 DOC_VER=${MY_PV}
419
420 DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
421 HOMEPAGE="http://www.git-scm.com/"
422 if [ "$PV" != "9999" ]; then
423 SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2
424 mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2
425 doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )"
426 else
427 SRC_URI=""
428 EGIT_BRANCH="master"
429 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
430 # EGIT_REPO_URI="http://www.kernel.org/pub/scm/git/git.git"
431 fi
432
433 LICENSE="GPL-2"
434 SLOT="0"
435 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
436 IUSE="curl cgi doc emacs gtk iconv mozsha1 perl ppcsha1 tk threads webdav xinetd cvs subversion"
437
438 # Common to both DEPEND and RDEPEND
439 CDEPEND="
440 !app-misc/git
441 dev-libs/openssl
442 sys-libs/zlib
443 app-arch/cpio
444 perl? ( dev-lang/perl )
445 tk? ( dev-lang/tk )
446 curl? (
447 net-misc/curl
448 webdav? ( dev-libs/expat )
449 )
450 emacs? ( virtual/emacs )"
451
452 RDEPEND="${CDEPEND}
453 perl? ( dev-perl/Error
454 dev-perl/Net-SMTP-SSL
455 dev-perl/Authen-SASL
456 cgi? ( virtual/perl-CGI )
457 cvs? ( >=dev-util/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
458 subversion? ( dev-util/subversion[-dso] dev-perl/libwww-perl dev-perl/TermReadKey )
459 )
460 gtk? ( >=dev-python/pygtk-2.8 )"
461
462 DEPEND="${CDEPEND}"
463
464 # These are needed to build the docs
465 if [ "$PV" == "9999" ]; then
466 DEPEND="${DEPEND}
467 doc? (
468 app-text/asciidoc
469 app-text/xmlto
470 app-text/docbook2X
471 )"
472 fi
473
474
475 SITEFILE=50${PN}-gentoo.el
476 S="${WORKDIR}/${MY_P}"
477
478 pkg_setup() {
479 if ! use perl ; then
480 use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi"
481 use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs"
482 use subversion && ewarn "git-svn needs USE=perl, it won't work"
483 fi
484 if use webdav && ! use curl ; then
485 ewarn "USE=webdav needs USE=curl. Ignoring"
486 fi
487 if use subversion && has_version dev-util/subversion && built_with_use --missing false dev-util/subversion dso ; then
488 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
489 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
490 ewarn "have been warned."
491 fi
492 }
493
494 # This is needed because for some obscure reasons future calls to make don't
495 # pick up these exports if we export them in src_unpack()
496 exportmakeopts() {
497 local myopts
498
499 if use mozsha1 ; then
500 myopts="${myopts} MOZILLA_SHA1=YesPlease"
501 elif use ppcsha1 ; then
502 myopts="${myopts} PPC_SHA1=YesPlease"
503 fi
504
505 if use curl ; then
506 use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
507 else
508 myopts="${myopts} NO_CURL=YesPlease"
509 fi
510
511 use iconv || myopts="${myopts} NO_ICONV=YesPlease"
512 use tk || myopts="${myopts} NO_TCLTK=YesPlease"
513 use perl || myopts="${myopts} NO_PERL=YesPlease"
514 use threads && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
515 use subversion || myopts="${myopts} NO_SVN_TESTS=YesPlease"
516
517 export MY_MAKEOPTS="${myopts}"
518 }
519
520 src_unpack() {
521 if [ "${PV}" != "9999" ]; then
522 unpack ${MY_P}.tar.bz2
523 cd "${S}"
524 unpack ${PN}-manpages-${DOC_VER}.tar.bz2
525 use doc && \
526 cd "${S}"/Documentation && \
527 unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2
528 cd "${S}"
529 else
530 git_src_unpack
531 cd "${S}"
532 #cp "${FILESDIR}"/GIT-VERSION-GEN .
533 fi
534
535 epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch
536
537 sed -i \
538 -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
539 -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
540 -e 's:^\(CC = \).*$:\1$(OPTCC):' \
541 -e 's:^\(AR = \).*$:\1$(OPTAR):' \
542 Makefile || die "sed failed"
543
544 # Fix docbook2texi command
545 sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \
546 Documentation/Makefile || die "sed failed"
547 }
548
549 git_emake() {
550 emake ${MY_MAKEOPTS} \
551 DESTDIR="${D}" \
552 OPTCFLAGS="${CFLAGS}" \
553 OPTLDFLAGS="${LDFLAGS}" \
554 OPTCC="$(tc-getCC)" \
555 OPTAR="$(tc-getAR)" \
556 prefix=/usr \
557 htmldir=/usr/share/doc/${PF}/html \
558 "$@"
559 }
560
561 src_configure() {
562 exportmakeopts
563 }
564
565 src_compile() {
566 git_emake || die "emake failed"
567
568 if use emacs ; then
569 elisp-compile contrib/emacs/git.el \
570 || die "emacs modules failed"
571 fi
572
573 if use perl && use cgi ; then
574 git_emake \
575 gitweb/gitweb.cgi \
576 || die "emake gitweb/gitweb.cgi failed"
577 fi
578
579 if [[ "$PV" == "9999" ]] && use doc; then
580 cd Documentation
581 git_emake man info html \
582 || die "emake man html info failed"
583 fi
584 }
585
586 src_install() {
587 git_emake \
588 install || \
589 die "make install failed"
590
591 doman man?/*
592
593 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
594 use doc && dodir /usr/share/doc/${PF}/html
595 for d in / /howto/ /technical/ ; do
596 docinto ${d}
597 dodoc Documentation${d}*.txt
598 use doc && dohtml -p ${d} Documentation${d}*.html
599 done
600 docinto /
601
602 dobashcompletion contrib/completion/git-completion.bash ${PN}
603
604 if use emacs ; then
605 elisp-install ${PN} contrib/emacs/git.{el,elc} || die
606 elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
607 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
608 # don't add automatically to the load-path, so the sitefile
609 # can do a conditional loading
610 touch "${D}${SITELISP}/${PN}/compat/.nosearch"
611 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
612 fi
613
614 if use gtk ; then
615 dobin "${S}"/contrib/gitview/gitview
616 dodoc "${S}"/contrib/gitview/gitview.txt
617 fi
618
619 dobin contrib/fast-import/git-p4
620 dodoc contrib/fast-import/git-p4.txt
621 newbin contrib/fast-import/import-tars.perl import-tars
622
623 dodir /usr/share/${PN}/contrib
624 # The following are excluded:
625 # svnimport - use git-svn
626 # p4import - excluded because fast-import has a better one
627 # examples - these are stuff that is not used in Git anymore actually
628 # patches - stuff the Git guys made to go upstream to other places
629 for i in continuous fast-import hg-to-git \
630 hooks remotes2config.sh stats \
631 workdir convert-objects blameview ; do
632 cp -rf \
633 "${S}"/contrib/${i} \
634 "${D}"/usr/share/${PN}/contrib \
635 || die "Failed contrib ${i}"
636 done
637
638 if use perl && use cgi ; then
639 dodir /usr/share/${PN}/gitweb
640 insinto /usr/share/${PN}/gitweb
641 doins "${S}"/gitweb/gitweb.cgi
642 doins "${S}"/gitweb/gitweb.css
643 doins "${S}"/gitweb/git-{favicon,logo}.png
644
645 # Make sure it can run
646 fperms 0755 /usr/share/${PN}/gitweb/gitweb.cgi
647
648 # INSTALL discusses configuration issues, not just installation
649 docinto /
650 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
651 newdoc "${S}"/gitweb/README README.gitweb
652 fi
653 if ! use subversion ; then
654 rm -f "${D}"/usr/libexec/git-core/git-svn \
655 "${D}"/usr/share/man/man1/git-svn.1*
656 fi
657
658 if use xinetd ; then
659 insinto /etc/xinetd.d
660 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
661 fi
662
663 newinitd "${FILESDIR}"/git-daemon.initd git-daemon
664 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
665
666 fixlocalpod
667 }
668
669 src_test() {
670 local disabled=""
671 local tests_cvs="t9200-git-cvsexportcommit.sh \
672 t9400-git-cvsserver-server.sh \
673 t9600-cvsimport.sh"
674 local tests_perl="t5502-quickfetch.sh \
675 t5512-ls-remote.sh \
676 t5520-pull.sh"
677
678 # Unzip is used only for the testcase code, not by any normal parts of Git.
679 if ! has_version app-arch/unzip ; then
680 einfo "Disabling tar-tree tests"
681 disabled="${disabled} t5000-tar-tree.sh"
682 fi
683
684 cvs=0
685 use cvs && let cvs=$cvs+1
686 if ! has userpriv "${FEATURES}"; then
687 if [[ $cvs -eq 1 ]]; then
688 ewarn "Skipping CVS tests because CVS does not work as root!"
689 ewarn "You should retest with FEATURES=userpriv!"
690 disabled="${disabled} ${tests_cvs}"
691 fi
692 # Bug #225601 - t0004 is not suitable for root perm
693 # Bug #219839 - t1004 is not suitable for root perm
694 disabled="${disabled} t0004-unwritable.sh t1004-read-tree-m-u-wf.sh"
695 else
696 [[ $cvs -gt 0 ]] && \
697 has_version dev-util/cvs && \
698 let cvs=$cvs+1
699 [[ $cvs -gt 0 ]] && \
700 built_with_use dev-util/cvs server && \
701 let cvs=$cvs+1
702 if [[ $cvs -lt 3 ]]; then
703 einfo "Disabling CVS tests (needs dev-util/cvs[USE=server])"
704 disabled="${disabled} ${tests_cvs}"
705 fi
706 fi
707
708 if ! use perl ; then
709 einfo "Disabling tests that need Perl"
710 disabled="${disabled} ${tests_perl}"
711 fi
712
713 # Reset all previously disabled tests
714 cd "${S}/t"
715 for i in *.sh.DISABLED ; do
716 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
717 done
718 einfo "Disabled tests:"
719 for i in ${disabled} ; do
720 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
721 done
722 cd "${S}"
723 # Now run the tests
724 einfo "Start test run"
725 git_emake \
726 test || die "tests failed"
727 }
728
729 showpkgdeps() {
730 local pkg=$1
731 shift
732 elog " $(printf "%-17s:" ${pkg}) ${@}"
733 }
734
735 pkg_postinst() {
736 use emacs && elisp-site-regen
737 if use subversion && has_version dev-util/subversion && ! built_with_use --missing false dev-util/subversion perl ; then
738 ewarn "You must build dev-util/subversion with USE=perl"
739 ewarn "to get the full functionality of git-svn!"
740 fi
741 elog "These additional scripts need some dependencies:"
742 echo
743 showpkgdeps git-quiltimport "dev-util/quilt"
744 showpkgdeps git-instaweb \
745 "|| ( www-servers/lighttpd www-servers/apache )"
746 echo
747 }
748
749 pkg_postrm() {
750 use emacs && elisp-site-regen
751 }