Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/git/
Date: Fri, 23 Mar 2018 11:24:01
Message-Id: 1521804232.7a47296aa274c077f413f1523a18e814bd3fc61c.polynomial-c@gentoo
1 commit: 7a47296aa274c077f413f1523a18e814bd3fc61c
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 23 11:23:34 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 23 11:23:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a47296a
7
8 dev-vcs/git: Synced live ebuilds.
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 dev-vcs/git/git-9999-r1.ebuild | 337 +++++++++++++++++++++--------------------
13 dev-vcs/git/git-9999-r2.ebuild | 337 +++++++++++++++++++++--------------------
14 dev-vcs/git/git-9999-r3.ebuild | 337 +++++++++++++++++++++--------------------
15 dev-vcs/git/git-9999.ebuild | 337 +++++++++++++++++++++--------------------
16 4 files changed, 704 insertions(+), 644 deletions(-)
17
18 diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild
19 index e9f0c242bcf..29ff3e4669d 100644
20 --- a/dev-vcs/git/git-9999-r1.ebuild
21 +++ b/dev-vcs/git/git-9999-r1.ebuild
22 @@ -73,18 +73,30 @@ CDEPEND="
23
24 RDEPEND="${CDEPEND}
25 gpg? ( app-crypt/gnupg )
26 - mediawiki? (
27 - dev-perl/DateTime-Format-ISO8601
28 - dev-perl/HTML-Tree
29 - dev-perl/MediaWiki-API
30 + perl? (
31 + dev-perl/Error
32 + dev-perl/Net-SMTP-SSL
33 + dev-perl/Authen-SASL
34 + cgi? (
35 + dev-perl/CGI
36 + highlight? ( app-text/highlight )
37 + )
38 + cvs? (
39 + >=dev-vcs/cvsps-2.1:0
40 + dev-perl/DBI
41 + dev-perl/DBD-SQLite
42 + )
43 + mediawiki? (
44 + dev-perl/DateTime-Format-ISO8601
45 + dev-perl/HTML-Tree
46 + dev-perl/MediaWiki-API
47 + )
48 + subversion? (
49 + dev-vcs/subversion[-dso,perl]
50 + dev-perl/libwww-perl
51 + dev-perl/TermReadKey
52 + )
53 )
54 - perl? ( dev-perl/Error
55 - dev-perl/Net-SMTP-SSL
56 - dev-perl/Authen-SASL
57 - cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
58 - cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
59 - subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
60 - )
61 python? ( ${PYTHON_DEPS} )
62 "
63
64 @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then
65 app-text/asciidoc"
66 fi
67
68 -SITEFILE=50${PN}-gentoo.el
69 +SITEFILE="50${PN}-gentoo.el"
70 S="${WORKDIR}/${MY_P}"
71
72 REQUIRED_USE="
73 @@ -124,11 +136,7 @@ REQUIRED_USE="
74
75 PATCHES=(
76 # bug #350330 - automagic CVS when we don't want it is bad.
77 - "${FILESDIR}"/git-2.12.0-optional-cvs.patch
78 -
79 - # install mediawiki perl modules also in vendor_dir
80 - # hack, needs better upstream solution
81 - "${FILESDIR}"/git-1.8.5-mw-vendor.patch
82 + "${FILESDIR}"/git-2.17.0_rc1-optional-cvs.patch
83
84 "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
85
86 @@ -150,111 +158,110 @@ pkg_setup() {
87 # This is needed because for some obscure reasons future calls to make don't
88 # pick up these exports if we export them in src_unpack()
89 exportmakeopts() {
90 - local myopts
91 + local myopts=(
92 + ASCIIDOC_NO_ROFF=YesPlease
93 + $(usex cvs '' NO_CVS=YesPlease)
94 + $(usex elibc_musl NO_REGEX=YesPlease '')
95 + $(usex iconv '' NO_ICONV=YesPlease)
96 + $(usex nls '' NO_GETTEXT=YesPlease)
97 + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
98 + $(usex python '' NO_PYTHON=YesPlease)
99 + $(usex subversion '' NO_SVN_TESTS=YesPlease)
100 + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease)
101 + $(usex tk '' NO_TCLTK=YesPlease)
102 + )
103
104 if use blksha1 ; then
105 - myopts+=" BLK_SHA1=YesPlease"
106 + myopts+=( BLK_SHA1=YesPlease )
107 elif use ppcsha1 ; then
108 - myopts+=" PPC_SHA1=YesPlease"
109 + myopts+=( PPC_SHA1=YesPlease )
110 fi
111
112 if use curl ; then
113 - use webdav || myopts+=" NO_EXPAT=YesPlease"
114 + use webdav || myopts+=( NO_EXPAT=YesPlease )
115 else
116 - myopts+=" NO_CURL=YesPlease"
117 + myopts+=( NO_CURL=YesPlease )
118 fi
119
120 # broken assumptions, because of static build system ...
121 - myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
122 - myopts+=" INSTALL=install TAR=tar"
123 - myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
124 - myopts+=" SANE_TOOL_PATH="
125 - myopts+=" OLD_ICONV="
126 - myopts+=" NO_EXTERNAL_GREP="
127 + myopts+=(
128 + NO_FINK=YesPlease
129 + NO_DARWIN_PORTS=YesPlease
130 + INSTALL=install
131 + TAR=tar
132 + SHELL_PATH="${EPREFIX}/bin/sh"
133 + SANE_TOOL_PATH=
134 + OLD_ICONV=
135 + NO_EXTERNAL_GREP=
136 + )
137
138 # For svn-fe
139 extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
140
141 # can't define this to null, since the entire makefile depends on it
142 - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
143 -
144 - use iconv \
145 - || myopts+=" NO_ICONV=YesPlease"
146 - use nls \
147 - || myopts+=" NO_GETTEXT=YesPlease"
148 - use tk \
149 - || myopts+=" NO_TCLTK=YesPlease"
150 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
151 +
152 if use pcre; then
153 if use pcre-jit; then
154 - myopts+=" USE_LIBPCRE2=YesPlease"
155 + myopts+=( USE_LIBPCRE2=YesPlease )
156 extlibs+=" -lpcre2-8"
157 else
158 - myopts+=" USE_LIBPCRE1=YesPlease"
159 - myopts+=" NO_LIBPCRE1_JIT=YesPlease"
160 + myopts+=(
161 + USE_LIBPCRE1=YesPlease
162 + NO_LIBPCRE1_JIT=YesPlease
163 + )
164 extlibs+=" -lpcre"
165 fi
166 fi
167 - use perl \
168 - && myopts+=" INSTALLDIRS=vendor" \
169 - || myopts+=" NO_PERL=YesPlease"
170 - use python \
171 - || myopts+=" NO_PYTHON=YesPlease"
172 - use subversion \
173 - || myopts+=" NO_SVN_TESTS=YesPlease"
174 - use threads \
175 - && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
176 - || myopts+=" NO_PTHREADS=YesPlease"
177 - use cvs \
178 - || myopts+=" NO_CVS=YesPlease"
179 - use elibc_musl \
180 - && myopts+=" NO_REGEX=YesPlease"
181 # Disabled until ~m68k-mint can be keyworded again
182 # if [[ ${CHOST} == *-mint* ]] ; then
183 -# myopts+=" NO_MMAP=YesPlease"
184 -# myopts+=" NO_IPV6=YesPlease"
185 -# myopts+=" NO_STRLCPY=YesPlease"
186 -# myopts+=" NO_MEMMEM=YesPlease"
187 -# myopts+=" NO_MKDTEMP=YesPlease"
188 -# myopts+=" NO_MKSTEMPS=YesPlease"
189 +# myopts+=(
190 +# NO_MMAP=YesPlease
191 +# NO_IPV6=YesPlease
192 +# NO_STRLCPY=YesPlease
193 +# NO_MEMMEM=YesPlease
194 +# NO_MKDTEMP=YesPlease
195 +# NO_MKSTEMPS=YesPlease
196 +# )
197 # fi
198 if [[ ${CHOST} == ia64-*-hpux* ]]; then
199 - myopts+=" NO_NSEC=YesPlease"
200 + myopts+=( NO_NSEC=YesPlease )
201 fi
202 if [[ ${CHOST} == *-*-aix* ]]; then
203 - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
204 + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
205 fi
206 if [[ ${CHOST} == *-solaris* ]]; then
207 - myopts+=" NEEDS_LIBICONV=YesPlease"
208 - myopts+=" HAVE_CLOCK_MONOTONIC=1"
209 + myopts+=(
210 + NEEDS_LIBICONV=YesPlease
211 + HAVE_CLOCK_MONOTONIC=1
212 + )
213 grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
214 - myopts+=" HAVE_GETDELIM=1"
215 + myopts+=( HAVE_GETDELIM=1 )
216 fi
217
218 has_version '>=app-text/asciidoc-8.0' \
219 - && myopts+=" ASCIIDOC8=YesPlease"
220 - myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
221 + && myopts+=( ASCIIDOC8=YesPlease )
222
223 # Bug 290465:
224 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
225 [[ "${CHOST}" == *-uclibc* ]] && \
226 - myopts+=" NO_NSEC=YesPlease"
227 + myopts+=( NO_NSEC=YesPlease )
228
229 - export MY_MAKEOPTS="${myopts}"
230 + export MY_MAKEOPTS="${myopts[@]}"
231 export EXTLIBS="${extlibs}"
232 }
233
234 src_unpack() {
235 if [[ ${PV} != *9999 ]]; then
236 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
237 - cd "${S}"
238 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
239 - use doc && \
240 - cd "${S}"/Documentation && \
241 + if use doc ; then
242 + pushd "${S}"/Documentation &>/dev/null || die
243 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
244 - cd "${S}"
245 + popd &>/dev/null || die
246 + fi
247 else
248 git-r3_src_unpack
249 - cd "${S}"
250 #cp "${FILESDIR}"/GIT-VERSION-GEN .
251 fi
252
253 @@ -280,41 +287,37 @@ src_prepare() {
254 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
255 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
256 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
257 - Makefile contrib/svn-fe/Makefile || die "sed failed"
258 -
259 - # Never install the private copy of Error.pm (bug #296310)
260 - sed -i \
261 - -e '/private-Error.pm/s,^,#,' \
262 - perl/Makefile.PL
263 + Makefile contrib/svn-fe/Makefile || die
264
265 # Fix docbook2texi command
266 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
267 - Documentation/Makefile || die "sed failed"
268 + Documentation/Makefile || die
269
270 # Fix git-subtree missing DESTDIR
271 sed -i \
272 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
273 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
274 - contrib/subtree/Makefile
275 + contrib/subtree/Makefile || die
276 }
277
278 git_emake() {
279 # bug #320647: PYTHON_PATH
280 - PYTHON_PATH=""
281 + local PYTHON_PATH=""
282 use python && PYTHON_PATH="${PYTHON}"
283 emake ${MY_MAKEOPTS} \
284 - DESTDIR="${D}" \
285 - OPTCFLAGS="${CFLAGS}" \
286 - OPTLDFLAGS="${LDFLAGS}" \
287 - OPTCC="$(tc-getCC)" \
288 - OPTAR="$(tc-getAR)" \
289 prefix="${EPREFIX}"/usr \
290 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
291 + perllibdir="$(perl_get_raw_vendorlib)" \
292 sysconfdir="${EPREFIX}"/etc \
293 - PYTHON_PATH="${PYTHON_PATH}" \
294 + DESTDIR="${D}" \
295 + GIT_TEST_OPTS="--no-color" \
296 + OPTAR="$(tc-getAR)" \
297 + OPTCC="$(tc-getCC)" \
298 + OPTCFLAGS="${CFLAGS}" \
299 + OPTLDFLAGS="${LDFLAGS}" \
300 PERL_PATH="${EPREFIX}/usr/bin/perl" \
301 PERL_MM_OPT="" \
302 - GIT_TEST_OPTS="--no-color" \
303 + PYTHON_PATH="${PYTHON_PATH}" \
304 V=1 \
305 "$@"
306 }
307 @@ -324,10 +327,6 @@ src_configure() {
308 }
309
310 src_compile() {
311 - if use perl ; then
312 - git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
313 - git_emake perl/perl.mak || die "emake perl/perl.mak failed"
314 - fi
315 git_emake || die "emake failed"
316
317 if use emacs ; then
318 @@ -341,12 +340,13 @@ src_compile() {
319 fi
320
321 if [[ ${CHOST} == *-darwin* ]]; then
322 - cd "${S}"/contrib/credential/osxkeychain || die
323 + pushd contrib/credential/osxkeychain &>/dev/null || die
324 git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
325 || die "emake credential-osxkeychain"
326 + popd &>/dev/null || die
327 fi
328
329 - cd "${S}"/Documentation
330 + pushd Documentation &>/dev/null || die
331 if [[ ${PV} == *9999 ]] ; then
332 git_emake man \
333 || die "emake man failed"
334 @@ -360,9 +360,10 @@ src_compile() {
335 || die "emake info html failed"
336 fi
337 fi
338 + popd &>/dev/null || die
339
340 if use subversion ; then
341 - cd "${S}"/contrib/svn-fe
342 + pushd contrib/svn-fe &>/dev/null || die
343 # by defining EXTLIBS we override the detection for libintl and
344 # libiconv, bug #516168
345 local nlsiconv=
346 @@ -372,24 +373,29 @@ src_compile() {
347 if use doc ; then
348 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
349 fi
350 - cd "${S}"
351 + popd &>/dev/null || die
352 fi
353
354 if use gnome-keyring ; then
355 - cd "${S}"/contrib/credential/libsecret
356 + pushd contrib/credential/libsecret &>/dev/null || die
357 git_emake || die "emake git-credential-libsecret failed"
358 + popd &>/dev/null || die
359 fi
360
361 - cd "${S}"/contrib/subtree || die
362 + pushd contrib/subtree &>/dev/null || die
363 git_emake
364 use doc && git_emake doc
365 + popd &>/dev/null || die
366
367 - cd "${S}"/contrib/diff-highlight || die
368 + pushd contrib/diff-highlight &>/dev/null || die
369 git_emake
370 + popd &>/dev/null || die
371
372 if use mediawiki ; then
373 - cd "${S}"/contrib/mw-to-git
374 + pushd contrib/mw-to-git &>/dev/null || die
375 git_emake
376 + popd &>/dev/null || die
377 +
378 fi
379 }
380
381 @@ -444,19 +450,19 @@ src_install() {
382 newexe contrib/git-resurrect.sh git-resurrect
383
384 # git-subtree
385 - cd "${S}"/contrib/subtree
386 + pushd contrib/subtree &>/dev/null || die
387 git_emake install || die "Failed to emake install git-subtree"
388 if use doc ; then
389 git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
390 fi
391 newdoc README README.git-subtree
392 dodoc git-subtree.txt
393 - cd "${S}"
394 + popd &>/dev/null || die
395
396 if use mediawiki ; then
397 - cd "${S}"/contrib/mw-to-git
398 + pushd contrib/mw-to-git &>/dev/null || die
399 git_emake install
400 - cd "${S}"
401 + popd &>/dev/null || die
402 fi
403
404 # diff-highlight
405 @@ -474,12 +480,13 @@ src_install() {
406 dodoc contrib/contacts/git-contacts.txt
407
408 if use gnome-keyring ; then
409 - cd "${S}"/contrib/credential/libsecret
410 + pushd contrib/credential/libsecret &>/dev/null || die
411 dobin git-credential-libsecret
412 + popd &>/dev/null || die
413 fi
414
415 if use subversion ; then
416 - cd "${S}"/contrib/svn-fe
417 + pushd contrib/svn-fe &>/dev/null || die
418 dobin svn-fe
419 dodoc svn-fe.txt
420 if use doc ; then
421 @@ -487,7 +494,7 @@ src_install() {
422 docinto html
423 dodoc svn-fe.html
424 fi
425 - cd "${S}"
426 + popd &>/dev/null || die
427 fi
428
429 dodir /usr/share/${PN}/contrib
430 @@ -518,7 +525,7 @@ src_install() {
431 for i in "${contrib_objects[@]}" ; do
432 cp -rf \
433 "${S}"/contrib/${i} \
434 - "${ED}"/usr/share/${PN}/contrib \
435 + "${ED%/}"/usr/share/${PN}/contrib \
436 || die "Failed contrib ${i}"
437 done
438
439 @@ -534,16 +541,17 @@ src_install() {
440 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
441 newdoc "${S}"/gitweb/README README.gitweb
442
443 - find "${ED}"/usr/lib64/perl5/ \
444 + find "${ED%/}"/usr/lib64/perl5/ \
445 -name .packlist \
446 - -exec rm \{\} \;
447 + -delete \
448 + || die
449 else
450 - rm -rf "${ED}"/usr/share/gitweb
451 + rm -rf "${ED%/}"/usr/share/gitweb
452 fi
453
454 if ! use subversion ; then
455 - rm -f "${ED}"/usr/libexec/git-core/git-svn \
456 - "${ED}"/usr/share/man/man1/git-svn.1*
457 + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \
458 + "${ED%/}"/usr/share/man/man1/git-svn.1*
459 fi
460
461 if use xinetd ; then
462 @@ -564,111 +572,118 @@ src_install() {
463 # we could remove sources in src_prepare, but install does not
464 # handle missing locale dir well
465 rm_loc() {
466 - if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
467 - rm -r "${ED}/usr/share/locale/${1}" || die
468 + if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then
469 + rm -r "${ED%/}/usr/share/locale/${1}" || die
470 fi
471 }
472 l10n_for_each_disabled_locale_do rm_loc
473 }
474
475 src_test() {
476 - local disabled=""
477 - local tests_cvs="t9200-git-cvsexportcommit.sh \
478 - t9400-git-cvsserver-server.sh \
479 - t9401-git-cvsserver-crlf.sh \
480 - t9402-git-cvsserver-refs.sh \
481 - t9600-cvsimport.sh \
482 - t9601-cvsimport-vendor-branch.sh \
483 - t9602-cvsimport-branches-tags.sh \
484 - t9603-cvsimport-patchsets.sh \
485 - t9604-cvsimport-timestamps.sh"
486 - local tests_perl="t3701-add-interactive.sh \
487 - t5502-quickfetch.sh \
488 - t5512-ls-remote.sh \
489 - t5520-pull.sh \
490 - t7106-reset-unborn-branch.sh \
491 - t7501-commit.sh"
492 + local disabled=()
493 + local tests_cvs=(
494 + t9200-git-cvsexportcommit.sh
495 + t9400-git-cvsserver-server.sh
496 + t9401-git-cvsserver-crlf.sh
497 + t9402-git-cvsserver-refs.sh
498 + t9600-cvsimport.sh
499 + t9601-cvsimport-vendor-branch.sh
500 + t9602-cvsimport-branches-tags.sh
501 + t9603-cvsimport-patchsets.sh
502 + t9604-cvsimport-timestamps.sh
503 + )
504 + local tests_perl=(
505 + t3701-add-interactive.sh
506 + t5502-quickfetch.sh
507 + t5512-ls-remote.sh
508 + t5520-pull.sh
509 + t7106-reset-unborn-branch.sh
510 + t7501-commit.sh
511 + )
512 # Bug #225601 - t0004 is not suitable for root perm
513 # Bug #219839 - t1004 is not suitable for root perm
514 # t0001-init.sh - check for init notices EPERM* fails
515 - local tests_nonroot="t0001-init.sh \
516 - t0004-unwritable.sh \
517 - t0070-fundamental.sh \
518 - t1004-read-tree-m-u-wf.sh \
519 - t3700-add.sh \
520 - t7300-clean.sh"
521 + local tests_nonroot=(
522 + t0001-init.sh
523 + t0004-unwritable.sh
524 + t0070-fundamental.sh
525 + t1004-read-tree-m-u-wf.sh
526 + t3700-add.sh
527 + t7300-clean.sh
528 + )
529 # t9100 still fails with symlinks in SVN 1.7
530 - local test_svn="t9100-git-svn-basic.sh"
531 + local test_svn=( t9100-git-svn-basic.sh )
532
533 # Unzip is used only for the testcase code, not by any normal parts of Git.
534 if ! has_version app-arch/unzip ; then
535 einfo "Disabling tar-tree tests"
536 - disabled+=" t5000-tar-tree.sh"
537 + disabled+=( t5000-tar-tree.sh )
538 fi
539
540 - cvs=0
541 - use cvs && let cvs=$cvs+1
542 + local cvs=0
543 + use cvs && let cvs=${cvs}+1
544 if [[ ${EUID} -eq 0 ]]; then
545 - if [[ $cvs -eq 1 ]]; then
546 + if [[ ${cvs} -eq 1 ]]; then
547 ewarn "Skipping CVS tests because CVS does not work as root!"
548 ewarn "You should retest with FEATURES=userpriv!"
549 - disabled+=" ${tests_cvs}"
550 + disabled+=( ${tests_cvs[@]} )
551 fi
552 einfo "Skipping other tests that require being non-root"
553 - disabled+=" ${tests_nonroot}"
554 + disabled+=( ${tests_nonroot[@]} )
555 else
556 - [[ $cvs -gt 0 ]] && \
557 + [[ ${cvs} -gt 0 ]] && \
558 has_version dev-vcs/cvs && \
559 - let cvs=$cvs+1
560 - [[ $cvs -gt 1 ]] && \
561 + let cvs=${cvs}+1
562 + [[ ${cvs} -gt 1 ]] && \
563 has_version "dev-vcs/cvs[server]" && \
564 - let cvs=$cvs+1
565 - if [[ $cvs -lt 3 ]]; then
566 + let cvs=${cvs}+1
567 + if [[ ${cvs} -lt 3 ]]; then
568 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
569 - disabled+=" ${tests_cvs}"
570 + disabled+=( ${tests_cvs[@]} )
571 fi
572 fi
573
574 if ! use perl ; then
575 einfo "Disabling tests that need Perl"
576 - disabled+=" ${tests_perl}"
577 + disabled+=( ${tests_perl[@]} )
578 fi
579
580 einfo "Disabling tests that fail with SVN 1.7"
581 - disabled+=" ${test_svn}"
582 + disabled+=( ${test_svn[@]} )
583
584 # Reset all previously disabled tests
585 - cd "${S}/t"
586 + pushd t &>/dev/null || die
587 + local i
588 for i in *.sh.DISABLED ; do
589 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
590 done
591 einfo "Disabled tests:"
592 - for i in ${disabled} ; do
593 - [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
594 + for i in ${disabled[@]} ; do
595 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
596 done
597
598 # Avoid the test system removing the results because we want them ourselves
599 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
600 - -i "${S}"/t/Makefile
601 + -i Makefile || die
602
603 # Clean old results first, must always run
604 - cd "${S}/t"
605 nonfatal git_emake clean
606 + popd &>/dev/null || die
607
608 # Now run the tests, keep going if we hit an error, and don't terminate on
609 # failure
610 - cd "${S}"
611 + local rc
612 einfo "Start test run"
613 #MAKEOPTS=-j1
614 nonfatal git_emake --keep-going test
615 rc=$?
616
617 # Display nice results, now print the results
618 - cd "${S}/t"
619 + pushd t &>/dev/null || die
620 nonfatal git_emake aggregate-results
621
622 # And bail if there was a problem
623 - [ $rc -eq 0 ] || die "tests failed. Please file a bug."
624 + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug."
625 }
626
627 showpkgdeps() {
628
629 diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild
630 index e9f0c242bcf..29ff3e4669d 100644
631 --- a/dev-vcs/git/git-9999-r2.ebuild
632 +++ b/dev-vcs/git/git-9999-r2.ebuild
633 @@ -73,18 +73,30 @@ CDEPEND="
634
635 RDEPEND="${CDEPEND}
636 gpg? ( app-crypt/gnupg )
637 - mediawiki? (
638 - dev-perl/DateTime-Format-ISO8601
639 - dev-perl/HTML-Tree
640 - dev-perl/MediaWiki-API
641 + perl? (
642 + dev-perl/Error
643 + dev-perl/Net-SMTP-SSL
644 + dev-perl/Authen-SASL
645 + cgi? (
646 + dev-perl/CGI
647 + highlight? ( app-text/highlight )
648 + )
649 + cvs? (
650 + >=dev-vcs/cvsps-2.1:0
651 + dev-perl/DBI
652 + dev-perl/DBD-SQLite
653 + )
654 + mediawiki? (
655 + dev-perl/DateTime-Format-ISO8601
656 + dev-perl/HTML-Tree
657 + dev-perl/MediaWiki-API
658 + )
659 + subversion? (
660 + dev-vcs/subversion[-dso,perl]
661 + dev-perl/libwww-perl
662 + dev-perl/TermReadKey
663 + )
664 )
665 - perl? ( dev-perl/Error
666 - dev-perl/Net-SMTP-SSL
667 - dev-perl/Authen-SASL
668 - cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
669 - cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
670 - subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
671 - )
672 python? ( ${PYTHON_DEPS} )
673 "
674
675 @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then
676 app-text/asciidoc"
677 fi
678
679 -SITEFILE=50${PN}-gentoo.el
680 +SITEFILE="50${PN}-gentoo.el"
681 S="${WORKDIR}/${MY_P}"
682
683 REQUIRED_USE="
684 @@ -124,11 +136,7 @@ REQUIRED_USE="
685
686 PATCHES=(
687 # bug #350330 - automagic CVS when we don't want it is bad.
688 - "${FILESDIR}"/git-2.12.0-optional-cvs.patch
689 -
690 - # install mediawiki perl modules also in vendor_dir
691 - # hack, needs better upstream solution
692 - "${FILESDIR}"/git-1.8.5-mw-vendor.patch
693 + "${FILESDIR}"/git-2.17.0_rc1-optional-cvs.patch
694
695 "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
696
697 @@ -150,111 +158,110 @@ pkg_setup() {
698 # This is needed because for some obscure reasons future calls to make don't
699 # pick up these exports if we export them in src_unpack()
700 exportmakeopts() {
701 - local myopts
702 + local myopts=(
703 + ASCIIDOC_NO_ROFF=YesPlease
704 + $(usex cvs '' NO_CVS=YesPlease)
705 + $(usex elibc_musl NO_REGEX=YesPlease '')
706 + $(usex iconv '' NO_ICONV=YesPlease)
707 + $(usex nls '' NO_GETTEXT=YesPlease)
708 + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
709 + $(usex python '' NO_PYTHON=YesPlease)
710 + $(usex subversion '' NO_SVN_TESTS=YesPlease)
711 + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease)
712 + $(usex tk '' NO_TCLTK=YesPlease)
713 + )
714
715 if use blksha1 ; then
716 - myopts+=" BLK_SHA1=YesPlease"
717 + myopts+=( BLK_SHA1=YesPlease )
718 elif use ppcsha1 ; then
719 - myopts+=" PPC_SHA1=YesPlease"
720 + myopts+=( PPC_SHA1=YesPlease )
721 fi
722
723 if use curl ; then
724 - use webdav || myopts+=" NO_EXPAT=YesPlease"
725 + use webdav || myopts+=( NO_EXPAT=YesPlease )
726 else
727 - myopts+=" NO_CURL=YesPlease"
728 + myopts+=( NO_CURL=YesPlease )
729 fi
730
731 # broken assumptions, because of static build system ...
732 - myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
733 - myopts+=" INSTALL=install TAR=tar"
734 - myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
735 - myopts+=" SANE_TOOL_PATH="
736 - myopts+=" OLD_ICONV="
737 - myopts+=" NO_EXTERNAL_GREP="
738 + myopts+=(
739 + NO_FINK=YesPlease
740 + NO_DARWIN_PORTS=YesPlease
741 + INSTALL=install
742 + TAR=tar
743 + SHELL_PATH="${EPREFIX}/bin/sh"
744 + SANE_TOOL_PATH=
745 + OLD_ICONV=
746 + NO_EXTERNAL_GREP=
747 + )
748
749 # For svn-fe
750 extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
751
752 # can't define this to null, since the entire makefile depends on it
753 - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
754 -
755 - use iconv \
756 - || myopts+=" NO_ICONV=YesPlease"
757 - use nls \
758 - || myopts+=" NO_GETTEXT=YesPlease"
759 - use tk \
760 - || myopts+=" NO_TCLTK=YesPlease"
761 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
762 +
763 if use pcre; then
764 if use pcre-jit; then
765 - myopts+=" USE_LIBPCRE2=YesPlease"
766 + myopts+=( USE_LIBPCRE2=YesPlease )
767 extlibs+=" -lpcre2-8"
768 else
769 - myopts+=" USE_LIBPCRE1=YesPlease"
770 - myopts+=" NO_LIBPCRE1_JIT=YesPlease"
771 + myopts+=(
772 + USE_LIBPCRE1=YesPlease
773 + NO_LIBPCRE1_JIT=YesPlease
774 + )
775 extlibs+=" -lpcre"
776 fi
777 fi
778 - use perl \
779 - && myopts+=" INSTALLDIRS=vendor" \
780 - || myopts+=" NO_PERL=YesPlease"
781 - use python \
782 - || myopts+=" NO_PYTHON=YesPlease"
783 - use subversion \
784 - || myopts+=" NO_SVN_TESTS=YesPlease"
785 - use threads \
786 - && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
787 - || myopts+=" NO_PTHREADS=YesPlease"
788 - use cvs \
789 - || myopts+=" NO_CVS=YesPlease"
790 - use elibc_musl \
791 - && myopts+=" NO_REGEX=YesPlease"
792 # Disabled until ~m68k-mint can be keyworded again
793 # if [[ ${CHOST} == *-mint* ]] ; then
794 -# myopts+=" NO_MMAP=YesPlease"
795 -# myopts+=" NO_IPV6=YesPlease"
796 -# myopts+=" NO_STRLCPY=YesPlease"
797 -# myopts+=" NO_MEMMEM=YesPlease"
798 -# myopts+=" NO_MKDTEMP=YesPlease"
799 -# myopts+=" NO_MKSTEMPS=YesPlease"
800 +# myopts+=(
801 +# NO_MMAP=YesPlease
802 +# NO_IPV6=YesPlease
803 +# NO_STRLCPY=YesPlease
804 +# NO_MEMMEM=YesPlease
805 +# NO_MKDTEMP=YesPlease
806 +# NO_MKSTEMPS=YesPlease
807 +# )
808 # fi
809 if [[ ${CHOST} == ia64-*-hpux* ]]; then
810 - myopts+=" NO_NSEC=YesPlease"
811 + myopts+=( NO_NSEC=YesPlease )
812 fi
813 if [[ ${CHOST} == *-*-aix* ]]; then
814 - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
815 + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
816 fi
817 if [[ ${CHOST} == *-solaris* ]]; then
818 - myopts+=" NEEDS_LIBICONV=YesPlease"
819 - myopts+=" HAVE_CLOCK_MONOTONIC=1"
820 + myopts+=(
821 + NEEDS_LIBICONV=YesPlease
822 + HAVE_CLOCK_MONOTONIC=1
823 + )
824 grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
825 - myopts+=" HAVE_GETDELIM=1"
826 + myopts+=( HAVE_GETDELIM=1 )
827 fi
828
829 has_version '>=app-text/asciidoc-8.0' \
830 - && myopts+=" ASCIIDOC8=YesPlease"
831 - myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
832 + && myopts+=( ASCIIDOC8=YesPlease )
833
834 # Bug 290465:
835 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
836 [[ "${CHOST}" == *-uclibc* ]] && \
837 - myopts+=" NO_NSEC=YesPlease"
838 + myopts+=( NO_NSEC=YesPlease )
839
840 - export MY_MAKEOPTS="${myopts}"
841 + export MY_MAKEOPTS="${myopts[@]}"
842 export EXTLIBS="${extlibs}"
843 }
844
845 src_unpack() {
846 if [[ ${PV} != *9999 ]]; then
847 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
848 - cd "${S}"
849 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
850 - use doc && \
851 - cd "${S}"/Documentation && \
852 + if use doc ; then
853 + pushd "${S}"/Documentation &>/dev/null || die
854 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
855 - cd "${S}"
856 + popd &>/dev/null || die
857 + fi
858 else
859 git-r3_src_unpack
860 - cd "${S}"
861 #cp "${FILESDIR}"/GIT-VERSION-GEN .
862 fi
863
864 @@ -280,41 +287,37 @@ src_prepare() {
865 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
866 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
867 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
868 - Makefile contrib/svn-fe/Makefile || die "sed failed"
869 -
870 - # Never install the private copy of Error.pm (bug #296310)
871 - sed -i \
872 - -e '/private-Error.pm/s,^,#,' \
873 - perl/Makefile.PL
874 + Makefile contrib/svn-fe/Makefile || die
875
876 # Fix docbook2texi command
877 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
878 - Documentation/Makefile || die "sed failed"
879 + Documentation/Makefile || die
880
881 # Fix git-subtree missing DESTDIR
882 sed -i \
883 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
884 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
885 - contrib/subtree/Makefile
886 + contrib/subtree/Makefile || die
887 }
888
889 git_emake() {
890 # bug #320647: PYTHON_PATH
891 - PYTHON_PATH=""
892 + local PYTHON_PATH=""
893 use python && PYTHON_PATH="${PYTHON}"
894 emake ${MY_MAKEOPTS} \
895 - DESTDIR="${D}" \
896 - OPTCFLAGS="${CFLAGS}" \
897 - OPTLDFLAGS="${LDFLAGS}" \
898 - OPTCC="$(tc-getCC)" \
899 - OPTAR="$(tc-getAR)" \
900 prefix="${EPREFIX}"/usr \
901 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
902 + perllibdir="$(perl_get_raw_vendorlib)" \
903 sysconfdir="${EPREFIX}"/etc \
904 - PYTHON_PATH="${PYTHON_PATH}" \
905 + DESTDIR="${D}" \
906 + GIT_TEST_OPTS="--no-color" \
907 + OPTAR="$(tc-getAR)" \
908 + OPTCC="$(tc-getCC)" \
909 + OPTCFLAGS="${CFLAGS}" \
910 + OPTLDFLAGS="${LDFLAGS}" \
911 PERL_PATH="${EPREFIX}/usr/bin/perl" \
912 PERL_MM_OPT="" \
913 - GIT_TEST_OPTS="--no-color" \
914 + PYTHON_PATH="${PYTHON_PATH}" \
915 V=1 \
916 "$@"
917 }
918 @@ -324,10 +327,6 @@ src_configure() {
919 }
920
921 src_compile() {
922 - if use perl ; then
923 - git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
924 - git_emake perl/perl.mak || die "emake perl/perl.mak failed"
925 - fi
926 git_emake || die "emake failed"
927
928 if use emacs ; then
929 @@ -341,12 +340,13 @@ src_compile() {
930 fi
931
932 if [[ ${CHOST} == *-darwin* ]]; then
933 - cd "${S}"/contrib/credential/osxkeychain || die
934 + pushd contrib/credential/osxkeychain &>/dev/null || die
935 git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
936 || die "emake credential-osxkeychain"
937 + popd &>/dev/null || die
938 fi
939
940 - cd "${S}"/Documentation
941 + pushd Documentation &>/dev/null || die
942 if [[ ${PV} == *9999 ]] ; then
943 git_emake man \
944 || die "emake man failed"
945 @@ -360,9 +360,10 @@ src_compile() {
946 || die "emake info html failed"
947 fi
948 fi
949 + popd &>/dev/null || die
950
951 if use subversion ; then
952 - cd "${S}"/contrib/svn-fe
953 + pushd contrib/svn-fe &>/dev/null || die
954 # by defining EXTLIBS we override the detection for libintl and
955 # libiconv, bug #516168
956 local nlsiconv=
957 @@ -372,24 +373,29 @@ src_compile() {
958 if use doc ; then
959 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
960 fi
961 - cd "${S}"
962 + popd &>/dev/null || die
963 fi
964
965 if use gnome-keyring ; then
966 - cd "${S}"/contrib/credential/libsecret
967 + pushd contrib/credential/libsecret &>/dev/null || die
968 git_emake || die "emake git-credential-libsecret failed"
969 + popd &>/dev/null || die
970 fi
971
972 - cd "${S}"/contrib/subtree || die
973 + pushd contrib/subtree &>/dev/null || die
974 git_emake
975 use doc && git_emake doc
976 + popd &>/dev/null || die
977
978 - cd "${S}"/contrib/diff-highlight || die
979 + pushd contrib/diff-highlight &>/dev/null || die
980 git_emake
981 + popd &>/dev/null || die
982
983 if use mediawiki ; then
984 - cd "${S}"/contrib/mw-to-git
985 + pushd contrib/mw-to-git &>/dev/null || die
986 git_emake
987 + popd &>/dev/null || die
988 +
989 fi
990 }
991
992 @@ -444,19 +450,19 @@ src_install() {
993 newexe contrib/git-resurrect.sh git-resurrect
994
995 # git-subtree
996 - cd "${S}"/contrib/subtree
997 + pushd contrib/subtree &>/dev/null || die
998 git_emake install || die "Failed to emake install git-subtree"
999 if use doc ; then
1000 git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
1001 fi
1002 newdoc README README.git-subtree
1003 dodoc git-subtree.txt
1004 - cd "${S}"
1005 + popd &>/dev/null || die
1006
1007 if use mediawiki ; then
1008 - cd "${S}"/contrib/mw-to-git
1009 + pushd contrib/mw-to-git &>/dev/null || die
1010 git_emake install
1011 - cd "${S}"
1012 + popd &>/dev/null || die
1013 fi
1014
1015 # diff-highlight
1016 @@ -474,12 +480,13 @@ src_install() {
1017 dodoc contrib/contacts/git-contacts.txt
1018
1019 if use gnome-keyring ; then
1020 - cd "${S}"/contrib/credential/libsecret
1021 + pushd contrib/credential/libsecret &>/dev/null || die
1022 dobin git-credential-libsecret
1023 + popd &>/dev/null || die
1024 fi
1025
1026 if use subversion ; then
1027 - cd "${S}"/contrib/svn-fe
1028 + pushd contrib/svn-fe &>/dev/null || die
1029 dobin svn-fe
1030 dodoc svn-fe.txt
1031 if use doc ; then
1032 @@ -487,7 +494,7 @@ src_install() {
1033 docinto html
1034 dodoc svn-fe.html
1035 fi
1036 - cd "${S}"
1037 + popd &>/dev/null || die
1038 fi
1039
1040 dodir /usr/share/${PN}/contrib
1041 @@ -518,7 +525,7 @@ src_install() {
1042 for i in "${contrib_objects[@]}" ; do
1043 cp -rf \
1044 "${S}"/contrib/${i} \
1045 - "${ED}"/usr/share/${PN}/contrib \
1046 + "${ED%/}"/usr/share/${PN}/contrib \
1047 || die "Failed contrib ${i}"
1048 done
1049
1050 @@ -534,16 +541,17 @@ src_install() {
1051 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
1052 newdoc "${S}"/gitweb/README README.gitweb
1053
1054 - find "${ED}"/usr/lib64/perl5/ \
1055 + find "${ED%/}"/usr/lib64/perl5/ \
1056 -name .packlist \
1057 - -exec rm \{\} \;
1058 + -delete \
1059 + || die
1060 else
1061 - rm -rf "${ED}"/usr/share/gitweb
1062 + rm -rf "${ED%/}"/usr/share/gitweb
1063 fi
1064
1065 if ! use subversion ; then
1066 - rm -f "${ED}"/usr/libexec/git-core/git-svn \
1067 - "${ED}"/usr/share/man/man1/git-svn.1*
1068 + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \
1069 + "${ED%/}"/usr/share/man/man1/git-svn.1*
1070 fi
1071
1072 if use xinetd ; then
1073 @@ -564,111 +572,118 @@ src_install() {
1074 # we could remove sources in src_prepare, but install does not
1075 # handle missing locale dir well
1076 rm_loc() {
1077 - if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
1078 - rm -r "${ED}/usr/share/locale/${1}" || die
1079 + if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then
1080 + rm -r "${ED%/}/usr/share/locale/${1}" || die
1081 fi
1082 }
1083 l10n_for_each_disabled_locale_do rm_loc
1084 }
1085
1086 src_test() {
1087 - local disabled=""
1088 - local tests_cvs="t9200-git-cvsexportcommit.sh \
1089 - t9400-git-cvsserver-server.sh \
1090 - t9401-git-cvsserver-crlf.sh \
1091 - t9402-git-cvsserver-refs.sh \
1092 - t9600-cvsimport.sh \
1093 - t9601-cvsimport-vendor-branch.sh \
1094 - t9602-cvsimport-branches-tags.sh \
1095 - t9603-cvsimport-patchsets.sh \
1096 - t9604-cvsimport-timestamps.sh"
1097 - local tests_perl="t3701-add-interactive.sh \
1098 - t5502-quickfetch.sh \
1099 - t5512-ls-remote.sh \
1100 - t5520-pull.sh \
1101 - t7106-reset-unborn-branch.sh \
1102 - t7501-commit.sh"
1103 + local disabled=()
1104 + local tests_cvs=(
1105 + t9200-git-cvsexportcommit.sh
1106 + t9400-git-cvsserver-server.sh
1107 + t9401-git-cvsserver-crlf.sh
1108 + t9402-git-cvsserver-refs.sh
1109 + t9600-cvsimport.sh
1110 + t9601-cvsimport-vendor-branch.sh
1111 + t9602-cvsimport-branches-tags.sh
1112 + t9603-cvsimport-patchsets.sh
1113 + t9604-cvsimport-timestamps.sh
1114 + )
1115 + local tests_perl=(
1116 + t3701-add-interactive.sh
1117 + t5502-quickfetch.sh
1118 + t5512-ls-remote.sh
1119 + t5520-pull.sh
1120 + t7106-reset-unborn-branch.sh
1121 + t7501-commit.sh
1122 + )
1123 # Bug #225601 - t0004 is not suitable for root perm
1124 # Bug #219839 - t1004 is not suitable for root perm
1125 # t0001-init.sh - check for init notices EPERM* fails
1126 - local tests_nonroot="t0001-init.sh \
1127 - t0004-unwritable.sh \
1128 - t0070-fundamental.sh \
1129 - t1004-read-tree-m-u-wf.sh \
1130 - t3700-add.sh \
1131 - t7300-clean.sh"
1132 + local tests_nonroot=(
1133 + t0001-init.sh
1134 + t0004-unwritable.sh
1135 + t0070-fundamental.sh
1136 + t1004-read-tree-m-u-wf.sh
1137 + t3700-add.sh
1138 + t7300-clean.sh
1139 + )
1140 # t9100 still fails with symlinks in SVN 1.7
1141 - local test_svn="t9100-git-svn-basic.sh"
1142 + local test_svn=( t9100-git-svn-basic.sh )
1143
1144 # Unzip is used only for the testcase code, not by any normal parts of Git.
1145 if ! has_version app-arch/unzip ; then
1146 einfo "Disabling tar-tree tests"
1147 - disabled+=" t5000-tar-tree.sh"
1148 + disabled+=( t5000-tar-tree.sh )
1149 fi
1150
1151 - cvs=0
1152 - use cvs && let cvs=$cvs+1
1153 + local cvs=0
1154 + use cvs && let cvs=${cvs}+1
1155 if [[ ${EUID} -eq 0 ]]; then
1156 - if [[ $cvs -eq 1 ]]; then
1157 + if [[ ${cvs} -eq 1 ]]; then
1158 ewarn "Skipping CVS tests because CVS does not work as root!"
1159 ewarn "You should retest with FEATURES=userpriv!"
1160 - disabled+=" ${tests_cvs}"
1161 + disabled+=( ${tests_cvs[@]} )
1162 fi
1163 einfo "Skipping other tests that require being non-root"
1164 - disabled+=" ${tests_nonroot}"
1165 + disabled+=( ${tests_nonroot[@]} )
1166 else
1167 - [[ $cvs -gt 0 ]] && \
1168 + [[ ${cvs} -gt 0 ]] && \
1169 has_version dev-vcs/cvs && \
1170 - let cvs=$cvs+1
1171 - [[ $cvs -gt 1 ]] && \
1172 + let cvs=${cvs}+1
1173 + [[ ${cvs} -gt 1 ]] && \
1174 has_version "dev-vcs/cvs[server]" && \
1175 - let cvs=$cvs+1
1176 - if [[ $cvs -lt 3 ]]; then
1177 + let cvs=${cvs}+1
1178 + if [[ ${cvs} -lt 3 ]]; then
1179 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
1180 - disabled+=" ${tests_cvs}"
1181 + disabled+=( ${tests_cvs[@]} )
1182 fi
1183 fi
1184
1185 if ! use perl ; then
1186 einfo "Disabling tests that need Perl"
1187 - disabled+=" ${tests_perl}"
1188 + disabled+=( ${tests_perl[@]} )
1189 fi
1190
1191 einfo "Disabling tests that fail with SVN 1.7"
1192 - disabled+=" ${test_svn}"
1193 + disabled+=( ${test_svn[@]} )
1194
1195 # Reset all previously disabled tests
1196 - cd "${S}/t"
1197 + pushd t &>/dev/null || die
1198 + local i
1199 for i in *.sh.DISABLED ; do
1200 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
1201 done
1202 einfo "Disabled tests:"
1203 - for i in ${disabled} ; do
1204 - [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
1205 + for i in ${disabled[@]} ; do
1206 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
1207 done
1208
1209 # Avoid the test system removing the results because we want them ourselves
1210 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
1211 - -i "${S}"/t/Makefile
1212 + -i Makefile || die
1213
1214 # Clean old results first, must always run
1215 - cd "${S}/t"
1216 nonfatal git_emake clean
1217 + popd &>/dev/null || die
1218
1219 # Now run the tests, keep going if we hit an error, and don't terminate on
1220 # failure
1221 - cd "${S}"
1222 + local rc
1223 einfo "Start test run"
1224 #MAKEOPTS=-j1
1225 nonfatal git_emake --keep-going test
1226 rc=$?
1227
1228 # Display nice results, now print the results
1229 - cd "${S}/t"
1230 + pushd t &>/dev/null || die
1231 nonfatal git_emake aggregate-results
1232
1233 # And bail if there was a problem
1234 - [ $rc -eq 0 ] || die "tests failed. Please file a bug."
1235 + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug."
1236 }
1237
1238 showpkgdeps() {
1239
1240 diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild
1241 index e9f0c242bcf..29ff3e4669d 100644
1242 --- a/dev-vcs/git/git-9999-r3.ebuild
1243 +++ b/dev-vcs/git/git-9999-r3.ebuild
1244 @@ -73,18 +73,30 @@ CDEPEND="
1245
1246 RDEPEND="${CDEPEND}
1247 gpg? ( app-crypt/gnupg )
1248 - mediawiki? (
1249 - dev-perl/DateTime-Format-ISO8601
1250 - dev-perl/HTML-Tree
1251 - dev-perl/MediaWiki-API
1252 + perl? (
1253 + dev-perl/Error
1254 + dev-perl/Net-SMTP-SSL
1255 + dev-perl/Authen-SASL
1256 + cgi? (
1257 + dev-perl/CGI
1258 + highlight? ( app-text/highlight )
1259 + )
1260 + cvs? (
1261 + >=dev-vcs/cvsps-2.1:0
1262 + dev-perl/DBI
1263 + dev-perl/DBD-SQLite
1264 + )
1265 + mediawiki? (
1266 + dev-perl/DateTime-Format-ISO8601
1267 + dev-perl/HTML-Tree
1268 + dev-perl/MediaWiki-API
1269 + )
1270 + subversion? (
1271 + dev-vcs/subversion[-dso,perl]
1272 + dev-perl/libwww-perl
1273 + dev-perl/TermReadKey
1274 + )
1275 )
1276 - perl? ( dev-perl/Error
1277 - dev-perl/Net-SMTP-SSL
1278 - dev-perl/Authen-SASL
1279 - cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
1280 - cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
1281 - subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
1282 - )
1283 python? ( ${PYTHON_DEPS} )
1284 "
1285
1286 @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then
1287 app-text/asciidoc"
1288 fi
1289
1290 -SITEFILE=50${PN}-gentoo.el
1291 +SITEFILE="50${PN}-gentoo.el"
1292 S="${WORKDIR}/${MY_P}"
1293
1294 REQUIRED_USE="
1295 @@ -124,11 +136,7 @@ REQUIRED_USE="
1296
1297 PATCHES=(
1298 # bug #350330 - automagic CVS when we don't want it is bad.
1299 - "${FILESDIR}"/git-2.12.0-optional-cvs.patch
1300 -
1301 - # install mediawiki perl modules also in vendor_dir
1302 - # hack, needs better upstream solution
1303 - "${FILESDIR}"/git-1.8.5-mw-vendor.patch
1304 + "${FILESDIR}"/git-2.17.0_rc1-optional-cvs.patch
1305
1306 "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
1307
1308 @@ -150,111 +158,110 @@ pkg_setup() {
1309 # This is needed because for some obscure reasons future calls to make don't
1310 # pick up these exports if we export them in src_unpack()
1311 exportmakeopts() {
1312 - local myopts
1313 + local myopts=(
1314 + ASCIIDOC_NO_ROFF=YesPlease
1315 + $(usex cvs '' NO_CVS=YesPlease)
1316 + $(usex elibc_musl NO_REGEX=YesPlease '')
1317 + $(usex iconv '' NO_ICONV=YesPlease)
1318 + $(usex nls '' NO_GETTEXT=YesPlease)
1319 + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
1320 + $(usex python '' NO_PYTHON=YesPlease)
1321 + $(usex subversion '' NO_SVN_TESTS=YesPlease)
1322 + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease)
1323 + $(usex tk '' NO_TCLTK=YesPlease)
1324 + )
1325
1326 if use blksha1 ; then
1327 - myopts+=" BLK_SHA1=YesPlease"
1328 + myopts+=( BLK_SHA1=YesPlease )
1329 elif use ppcsha1 ; then
1330 - myopts+=" PPC_SHA1=YesPlease"
1331 + myopts+=( PPC_SHA1=YesPlease )
1332 fi
1333
1334 if use curl ; then
1335 - use webdav || myopts+=" NO_EXPAT=YesPlease"
1336 + use webdav || myopts+=( NO_EXPAT=YesPlease )
1337 else
1338 - myopts+=" NO_CURL=YesPlease"
1339 + myopts+=( NO_CURL=YesPlease )
1340 fi
1341
1342 # broken assumptions, because of static build system ...
1343 - myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
1344 - myopts+=" INSTALL=install TAR=tar"
1345 - myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
1346 - myopts+=" SANE_TOOL_PATH="
1347 - myopts+=" OLD_ICONV="
1348 - myopts+=" NO_EXTERNAL_GREP="
1349 + myopts+=(
1350 + NO_FINK=YesPlease
1351 + NO_DARWIN_PORTS=YesPlease
1352 + INSTALL=install
1353 + TAR=tar
1354 + SHELL_PATH="${EPREFIX}/bin/sh"
1355 + SANE_TOOL_PATH=
1356 + OLD_ICONV=
1357 + NO_EXTERNAL_GREP=
1358 + )
1359
1360 # For svn-fe
1361 extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
1362
1363 # can't define this to null, since the entire makefile depends on it
1364 - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
1365 -
1366 - use iconv \
1367 - || myopts+=" NO_ICONV=YesPlease"
1368 - use nls \
1369 - || myopts+=" NO_GETTEXT=YesPlease"
1370 - use tk \
1371 - || myopts+=" NO_TCLTK=YesPlease"
1372 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
1373 +
1374 if use pcre; then
1375 if use pcre-jit; then
1376 - myopts+=" USE_LIBPCRE2=YesPlease"
1377 + myopts+=( USE_LIBPCRE2=YesPlease )
1378 extlibs+=" -lpcre2-8"
1379 else
1380 - myopts+=" USE_LIBPCRE1=YesPlease"
1381 - myopts+=" NO_LIBPCRE1_JIT=YesPlease"
1382 + myopts+=(
1383 + USE_LIBPCRE1=YesPlease
1384 + NO_LIBPCRE1_JIT=YesPlease
1385 + )
1386 extlibs+=" -lpcre"
1387 fi
1388 fi
1389 - use perl \
1390 - && myopts+=" INSTALLDIRS=vendor" \
1391 - || myopts+=" NO_PERL=YesPlease"
1392 - use python \
1393 - || myopts+=" NO_PYTHON=YesPlease"
1394 - use subversion \
1395 - || myopts+=" NO_SVN_TESTS=YesPlease"
1396 - use threads \
1397 - && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
1398 - || myopts+=" NO_PTHREADS=YesPlease"
1399 - use cvs \
1400 - || myopts+=" NO_CVS=YesPlease"
1401 - use elibc_musl \
1402 - && myopts+=" NO_REGEX=YesPlease"
1403 # Disabled until ~m68k-mint can be keyworded again
1404 # if [[ ${CHOST} == *-mint* ]] ; then
1405 -# myopts+=" NO_MMAP=YesPlease"
1406 -# myopts+=" NO_IPV6=YesPlease"
1407 -# myopts+=" NO_STRLCPY=YesPlease"
1408 -# myopts+=" NO_MEMMEM=YesPlease"
1409 -# myopts+=" NO_MKDTEMP=YesPlease"
1410 -# myopts+=" NO_MKSTEMPS=YesPlease"
1411 +# myopts+=(
1412 +# NO_MMAP=YesPlease
1413 +# NO_IPV6=YesPlease
1414 +# NO_STRLCPY=YesPlease
1415 +# NO_MEMMEM=YesPlease
1416 +# NO_MKDTEMP=YesPlease
1417 +# NO_MKSTEMPS=YesPlease
1418 +# )
1419 # fi
1420 if [[ ${CHOST} == ia64-*-hpux* ]]; then
1421 - myopts+=" NO_NSEC=YesPlease"
1422 + myopts+=( NO_NSEC=YesPlease )
1423 fi
1424 if [[ ${CHOST} == *-*-aix* ]]; then
1425 - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
1426 + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
1427 fi
1428 if [[ ${CHOST} == *-solaris* ]]; then
1429 - myopts+=" NEEDS_LIBICONV=YesPlease"
1430 - myopts+=" HAVE_CLOCK_MONOTONIC=1"
1431 + myopts+=(
1432 + NEEDS_LIBICONV=YesPlease
1433 + HAVE_CLOCK_MONOTONIC=1
1434 + )
1435 grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
1436 - myopts+=" HAVE_GETDELIM=1"
1437 + myopts+=( HAVE_GETDELIM=1 )
1438 fi
1439
1440 has_version '>=app-text/asciidoc-8.0' \
1441 - && myopts+=" ASCIIDOC8=YesPlease"
1442 - myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
1443 + && myopts+=( ASCIIDOC8=YesPlease )
1444
1445 # Bug 290465:
1446 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
1447 [[ "${CHOST}" == *-uclibc* ]] && \
1448 - myopts+=" NO_NSEC=YesPlease"
1449 + myopts+=( NO_NSEC=YesPlease )
1450
1451 - export MY_MAKEOPTS="${myopts}"
1452 + export MY_MAKEOPTS="${myopts[@]}"
1453 export EXTLIBS="${extlibs}"
1454 }
1455
1456 src_unpack() {
1457 if [[ ${PV} != *9999 ]]; then
1458 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
1459 - cd "${S}"
1460 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
1461 - use doc && \
1462 - cd "${S}"/Documentation && \
1463 + if use doc ; then
1464 + pushd "${S}"/Documentation &>/dev/null || die
1465 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
1466 - cd "${S}"
1467 + popd &>/dev/null || die
1468 + fi
1469 else
1470 git-r3_src_unpack
1471 - cd "${S}"
1472 #cp "${FILESDIR}"/GIT-VERSION-GEN .
1473 fi
1474
1475 @@ -280,41 +287,37 @@ src_prepare() {
1476 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
1477 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
1478 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
1479 - Makefile contrib/svn-fe/Makefile || die "sed failed"
1480 -
1481 - # Never install the private copy of Error.pm (bug #296310)
1482 - sed -i \
1483 - -e '/private-Error.pm/s,^,#,' \
1484 - perl/Makefile.PL
1485 + Makefile contrib/svn-fe/Makefile || die
1486
1487 # Fix docbook2texi command
1488 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
1489 - Documentation/Makefile || die "sed failed"
1490 + Documentation/Makefile || die
1491
1492 # Fix git-subtree missing DESTDIR
1493 sed -i \
1494 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
1495 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
1496 - contrib/subtree/Makefile
1497 + contrib/subtree/Makefile || die
1498 }
1499
1500 git_emake() {
1501 # bug #320647: PYTHON_PATH
1502 - PYTHON_PATH=""
1503 + local PYTHON_PATH=""
1504 use python && PYTHON_PATH="${PYTHON}"
1505 emake ${MY_MAKEOPTS} \
1506 - DESTDIR="${D}" \
1507 - OPTCFLAGS="${CFLAGS}" \
1508 - OPTLDFLAGS="${LDFLAGS}" \
1509 - OPTCC="$(tc-getCC)" \
1510 - OPTAR="$(tc-getAR)" \
1511 prefix="${EPREFIX}"/usr \
1512 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
1513 + perllibdir="$(perl_get_raw_vendorlib)" \
1514 sysconfdir="${EPREFIX}"/etc \
1515 - PYTHON_PATH="${PYTHON_PATH}" \
1516 + DESTDIR="${D}" \
1517 + GIT_TEST_OPTS="--no-color" \
1518 + OPTAR="$(tc-getAR)" \
1519 + OPTCC="$(tc-getCC)" \
1520 + OPTCFLAGS="${CFLAGS}" \
1521 + OPTLDFLAGS="${LDFLAGS}" \
1522 PERL_PATH="${EPREFIX}/usr/bin/perl" \
1523 PERL_MM_OPT="" \
1524 - GIT_TEST_OPTS="--no-color" \
1525 + PYTHON_PATH="${PYTHON_PATH}" \
1526 V=1 \
1527 "$@"
1528 }
1529 @@ -324,10 +327,6 @@ src_configure() {
1530 }
1531
1532 src_compile() {
1533 - if use perl ; then
1534 - git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
1535 - git_emake perl/perl.mak || die "emake perl/perl.mak failed"
1536 - fi
1537 git_emake || die "emake failed"
1538
1539 if use emacs ; then
1540 @@ -341,12 +340,13 @@ src_compile() {
1541 fi
1542
1543 if [[ ${CHOST} == *-darwin* ]]; then
1544 - cd "${S}"/contrib/credential/osxkeychain || die
1545 + pushd contrib/credential/osxkeychain &>/dev/null || die
1546 git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
1547 || die "emake credential-osxkeychain"
1548 + popd &>/dev/null || die
1549 fi
1550
1551 - cd "${S}"/Documentation
1552 + pushd Documentation &>/dev/null || die
1553 if [[ ${PV} == *9999 ]] ; then
1554 git_emake man \
1555 || die "emake man failed"
1556 @@ -360,9 +360,10 @@ src_compile() {
1557 || die "emake info html failed"
1558 fi
1559 fi
1560 + popd &>/dev/null || die
1561
1562 if use subversion ; then
1563 - cd "${S}"/contrib/svn-fe
1564 + pushd contrib/svn-fe &>/dev/null || die
1565 # by defining EXTLIBS we override the detection for libintl and
1566 # libiconv, bug #516168
1567 local nlsiconv=
1568 @@ -372,24 +373,29 @@ src_compile() {
1569 if use doc ; then
1570 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
1571 fi
1572 - cd "${S}"
1573 + popd &>/dev/null || die
1574 fi
1575
1576 if use gnome-keyring ; then
1577 - cd "${S}"/contrib/credential/libsecret
1578 + pushd contrib/credential/libsecret &>/dev/null || die
1579 git_emake || die "emake git-credential-libsecret failed"
1580 + popd &>/dev/null || die
1581 fi
1582
1583 - cd "${S}"/contrib/subtree || die
1584 + pushd contrib/subtree &>/dev/null || die
1585 git_emake
1586 use doc && git_emake doc
1587 + popd &>/dev/null || die
1588
1589 - cd "${S}"/contrib/diff-highlight || die
1590 + pushd contrib/diff-highlight &>/dev/null || die
1591 git_emake
1592 + popd &>/dev/null || die
1593
1594 if use mediawiki ; then
1595 - cd "${S}"/contrib/mw-to-git
1596 + pushd contrib/mw-to-git &>/dev/null || die
1597 git_emake
1598 + popd &>/dev/null || die
1599 +
1600 fi
1601 }
1602
1603 @@ -444,19 +450,19 @@ src_install() {
1604 newexe contrib/git-resurrect.sh git-resurrect
1605
1606 # git-subtree
1607 - cd "${S}"/contrib/subtree
1608 + pushd contrib/subtree &>/dev/null || die
1609 git_emake install || die "Failed to emake install git-subtree"
1610 if use doc ; then
1611 git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
1612 fi
1613 newdoc README README.git-subtree
1614 dodoc git-subtree.txt
1615 - cd "${S}"
1616 + popd &>/dev/null || die
1617
1618 if use mediawiki ; then
1619 - cd "${S}"/contrib/mw-to-git
1620 + pushd contrib/mw-to-git &>/dev/null || die
1621 git_emake install
1622 - cd "${S}"
1623 + popd &>/dev/null || die
1624 fi
1625
1626 # diff-highlight
1627 @@ -474,12 +480,13 @@ src_install() {
1628 dodoc contrib/contacts/git-contacts.txt
1629
1630 if use gnome-keyring ; then
1631 - cd "${S}"/contrib/credential/libsecret
1632 + pushd contrib/credential/libsecret &>/dev/null || die
1633 dobin git-credential-libsecret
1634 + popd &>/dev/null || die
1635 fi
1636
1637 if use subversion ; then
1638 - cd "${S}"/contrib/svn-fe
1639 + pushd contrib/svn-fe &>/dev/null || die
1640 dobin svn-fe
1641 dodoc svn-fe.txt
1642 if use doc ; then
1643 @@ -487,7 +494,7 @@ src_install() {
1644 docinto html
1645 dodoc svn-fe.html
1646 fi
1647 - cd "${S}"
1648 + popd &>/dev/null || die
1649 fi
1650
1651 dodir /usr/share/${PN}/contrib
1652 @@ -518,7 +525,7 @@ src_install() {
1653 for i in "${contrib_objects[@]}" ; do
1654 cp -rf \
1655 "${S}"/contrib/${i} \
1656 - "${ED}"/usr/share/${PN}/contrib \
1657 + "${ED%/}"/usr/share/${PN}/contrib \
1658 || die "Failed contrib ${i}"
1659 done
1660
1661 @@ -534,16 +541,17 @@ src_install() {
1662 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
1663 newdoc "${S}"/gitweb/README README.gitweb
1664
1665 - find "${ED}"/usr/lib64/perl5/ \
1666 + find "${ED%/}"/usr/lib64/perl5/ \
1667 -name .packlist \
1668 - -exec rm \{\} \;
1669 + -delete \
1670 + || die
1671 else
1672 - rm -rf "${ED}"/usr/share/gitweb
1673 + rm -rf "${ED%/}"/usr/share/gitweb
1674 fi
1675
1676 if ! use subversion ; then
1677 - rm -f "${ED}"/usr/libexec/git-core/git-svn \
1678 - "${ED}"/usr/share/man/man1/git-svn.1*
1679 + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \
1680 + "${ED%/}"/usr/share/man/man1/git-svn.1*
1681 fi
1682
1683 if use xinetd ; then
1684 @@ -564,111 +572,118 @@ src_install() {
1685 # we could remove sources in src_prepare, but install does not
1686 # handle missing locale dir well
1687 rm_loc() {
1688 - if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
1689 - rm -r "${ED}/usr/share/locale/${1}" || die
1690 + if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then
1691 + rm -r "${ED%/}/usr/share/locale/${1}" || die
1692 fi
1693 }
1694 l10n_for_each_disabled_locale_do rm_loc
1695 }
1696
1697 src_test() {
1698 - local disabled=""
1699 - local tests_cvs="t9200-git-cvsexportcommit.sh \
1700 - t9400-git-cvsserver-server.sh \
1701 - t9401-git-cvsserver-crlf.sh \
1702 - t9402-git-cvsserver-refs.sh \
1703 - t9600-cvsimport.sh \
1704 - t9601-cvsimport-vendor-branch.sh \
1705 - t9602-cvsimport-branches-tags.sh \
1706 - t9603-cvsimport-patchsets.sh \
1707 - t9604-cvsimport-timestamps.sh"
1708 - local tests_perl="t3701-add-interactive.sh \
1709 - t5502-quickfetch.sh \
1710 - t5512-ls-remote.sh \
1711 - t5520-pull.sh \
1712 - t7106-reset-unborn-branch.sh \
1713 - t7501-commit.sh"
1714 + local disabled=()
1715 + local tests_cvs=(
1716 + t9200-git-cvsexportcommit.sh
1717 + t9400-git-cvsserver-server.sh
1718 + t9401-git-cvsserver-crlf.sh
1719 + t9402-git-cvsserver-refs.sh
1720 + t9600-cvsimport.sh
1721 + t9601-cvsimport-vendor-branch.sh
1722 + t9602-cvsimport-branches-tags.sh
1723 + t9603-cvsimport-patchsets.sh
1724 + t9604-cvsimport-timestamps.sh
1725 + )
1726 + local tests_perl=(
1727 + t3701-add-interactive.sh
1728 + t5502-quickfetch.sh
1729 + t5512-ls-remote.sh
1730 + t5520-pull.sh
1731 + t7106-reset-unborn-branch.sh
1732 + t7501-commit.sh
1733 + )
1734 # Bug #225601 - t0004 is not suitable for root perm
1735 # Bug #219839 - t1004 is not suitable for root perm
1736 # t0001-init.sh - check for init notices EPERM* fails
1737 - local tests_nonroot="t0001-init.sh \
1738 - t0004-unwritable.sh \
1739 - t0070-fundamental.sh \
1740 - t1004-read-tree-m-u-wf.sh \
1741 - t3700-add.sh \
1742 - t7300-clean.sh"
1743 + local tests_nonroot=(
1744 + t0001-init.sh
1745 + t0004-unwritable.sh
1746 + t0070-fundamental.sh
1747 + t1004-read-tree-m-u-wf.sh
1748 + t3700-add.sh
1749 + t7300-clean.sh
1750 + )
1751 # t9100 still fails with symlinks in SVN 1.7
1752 - local test_svn="t9100-git-svn-basic.sh"
1753 + local test_svn=( t9100-git-svn-basic.sh )
1754
1755 # Unzip is used only for the testcase code, not by any normal parts of Git.
1756 if ! has_version app-arch/unzip ; then
1757 einfo "Disabling tar-tree tests"
1758 - disabled+=" t5000-tar-tree.sh"
1759 + disabled+=( t5000-tar-tree.sh )
1760 fi
1761
1762 - cvs=0
1763 - use cvs && let cvs=$cvs+1
1764 + local cvs=0
1765 + use cvs && let cvs=${cvs}+1
1766 if [[ ${EUID} -eq 0 ]]; then
1767 - if [[ $cvs -eq 1 ]]; then
1768 + if [[ ${cvs} -eq 1 ]]; then
1769 ewarn "Skipping CVS tests because CVS does not work as root!"
1770 ewarn "You should retest with FEATURES=userpriv!"
1771 - disabled+=" ${tests_cvs}"
1772 + disabled+=( ${tests_cvs[@]} )
1773 fi
1774 einfo "Skipping other tests that require being non-root"
1775 - disabled+=" ${tests_nonroot}"
1776 + disabled+=( ${tests_nonroot[@]} )
1777 else
1778 - [[ $cvs -gt 0 ]] && \
1779 + [[ ${cvs} -gt 0 ]] && \
1780 has_version dev-vcs/cvs && \
1781 - let cvs=$cvs+1
1782 - [[ $cvs -gt 1 ]] && \
1783 + let cvs=${cvs}+1
1784 + [[ ${cvs} -gt 1 ]] && \
1785 has_version "dev-vcs/cvs[server]" && \
1786 - let cvs=$cvs+1
1787 - if [[ $cvs -lt 3 ]]; then
1788 + let cvs=${cvs}+1
1789 + if [[ ${cvs} -lt 3 ]]; then
1790 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
1791 - disabled+=" ${tests_cvs}"
1792 + disabled+=( ${tests_cvs[@]} )
1793 fi
1794 fi
1795
1796 if ! use perl ; then
1797 einfo "Disabling tests that need Perl"
1798 - disabled+=" ${tests_perl}"
1799 + disabled+=( ${tests_perl[@]} )
1800 fi
1801
1802 einfo "Disabling tests that fail with SVN 1.7"
1803 - disabled+=" ${test_svn}"
1804 + disabled+=( ${test_svn[@]} )
1805
1806 # Reset all previously disabled tests
1807 - cd "${S}/t"
1808 + pushd t &>/dev/null || die
1809 + local i
1810 for i in *.sh.DISABLED ; do
1811 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
1812 done
1813 einfo "Disabled tests:"
1814 - for i in ${disabled} ; do
1815 - [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
1816 + for i in ${disabled[@]} ; do
1817 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
1818 done
1819
1820 # Avoid the test system removing the results because we want them ourselves
1821 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
1822 - -i "${S}"/t/Makefile
1823 + -i Makefile || die
1824
1825 # Clean old results first, must always run
1826 - cd "${S}/t"
1827 nonfatal git_emake clean
1828 + popd &>/dev/null || die
1829
1830 # Now run the tests, keep going if we hit an error, and don't terminate on
1831 # failure
1832 - cd "${S}"
1833 + local rc
1834 einfo "Start test run"
1835 #MAKEOPTS=-j1
1836 nonfatal git_emake --keep-going test
1837 rc=$?
1838
1839 # Display nice results, now print the results
1840 - cd "${S}/t"
1841 + pushd t &>/dev/null || die
1842 nonfatal git_emake aggregate-results
1843
1844 # And bail if there was a problem
1845 - [ $rc -eq 0 ] || die "tests failed. Please file a bug."
1846 + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug."
1847 }
1848
1849 showpkgdeps() {
1850
1851 diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild
1852 index e9f0c242bcf..29ff3e4669d 100644
1853 --- a/dev-vcs/git/git-9999.ebuild
1854 +++ b/dev-vcs/git/git-9999.ebuild
1855 @@ -73,18 +73,30 @@ CDEPEND="
1856
1857 RDEPEND="${CDEPEND}
1858 gpg? ( app-crypt/gnupg )
1859 - mediawiki? (
1860 - dev-perl/DateTime-Format-ISO8601
1861 - dev-perl/HTML-Tree
1862 - dev-perl/MediaWiki-API
1863 + perl? (
1864 + dev-perl/Error
1865 + dev-perl/Net-SMTP-SSL
1866 + dev-perl/Authen-SASL
1867 + cgi? (
1868 + dev-perl/CGI
1869 + highlight? ( app-text/highlight )
1870 + )
1871 + cvs? (
1872 + >=dev-vcs/cvsps-2.1:0
1873 + dev-perl/DBI
1874 + dev-perl/DBD-SQLite
1875 + )
1876 + mediawiki? (
1877 + dev-perl/DateTime-Format-ISO8601
1878 + dev-perl/HTML-Tree
1879 + dev-perl/MediaWiki-API
1880 + )
1881 + subversion? (
1882 + dev-vcs/subversion[-dso,perl]
1883 + dev-perl/libwww-perl
1884 + dev-perl/TermReadKey
1885 + )
1886 )
1887 - perl? ( dev-perl/Error
1888 - dev-perl/Net-SMTP-SSL
1889 - dev-perl/Authen-SASL
1890 - cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
1891 - cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
1892 - subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
1893 - )
1894 python? ( ${PYTHON_DEPS} )
1895 "
1896
1897 @@ -108,7 +120,7 @@ if [[ ${PV} == *9999 ]]; then
1898 app-text/asciidoc"
1899 fi
1900
1901 -SITEFILE=50${PN}-gentoo.el
1902 +SITEFILE="50${PN}-gentoo.el"
1903 S="${WORKDIR}/${MY_P}"
1904
1905 REQUIRED_USE="
1906 @@ -124,11 +136,7 @@ REQUIRED_USE="
1907
1908 PATCHES=(
1909 # bug #350330 - automagic CVS when we don't want it is bad.
1910 - "${FILESDIR}"/git-2.12.0-optional-cvs.patch
1911 -
1912 - # install mediawiki perl modules also in vendor_dir
1913 - # hack, needs better upstream solution
1914 - "${FILESDIR}"/git-1.8.5-mw-vendor.patch
1915 + "${FILESDIR}"/git-2.17.0_rc1-optional-cvs.patch
1916
1917 "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
1918
1919 @@ -150,111 +158,110 @@ pkg_setup() {
1920 # This is needed because for some obscure reasons future calls to make don't
1921 # pick up these exports if we export them in src_unpack()
1922 exportmakeopts() {
1923 - local myopts
1924 + local myopts=(
1925 + ASCIIDOC_NO_ROFF=YesPlease
1926 + $(usex cvs '' NO_CVS=YesPlease)
1927 + $(usex elibc_musl NO_REGEX=YesPlease '')
1928 + $(usex iconv '' NO_ICONV=YesPlease)
1929 + $(usex nls '' NO_GETTEXT=YesPlease)
1930 + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
1931 + $(usex python '' NO_PYTHON=YesPlease)
1932 + $(usex subversion '' NO_SVN_TESTS=YesPlease)
1933 + $(usex threads THREADED_DELTA_SEARCH=YesPlease NO_PTHREAD=YesPlease)
1934 + $(usex tk '' NO_TCLTK=YesPlease)
1935 + )
1936
1937 if use blksha1 ; then
1938 - myopts+=" BLK_SHA1=YesPlease"
1939 + myopts+=( BLK_SHA1=YesPlease )
1940 elif use ppcsha1 ; then
1941 - myopts+=" PPC_SHA1=YesPlease"
1942 + myopts+=( PPC_SHA1=YesPlease )
1943 fi
1944
1945 if use curl ; then
1946 - use webdav || myopts+=" NO_EXPAT=YesPlease"
1947 + use webdav || myopts+=( NO_EXPAT=YesPlease )
1948 else
1949 - myopts+=" NO_CURL=YesPlease"
1950 + myopts+=( NO_CURL=YesPlease )
1951 fi
1952
1953 # broken assumptions, because of static build system ...
1954 - myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
1955 - myopts+=" INSTALL=install TAR=tar"
1956 - myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
1957 - myopts+=" SANE_TOOL_PATH="
1958 - myopts+=" OLD_ICONV="
1959 - myopts+=" NO_EXTERNAL_GREP="
1960 + myopts+=(
1961 + NO_FINK=YesPlease
1962 + NO_DARWIN_PORTS=YesPlease
1963 + INSTALL=install
1964 + TAR=tar
1965 + SHELL_PATH="${EPREFIX}/bin/sh"
1966 + SANE_TOOL_PATH=
1967 + OLD_ICONV=
1968 + NO_EXTERNAL_GREP=
1969 + )
1970
1971 # For svn-fe
1972 extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
1973
1974 # can't define this to null, since the entire makefile depends on it
1975 - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
1976 -
1977 - use iconv \
1978 - || myopts+=" NO_ICONV=YesPlease"
1979 - use nls \
1980 - || myopts+=" NO_GETTEXT=YesPlease"
1981 - use tk \
1982 - || myopts+=" NO_TCLTK=YesPlease"
1983 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
1984 +
1985 if use pcre; then
1986 if use pcre-jit; then
1987 - myopts+=" USE_LIBPCRE2=YesPlease"
1988 + myopts+=( USE_LIBPCRE2=YesPlease )
1989 extlibs+=" -lpcre2-8"
1990 else
1991 - myopts+=" USE_LIBPCRE1=YesPlease"
1992 - myopts+=" NO_LIBPCRE1_JIT=YesPlease"
1993 + myopts+=(
1994 + USE_LIBPCRE1=YesPlease
1995 + NO_LIBPCRE1_JIT=YesPlease
1996 + )
1997 extlibs+=" -lpcre"
1998 fi
1999 fi
2000 - use perl \
2001 - && myopts+=" INSTALLDIRS=vendor" \
2002 - || myopts+=" NO_PERL=YesPlease"
2003 - use python \
2004 - || myopts+=" NO_PYTHON=YesPlease"
2005 - use subversion \
2006 - || myopts+=" NO_SVN_TESTS=YesPlease"
2007 - use threads \
2008 - && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
2009 - || myopts+=" NO_PTHREADS=YesPlease"
2010 - use cvs \
2011 - || myopts+=" NO_CVS=YesPlease"
2012 - use elibc_musl \
2013 - && myopts+=" NO_REGEX=YesPlease"
2014 # Disabled until ~m68k-mint can be keyworded again
2015 # if [[ ${CHOST} == *-mint* ]] ; then
2016 -# myopts+=" NO_MMAP=YesPlease"
2017 -# myopts+=" NO_IPV6=YesPlease"
2018 -# myopts+=" NO_STRLCPY=YesPlease"
2019 -# myopts+=" NO_MEMMEM=YesPlease"
2020 -# myopts+=" NO_MKDTEMP=YesPlease"
2021 -# myopts+=" NO_MKSTEMPS=YesPlease"
2022 +# myopts+=(
2023 +# NO_MMAP=YesPlease
2024 +# NO_IPV6=YesPlease
2025 +# NO_STRLCPY=YesPlease
2026 +# NO_MEMMEM=YesPlease
2027 +# NO_MKDTEMP=YesPlease
2028 +# NO_MKSTEMPS=YesPlease
2029 +# )
2030 # fi
2031 if [[ ${CHOST} == ia64-*-hpux* ]]; then
2032 - myopts+=" NO_NSEC=YesPlease"
2033 + myopts+=( NO_NSEC=YesPlease )
2034 fi
2035 if [[ ${CHOST} == *-*-aix* ]]; then
2036 - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
2037 + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
2038 fi
2039 if [[ ${CHOST} == *-solaris* ]]; then
2040 - myopts+=" NEEDS_LIBICONV=YesPlease"
2041 - myopts+=" HAVE_CLOCK_MONOTONIC=1"
2042 + myopts+=(
2043 + NEEDS_LIBICONV=YesPlease
2044 + HAVE_CLOCK_MONOTONIC=1
2045 + )
2046 grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
2047 - myopts+=" HAVE_GETDELIM=1"
2048 + myopts+=( HAVE_GETDELIM=1 )
2049 fi
2050
2051 has_version '>=app-text/asciidoc-8.0' \
2052 - && myopts+=" ASCIIDOC8=YesPlease"
2053 - myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
2054 + && myopts+=( ASCIIDOC8=YesPlease )
2055
2056 # Bug 290465:
2057 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
2058 [[ "${CHOST}" == *-uclibc* ]] && \
2059 - myopts+=" NO_NSEC=YesPlease"
2060 + myopts+=( NO_NSEC=YesPlease )
2061
2062 - export MY_MAKEOPTS="${myopts}"
2063 + export MY_MAKEOPTS="${myopts[@]}"
2064 export EXTLIBS="${extlibs}"
2065 }
2066
2067 src_unpack() {
2068 if [[ ${PV} != *9999 ]]; then
2069 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
2070 - cd "${S}"
2071 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
2072 - use doc && \
2073 - cd "${S}"/Documentation && \
2074 + if use doc ; then
2075 + pushd "${S}"/Documentation &>/dev/null || die
2076 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
2077 - cd "${S}"
2078 + popd &>/dev/null || die
2079 + fi
2080 else
2081 git-r3_src_unpack
2082 - cd "${S}"
2083 #cp "${FILESDIR}"/GIT-VERSION-GEN .
2084 fi
2085
2086 @@ -280,41 +287,37 @@ src_prepare() {
2087 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
2088 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
2089 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
2090 - Makefile contrib/svn-fe/Makefile || die "sed failed"
2091 -
2092 - # Never install the private copy of Error.pm (bug #296310)
2093 - sed -i \
2094 - -e '/private-Error.pm/s,^,#,' \
2095 - perl/Makefile.PL
2096 + Makefile contrib/svn-fe/Makefile || die
2097
2098 # Fix docbook2texi command
2099 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
2100 - Documentation/Makefile || die "sed failed"
2101 + Documentation/Makefile || die
2102
2103 # Fix git-subtree missing DESTDIR
2104 sed -i \
2105 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
2106 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
2107 - contrib/subtree/Makefile
2108 + contrib/subtree/Makefile || die
2109 }
2110
2111 git_emake() {
2112 # bug #320647: PYTHON_PATH
2113 - PYTHON_PATH=""
2114 + local PYTHON_PATH=""
2115 use python && PYTHON_PATH="${PYTHON}"
2116 emake ${MY_MAKEOPTS} \
2117 - DESTDIR="${D}" \
2118 - OPTCFLAGS="${CFLAGS}" \
2119 - OPTLDFLAGS="${LDFLAGS}" \
2120 - OPTCC="$(tc-getCC)" \
2121 - OPTAR="$(tc-getAR)" \
2122 prefix="${EPREFIX}"/usr \
2123 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
2124 + perllibdir="$(perl_get_raw_vendorlib)" \
2125 sysconfdir="${EPREFIX}"/etc \
2126 - PYTHON_PATH="${PYTHON_PATH}" \
2127 + DESTDIR="${D}" \
2128 + GIT_TEST_OPTS="--no-color" \
2129 + OPTAR="$(tc-getAR)" \
2130 + OPTCC="$(tc-getCC)" \
2131 + OPTCFLAGS="${CFLAGS}" \
2132 + OPTLDFLAGS="${LDFLAGS}" \
2133 PERL_PATH="${EPREFIX}/usr/bin/perl" \
2134 PERL_MM_OPT="" \
2135 - GIT_TEST_OPTS="--no-color" \
2136 + PYTHON_PATH="${PYTHON_PATH}" \
2137 V=1 \
2138 "$@"
2139 }
2140 @@ -324,10 +327,6 @@ src_configure() {
2141 }
2142
2143 src_compile() {
2144 - if use perl ; then
2145 - git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
2146 - git_emake perl/perl.mak || die "emake perl/perl.mak failed"
2147 - fi
2148 git_emake || die "emake failed"
2149
2150 if use emacs ; then
2151 @@ -341,12 +340,13 @@ src_compile() {
2152 fi
2153
2154 if [[ ${CHOST} == *-darwin* ]]; then
2155 - cd "${S}"/contrib/credential/osxkeychain || die
2156 + pushd contrib/credential/osxkeychain &>/dev/null || die
2157 git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
2158 || die "emake credential-osxkeychain"
2159 + popd &>/dev/null || die
2160 fi
2161
2162 - cd "${S}"/Documentation
2163 + pushd Documentation &>/dev/null || die
2164 if [[ ${PV} == *9999 ]] ; then
2165 git_emake man \
2166 || die "emake man failed"
2167 @@ -360,9 +360,10 @@ src_compile() {
2168 || die "emake info html failed"
2169 fi
2170 fi
2171 + popd &>/dev/null || die
2172
2173 if use subversion ; then
2174 - cd "${S}"/contrib/svn-fe
2175 + pushd contrib/svn-fe &>/dev/null || die
2176 # by defining EXTLIBS we override the detection for libintl and
2177 # libiconv, bug #516168
2178 local nlsiconv=
2179 @@ -372,24 +373,29 @@ src_compile() {
2180 if use doc ; then
2181 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
2182 fi
2183 - cd "${S}"
2184 + popd &>/dev/null || die
2185 fi
2186
2187 if use gnome-keyring ; then
2188 - cd "${S}"/contrib/credential/libsecret
2189 + pushd contrib/credential/libsecret &>/dev/null || die
2190 git_emake || die "emake git-credential-libsecret failed"
2191 + popd &>/dev/null || die
2192 fi
2193
2194 - cd "${S}"/contrib/subtree || die
2195 + pushd contrib/subtree &>/dev/null || die
2196 git_emake
2197 use doc && git_emake doc
2198 + popd &>/dev/null || die
2199
2200 - cd "${S}"/contrib/diff-highlight || die
2201 + pushd contrib/diff-highlight &>/dev/null || die
2202 git_emake
2203 + popd &>/dev/null || die
2204
2205 if use mediawiki ; then
2206 - cd "${S}"/contrib/mw-to-git
2207 + pushd contrib/mw-to-git &>/dev/null || die
2208 git_emake
2209 + popd &>/dev/null || die
2210 +
2211 fi
2212 }
2213
2214 @@ -444,19 +450,19 @@ src_install() {
2215 newexe contrib/git-resurrect.sh git-resurrect
2216
2217 # git-subtree
2218 - cd "${S}"/contrib/subtree
2219 + pushd contrib/subtree &>/dev/null || die
2220 git_emake install || die "Failed to emake install git-subtree"
2221 if use doc ; then
2222 git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
2223 fi
2224 newdoc README README.git-subtree
2225 dodoc git-subtree.txt
2226 - cd "${S}"
2227 + popd &>/dev/null || die
2228
2229 if use mediawiki ; then
2230 - cd "${S}"/contrib/mw-to-git
2231 + pushd contrib/mw-to-git &>/dev/null || die
2232 git_emake install
2233 - cd "${S}"
2234 + popd &>/dev/null || die
2235 fi
2236
2237 # diff-highlight
2238 @@ -474,12 +480,13 @@ src_install() {
2239 dodoc contrib/contacts/git-contacts.txt
2240
2241 if use gnome-keyring ; then
2242 - cd "${S}"/contrib/credential/libsecret
2243 + pushd contrib/credential/libsecret &>/dev/null || die
2244 dobin git-credential-libsecret
2245 + popd &>/dev/null || die
2246 fi
2247
2248 if use subversion ; then
2249 - cd "${S}"/contrib/svn-fe
2250 + pushd contrib/svn-fe &>/dev/null || die
2251 dobin svn-fe
2252 dodoc svn-fe.txt
2253 if use doc ; then
2254 @@ -487,7 +494,7 @@ src_install() {
2255 docinto html
2256 dodoc svn-fe.html
2257 fi
2258 - cd "${S}"
2259 + popd &>/dev/null || die
2260 fi
2261
2262 dodir /usr/share/${PN}/contrib
2263 @@ -518,7 +525,7 @@ src_install() {
2264 for i in "${contrib_objects[@]}" ; do
2265 cp -rf \
2266 "${S}"/contrib/${i} \
2267 - "${ED}"/usr/share/${PN}/contrib \
2268 + "${ED%/}"/usr/share/${PN}/contrib \
2269 || die "Failed contrib ${i}"
2270 done
2271
2272 @@ -534,16 +541,17 @@ src_install() {
2273 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
2274 newdoc "${S}"/gitweb/README README.gitweb
2275
2276 - find "${ED}"/usr/lib64/perl5/ \
2277 + find "${ED%/}"/usr/lib64/perl5/ \
2278 -name .packlist \
2279 - -exec rm \{\} \;
2280 + -delete \
2281 + || die
2282 else
2283 - rm -rf "${ED}"/usr/share/gitweb
2284 + rm -rf "${ED%/}"/usr/share/gitweb
2285 fi
2286
2287 if ! use subversion ; then
2288 - rm -f "${ED}"/usr/libexec/git-core/git-svn \
2289 - "${ED}"/usr/share/man/man1/git-svn.1*
2290 + rm -f "${ED%/}"/usr/libexec/git-core/git-svn \
2291 + "${ED%/}"/usr/share/man/man1/git-svn.1*
2292 fi
2293
2294 if use xinetd ; then
2295 @@ -564,111 +572,118 @@ src_install() {
2296 # we could remove sources in src_prepare, but install does not
2297 # handle missing locale dir well
2298 rm_loc() {
2299 - if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
2300 - rm -r "${ED}/usr/share/locale/${1}" || die
2301 + if [[ -e "${ED%/}/usr/share/locale/${1}" ]]; then
2302 + rm -r "${ED%/}/usr/share/locale/${1}" || die
2303 fi
2304 }
2305 l10n_for_each_disabled_locale_do rm_loc
2306 }
2307
2308 src_test() {
2309 - local disabled=""
2310 - local tests_cvs="t9200-git-cvsexportcommit.sh \
2311 - t9400-git-cvsserver-server.sh \
2312 - t9401-git-cvsserver-crlf.sh \
2313 - t9402-git-cvsserver-refs.sh \
2314 - t9600-cvsimport.sh \
2315 - t9601-cvsimport-vendor-branch.sh \
2316 - t9602-cvsimport-branches-tags.sh \
2317 - t9603-cvsimport-patchsets.sh \
2318 - t9604-cvsimport-timestamps.sh"
2319 - local tests_perl="t3701-add-interactive.sh \
2320 - t5502-quickfetch.sh \
2321 - t5512-ls-remote.sh \
2322 - t5520-pull.sh \
2323 - t7106-reset-unborn-branch.sh \
2324 - t7501-commit.sh"
2325 + local disabled=()
2326 + local tests_cvs=(
2327 + t9200-git-cvsexportcommit.sh
2328 + t9400-git-cvsserver-server.sh
2329 + t9401-git-cvsserver-crlf.sh
2330 + t9402-git-cvsserver-refs.sh
2331 + t9600-cvsimport.sh
2332 + t9601-cvsimport-vendor-branch.sh
2333 + t9602-cvsimport-branches-tags.sh
2334 + t9603-cvsimport-patchsets.sh
2335 + t9604-cvsimport-timestamps.sh
2336 + )
2337 + local tests_perl=(
2338 + t3701-add-interactive.sh
2339 + t5502-quickfetch.sh
2340 + t5512-ls-remote.sh
2341 + t5520-pull.sh
2342 + t7106-reset-unborn-branch.sh
2343 + t7501-commit.sh
2344 + )
2345 # Bug #225601 - t0004 is not suitable for root perm
2346 # Bug #219839 - t1004 is not suitable for root perm
2347 # t0001-init.sh - check for init notices EPERM* fails
2348 - local tests_nonroot="t0001-init.sh \
2349 - t0004-unwritable.sh \
2350 - t0070-fundamental.sh \
2351 - t1004-read-tree-m-u-wf.sh \
2352 - t3700-add.sh \
2353 - t7300-clean.sh"
2354 + local tests_nonroot=(
2355 + t0001-init.sh
2356 + t0004-unwritable.sh
2357 + t0070-fundamental.sh
2358 + t1004-read-tree-m-u-wf.sh
2359 + t3700-add.sh
2360 + t7300-clean.sh
2361 + )
2362 # t9100 still fails with symlinks in SVN 1.7
2363 - local test_svn="t9100-git-svn-basic.sh"
2364 + local test_svn=( t9100-git-svn-basic.sh )
2365
2366 # Unzip is used only for the testcase code, not by any normal parts of Git.
2367 if ! has_version app-arch/unzip ; then
2368 einfo "Disabling tar-tree tests"
2369 - disabled+=" t5000-tar-tree.sh"
2370 + disabled+=( t5000-tar-tree.sh )
2371 fi
2372
2373 - cvs=0
2374 - use cvs && let cvs=$cvs+1
2375 + local cvs=0
2376 + use cvs && let cvs=${cvs}+1
2377 if [[ ${EUID} -eq 0 ]]; then
2378 - if [[ $cvs -eq 1 ]]; then
2379 + if [[ ${cvs} -eq 1 ]]; then
2380 ewarn "Skipping CVS tests because CVS does not work as root!"
2381 ewarn "You should retest with FEATURES=userpriv!"
2382 - disabled+=" ${tests_cvs}"
2383 + disabled+=( ${tests_cvs[@]} )
2384 fi
2385 einfo "Skipping other tests that require being non-root"
2386 - disabled+=" ${tests_nonroot}"
2387 + disabled+=( ${tests_nonroot[@]} )
2388 else
2389 - [[ $cvs -gt 0 ]] && \
2390 + [[ ${cvs} -gt 0 ]] && \
2391 has_version dev-vcs/cvs && \
2392 - let cvs=$cvs+1
2393 - [[ $cvs -gt 1 ]] && \
2394 + let cvs=${cvs}+1
2395 + [[ ${cvs} -gt 1 ]] && \
2396 has_version "dev-vcs/cvs[server]" && \
2397 - let cvs=$cvs+1
2398 - if [[ $cvs -lt 3 ]]; then
2399 + let cvs=${cvs}+1
2400 + if [[ ${cvs} -lt 3 ]]; then
2401 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
2402 - disabled+=" ${tests_cvs}"
2403 + disabled+=( ${tests_cvs[@]} )
2404 fi
2405 fi
2406
2407 if ! use perl ; then
2408 einfo "Disabling tests that need Perl"
2409 - disabled+=" ${tests_perl}"
2410 + disabled+=( ${tests_perl[@]} )
2411 fi
2412
2413 einfo "Disabling tests that fail with SVN 1.7"
2414 - disabled+=" ${test_svn}"
2415 + disabled+=( ${test_svn[@]} )
2416
2417 # Reset all previously disabled tests
2418 - cd "${S}/t"
2419 + pushd t &>/dev/null || die
2420 + local i
2421 for i in *.sh.DISABLED ; do
2422 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
2423 done
2424 einfo "Disabled tests:"
2425 - for i in ${disabled} ; do
2426 - [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
2427 + for i in ${disabled[@]} ; do
2428 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
2429 done
2430
2431 # Avoid the test system removing the results because we want them ourselves
2432 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
2433 - -i "${S}"/t/Makefile
2434 + -i Makefile || die
2435
2436 # Clean old results first, must always run
2437 - cd "${S}/t"
2438 nonfatal git_emake clean
2439 + popd &>/dev/null || die
2440
2441 # Now run the tests, keep going if we hit an error, and don't terminate on
2442 # failure
2443 - cd "${S}"
2444 + local rc
2445 einfo "Start test run"
2446 #MAKEOPTS=-j1
2447 nonfatal git_emake --keep-going test
2448 rc=$?
2449
2450 # Display nice results, now print the results
2451 - cd "${S}/t"
2452 + pushd t &>/dev/null || die
2453 nonfatal git_emake aggregate-results
2454
2455 # And bail if there was a problem
2456 - [ $rc -eq 0 ] || die "tests failed. Please file a bug."
2457 + [ ${rc} -eq 0 ] || die "tests failed. Please file a bug."
2458 }
2459
2460 showpkgdeps() {