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: git-1.8.5.1.ebuild ChangeLog metadata.xml git-1.7.8.6.ebuild git-1.7.2.5.ebuild git-1.8.0.2.ebuild git-1.7.12.4.ebuild git-1.6.4.5.ebuild git-1.7.3.4-r1.ebuild
Date: Thu, 05 Dec 2013 08:13:56
Message-Id: 20131205081352.A436A2004E@flycatcher.gentoo.org
1 polynomial-c 13/12/05 08:13:52
2
3 Modified: ChangeLog metadata.xml
4 Added: git-1.8.5.1.ebuild
5 Removed: git-1.7.8.6.ebuild git-1.7.2.5.ebuild
6 git-1.8.0.2.ebuild git-1.7.12.4.ebuild
7 git-1.6.4.5.ebuild git-1.7.3.4-r1.ebuild
8 Log:
9 Version bump. Removed old
10
11 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
12
13 Revision Changes Path
14 1.229 dev-vcs/git/ChangeLog
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.229&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.229&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?r1=1.228&r2=1.229
19
20 Index: ChangeLog
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v
23 retrieving revision 1.228
24 retrieving revision 1.229
25 diff -u -r1.228 -r1.229
26 --- ChangeLog 4 Dec 2013 23:07:42 -0000 1.228
27 +++ ChangeLog 5 Dec 2013 08:13:52 -0000 1.229
28 @@ -1,6 +1,19 @@
29 # ChangeLog for dev-vcs/git
30 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
31 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.228 2013/12/04 23:07:42 polynomial-c Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.229 2013/12/05 08:13:52 polynomial-c Exp $
33 +
34 +*git-1.8.5.1 (05 Dec 2013)
35 +
36 + 05 Dec 2013; Lars Wendler <polynomial-c@g.o> -git-1.6.4.5.ebuild,
37 + -git-1.7.2.5.ebuild, -git-1.7.3.4-r1.ebuild, -git-1.7.8.6.ebuild,
38 + -git-1.7.12.4.ebuild, -git-1.8.0.2.ebuild, +git-1.8.5.1.ebuild,
39 + -files/git-1.6.6.1-interix6.patch, -files/git-1.7.1-interix.patch,
40 + -files/git-1.7.2-always-install-js.patch, -files/git-1.7.3.2-interix.patch,
41 + -files/git-1.7.3.4-avoid-shell-issues.patch,
42 + -files/git-1.7.3.4-fix-perl-test-prereq.patch,
43 + -files/git-1.7.3.5-optional-cvs.patch, -files/git-1.7.11-optional-cvs.patch,
44 + +files/git-1.8.5-optional-cvs.patch, metadata.xml:
45 + Version bump. Removed old.
46
47 *git-1.8.4.5 (04 Dec 2013)
48
49
50
51
52 1.10 dev-vcs/git/metadata.xml
53
54 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/metadata.xml?rev=1.10&view=markup
55 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/metadata.xml?rev=1.10&content-type=text/plain
56 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/metadata.xml?r1=1.9&r2=1.10
57
58 Index: metadata.xml
59 ===================================================================
60 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/metadata.xml,v
61 retrieving revision 1.9
62 retrieving revision 1.10
63 diff -u -r1.9 -r1.10
64 --- metadata.xml 3 Nov 2013 05:52:45 -0000 1.9
65 +++ metadata.xml 5 Dec 2013 08:13:52 -0000 1.10
66 @@ -33,7 +33,6 @@
67 <flag name="gpg">Pull in gnupg for signing -- without gnupg, attempts at signing will fail at runtime!</flag>
68 <flag name="gtk">Include the gitview contrib tool</flag>
69 <flag name="highlight">GitWeb support for app-text/highlight</flag>
70 - <flag name="mozsha1">Makes git use an optimized SHA1 routine from Mozilla that should be fast on non-x86 machines</flag>
71 <flag name="ppcsha1">Make use of a bundled routine that is optimized for the PPC arch</flag>
72 <flag name="subversion">Include git-svn for <pkg>dev-vcs/subversion</pkg> support</flag>
73 <flag name="webdav">Adds support for push'ing to HTTP/HTTPS repositories via DAV</flag>
74
75
76
77 1.1 dev-vcs/git/git-1.8.5.1.ebuild
78
79 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.8.5.1.ebuild?rev=1.1&view=markup
80 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.8.5.1.ebuild?rev=1.1&content-type=text/plain
81
82 Index: git-1.8.5.1.ebuild
83 ===================================================================
84 # Copyright 1999-2013 Gentoo Foundation
85 # Distributed under the terms of the GNU General Public License v2
86 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.8.5.1.ebuild,v 1.1 2013/12/05 08:13:52 polynomial-c Exp $
87
88 EAPI=5
89
90 GENTOO_DEPEND_ON_PERL=no
91
92 # bug #329479: git-remote-testgit is not multiple-version aware
93 PYTHON_COMPAT=( python2_{6,7} )
94 [[ ${PV} == *9999 ]] && SCM="git-2"
95 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
96
97 inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
98
99 MY_PV="${PV/_rc/.rc}"
100 MY_P="${PN}-${MY_PV}"
101
102 DOC_VER=${MY_PV}
103
104 DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
105 HOMEPAGE="http://www.git-scm.com/"
106 if [[ ${PV} != *9999 ]]; then
107 SRC_URI_SUFFIX="gz"
108 SRC_URI_GOOG="http://git-core.googlecode.com/files"
109 SRC_URI_KORG="mirror://kernel/software/scm/git"
110 SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
111 ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
112 ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
113 ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
114 doc? (
115 ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
116 ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
117 )"
118 KEYWORDS="~alpha ~amd64 ~arm ~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"
119 else
120 SRC_URI=""
121 KEYWORDS=""
122 fi
123
124 LICENSE="GPL-2"
125 SLOT="0"
126 IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
127
128 # Common to both DEPEND and RDEPEND
129 CDEPEND="
130 dev-libs/openssl
131 sys-libs/zlib
132 pcre? ( dev-libs/libpcre )
133 perl? ( dev-lang/perl[-build(-)] )
134 tk? ( dev-lang/tk )
135 curl? (
136 net-misc/curl
137 webdav? ( dev-libs/expat )
138 )
139 emacs? ( virtual/emacs )
140 gnome-keyring? ( gnome-base/gnome-keyring )"
141
142 RDEPEND="${CDEPEND}
143 gpg? ( app-crypt/gnupg )
144 perl? ( dev-perl/Error
145 dev-perl/Net-SMTP-SSL
146 dev-perl/Authen-SASL
147 cgi? ( virtual/perl-CGI highlight? ( app-text/highlight ) )
148 cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
149 subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
150 )
151 python? ( gtk?
152 (
153 >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
154 >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
155 )
156 ${PYTHON_DEPS} )"
157
158 # This is how info docs are created with Git:
159 # .txt/asciidoc --(asciidoc)---------> .xml/docbook
160 # .xml/docbook --(docbook2texi.pl)--> .texi
161 # .texi --(makeinfo)---------> .info
162 DEPEND="${CDEPEND}
163 app-arch/cpio
164 doc? (
165 app-text/asciidoc
166 app-text/docbook2X
167 sys-apps/texinfo
168 app-text/xmlto
169 )
170 test? (
171 app-crypt/gnupg
172 )"
173
174 # Live ebuild builds man pages and HTML docs, additionally
175 if [[ ${PV} == *9999 ]]; then
176 DEPEND="${DEPEND}
177 app-text/asciidoc"
178 fi
179
180 SITEFILE=50${PN}-gentoo.el
181 S="${WORKDIR}/${MY_P}"
182
183 REQUIRED_USE="
184 cgi? ( perl )
185 cvs? ( perl )
186 subversion? ( perl )
187 webdav? ( curl )
188 gtk? ( python )
189 python? ( ${PYTHON_REQUIRED_USE} )
190 "
191
192 pkg_setup() {
193 if use subversion && has_version "dev-vcs/subversion[dso]"; then
194 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
195 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
196 ewarn "have been warned."
197 fi
198 if use python ; then
199 python-single-r1_pkg_setup
200 fi
201 }
202
203 # This is needed because for some obscure reasons future calls to make don't
204 # pick up these exports if we export them in src_unpack()
205 exportmakeopts() {
206 local myopts
207
208 if use blksha1 ; then
209 myopts="${myopts} BLK_SHA1=YesPlease"
210 elif use ppcsha1 ; then
211 myopts="${myopts} PPC_SHA1=YesPlease"
212 fi
213
214 if use curl ; then
215 use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
216 else
217 myopts="${myopts} NO_CURL=YesPlease"
218 fi
219
220 # broken assumptions, because of broken build system ...
221 myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
222 myopts="${myopts} INSTALL=install TAR=tar"
223 myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
224 myopts="${myopts} SANE_TOOL_PATH="
225 myopts="${myopts} OLD_ICONV="
226 myopts="${myopts} NO_EXTERNAL_GREP="
227
228 # For svn-fe
229 extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
230
231 # can't define this to null, since the entire makefile depends on it
232 sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
233
234 use iconv \
235 || myopts="${myopts} NO_ICONV=YesPlease"
236 use nls \
237 || myopts="${myopts} NO_GETTEXT=YesPlease"
238 use tk \
239 || myopts="${myopts} NO_TCLTK=YesPlease"
240 use pcre \
241 && myopts="${myopts} USE_LIBPCRE=yes" \
242 && extlibs="${extlibs} -lpcre"
243 use perl \
244 && myopts="${myopts} INSTALLDIRS=vendor" \
245 || myopts="${myopts} NO_PERL=YesPlease"
246 use python \
247 || myopts="${myopts} NO_PYTHON=YesPlease"
248 use subversion \
249 || myopts="${myopts} NO_SVN_TESTS=YesPlease"
250 use threads \
251 && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
252 || myopts="${myopts} NO_PTHREADS=YesPlease"
253 use cvs \
254 || myopts="${myopts} NO_CVS=YesPlease"
255 # Disabled until ~m68k-mint can be keyworded again
256 # if [[ ${CHOST} == *-mint* ]] ; then
257 # myopts="${myopts} NO_MMAP=YesPlease"
258 # myopts="${myopts} NO_IPV6=YesPlease"
259 # myopts="${myopts} NO_STRLCPY=YesPlease"
260 # myopts="${myopts} NO_MEMMEM=YesPlease"
261 # myopts="${myopts} NO_MKDTEMP=YesPlease"
262 # myopts="${myopts} NO_MKSTEMPS=YesPlease"
263 # fi
264 if [[ ${CHOST} == ia64-*-hpux* ]]; then
265 myopts="${myopts} NO_NSEC=YesPlease"
266 fi
267 if [[ ${CHOST} == *-*-aix* ]]; then
268 myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease"
269 fi
270 if [[ ${CHOST} == *-solaris* ]]; then
271 myopts="${myopts} NEEDS_LIBICONV=YesPlease"
272 fi
273
274 has_version '>=app-text/asciidoc-8.0' \
275 && myopts="${myopts} ASCIIDOC8=YesPlease"
276 myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
277
278 # Bug 290465:
279 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
280 [[ "${CHOST}" == *-uclibc* ]] && \
281 myopts="${myopts} NO_NSEC=YesPlease"
282
283 export MY_MAKEOPTS="${myopts}"
284 export EXTLIBS="${extlibs}"
285 }
286
287 src_unpack() {
288 if [[ ${PV} != *9999 ]]; then
289 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
290 cd "${S}"
291 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
292 use doc && \
293 cd "${S}"/Documentation && \
294 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
295 cd "${S}"
296 else
297 git-2_src_unpack
298 cd "${S}"
299 #cp "${FILESDIR}"/GIT-VERSION-GEN .
300 fi
301
302 }
303
304 src_prepare() {
305 # bug #350330 - automagic CVS when we don't want it is bad.
306 epatch "${FILESDIR}"/git-1.8.5-optional-cvs.patch
307
308 sed -i \
309 -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
310 -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
311 -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
312 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
313 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
314 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
315 Makefile contrib/svn-fe/Makefile || die "sed failed"
316
317 # Never install the private copy of Error.pm (bug #296310)
318 sed -i \
319 -e '/private-Error.pm/s,^,#,' \
320 perl/Makefile.PL
321
322 # Fix docbook2texi command
323 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
324 Documentation/Makefile || die "sed failed"
325
326 # Fix git-subtree missing DESTDIR
327 sed -i \
328 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
329 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
330 contrib/subtree/Makefile
331 }
332
333 git_emake() {
334 # bug #326625: PERL_PATH, PERL_MM_OPT
335 # bug #320647: PYTHON_PATH
336 PYTHON_PATH=""
337 use python && PYTHON_PATH="${PYTHON}"
338 emake ${MY_MAKEOPTS} \
339 DESTDIR="${D}" \
340 OPTCFLAGS="${CFLAGS}" \
341 OPTLDFLAGS="${LDFLAGS}" \
342 OPTCC="$(tc-getCC)" \
343 OPTAR="$(tc-getAR)" \
344 prefix="${EPREFIX}"/usr \
345 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
346 sysconfdir="${EPREFIX}"/etc \
347 PYTHON_PATH="${PYTHON_PATH}" \
348 PERL_MM_OPT="" \
349 GIT_TEST_OPTS="--no-color" \
350 V=1 \
351 "$@"
352 # This is the fix for bug #326625, but it also causes breakage, see bug
353 # #352693.
354 # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
355 }
356
357 src_configure() {
358 exportmakeopts
359 }
360
361 src_compile() {
362 if use perl ; then
363 git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
364 git_emake perl/perl.mak || die "emake perl/perl.mak failed"
365 fi
366 git_emake || die "emake failed"
367
368 if use emacs ; then
369 elisp-compile contrib/emacs/git{,-blame}.el
370 fi
371
372 if use perl && use cgi ; then
373 git_emake \
374 gitweb/gitweb.cgi \
375 || die "emake gitweb/gitweb.cgi failed"
376 fi
377
378 if [[ ${CHOST} == *-darwin* ]]; then
379 cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
380 git_emake || die "emake credential-osxkeychain"
381 fi
382
383 cd "${S}"/Documentation
384 if [[ ${PV} == *9999 ]] ; then
385 git_emake man \
386 || die "emake man failed"
387 if use doc ; then
388 git_emake info html \
389 || die "emake info html failed"
390 fi
391 else
392 if use doc ; then
393 git_emake info \
394 || die "emake info html failed"
395 fi
396 fi
397
398 if use subversion ; then
399 cd "${S}"/contrib/svn-fe
400 git_emake EXTLIBS="${EXTLIBS}" || die "emake svn-fe failed"
401 if use doc ; then
402 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
403 fi
404 cd "${S}"
405 fi
406
407 if use gnome-keyring ; then
408 cd "${S}"/contrib/credential/gnome-keyring
409 git_emake || die "emake git-credential-gnome-keyring failed"
410 fi
411
412 cd "${S}"/contrib/subtree
413 git_emake
414 use doc && git_emake doc
415 }
416
417 src_install() {
418 git_emake \
419 install || \
420 die "make install failed"
421
422 if [[ ${CHOST} == *-darwin* ]]; then
423 dobin contrib/credential/osxkeychain/git-credential-osxkeychain
424 fi
425
426 # Depending on the tarball and manual rebuild of the documentation, the
427 # manpages may exist in either OR both of these directories.
428 find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
429 find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
430
431 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
432 use doc && dodir /usr/share/doc/${PF}/html
433 for d in / /howto/ /technical/ ; do
434 docinto ${d}
435 dodoc Documentation${d}*.txt
436 use doc && dohtml -p ${d} Documentation${d}*.html
437 done
438 docinto /
439 # Upstream does not ship this pre-built :-(
440 use doc && doinfo Documentation/{git,gitman}.info
441
442 newbashcomp contrib/completion/git-completion.bash ${PN}
443 newbashcomp contrib/completion/git-prompt.sh ${PN}-prompt
444
445 if use emacs ; then
446 elisp-install ${PN} contrib/emacs/git.{el,elc}
447 elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
448 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
449 # don't add automatically to the load-path, so the sitefile
450 # can do a conditional loading
451 touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
452 elisp-site-file-install "${FILESDIR}"/${SITEFILE}
453 fi
454
455 if use python && use gtk ; then
456 python_doscript "${S}"/contrib/gitview/gitview
457 dodoc "${S}"/contrib/gitview/gitview.txt
458 fi
459
460 #dobin contrib/fast-import/git-p4 # Moved upstream
461 #dodoc contrib/fast-import/git-p4.txt # Moved upstream
462 newbin contrib/fast-import/import-tars.perl import-tars
463 exeinto /usr/libexec/git-core/
464 newexe contrib/git-resurrect.sh git-resurrect
465
466 # git-subtree
467 cd "${S}"/contrib/subtree
468 git_emake install || die "Failed to emake install git-subtree"
469 if use doc ; then
470 git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
471 fi
472 newdoc README README.git-subtree
473 dodoc git-subtree.txt
474 cd "${S}"
475
476 # git-diffall
477 dobin contrib/diffall/git-diffall
478 newdoc contrib/diffall/README git-diffall.txt
479
480 # diff-highlight
481 dobin contrib/diff-highlight/diff-highlight
482 newdoc contrib/diff-highlight/README README.diff-highlight
483
484 # git-jump
485 exeinto /usr/libexec/git-core/
486 doexe contrib/git-jump/git-jump
487 newdoc contrib/git-jump/README git-jump.txt
488
489 # git-contacts
490 exeinto /usr/libexec/git-core/
491 doexe contrib/contacts/git-contacts
492 dodoc contrib/contacts/git-contacts.txt
493
494 if use gnome-keyring ; then
495 cd "${S}"/contrib/credential/gnome-keyring
496 dobin git-credential-gnome-keyring
497 fi
498
499 if use subversion ; then
500 cd "${S}"/contrib/svn-fe
501 dobin svn-fe
502 dodoc svn-fe.txt
503 use doc && doman svn-fe.1 && dohtml svn-fe.html
504 cd "${S}"
505 fi
506
507 # remote-helpers
508 if use python ; then
509 python_scriptinto /usr/libexec/git-core/
510 python_doscript "${S}"/contrib/remote-helpers/git-remote-{bzr,hg}
511 python_optimize
512 fi
513
514 dodir /usr/share/${PN}/contrib
515 # The following are excluded:
516 # completion - installed above
517 # credential/gnome-keyring TODO
518 # diff-highlight - done above
519 # diffall - done above
520 # emacs - installed above
521 # examples - these are stuff that is not used in Git anymore actually
522 # git-jump - done above
523 # gitview - installed above
524 # p4import - excluded because fast-import has a better one
525 # patches - stuff the Git guys made to go upstream to other places
526 # persistent-https - TODO
527 # mw-to-git - TODO
528 # subtree - build seperately
529 # svnimport - use git-svn
530 # thunderbird-patch-inline - fixes thunderbird
531 for i in \
532 buildsystems convert-objects fast-import \
533 hg-to-git hooks remotes2config.sh rerere-train.sh \
534 stats vim workdir \
535 ; do
536 cp -rf \
537 "${S}"/contrib/${i} \
538 "${ED}"/usr/share/${PN}/contrib \
539 || die "Failed contrib ${i}"
540 done
541
542 if use perl && use cgi ; then
543 # We used to install in /usr/share/${PN}/gitweb
544 # but upstream installs in /usr/share/gitweb
545 # so we will install a symlink and use their location for compat with other
546 # distros
547 dosym /usr/share/gitweb /usr/share/${PN}/gitweb
548
549 # INSTALL discusses configuration issues, not just installation
550 docinto /
551 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
552 newdoc "${S}"/gitweb/README README.gitweb
553
554 find "${ED}"/usr/lib64/perl5/ \
555 -name .packlist \
556 -exec rm \{\} \;
557 else
558 rm -rf "${ED}"/usr/share/gitweb
559 fi
560
561 if ! use subversion ; then
562 rm -f "${ED}"/usr/libexec/git-core/git-svn \
563 "${ED}"/usr/share/man/man1/git-svn.1*
564 fi
565
566 if use xinetd ; then
567 insinto /etc/xinetd.d
568 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
569 fi
570
571 if use !prefix ; then
572 newinitd "${FILESDIR}"/git-daemon.initd git-daemon
573 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
574 systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
575 systemd_dounit "${FILESDIR}/git-daemon.socket"
576 fi
577
578 fixlocalpod
579 }
580
581 src_test() {
582 local disabled=""
583 local tests_cvs="t9200-git-cvsexportcommit.sh \
584 t9400-git-cvsserver-server.sh \
585 t9401-git-cvsserver-crlf.sh \
586 t9600-cvsimport.sh \
587 t9601-cvsimport-vendor-branch.sh \
588 t9602-cvsimport-branches-tags.sh \
589 t9603-cvsimport-patchsets.sh"
590 local tests_perl="t3701-add-interactive.sh \
591 t5502-quickfetch.sh \
592 t5512-ls-remote.sh \
593 t5520-pull.sh \
594 t7106-reset-unborn-branch.sh \
595 t7501-commit.sh"
596 # Bug #225601 - t0004 is not suitable for root perm
597 # Bug #219839 - t1004 is not suitable for root perm
598 # t0001-init.sh - check for init notices EPERM* fails
599 local tests_nonroot="t0001-init.sh \
600 t0004-unwritable.sh \
601 t0070-fundamental.sh \
602 t1004-read-tree-m-u-wf.sh \
603 t3700-add.sh \
604 t7300-clean.sh"
605 # t9100 still fails with symlinks in SVN 1.7
606 local test_svn="t9100-git-svn-basic.sh"
607
608 # Unzip is used only for the testcase code, not by any normal parts of Git.
609 if ! has_version app-arch/unzip ; then
610 einfo "Disabling tar-tree tests"
611 disabled="${disabled} t5000-tar-tree.sh"
612 fi
613
614 cvs=0
615 use cvs && let cvs=$cvs+1
616 if [[ ${EUID} -eq 0 ]]; then
617 if [[ $cvs -eq 1 ]]; then
618 ewarn "Skipping CVS tests because CVS does not work as root!"
619 ewarn "You should retest with FEATURES=userpriv!"
620 disabled="${disabled} ${tests_cvs}"
621 fi
622 einfo "Skipping other tests that require being non-root"
623 disabled="${disabled} ${tests_nonroot}"
624 else
625 [[ $cvs -gt 0 ]] && \
626 has_version dev-vcs/cvs && \
627 let cvs=$cvs+1
628 [[ $cvs -gt 1 ]] && \
629 has_version "dev-vcs/cvs[server]" && \
630 let cvs=$cvs+1
631 if [[ $cvs -lt 3 ]]; then
632 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
633 disabled="${disabled} ${tests_cvs}"
634 fi
635 fi
636
637 if ! use perl ; then
638 einfo "Disabling tests that need Perl"
639 disabled="${disabled} ${tests_perl}"
640 fi
641
642 einfo "Disabling tests that fail with SVN 1.7"
643 disabled="${disabled} ${test_svn}"
644
645 # Reset all previously disabled tests
646 cd "${S}/t"
647 for i in *.sh.DISABLED ; do
648 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
649 done
650 einfo "Disabled tests:"
651 for i in ${disabled} ; do
652 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
653 done
654
655 # Avoid the test system removing the results because we want them ourselves
656 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
657 -i "${S}"/t/Makefile
658
659 # Clean old results first, must always run
660 cd "${S}/t"
661 nonfatal git_emake clean
662
663 # Now run the tests, keep going if we hit an error, and don't terminate on
664 # failure
665 cd "${S}"
666 einfo "Start test run"
667 #MAKEOPTS=-j1
668 nonfatal git_emake --keep-going test
669 rc=$?
670
671 # Display nice results, now print the results
672 cd "${S}/t"
673 nonfatal git_emake aggregate-results
674
675 # And bail if there was a problem
676 [ $rc -eq 0 ] || die "tests failed. Please file a bug."
677 }
678
679 showpkgdeps() {
680 local pkg=$1
681 shift
682 elog " $(printf "%-17s:" ${pkg}) ${@}"
683 }
684
685 pkg_postinst() {
686 use emacs && elisp-site-regen
687 einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
688 einfo "Please read /usr/share/bash-completion/git-prompt for Git bash prompt"
689 einfo "Note that the prompt bash code is now in the seperate script"
690 elog "These additional scripts need some dependencies:"
691 echo
692 showpkgdeps git-quiltimport "dev-util/quilt"
693 showpkgdeps git-instaweb \
694 "|| ( www-servers/lighttpd www-servers/apache )"
695 echo
696 }
697
698 pkg_postrm() {
699 use emacs && elisp-site-regen
700 }