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