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: Mon, 17 Feb 2020 09:48:24
Message-Id: 1581932791.4bb24706041e88060ac66559153a9766d377d885.polynomial-c@gentoo
1 commit: 4bb24706041e88060ac66559153a9766d377d885
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 17 09:46:31 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 17 09:46:31 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bb24706
7
8 dev-vcs/git: Bump to version 2.25.1
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 dev-vcs/git/Manifest | 3 +
14 dev-vcs/git/git-2.25.1.ebuild | 728 ++++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 731 insertions(+)
16
17 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
18 index 622975af3b9..8ff76e98a4d 100644
19 --- a/dev-vcs/git/Manifest
20 +++ b/dev-vcs/git/Manifest
21 @@ -2,11 +2,14 @@ DIST git-2.21.1.tar.xz 5496840 BLAKE2B 8b61c5ca8940422238e48931b502f2a876e20181e
22 DIST git-2.23.1.tar.xz 5713672 BLAKE2B 50db7bafbadcefbc5a56db478ea0464d289c45190a0454e0b8f3d99d48e6251071482df0240ee1ee8a1f733c91e9e46d34794bca8ca70d3c4ecc3b5da6d5d529 SHA512 708f8b9a7c65c1c9d3117b1b7ee9383044b66fe8a5c168a52ba561985670f659d514aa34988ea8ba85c127da6a23c39c511919a6d661bffc9cf782e30fd62373
23 DIST git-2.24.1.tar.xz 5772304 BLAKE2B 45e49325221cd0407968b4e2ff7bcab7ea021863119ae29fec5c7a9ff10461b5af0ea05f587647c7d4965c38e25f1140f194be72ff5f1bea8851c0485effbfa2 SHA512 010c13d4023c142876d0e075a394b74bef422944d8ca602325d0b2b47bf28b1d534283c7f295751113c83fdfcc0c91f97090e8f906560d44b04a94607fd8fcf7
24 DIST git-2.25.0.tar.xz 5873532 BLAKE2B 7e9e54677ac3c4d3295e9f92ba7e3f7f5b33620d6d0fb8105d5e57d609fe3ee499d1c1bc4a6d8832927a28f4948f4466a6ca4edf996b8a324279f91d25627660 SHA512 8bbada0451fe0a3314e1b9a43a74135115449aa41f5b3e7f960279e4a7fe6069c36e78825fc4b60d06806e3a6fa8158f327cb8a3801686ac22a35e3704244191
25 +DIST git-2.25.1.tar.xz 5875548 BLAKE2B 582da3d4ac996d7b9ce6cf505661496ab1a2cd061f058745350498121956b33d79739b567fb5fea0b4e298303261256034aa0b8da0b842feab04ae67a7d5b142 SHA512 15241143acfd8542d85d2709ac3c80dbd6e8d5234438f70c4f33cc71a2bdec3e32938df7f6351e2746d570b021d3bd0b70474ea4beec0c51d1fc45f9c287b344
26 DIST git-htmldocs-2.21.1.tar.xz 1236408 BLAKE2B 173892327d27d918cc0a15e982145d5f0f638deeda56be1cbf16c953b7b3454555ecf3e708c6117b1d4e781ca332199457d9c5b619c91735e0c6e85449be528f SHA512 41819a75656afab0fd56407e7141c8176b708099546cdc7cdc5e765a35401e1148a7165c41bc12a68e124335532450748b27cc3f8c0e372d596f27a992e23e95
27 DIST git-htmldocs-2.23.1.tar.xz 1296144 BLAKE2B 5be4a8afdd79234d220c119b8a4239e640486dc52236d980d08e6b3cad1be61b683c0e3dff6bdd67035a1e23f1d07858d3344f9f2ae90b44188395f34c22fea4 SHA512 c005be3baf129c9320893270d1d3b69e01546a29d482d29e5bc7baefbaab33e45d877c5c09e47312bbdb8b3dfcff27735c2427dcae9eb21fd3500ec30e214ae1
28 DIST git-htmldocs-2.24.1.tar.xz 1307992 BLAKE2B 80b39d2fcf47d20a584109572414ff8d275245afb80c3946e2fa62346fdaee3b1c873a0dccfb44af52290756d26d5e53021a1bf1ace7ada34e50e03244f05e92 SHA512 4da610ba1ee307e4f53414e324ef63ab25cf3945a74bf813aeacd4cf714710eab31776c2402c9567f1a3805e3d8576a158c78a72722c0178fb7c2dec2dcebf5a
29 DIST git-htmldocs-2.25.0.tar.xz 1293644 BLAKE2B 8966e7d57701543770a589aef4a4bb8e673c22987330095431da6cc6cff023f8e288ba13a43d388d9b6e4fb92bed5baaa983c72124f440ef9e6c966b03d920a4 SHA512 67e8c2cc458d81870c901b720800a49cf605b3815c63af91328419a1e543e296b348bd8f7126a4a3cefcb8e2e2c7b713bcfc38ee945c224bd34bbd1c3e4f45b2
30 +DIST git-htmldocs-2.25.1.tar.xz 1295708 BLAKE2B 18a274e5eb48030f50c0f38cbcc81b0e65c55ea6b702a9cc4f231c274faf0247c4fdaccde2d348717826d1bd914fe62b387946ae63aba64ba032c43898529f7a SHA512 f261cf72a7b59277666c543d2b40cc9e37ae6d4925616dcb448325e69c59efdee9db151a0d509545d5b366d82fe1196ece289197c02c65ae5f8c91526d49b0fb
31 DIST git-manpages-2.21.1.tar.xz 440316 BLAKE2B 658232d29bbca3b55a6797d5008f2f6f82d0c04d22ae5af8c689d8cb00e35bfbbccf658d269b96dd868cf3e1cf8f3304eb97cfee428ff8c762f914d1cde4e4f4 SHA512 1a687e4cb2dc90854067b164d6142b88205ba40dbc283432296afafde4370afc900096c5aedc9a7a959b8aa910196d42c399c5c4eed7e2f1ce0f98d8005f3581
32 DIST git-manpages-2.23.1.tar.xz 448432 BLAKE2B 0de4b2c0dcc3a70188a66d8aa6e16aeaad84a9f16b764934b06f61773db2d5141cc0b1091780d126f29a1f50c767a54fbb7d01a36f86d387d8ccb4060f48156e SHA512 16145c0c2215ce6a3aa9045f35f670258f6823a765ed2feec680ed980420d1bb008fc39d8f379c81cd0b259fc582d15e42395d4f954171b20bcf214ab25e41d7
33 DIST git-manpages-2.24.1.tar.xz 453752 BLAKE2B 51a549099205341bfec5a7998e5f66e9fc78ffd05fd04e745401a8bcc5bffcb64f26a64c7e24c9822bc2d62d000ea2b13779ffe19f065124a8e42b306fb5a2d3 SHA512 ee1e70fdbfc6eae97dc3b3180fa119b0d1189db7cae3e45b8baa9311d0c1162a5b46824a785e91288522a9fd00b8e4ff07590f4e4722a08955d6a9d048cc3a90
34 DIST git-manpages-2.25.0.tar.xz 456636 BLAKE2B 672557d167b7d2ff48089bc5be1fa446f25eed4412d6e48549d5907f7addab9f721a03a8bcb7ca3fb1804220021566ebac549d9878df9f1030f283ed5e44ddf3 SHA512 3ad1756b1f12898823a8981e3b650f588c6c1fb2d51371739c754108e67c2cd13e4d2bcb8291534523eac60e7a05253d4ddf2f3528e28d4e1b50eafa42168847
35 +DIST git-manpages-2.25.1.tar.xz 457408 BLAKE2B 6b9d7074bc690156e7d4a14b04d8e82c9441c8b9330bdf40de215fc48ee7bbfaf410b57bbf48bd6127a60f0d6daa0adf7194fc8eb43b3d8e2a9b5d054cb7d5ea SHA512 c36afa05f641c6e1d909cbe0e3292a10f35c0a05867e2782e6770857714b152de839f1e9b2c2ff2efea0b50b19cfdf3022d8617a299f4aa3940533eb891fa6ba
36
37 diff --git a/dev-vcs/git/git-2.25.1.ebuild b/dev-vcs/git/git-2.25.1.ebuild
38 new file mode 100644
39 index 00000000000..d256228c484
40 --- /dev/null
41 +++ b/dev-vcs/git/git-2.25.1.ebuild
42 @@ -0,0 +1,728 @@
43 +# Copyright 1999-2020 Gentoo Authors
44 +# Distributed under the terms of the GNU General Public License v2
45 +
46 +EAPI=7
47 +
48 +GENTOO_DEPEND_ON_PERL=no
49 +
50 +# bug #329479: git-remote-testgit is not multiple-version aware
51 +PYTHON_COMPAT=( python{2_7,3_{6,7}} )
52 +
53 +inherit toolchain-funcs elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd
54 +
55 +PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
56 +if [[ ${PV} == *9999 ]]; then
57 + inherit git-r3
58 + EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
59 + # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
60 + # See https://git-scm.com/docs/gitworkflows#_graduation
61 + # In order of stability:
62 + # 9999-r0: maint
63 + # 9999-r1: master
64 + # 9999-r2: next
65 + # 9999-r3: pu
66 + case "${PVR}" in
67 + 9999) EGIT_BRANCH=maint ;;
68 + 9999-r1) EGIT_BRANCH=master ;;
69 + 9999-r2) EGIT_BRANCH=next;;
70 + 9999-r3) EGIT_BRANCH=pu ;;
71 + esac
72 +fi
73 +
74 +MY_PV="${PV/_rc/.rc}"
75 +MY_P="${PN}-${MY_PV}"
76 +
77 +DOC_VER="${MY_PV}"
78 +
79 +DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
80 +HOMEPAGE="https://www.git-scm.com/"
81 +if [[ ${PV} != *9999 ]]; then
82 + SRC_URI_SUFFIX="xz"
83 + SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git"
84 + [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
85 + SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
86 + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
87 + doc? (
88 + ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
89 + )"
90 + [[ "${PV}" == *_rc* ]] || \
91 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
92 +fi
93 +
94 +LICENSE="GPL-2"
95 +SLOT="0"
96 +IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg highlight +iconv libressl mediawiki mediawiki-experimental +nls +pcre +pcre-jit perforce +perl +ppcsha1 tk +threads +webdav xinetd cvs subversion test"
97 +
98 +# Common to both DEPEND and RDEPEND
99 +DEPEND="
100 + gnome-keyring? ( app-crypt/libsecret )
101 + !libressl? ( dev-libs/openssl:0= )
102 + libressl? ( dev-libs/libressl:= )
103 + sys-libs/zlib
104 + pcre? (
105 + pcre-jit? ( dev-libs/libpcre2[jit(+)] )
106 + !pcre-jit? ( dev-libs/libpcre )
107 + )
108 + perl? ( dev-lang/perl:=[-build(-)] )
109 + tk? ( dev-lang/tk:0= )
110 + curl? (
111 + net-misc/curl
112 + webdav? ( dev-libs/expat )
113 + )
114 + emacs? ( >=app-editors/emacs-23.1:* )
115 + iconv? ( virtual/libiconv )
116 +"
117 +
118 +RDEPEND="${DEPEND}
119 + gpg? ( app-crypt/gnupg )
120 + perl? (
121 + dev-perl/Error
122 + dev-perl/MailTools
123 + dev-perl/Authen-SASL
124 + cgi? (
125 + dev-perl/CGI
126 + highlight? ( app-text/highlight )
127 + )
128 + cvs? (
129 + >=dev-vcs/cvsps-2.1:0
130 + dev-perl/DBI
131 + dev-perl/DBD-SQLite
132 + )
133 + mediawiki? (
134 + dev-perl/DateTime-Format-ISO8601
135 + dev-perl/HTML-Tree
136 + dev-perl/MediaWiki-API
137 + )
138 + subversion? (
139 + dev-vcs/subversion[-dso,perl]
140 + dev-perl/libwww-perl
141 + dev-perl/TermReadKey
142 + )
143 + )
144 + perforce? ( ${PYTHON_DEPS} )
145 +"
146 +
147 +# This is how info docs are created with Git:
148 +# .txt/asciidoc --(asciidoc)---------> .xml/docbook
149 +# .xml/docbook --(docbook2texi.pl)--> .texi
150 +# .texi --(makeinfo)---------> .info
151 +BDEPEND="
152 + doc? (
153 + app-text/asciidoc
154 + app-text/docbook2X
155 + app-text/xmlto
156 + sys-apps/texinfo
157 + )
158 + nls? ( sys-devel/gettext )
159 + test? ( app-crypt/gnupg )
160 +"
161 +
162 +# Live ebuild builds man pages and HTML docs, additionally
163 +if [[ ${PV} == *9999 ]]; then
164 + BDEPEND="${BDEPEND}
165 + app-text/asciidoc"
166 +fi
167 +
168 +SITEFILE="50${PN}-gentoo.el"
169 +S="${WORKDIR}/${MY_P}"
170 +
171 +REQUIRED_USE="
172 + cgi? ( perl )
173 + cvs? ( perl )
174 + mediawiki? ( perl )
175 + mediawiki-experimental? ( mediawiki )
176 + subversion? ( perl )
177 + webdav? ( curl )
178 + pcre-jit? ( pcre )
179 + perforce? ( ${PYTHON_REQUIRED_USE} )
180 +"
181 +
182 +RESTRICT="!test? ( test )"
183 +
184 +PATCHES=(
185 + # bug #350330 - automagic CVS when we don't want it is bad.
186 + "${FILESDIR}"/git-2.22.0_rc0-optional-cvs.patch
187 +
188 + "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
189 +
190 + # Make submodule output quiet
191 + "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch
192 +)
193 +
194 +pkg_setup() {
195 + if use subversion && has_version "dev-vcs/subversion[dso]"; then
196 + ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
197 + ewarn "with USE=dso, there may be weird crashes in git-svn. You"
198 + ewarn "have been warned."
199 + fi
200 + if use perforce ; then
201 + python-single-r1_pkg_setup
202 + fi
203 +}
204 +
205 +# This is needed because for some obscure reasons future calls to make don't
206 +# pick up these exports if we export them in src_unpack()
207 +exportmakeopts() {
208 + local extlibs myopts
209 +
210 + myopts=(
211 + ASCIIDOC_NO_ROFF=YesPlease
212 + $(usex cvs '' NO_CVS=YesPlease)
213 + $(usex elibc_musl NO_REGEX=YesPlease '')
214 + $(usex iconv '' NO_ICONV=YesPlease)
215 + $(usex nls '' NO_GETTEXT=YesPlease)
216 + $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease)
217 + $(usex perforce '' NO_PYTHON=YesPlease)
218 + $(usex subversion '' NO_SVN_TESTS=YesPlease)
219 + $(usex threads '' NO_PTHREAD=YesPlease)
220 + $(usex tk '' NO_TCLTK=YesPlease)
221 + )
222 +
223 + if use blksha1 ; then
224 + myopts+=( BLK_SHA1=YesPlease )
225 + elif use ppcsha1 ; then
226 + myopts+=( PPC_SHA1=YesPlease )
227 + fi
228 +
229 + if use curl ; then
230 + use webdav || myopts+=( NO_EXPAT=YesPlease )
231 + else
232 + myopts+=( NO_CURL=YesPlease )
233 + fi
234 +
235 + # broken assumptions, because of static build system ...
236 + myopts+=(
237 + NO_FINK=YesPlease
238 + NO_DARWIN_PORTS=YesPlease
239 + INSTALL=install
240 + TAR=tar
241 + SHELL_PATH="${EPREFIX}/bin/sh"
242 + SANE_TOOL_PATH=
243 + OLD_ICONV=
244 + NO_EXTERNAL_GREP=
245 + )
246 +
247 + # For svn-fe
248 + extlibs=( -lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '') )
249 +
250 + # can't define this to null, since the entire makefile depends on it
251 + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die
252 +
253 + if use pcre; then
254 + if use pcre-jit; then
255 + myopts+=( USE_LIBPCRE2=YesPlease )
256 + extlibs+=( -lpcre2-8 )
257 + else
258 + myopts+=(
259 + USE_LIBPCRE1=YesPlease
260 + NO_LIBPCRE1_JIT=YesPlease
261 + )
262 + extlibs+=( -lpcre )
263 + fi
264 + fi
265 +# Disabled until ~m68k-mint can be keyworded again
266 +# if [[ ${CHOST} == *-mint* ]] ; then
267 +# myopts+=(
268 +# NO_MMAP=YesPlease
269 +# NO_IPV6=YesPlease
270 +# NO_STRLCPY=YesPlease
271 +# NO_MEMMEM=YesPlease
272 +# NO_MKDTEMP=YesPlease
273 +# NO_MKSTEMPS=YesPlease
274 +# )
275 +# fi
276 + if [[ ${CHOST} == ia64-*-hpux* ]]; then
277 + myopts+=( NO_NSEC=YesPlease )
278 + fi
279 + if [[ ${CHOST} == *-*-aix* ]]; then
280 + myopts+=( NO_FNMATCH_CASEFOLD=YesPlease )
281 + fi
282 + if [[ ${CHOST} == *-solaris* ]]; then
283 + myopts+=(
284 + NEEDS_LIBICONV=YesPlease
285 + HAVE_CLOCK_MONOTONIC=1
286 + )
287 + if grep -q getdelim "${EROOT}"/usr/include/stdio.h ; then
288 + myopts+=( HAVE_GETDELIM=1 )
289 + fi
290 + fi
291 +
292 + if has_version '>=app-text/asciidoc-8.0' ; then
293 + myopts+=( ASCIIDOC8=YesPlease )
294 + fi
295 +
296 + # Bug 290465:
297 + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
298 + if [[ "${CHOST}" == *-uclibc* ]] ; then
299 + myopts+=( NO_NSEC=YesPlease )
300 + use iconv && myopts+=( NEEDS_LIBICONV=YesPlease )
301 + fi
302 +
303 + export MY_MAKEOPTS="${myopts[@]}"
304 + export EXTLIBS="${extlibs[@]}"
305 +}
306 +
307 +src_unpack() {
308 + if [[ ${PV} != *9999 ]]; then
309 + unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
310 + cd "${S}" || die
311 + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
312 + if use doc ; then
313 + pushd "${S}"/Documentation &>/dev/null || die
314 + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
315 + popd &>/dev/null || die
316 + fi
317 + else
318 + git-r3_src_unpack
319 + #cp "${FILESDIR}"/GIT-VERSION-GEN .
320 + fi
321 +
322 +}
323 +
324 +src_prepare() {
325 + # add experimental patches to improve mediawiki support
326 + # see patches for origin
327 + if use mediawiki-experimental ; then
328 + PATCHES+=(
329 + "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
330 + "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
331 + "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
332 + )
333 + fi
334 +
335 + default
336 +
337 + sed -i \
338 + -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
339 + -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
340 + -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
341 + -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
342 + -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
343 + -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
344 + Makefile contrib/svn-fe/Makefile || die
345 +
346 + # Fix docbook2texi command
347 + sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
348 + Documentation/Makefile || die
349 +}
350 +
351 +git_emake() {
352 + # bug #320647: PYTHON_PATH
353 + local PYTHON_PATH=""
354 + use perforce && PYTHON_PATH="${PYTHON}"
355 + emake ${MY_MAKEOPTS} \
356 + prefix="${EPREFIX}"/usr \
357 + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
358 + perllibdir="$(use perl && perl_get_raw_vendorlib)" \
359 + sysconfdir="${EPREFIX}"/etc \
360 + DESTDIR="${D}" \
361 + GIT_TEST_OPTS="--no-color" \
362 + OPTAR="$(tc-getAR)" \
363 + OPTCC="$(tc-getCC)" \
364 + OPTCFLAGS="${CFLAGS}" \
365 + OPTLDFLAGS="${LDFLAGS}" \
366 + PERL_PATH="${EPREFIX}/usr/bin/perl" \
367 + PERL_MM_OPT="" \
368 + PYTHON_PATH="${PYTHON_PATH}" \
369 + V=1 \
370 + "$@"
371 +}
372 +
373 +src_configure() {
374 + exportmakeopts
375 +}
376 +
377 +src_compile() {
378 + git_emake || die "emake failed"
379 +
380 + if use emacs ; then
381 + elisp-compile contrib/emacs/git{,-blame}.el
382 + fi
383 +
384 + if use perl && use cgi ; then
385 + git_emake \
386 + gitweb \
387 + || die "emake gitweb (cgi) failed"
388 + fi
389 +
390 + if [[ ${CHOST} == *-darwin* ]]; then
391 + pushd contrib/credential/osxkeychain &>/dev/null || die
392 + git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
393 + || die "emake credential-osxkeychain"
394 + popd &>/dev/null || die
395 + fi
396 +
397 + pushd Documentation &>/dev/null || die
398 + if [[ ${PV} == *9999 ]] ; then
399 + git_emake man \
400 + || die "emake man failed"
401 + if use doc ; then
402 + git_emake info html \
403 + || die "emake info html failed"
404 + fi
405 + else
406 + if use doc ; then
407 + git_emake info \
408 + || die "emake info html failed"
409 + fi
410 + fi
411 + popd &>/dev/null || die
412 +
413 + if use subversion ; then
414 + pushd contrib/svn-fe &>/dev/null || die
415 + # by defining EXTLIBS we override the detection for libintl and
416 + # libiconv, bug #516168
417 + local nlsiconv=()
418 + use nls && use !elibc_glibc && nlsiconv+=( -lintl )
419 + use iconv && use !elibc_glibc && nlsiconv+=( -liconv )
420 + git_emake EXTLIBS="${EXTLIBS} ${nlsiconv[@]}" \
421 + || die "emake svn-fe failed"
422 + if use doc ; then
423 + # svn-fe.1 requires the full USE=doc dependency stack
424 + git_emake svn-fe.1 \
425 + || die "emake svn-fe.1 failed"
426 + git_emake svn-fe.html \
427 + || die "svn-fe.html failed"
428 + fi
429 + popd &>/dev/null || die
430 + fi
431 +
432 + if use gnome-keyring ; then
433 + pushd contrib/credential/libsecret &>/dev/null || die
434 + git_emake || die "emake git-credential-libsecret failed"
435 + popd &>/dev/null || die
436 + fi
437 +
438 + pushd contrib/subtree &>/dev/null || die
439 + git_emake git-subtree
440 + # git-subtree.1 requires the full USE=doc dependency stack
441 + use doc && git_emake git-subtree.html git-subtree.1
442 + popd &>/dev/null || die
443 +
444 + pushd contrib/diff-highlight &>/dev/null || die
445 + git_emake
446 + popd &>/dev/null || die
447 +
448 + if use mediawiki ; then
449 + pushd contrib/mw-to-git &>/dev/null || die
450 + git_emake
451 + popd &>/dev/null || die
452 +
453 + fi
454 +}
455 +
456 +src_install() {
457 + git_emake install || die "make install failed"
458 +
459 + if [[ ${CHOST} == *-darwin* ]]; then
460 + dobin contrib/credential/osxkeychain/git-credential-osxkeychain
461 + fi
462 +
463 + # Depending on the tarball and manual rebuild of the documentation, the
464 + # manpages may exist in either OR both of these directories.
465 + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
466 + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
467 + dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
468 + use doc && dodir /usr/share/doc/${PF}/html
469 + local d
470 + for d in / /howto/ /technical/ ; do
471 + docinto ${d}
472 + dodoc Documentation${d}*.txt
473 + if use doc ; then
474 + docinto ${d}/html
475 + dodoc Documentation${d}*.html
476 + fi
477 + done
478 + docinto /
479 + # Upstream does not ship this pre-built :-(
480 + use doc && doinfo Documentation/{git,gitman}.info
481 +
482 + newbashcomp contrib/completion/git-completion.bash ${PN}
483 + bashcomp_alias git gitk
484 + # Not really a bash-completion file (bug #477920)
485 + # but still needed uncompressed (bug #507480)
486 + insinto /usr/share/${PN}
487 + doins contrib/completion/git-prompt.sh
488 +
489 + if use emacs ; then
490 + elisp-install ${PN} contrib/emacs/git.{el,elc}
491 + elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
492 + #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
493 + # don't add automatically to the load-path, so the sitefile
494 + # can do a conditional loading
495 + touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
496 + elisp-site-file-install "${FILESDIR}"/${SITEFILE}
497 + fi
498 +
499 + #dobin contrib/fast-import/git-p4 # Moved upstream
500 + #dodoc contrib/fast-import/git-p4.txt # Moved upstream
501 + newbin contrib/fast-import/import-tars.perl import-tars
502 + exeinto /usr/libexec/git-core/
503 + newexe contrib/git-resurrect.sh git-resurrect
504 +
505 + # git-subtree
506 + pushd contrib/subtree &>/dev/null || die
507 + git_emake install || die "Failed to emake install for git-subtree"
508 + if use doc ; then
509 + # Do not move git subtree install-man outside USE=doc!
510 + git_emake install-man install-html || die "Failed to emake install-html install-man for git-subtree"
511 + fi
512 + newdoc README README.git-subtree
513 + dodoc git-subtree.txt
514 + popd &>/dev/null || die
515 +
516 + if use mediawiki ; then
517 + pushd contrib/mw-to-git &>/dev/null || die
518 + git_emake install
519 + popd &>/dev/null || die
520 + fi
521 +
522 + # diff-highlight
523 + dobin contrib/diff-highlight/diff-highlight
524 + newdoc contrib/diff-highlight/README README.diff-highlight
525 +
526 + # git-jump
527 + exeinto /usr/libexec/git-core/
528 + doexe contrib/git-jump/git-jump
529 + newdoc contrib/git-jump/README git-jump.txt
530 +
531 + # git-contacts
532 + exeinto /usr/libexec/git-core/
533 + doexe contrib/contacts/git-contacts
534 + dodoc contrib/contacts/git-contacts.txt
535 +
536 + if use gnome-keyring ; then
537 + pushd contrib/credential/libsecret &>/dev/null || die
538 + dobin git-credential-libsecret
539 + popd &>/dev/null || die
540 + fi
541 +
542 + if use subversion ; then
543 + pushd contrib/svn-fe &>/dev/null || die
544 + dobin svn-fe
545 + dodoc svn-fe.txt
546 + if use doc ; then
547 + # Do not move svn-fe.1 outside USE=doc!
548 + doman svn-fe.1
549 + docinto html
550 + dodoc svn-fe.html
551 + fi
552 + popd &>/dev/null || die
553 + fi
554 +
555 + dodir /usr/share/${PN}/contrib
556 + # The following are excluded:
557 + # completion - installed above
558 + # diff-highlight - done above
559 + # emacs - installed above
560 + # examples - these are stuff that is not used in Git anymore actually
561 + # git-jump - done above
562 + # gitview - installed above
563 + # p4import - excluded because fast-import has a better one
564 + # patches - stuff the Git guys made to go upstream to other places
565 + # persistent-https - TODO
566 + # mw-to-git - TODO
567 + # subtree - build seperately
568 + # svnimport - use git-svn
569 + # thunderbird-patch-inline - fixes thunderbird
570 + local contrib_objects=(
571 + buildsystems
572 + fast-import
573 + hg-to-git
574 + hooks
575 + remotes2config.sh
576 + rerere-train.sh
577 + stats
578 + workdir
579 + )
580 + local i
581 + for i in "${contrib_objects[@]}" ; do
582 + cp -rf \
583 + "${S}"/contrib/${i} \
584 + "${ED}"/usr/share/${PN}/contrib \
585 + || die "Failed contrib ${i}"
586 + done
587 +
588 + if use perl && use cgi ; then
589 + # We used to install in /usr/share/${PN}/gitweb
590 + # but upstream installs in /usr/share/gitweb
591 + # so we will install a symlink and use their location for compat with other
592 + # distros
593 + dosym ../gitweb /usr/share/${PN}/gitweb
594 +
595 + # INSTALL discusses configuration issues, not just installation
596 + docinto /
597 + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
598 + newdoc "${S}"/gitweb/README README.gitweb
599 +
600 + for d in "${ED}"/usr/lib{,64}/perl5/ ; do
601 + if test -d "${d}" ; then find "${d}" \
602 + -name .packlist \
603 + -delete || die
604 + fi
605 + done
606 + else
607 + rm -rf "${ED}"/usr/share/gitweb
608 + fi
609 +
610 + if ! use subversion ; then
611 + rm -f "${ED}"/usr/libexec/git-core/git-svn \
612 + "${ED}"/usr/share/man/man1/git-svn.1*
613 + fi
614 +
615 + if use xinetd ; then
616 + insinto /etc/xinetd.d
617 + newins "${FILESDIR}"/git-daemon.xinetd git-daemon
618 + fi
619 +
620 + if use !prefix ; then
621 + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
622 + newconfd "${FILESDIR}"/git-daemon.confd git-daemon
623 + systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
624 + systemd_dounit "${FILESDIR}/git-daemon.socket"
625 + fi
626 +
627 + perl_delete_localpod
628 +
629 + # Remove disabled linguas
630 + # we could remove sources in src_prepare, but install does not
631 + # handle missing locale dir well
632 + rm_loc() {
633 + if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
634 + rm -r "${ED}/usr/share/locale/${1}" || die
635 + fi
636 + }
637 + l10n_for_each_disabled_locale_do rm_loc
638 +}
639 +
640 +src_test() {
641 + local disabled=()
642 + local tests_cvs=(
643 + t9200-git-cvsexportcommit.sh
644 + t9400-git-cvsserver-server.sh
645 + t9401-git-cvsserver-crlf.sh
646 + t9402-git-cvsserver-refs.sh
647 + t9600-cvsimport.sh
648 + t9601-cvsimport-vendor-branch.sh
649 + t9602-cvsimport-branches-tags.sh
650 + t9603-cvsimport-patchsets.sh
651 + t9604-cvsimport-timestamps.sh
652 + )
653 + local tests_perl=(
654 + t3701-add-interactive.sh
655 + t5502-quickfetch.sh
656 + t5512-ls-remote.sh
657 + t5520-pull.sh
658 + t7106-reset-unborn-branch.sh
659 + t7501-commit.sh
660 + )
661 + # Bug #225601 - t0004 is not suitable for root perm
662 + # Bug #219839 - t1004 is not suitable for root perm
663 + # t0001-init.sh - check for init notices EPERM* fails
664 + local tests_nonroot=(
665 + t0001-init.sh
666 + t0004-unwritable.sh
667 + t0070-fundamental.sh
668 + t1004-read-tree-m-u-wf.sh
669 + t3700-add.sh
670 + t7300-clean.sh
671 + )
672 + # t9100 still fails with symlinks in SVN 1.7
673 + local test_svn=( t9100-git-svn-basic.sh )
674 +
675 + # Unzip is used only for the testcase code, not by any normal parts of Git.
676 + if ! has_version app-arch/unzip ; then
677 + einfo "Disabling tar-tree tests"
678 + disabled+=( t5000-tar-tree.sh )
679 + fi
680 +
681 + local cvs=0
682 + use cvs && let cvs=${cvs}+1
683 + if [[ ${EUID} -eq 0 ]]; then
684 + if [[ ${cvs} -eq 1 ]]; then
685 + ewarn "Skipping CVS tests because CVS does not work as root!"
686 + ewarn "You should retest with FEATURES=userpriv!"
687 + disabled+=( ${tests_cvs[@]} )
688 + fi
689 + einfo "Skipping other tests that require being non-root"
690 + disabled+=( ${tests_nonroot[@]} )
691 + else
692 + [[ ${cvs} -gt 0 ]] && \
693 + has_version dev-vcs/cvs && \
694 + let cvs=${cvs}+1
695 + [[ ${cvs} -gt 1 ]] && \
696 + has_version "dev-vcs/cvs[server]" && \
697 + let cvs=${cvs}+1
698 + if [[ ${cvs} -lt 3 ]]; then
699 + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
700 + disabled+=( ${tests_cvs[@]} )
701 + fi
702 + fi
703 +
704 + if ! use perl ; then
705 + einfo "Disabling tests that need Perl"
706 + disabled+=( ${tests_perl[@]} )
707 + fi
708 +
709 + einfo "Disabling tests that fail with SVN 1.7"
710 + disabled+=( ${test_svn[@]} )
711 +
712 + # Reset all previously disabled tests
713 + pushd t &>/dev/null || die
714 + local i
715 + for i in *.sh.DISABLED ; do
716 + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
717 + done
718 + einfo "Disabled tests:"
719 + for i in ${disabled[@]} ; do
720 + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}"
721 + done
722 +
723 + # Avoid the test system removing the results because we want them ourselves
724 + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
725 + -i Makefile || die
726 +
727 + # Clean old results first, must always run
728 + nonfatal git_emake clean
729 + popd &>/dev/null || die
730 +
731 + # Now run the tests, keep going if we hit an error, and don't terminate on
732 + # failure
733 + local rc
734 + einfo "Start test run"
735 + #MAKEOPTS=-j1
736 + nonfatal git_emake --keep-going test
737 + rc=$?
738 +
739 + # Display nice results, now print the results
740 + pushd t &>/dev/null || die
741 + nonfatal git_emake aggregate-results
742 +
743 + # And bail if there was a problem
744 + [[ ${rc} -eq 0 ]] || die "tests failed. Please file a bug."
745 +}
746 +
747 +showpkgdeps() {
748 + local pkg=$1
749 + shift
750 + elog " $(printf "%-17s:" ${pkg}) ${@}"
751 +}
752 +
753 +pkg_postinst() {
754 + use emacs && elisp-site-regen
755 + elog "Please read /usr/share/bash-completion/completions/git for Git bash command"
756 + elog "completion."
757 + elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
758 + elog "Note that the prompt bash code is now in that separate script"
759 + elog "These additional scripts need some dependencies:"
760 + echo
761 + showpkgdeps git-quiltimport "dev-util/quilt"
762 + showpkgdeps git-instaweb \
763 + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
764 + echo
765 + use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
766 +}
767 +
768 +pkg_postrm() {
769 + use emacs && elisp-site-regen
770 +}