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-vcs/git: ChangeLog git-1.7.6.4.ebuild git-1.7.7.ebuild
Date: Sat, 01 Oct 2011 00:06:48
Message-Id: 20111001000637.E1A9220036@flycatcher.gentoo.org
1 robbat2 11/10/01 00:06:37
2
3 Modified: ChangeLog
4 Added: git-1.7.6.4.ebuild git-1.7.7.ebuild
5 Log:
6 Version bump. Was delayed by getting html/manpage tarballs on the alternative mirroring location.
7
8 (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.100 dev-vcs/git/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.100&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.100&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?r1=1.99&r2=1.100
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v
20 retrieving revision 1.99
21 retrieving revision 1.100
22 diff -p -w -b -B -u -u -r1.99 -r1.100
23 --- ChangeLog 25 Aug 2011 01:45:36 -0000 1.99
24 +++ ChangeLog 1 Oct 2011 00:06:37 -0000 1.100
25 @@ -1,6 +1,14 @@
26 # ChangeLog for dev-vcs/git
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.99 2011/08/25 01:45:36 robbat2 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.100 2011/10/01 00:06:37 robbat2 Exp $
30 +
31 +*git-1.7.7 (01 Oct 2011)
32 +*git-1.7.6.4 (01 Oct 2011)
33 +
34 + 01 Oct 2011; Robin H. Johnson <robbat2@g.o> +git-1.7.6.4.ebuild,
35 + +git-1.7.7.ebuild:
36 + Version bump. Was delayed by getting html/manpage tarballs on the alternative
37 + mirroring location.
38
39 *git-1.7.6.1 (25 Aug 2011)
40
41
42
43
44 1.1 dev-vcs/git/git-1.7.6.4.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.7.6.4.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.7.6.4.ebuild?rev=1.1&content-type=text/plain
48
49 Index: git-1.7.6.4.ebuild
50 ===================================================================
51 # Copyright 1999-2011 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.7.6.4.ebuild,v 1.1 2011/10/01 00:06:37 robbat2 Exp $
54
55 EAPI=3
56
57 GENTOO_DEPEND_ON_PERL=no
58
59 # bug #329479: git-remote-testgit is not multiple-version aware
60 PYTHON_DEPEND="python? 2"
61 [[ ${PV} == *9999 ]] && SCM="git-2"
62 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
63
64 inherit toolchain-funcs eutils elisp-common perl-module bash-completion python ${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="gz"
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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-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 gtk iconv +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion"
94
95 # Common to both DEPEND and RDEPEND
96 CDEPEND="
97 !blksha1? ( dev-libs/openssl )
98 sys-libs/zlib
99 perl? ( dev-lang/perl[-build] )
100 tk? ( dev-lang/tk )
101 curl? (
102 net-misc/curl
103 webdav? ( dev-libs/expat )
104 )
105 emacs? ( virtual/emacs )"
106
107 RDEPEND="${CDEPEND}
108 perl? ( dev-perl/Error
109 dev-perl/Net-SMTP-SSL
110 dev-perl/Authen-SASL
111 cgi? ( virtual/perl-CGI )
112 cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
113 subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
114 )
115 python? ( gtk?
116 (
117 >=dev-python/pygtk-2.8
118 dev-python/pygtksourceview:2
119 ) )"
120
121 # This is how info docs are created with Git:
122 # .txt/asciidoc --(asciidoc)---------> .xml/docbook
123 # .xml/docbook --(docbook2texi.pl)--> .texi
124 # .texi --(makeinfo)---------> .info
125 DEPEND="${CDEPEND}
126 app-arch/cpio
127 doc? (
128 app-text/asciidoc
129 app-text/docbook2X
130 sys-apps/texinfo
131 )"
132
133 # Live ebuild builds man pages and HTML docs, additionally
134 if [[ ${PV} == *9999 ]]; then
135 DEPEND="${DEPEND}
136 app-text/asciidoc
137 app-text/xmlto"
138 fi
139
140 SITEFILE=50${PN}-gentoo.el
141 S="${WORKDIR}/${MY_P}"
142
143 pkg_setup() {
144 if ! use perl ; then
145 use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi"
146 use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs"
147 use subversion && ewarn "git-svn needs USE=perl, it won't work"
148 fi
149 if use webdav && ! use curl ; then
150 ewarn "USE=webdav needs USE=curl. Ignoring"
151 fi
152 if use subversion && has_version dev-vcs/subversion && built_with_use --missing false dev-vcs/subversion dso ; then
153 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
154 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
155 ewarn "have been warned."
156 fi
157 if use python ; then
158 python_set_active_version 2
159 python_pkg_setup
160 fi
161 }
162
163 # This is needed because for some obscure reasons future calls to make don't
164 # pick up these exports if we export them in src_unpack()
165 exportmakeopts() {
166 local myopts
167
168 if use blksha1 ; then
169 myopts="${myopts} BLK_SHA1=YesPlease"
170 elif use ppcsha1 ; then
171 myopts="${myopts} PPC_SHA1=YesPlease"
172 fi
173
174 if use curl ; then
175 use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
176 else
177 myopts="${myopts} NO_CURL=YesPlease"
178 fi
179
180 # broken assumptions, because of broken build system ...
181 myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
182 myopts="${myopts} INSTALL=install TAR=tar"
183 myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
184 myopts="${myopts} SANE_TOOL_PATH="
185 myopts="${myopts} OLD_ICONV="
186 myopts="${myopts} NO_EXTERNAL_GREP="
187
188 # can't define this to null, since the entire makefile depends on it
189 sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
190
191 use iconv \
192 || einfo "Forcing iconv for ${PVR} due to bugs #321895, #322205."
193 # || myopts="${myopts} NO_ICONV=YesPlease"
194 # because, above, we need to do this unconditionally (no "&& use iconv")
195 use !elibc_glibc && myopts="${myopts} NEEDS_LIBICONV=YesPlease"
196
197 use tk \
198 || myopts="${myopts} NO_TCLTK=YesPlease"
199 use perl \
200 && myopts="${myopts} INSTALLDIRS=vendor" \
201 || myopts="${myopts} NO_PERL=YesPlease"
202 use python \
203 || myopts="${myopts} NO_PYTHON=YesPlease"
204 use subversion \
205 || myopts="${myopts} NO_SVN_TESTS=YesPlease"
206 use threads \
207 && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
208 use cvs \
209 || myopts="${myopts} NO_CVS=YesPlease"
210 # Disabled until ~m68k-mint can be keyworded again
211 # if [[ ${CHOST} == *-mint* ]] ; then
212 # myopts="${myopts} NO_MMAP=YesPlease"
213 # myopts="${myopts} NO_IPV6=YesPlease"
214 # myopts="${myopts} NO_STRLCPY=YesPlease"
215 # myopts="${myopts} NO_MEMMEM=YesPlease"
216 # myopts="${myopts} NO_MKDTEMP=YesPlease"
217 # myopts="${myopts} NO_MKSTEMPS=YesPlease"
218 # fi
219 if [[ ${CHOST} == ia64-*-hpux* ]]; then
220 myopts="${myopts} NO_NSEC=YesPlease"
221 fi
222 if [[ ${CHOST} == *-*-aix* ]]; then
223 myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
224 fi
225
226 has_version '>=app-text/asciidoc-8.0' \
227 && myopts="${myopts} ASCIIDOC8=YesPlease"
228 myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
229
230 # Bug 290465:
231 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
232 [[ "${CHOST}" == *-uclibc* ]] && \
233 myopts="${myopts} NO_NSEC=YesPlease"
234
235 export MY_MAKEOPTS="${myopts}"
236 }
237
238 src_unpack() {
239 if [[ ${PV} != *9999 ]]; then
240 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
241 cd "${S}"
242 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
243 use doc && \
244 cd "${S}"/Documentation && \
245 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
246 cd "${S}"
247 else
248 git-2_src_unpack
249 cd "${S}"
250 #cp "${FILESDIR}"/GIT-VERSION-GEN .
251 fi
252
253 }
254
255 src_prepare() {
256 # Noperl is being merged to upstream as of 2009/04/05
257 #epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch
258
259 # GetOpt-Long v2.38 is strict
260 # Merged in 1.6.3 final 2009/05/07
261 #epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch
262
263 # JS install fixup
264 # Merged in 1.7.5.x
265 #epatch "${FILESDIR}"/git-1.7.2-always-install-js.patch
266
267 # USE=-iconv causes segfaults, fixed post 1.7.1
268 # Gentoo bug #321895
269 #epatch "${FILESDIR}"/git-1.7.1-noiconv-segfault-fix.patch
270
271 # Fix false positives with t3404 due to SHELL=/bin/false for the portage
272 # user.
273 # Merged upstream
274 #epatch "${FILESDIR}"/git-1.7.3.4-avoid-shell-issues.patch
275
276 # bug #350075: t9001: fix missing prereq on some tests
277 # Merged upstream
278 #epatch "${FILESDIR}"/git-1.7.3.4-fix-perl-test-prereq.patch
279
280 # bug #350330 - automagic CVS when we don't want it is bad.
281 epatch "${FILESDIR}"/git-1.7.3.5-optional-cvs.patch
282
283 sed -i \
284 -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
285 -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
286 -e 's:^\(CC = \).*$:\1$(OPTCC):' \
287 -e 's:^\(AR = \).*$:\1$(OPTAR):' \
288 -e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
289 -e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
290 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 -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \
299 Documentation/Makefile || die "sed failed"
300
301 # bug #318289
302 # Merged upstream
303 #epatch "${FILESDIR}"/git-1.7.3.2-interix.patch
304
305 # merged upstream
306 #epatch "${FILESDIR}"/git-1.7.5-interix.patch
307 # but only one of two hunks made it into the release ... :(
308 epatch "${FILESDIR}"/git-1.7.6-interix.patch
309 }
310
311 git_emake() {
312 # bug #326625: PERL_PATH, PERL_MM_OPT
313 # bug #320647: PYTHON_PATH
314 PYTHON_PATH=""
315 use python && PYTHON_PATH="$(PYTHON -a)"
316 emake ${MY_MAKEOPTS} \
317 DESTDIR="${D}" \
318 OPTCFLAGS="${CFLAGS}" \
319 OPTLDFLAGS="${LDFLAGS}" \
320 OPTCC="$(tc-getCC)" \
321 OPTAR="$(tc-getAR)" \
322 prefix="${EPREFIX}"/usr \
323 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
324 sysconfdir="${EPREFIX}"/etc \
325 PYTHON_PATH="${PYTHON_PATH}" \
326 PERL_MM_OPT="" \
327 GIT_TEST_OPTS="--no-color" \
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 git_emake || die "emake failed"
340
341 if use emacs ; then
342 elisp-compile contrib/emacs/git{,-blame}.el \
343 || die "emacs modules failed"
344 fi
345
346 if use perl && use cgi ; then
347 git_emake \
348 gitweb/gitweb.cgi \
349 || die "emake gitweb/gitweb.cgi failed"
350 fi
351
352 cd "${S}"/Documentation
353 if [[ ${PV} == *9999 ]] ; then
354 git_emake man \
355 || die "emake man failed"
356 if use doc ; then
357 git_emake info html \
358 || die "emake info html failed"
359 fi
360 else
361 if use doc ; then
362 git_emake info \
363 || die "emake info html failed"
364 fi
365 fi
366 }
367
368 src_install() {
369 git_emake \
370 install || \
371 die "make install failed"
372
373 # Depending on the tarball and manual rebuild of the documentation, the
374 # manpages may exist in either OR both of these directories.
375 find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
376 find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
377
378 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
379 use doc && dodir /usr/share/doc/${PF}/html
380 for d in / /howto/ /technical/ ; do
381 docinto ${d}
382 dodoc Documentation${d}*.txt
383 use doc && dohtml -p ${d} Documentation${d}*.html
384 done
385 docinto /
386 # Upstream does not ship this pre-built :-(
387 use doc && doinfo Documentation/{git,gitman}.info
388
389 dobashcompletion contrib/completion/git-completion.bash ${PN}
390
391 if use emacs ; then
392 elisp-install ${PN} contrib/emacs/git.{el,elc} || die
393 elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
394 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
395 # don't add automatically to the load-path, so the sitefile
396 # can do a conditional loading
397 touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
398 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
399 fi
400
401 if use python && use gtk ; then
402 dobin "${S}"/contrib/gitview/gitview
403 python_convert_shebangs ${PYTHON_ABI} "${ED}"/usr/bin/gitview
404 dodoc "${S}"/contrib/gitview/gitview.txt
405 fi
406
407 dobin contrib/fast-import/git-p4
408 dodoc contrib/fast-import/git-p4.txt
409 newbin contrib/fast-import/import-tars.perl import-tars
410 newbin contrib/git-resurrect.sh git-resurrect
411
412 dodir /usr/share/${PN}/contrib
413 # The following are excluded:
414 # completion - installed above
415 # emacs - installed above
416 # examples - these are stuff that is not used in Git anymore actually
417 # gitview - installed above
418 # p4import - excluded because fast-import has a better one
419 # patches - stuff the Git guys made to go upstream to other places
420 # svnimport - use git-svn
421 # thunderbird-patch-inline - fixes thunderbird
422 for i in \
423 blameview buildsystems ciabot continuous convert-objects fast-import \
424 hg-to-git hooks remotes2config.sh remotes2config.sh rerere-train.sh \
425 stats svn-fe vim workdir \
426 ; do
427 cp -rf \
428 "${S}"/contrib/${i} \
429 "${ED}"/usr/share/${PN}/contrib \
430 || die "Failed contrib ${i}"
431 done
432
433 if use perl && use cgi ; then
434 # We used to install in /usr/share/${PN}/gitweb
435 # but upstream installs in /usr/share/gitweb
436 # so we will install a symlink and use their location for compat with other
437 # distros
438 dosym /usr/share/gitweb /usr/share/${PN}/gitweb
439
440 # INSTALL discusses configuration issues, not just installation
441 docinto /
442 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
443 newdoc "${S}"/gitweb/README README.gitweb
444
445 find "${ED}"/usr/lib64/perl5/ \
446 -name .packlist \
447 -exec rm \{\} \;
448 else
449 rm -rf "${ED}"/usr/share/gitweb
450 fi
451
452 if ! use subversion ; then
453 rm -f "${ED}"/usr/libexec/git-core/git-svn \
454 "${ED}"/usr/share/man/man1/git-svn.1*
455 fi
456
457 if use xinetd ; then
458 insinto /etc/xinetd.d
459 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
460 fi
461
462 newinitd "${FILESDIR}"/git-daemon.initd git-daemon
463 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
464
465 fixlocalpod
466 }
467
468 src_test() {
469 local disabled=""
470 local tests_cvs="t9200-git-cvsexportcommit.sh \
471 t9400-git-cvsserver-server.sh \
472 t9401-git-cvsserver-crlf.sh \
473 t9600-cvsimport.sh \
474 t9601-cvsimport-vendor-branch.sh \
475 t9602-cvsimport-branches-tags.sh \
476 t9603-cvsimport-patchsets.sh"
477 local tests_perl="t5502-quickfetch.sh \
478 t5512-ls-remote.sh \
479 t5520-pull.sh"
480 # Bug #225601 - t0004 is not suitable for root perm
481 # Bug #219839 - t1004 is not suitable for root perm
482 # t0001-init.sh - check for init notices EPERM* fails
483 local tests_nonroot="t0001-init.sh \
484 t0004-unwritable.sh \
485 t0070-fundamental.sh \
486 t1004-read-tree-m-u-wf.sh \
487 t3700-add.sh \
488 t7300-clean.sh"
489
490 # Unzip is used only for the testcase code, not by any normal parts of Git.
491 if ! has_version app-arch/unzip ; then
492 einfo "Disabling tar-tree tests"
493 disabled="${disabled} t5000-tar-tree.sh"
494 fi
495
496 cvs=0
497 use cvs && let cvs=$cvs+1
498 if [[ ${EUID} -eq 0 ]]; then
499 if [[ $cvs -eq 1 ]]; then
500 ewarn "Skipping CVS tests because CVS does not work as root!"
501 ewarn "You should retest with FEATURES=userpriv!"
502 disabled="${disabled} ${tests_cvs}"
503 fi
504 einfo "Skipping other tests that require being non-root"
505 disabled="${disabled} ${tests_nonroot}"
506 else
507 [[ $cvs -gt 0 ]] && \
508 has_version dev-vcs/cvs && \
509 let cvs=$cvs+1
510 [[ $cvs -gt 1 ]] && \
511 built_with_use dev-vcs/cvs server && \
512 let cvs=$cvs+1
513 if [[ $cvs -lt 3 ]]; then
514 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
515 disabled="${disabled} ${tests_cvs}"
516 fi
517 fi
518
519 if ! use perl ; then
520 einfo "Disabling tests that need Perl"
521 disabled="${disabled} ${tests_perl}"
522 fi
523
524 # Reset all previously disabled tests
525 cd "${S}/t"
526 for i in *.sh.DISABLED ; do
527 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
528 done
529 einfo "Disabled tests:"
530 for i in ${disabled} ; do
531 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
532 done
533
534 # Avoid the test system removing the results because we want them ourselves
535 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
536 -i "${S}"/t/Makefile
537
538 # Clean old results first
539 cd "${S}/t"
540 git_emake clean
541
542 # Now run the tests
543 cd "${S}"
544 einfo "Start test run"
545 git_emake test
546 rc=$?
547
548 # Display nice results
549 cd "${S}/t"
550 git_emake aggregate-results
551
552 # And exit
553 [ $rc -eq 0 ] || die "tests failed. Please file a bug."
554 }
555
556 showpkgdeps() {
557 local pkg=$1
558 shift
559 elog " $(printf "%-17s:" ${pkg}) ${@}"
560 }
561
562 pkg_postinst() {
563 use emacs && elisp-site-regen
564 use python && python_mod_optimize git_remote_helpers
565 use bash-completion && \
566 einfo "Please read /usr/share/bash-completion/git for Git bash completion"
567 elog "These additional scripts need some dependencies:"
568 echo
569 showpkgdeps git-quiltimport "dev-util/quilt"
570 showpkgdeps git-instaweb \
571 "|| ( www-servers/lighttpd www-servers/apache )"
572 echo
573 }
574
575 pkg_postrm() {
576 use emacs && elisp-site-regen
577 use python && python_mod_cleanup git_remote_helpers
578 }
579
580
581
582 1.1 dev-vcs/git/git-1.7.7.ebuild
583
584 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.7.7.ebuild?rev=1.1&view=markup
585 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.7.7.ebuild?rev=1.1&content-type=text/plain
586
587 Index: git-1.7.7.ebuild
588 ===================================================================
589 # Copyright 1999-2011 Gentoo Foundation
590 # Distributed under the terms of the GNU General Public License v2
591 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.7.7.ebuild,v 1.1 2011/10/01 00:06:37 robbat2 Exp $
592
593 EAPI=3
594
595 GENTOO_DEPEND_ON_PERL=no
596
597 # bug #329479: git-remote-testgit is not multiple-version aware
598 PYTHON_DEPEND="python? 2"
599 [[ ${PV} == *9999 ]] && SCM="git-2"
600 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
601
602 inherit toolchain-funcs eutils elisp-common perl-module bash-completion python ${SCM}
603
604 MY_PV="${PV/_rc/.rc}"
605 MY_P="${PN}-${MY_PV}"
606
607 DOC_VER=${MY_PV}
608
609 DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
610 HOMEPAGE="http://www.git-scm.com/"
611 if [[ ${PV} != *9999 ]]; then
612 SRC_URI_SUFFIX="gz"
613 SRC_URI_GOOG="http://git-core.googlecode.com/files"
614 SRC_URI_KORG="mirror://kernel/software/scm/git"
615 SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
616 ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
617 ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
618 ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
619 doc? (
620 ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
621 ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
622 )"
623 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
624 else
625 SRC_URI=""
626 KEYWORDS=""
627 fi
628
629 LICENSE="GPL-2"
630 SLOT="0"
631 IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion"
632
633 # Common to both DEPEND and RDEPEND
634 CDEPEND="
635 !blksha1? ( dev-libs/openssl )
636 sys-libs/zlib
637 perl? ( dev-lang/perl[-build] )
638 tk? ( dev-lang/tk )
639 curl? (
640 net-misc/curl
641 webdav? ( dev-libs/expat )
642 )
643 emacs? ( virtual/emacs )"
644
645 RDEPEND="${CDEPEND}
646 perl? ( dev-perl/Error
647 dev-perl/Net-SMTP-SSL
648 dev-perl/Authen-SASL
649 cgi? ( virtual/perl-CGI )
650 cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
651 subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
652 )
653 python? ( gtk?
654 (
655 >=dev-python/pygtk-2.8
656 dev-python/pygtksourceview:2
657 ) )"
658
659 # This is how info docs are created with Git:
660 # .txt/asciidoc --(asciidoc)---------> .xml/docbook
661 # .xml/docbook --(docbook2texi.pl)--> .texi
662 # .texi --(makeinfo)---------> .info
663 DEPEND="${CDEPEND}
664 app-arch/cpio
665 doc? (
666 app-text/asciidoc
667 app-text/docbook2X
668 sys-apps/texinfo
669 )"
670
671 # Live ebuild builds man pages and HTML docs, additionally
672 if [[ ${PV} == *9999 ]]; then
673 DEPEND="${DEPEND}
674 app-text/asciidoc
675 app-text/xmlto"
676 fi
677
678 SITEFILE=50${PN}-gentoo.el
679 S="${WORKDIR}/${MY_P}"
680
681 pkg_setup() {
682 if ! use perl ; then
683 use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi"
684 use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs"
685 use subversion && ewarn "git-svn needs USE=perl, it won't work"
686 fi
687 if use webdav && ! use curl ; then
688 ewarn "USE=webdav needs USE=curl. Ignoring"
689 fi
690 if use subversion && has_version dev-vcs/subversion && built_with_use --missing false dev-vcs/subversion dso ; then
691 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
692 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
693 ewarn "have been warned."
694 fi
695 if use python ; then
696 python_set_active_version 2
697 python_pkg_setup
698 fi
699 }
700
701 # This is needed because for some obscure reasons future calls to make don't
702 # pick up these exports if we export them in src_unpack()
703 exportmakeopts() {
704 local myopts
705
706 if use blksha1 ; then
707 myopts="${myopts} BLK_SHA1=YesPlease"
708 elif use ppcsha1 ; then
709 myopts="${myopts} PPC_SHA1=YesPlease"
710 fi
711
712 if use curl ; then
713 use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
714 else
715 myopts="${myopts} NO_CURL=YesPlease"
716 fi
717
718 # broken assumptions, because of broken build system ...
719 myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
720 myopts="${myopts} INSTALL=install TAR=tar"
721 myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
722 myopts="${myopts} SANE_TOOL_PATH="
723 myopts="${myopts} OLD_ICONV="
724 myopts="${myopts} NO_EXTERNAL_GREP="
725
726 # can't define this to null, since the entire makefile depends on it
727 sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
728
729 use iconv \
730 || einfo "Forcing iconv for ${PVR} due to bugs #321895, #322205."
731 # || myopts="${myopts} NO_ICONV=YesPlease"
732 # because, above, we need to do this unconditionally (no "&& use iconv")
733 use !elibc_glibc && myopts="${myopts} NEEDS_LIBICONV=YesPlease"
734
735 use tk \
736 || myopts="${myopts} NO_TCLTK=YesPlease"
737 use perl \
738 && myopts="${myopts} INSTALLDIRS=vendor" \
739 || myopts="${myopts} NO_PERL=YesPlease"
740 use python \
741 || myopts="${myopts} NO_PYTHON=YesPlease"
742 use subversion \
743 || myopts="${myopts} NO_SVN_TESTS=YesPlease"
744 use threads \
745 && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
746 use cvs \
747 || myopts="${myopts} NO_CVS=YesPlease"
748 # Disabled until ~m68k-mint can be keyworded again
749 # if [[ ${CHOST} == *-mint* ]] ; then
750 # myopts="${myopts} NO_MMAP=YesPlease"
751 # myopts="${myopts} NO_IPV6=YesPlease"
752 # myopts="${myopts} NO_STRLCPY=YesPlease"
753 # myopts="${myopts} NO_MEMMEM=YesPlease"
754 # myopts="${myopts} NO_MKDTEMP=YesPlease"
755 # myopts="${myopts} NO_MKSTEMPS=YesPlease"
756 # fi
757 if [[ ${CHOST} == ia64-*-hpux* ]]; then
758 myopts="${myopts} NO_NSEC=YesPlease"
759 fi
760 if [[ ${CHOST} == *-*-aix* ]]; then
761 myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
762 fi
763
764 has_version '>=app-text/asciidoc-8.0' \
765 && myopts="${myopts} ASCIIDOC8=YesPlease"
766 myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
767
768 # Bug 290465:
769 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
770 [[ "${CHOST}" == *-uclibc* ]] && \
771 myopts="${myopts} NO_NSEC=YesPlease"
772
773 export MY_MAKEOPTS="${myopts}"
774 }
775
776 src_unpack() {
777 if [[ ${PV} != *9999 ]]; then
778 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
779 cd "${S}"
780 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
781 use doc && \
782 cd "${S}"/Documentation && \
783 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
784 cd "${S}"
785 else
786 git-2_src_unpack
787 cd "${S}"
788 #cp "${FILESDIR}"/GIT-VERSION-GEN .
789 fi
790
791 }
792
793 src_prepare() {
794 # Noperl is being merged to upstream as of 2009/04/05
795 #epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch
796
797 # GetOpt-Long v2.38 is strict
798 # Merged in 1.6.3 final 2009/05/07
799 #epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch
800
801 # JS install fixup
802 # Merged in 1.7.5.x
803 #epatch "${FILESDIR}"/git-1.7.2-always-install-js.patch
804
805 # USE=-iconv causes segfaults, fixed post 1.7.1
806 # Gentoo bug #321895
807 #epatch "${FILESDIR}"/git-1.7.1-noiconv-segfault-fix.patch
808
809 # Fix false positives with t3404 due to SHELL=/bin/false for the portage
810 # user.
811 # Merged upstream
812 #epatch "${FILESDIR}"/git-1.7.3.4-avoid-shell-issues.patch
813
814 # bug #350075: t9001: fix missing prereq on some tests
815 # Merged upstream
816 #epatch "${FILESDIR}"/git-1.7.3.4-fix-perl-test-prereq.patch
817
818 # bug #350330 - automagic CVS when we don't want it is bad.
819 epatch "${FILESDIR}"/git-1.7.3.5-optional-cvs.patch
820
821 sed -i \
822 -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
823 -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
824 -e 's:^\(CC = \).*$:\1$(OPTCC):' \
825 -e 's:^\(AR = \).*$:\1$(OPTAR):' \
826 -e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
827 -e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
828 Makefile || die "sed failed"
829
830 # Never install the private copy of Error.pm (bug #296310)
831 sed -i \
832 -e '/private-Error.pm/s,^,#,' \
833 perl/Makefile.PL
834
835 # Fix docbook2texi command
836 sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \
837 Documentation/Makefile || die "sed failed"
838
839 # bug #318289
840 # Merged upstream
841 #epatch "${FILESDIR}"/git-1.7.3.2-interix.patch
842
843 # merged upstream
844 #epatch "${FILESDIR}"/git-1.7.5-interix.patch
845
846 # merged upstream
847 #epatch "${FILESDIR}"/git-1.7.6-interix.patch
848 }
849
850 git_emake() {
851 # bug #326625: PERL_PATH, PERL_MM_OPT
852 # bug #320647: PYTHON_PATH
853 PYTHON_PATH=""
854 use python && PYTHON_PATH="$(PYTHON -a)"
855 emake ${MY_MAKEOPTS} \
856 DESTDIR="${D}" \
857 OPTCFLAGS="${CFLAGS}" \
858 OPTLDFLAGS="${LDFLAGS}" \
859 OPTCC="$(tc-getCC)" \
860 OPTAR="$(tc-getAR)" \
861 prefix="${EPREFIX}"/usr \
862 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
863 sysconfdir="${EPREFIX}"/etc \
864 PYTHON_PATH="${PYTHON_PATH}" \
865 PERL_MM_OPT="" \
866 GIT_TEST_OPTS="--no-color" \
867 "$@"
868 # This is the fix for bug #326625, but it also causes breakage, see bug
869 # #352693.
870 # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
871 }
872
873 src_configure() {
874 exportmakeopts
875 }
876
877 src_compile() {
878 git_emake || die "emake failed"
879
880 if use emacs ; then
881 elisp-compile contrib/emacs/git{,-blame}.el \
882 || die "emacs modules failed"
883 fi
884
885 if use perl && use cgi ; then
886 git_emake \
887 gitweb/gitweb.cgi \
888 || die "emake gitweb/gitweb.cgi failed"
889 fi
890
891 cd "${S}"/Documentation
892 if [[ ${PV} == *9999 ]] ; then
893 git_emake man \
894 || die "emake man failed"
895 if use doc ; then
896 git_emake info html \
897 || die "emake info html failed"
898 fi
899 else
900 if use doc ; then
901 git_emake info \
902 || die "emake info html failed"
903 fi
904 fi
905 }
906
907 src_install() {
908 git_emake \
909 install || \
910 die "make install failed"
911
912 # Depending on the tarball and manual rebuild of the documentation, the
913 # manpages may exist in either OR both of these directories.
914 find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
915 find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
916
917 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
918 use doc && dodir /usr/share/doc/${PF}/html
919 for d in / /howto/ /technical/ ; do
920 docinto ${d}
921 dodoc Documentation${d}*.txt
922 use doc && dohtml -p ${d} Documentation${d}*.html
923 done
924 docinto /
925 # Upstream does not ship this pre-built :-(
926 use doc && doinfo Documentation/{git,gitman}.info
927
928 dobashcompletion contrib/completion/git-completion.bash ${PN}
929
930 if use emacs ; then
931 elisp-install ${PN} contrib/emacs/git.{el,elc} || die
932 elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
933 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
934 # don't add automatically to the load-path, so the sitefile
935 # can do a conditional loading
936 touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
937 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
938 fi
939
940 if use python && use gtk ; then
941 dobin "${S}"/contrib/gitview/gitview
942 python_convert_shebangs ${PYTHON_ABI} "${ED}"/usr/bin/gitview
943 dodoc "${S}"/contrib/gitview/gitview.txt
944 fi
945
946 dobin contrib/fast-import/git-p4
947 dodoc contrib/fast-import/git-p4.txt
948 newbin contrib/fast-import/import-tars.perl import-tars
949 newbin contrib/git-resurrect.sh git-resurrect
950
951 dodir /usr/share/${PN}/contrib
952 # The following are excluded:
953 # completion - installed above
954 # emacs - installed above
955 # examples - these are stuff that is not used in Git anymore actually
956 # gitview - installed above
957 # p4import - excluded because fast-import has a better one
958 # patches - stuff the Git guys made to go upstream to other places
959 # svnimport - use git-svn
960 # thunderbird-patch-inline - fixes thunderbird
961 for i in \
962 blameview buildsystems ciabot continuous convert-objects fast-import \
963 hg-to-git hooks remotes2config.sh remotes2config.sh rerere-train.sh \
964 stats svn-fe vim workdir \
965 ; do
966 cp -rf \
967 "${S}"/contrib/${i} \
968 "${ED}"/usr/share/${PN}/contrib \
969 || die "Failed contrib ${i}"
970 done
971
972 if use perl && use cgi ; then
973 # We used to install in /usr/share/${PN}/gitweb
974 # but upstream installs in /usr/share/gitweb
975 # so we will install a symlink and use their location for compat with other
976 # distros
977 dosym /usr/share/gitweb /usr/share/${PN}/gitweb
978
979 # INSTALL discusses configuration issues, not just installation
980 docinto /
981 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
982 newdoc "${S}"/gitweb/README README.gitweb
983
984 find "${ED}"/usr/lib64/perl5/ \
985 -name .packlist \
986 -exec rm \{\} \;
987 else
988 rm -rf "${ED}"/usr/share/gitweb
989 fi
990
991 if ! use subversion ; then
992 rm -f "${ED}"/usr/libexec/git-core/git-svn \
993 "${ED}"/usr/share/man/man1/git-svn.1*
994 fi
995
996 if use xinetd ; then
997 insinto /etc/xinetd.d
998 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
999 fi
1000
1001 newinitd "${FILESDIR}"/git-daemon.initd git-daemon
1002 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
1003
1004 fixlocalpod
1005 }
1006
1007 src_test() {
1008 local disabled=""
1009 local tests_cvs="t9200-git-cvsexportcommit.sh \
1010 t9400-git-cvsserver-server.sh \
1011 t9401-git-cvsserver-crlf.sh \
1012 t9600-cvsimport.sh \
1013 t9601-cvsimport-vendor-branch.sh \
1014 t9602-cvsimport-branches-tags.sh \
1015 t9603-cvsimport-patchsets.sh"
1016 local tests_perl="t5502-quickfetch.sh \
1017 t5512-ls-remote.sh \
1018 t5520-pull.sh"
1019 # Bug #225601 - t0004 is not suitable for root perm
1020 # Bug #219839 - t1004 is not suitable for root perm
1021 # t0001-init.sh - check for init notices EPERM* fails
1022 local tests_nonroot="t0001-init.sh \
1023 t0004-unwritable.sh \
1024 t0070-fundamental.sh \
1025 t1004-read-tree-m-u-wf.sh \
1026 t3700-add.sh \
1027 t7300-clean.sh"
1028
1029 # Unzip is used only for the testcase code, not by any normal parts of Git.
1030 if ! has_version app-arch/unzip ; then
1031 einfo "Disabling tar-tree tests"
1032 disabled="${disabled} t5000-tar-tree.sh"
1033 fi
1034
1035 cvs=0
1036 use cvs && let cvs=$cvs+1
1037 if [[ ${EUID} -eq 0 ]]; then
1038 if [[ $cvs -eq 1 ]]; then
1039 ewarn "Skipping CVS tests because CVS does not work as root!"
1040 ewarn "You should retest with FEATURES=userpriv!"
1041 disabled="${disabled} ${tests_cvs}"
1042 fi
1043 einfo "Skipping other tests that require being non-root"
1044 disabled="${disabled} ${tests_nonroot}"
1045 else
1046 [[ $cvs -gt 0 ]] && \
1047 has_version dev-vcs/cvs && \
1048 let cvs=$cvs+1
1049 [[ $cvs -gt 1 ]] && \
1050 built_with_use dev-vcs/cvs server && \
1051 let cvs=$cvs+1
1052 if [[ $cvs -lt 3 ]]; then
1053 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
1054 disabled="${disabled} ${tests_cvs}"
1055 fi
1056 fi
1057
1058 if ! use perl ; then
1059 einfo "Disabling tests that need Perl"
1060 disabled="${disabled} ${tests_perl}"
1061 fi
1062
1063 # Reset all previously disabled tests
1064 cd "${S}/t"
1065 for i in *.sh.DISABLED ; do
1066 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
1067 done
1068 einfo "Disabled tests:"
1069 for i in ${disabled} ; do
1070 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
1071 done
1072
1073 # Avoid the test system removing the results because we want them ourselves
1074 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
1075 -i "${S}"/t/Makefile
1076
1077 # Clean old results first
1078 cd "${S}/t"
1079 git_emake clean
1080
1081 # Now run the tests
1082 cd "${S}"
1083 einfo "Start test run"
1084 git_emake test
1085 rc=$?
1086
1087 # Display nice results
1088 cd "${S}/t"
1089 git_emake aggregate-results
1090
1091 # And exit
1092 [ $rc -eq 0 ] || die "tests failed. Please file a bug."
1093 }
1094
1095 showpkgdeps() {
1096 local pkg=$1
1097 shift
1098 elog " $(printf "%-17s:" ${pkg}) ${@}"
1099 }
1100
1101 pkg_postinst() {
1102 use emacs && elisp-site-regen
1103 use python && python_mod_optimize git_remote_helpers
1104 use bash-completion && \
1105 einfo "Please read /usr/share/bash-completion/git for Git bash completion"
1106 elog "These additional scripts need some dependencies:"
1107 echo
1108 showpkgdeps git-quiltimport "dev-util/quilt"
1109 showpkgdeps git-instaweb \
1110 "|| ( www-servers/lighttpd www-servers/apache )"
1111 echo
1112 }
1113
1114 pkg_postrm() {
1115 use emacs && elisp-site-regen
1116 use python && python_mod_cleanup git_remote_helpers
1117 }