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: Wed, 20 May 2020 19:14:06
Message-Id: 1590002034.2df602e91e1a54766cf463914f6a365208446072.polynomial-c@gentoo
1 commit: 2df602e91e1a54766cf463914f6a365208446072
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 20 18:37:42 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed May 20 19:13:54 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2df602e9
7
8 dev-vcs/git: Bump to version 2.27.0_rc0
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 dev-vcs/git/Manifest | 3 +
14 dev-vcs/git/git-2.27.0_rc0.ebuild | 728 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 731 insertions(+)
16
17 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
18 index dc5ca43f1c9..3eeff576509 100644
19 --- a/dev-vcs/git/Manifest
20 +++ b/dev-vcs/git/Manifest
21 @@ -2,11 +2,14 @@ DIST git-2.23.3.tar.xz 5716108 BLAKE2B 9d0e63e075d8e64bf2772bdd3e49e9907ae093bcf
22 DIST git-2.24.3.tar.xz 5774192 BLAKE2B a8bea56f85a12863565325984a303ac2d964e0371de5252252a736a376a22cc1695da15b46d35bdec8a36c2ebd7ba7040727265acee37892350aad08209ed15f SHA512 b2fbafd0faa06a304e960f78696f5c033eb5330b18af28c0d169af86aa836dada0c3cf349993b1c9a6129d0c42788167a393f9db9be981610318dca5743b2c87
23 DIST git-2.25.4.tar.xz 5880976 BLAKE2B a3ac79918ba174a93844d9518a2f1c6970abe2cd31acea260742d3c03a31a03131f53603a3bd3e525a60f8ebcfbbaa3b92228e2486717ca2d389a978e39bd5ec SHA512 ca2ecc561d06dbb393fe47d445f0d69423d114766d9bcc125ef1d6d37e350ad903c456540cea420c1a51635b750cde3901e4196f29ce95b315fda11270173450
24 DIST git-2.26.2.tar.xz 6007864 BLAKE2B efce003a95e24dbb6e14feebd35874c9ed1a5c06d7f0722d4dfefae830613b64b81faa41d5952400fa382b385d15d48829f8ee3b4d065e134bd38fa0e10bf570 SHA512 5d92d07b171c5cd6e89a29c1211c73c1c900cd51c74d690aebfb4a3d0e93b541b09b42b6d6a1a82f5c3d953096771f9a8605c63be139f559f58698c1a0eabcfc
25 +DIST git-2.27.0.rc0.tar.xz 6054064 BLAKE2B 46ecae68b111be2d5d2e2664dd80864ad7e3b0b6ee4725baf3a4f3aa95f1434188c6a2641df67376006ff5c1540e89d68999a1e12af8d36ed4d47a994feb3224 SHA512 796d39845e3e18445660b280b6041fda3f5b3bd367f892048871b3a4cd6e6e21c84cee9e4ed8cb0778cda8f9518e8dff3351f63dccecade9431db6fa4ed6b034
26 DIST git-htmldocs-2.23.3.tar.xz 1295344 BLAKE2B 7a6d8198cf8285717f11731ea907ea06786c486701a729d071deedc5437a595dab355ae2d0ac2814b10503ab4161e76a1245663a9ce35ce48d03be9905315db3 SHA512 2c86c03f29f1a4fc2acb17a17a9e1a3df2ec95138895f5c8e776859772ebc7b95c24af0e328508ccf1ea85b7adaa86a9aedc4d0c353ffc91ad5810ecc9a48059
27 DIST git-htmldocs-2.24.3.tar.xz 1307828 BLAKE2B 5d6dda03e2c51346326a1258a14a0ee16fab7fe83c80b4a1a0b307a6343db851d89b96afcf616e10ad5831352a90332ac602e5713444855327e11be8992a5274 SHA512 14289fb46cff48bece0cdafea9ef201facdb58eafce4b735ce50489356deb993c481ac1b6e96a2f98cfe30434280997c47f2cca0bdb2b6e85c31cb7cf17cc257
28 DIST git-htmldocs-2.25.4.tar.xz 1296896 BLAKE2B 4f6469acdcd699698bd1f19bd0d911fd522c1890115f25c087a7870b855eb9354340fe17e9e6aaec7fb27cd951fe28cadbf26e1aeadc76f3c3a1cde4d23e42cd SHA512 e10c6fa52e213a2b18290fed375f6e176eef17b0a19f6906f09d6228d18bece88ff0ec97d871db0ba29fc0fbff73740312ab01eab809bd6a9a41c8b295cf8d67
29 DIST git-htmldocs-2.26.2.tar.xz 1304788 BLAKE2B e0de88c5c41646d5fb9b54e2ee873c7904e1b85c67f971499f0227eb2dd59cabd4ffc58c468cf8a7a7466920af972dbc7f95d78003e487edac9a15a9c49b80a2 SHA512 b577693180b4fc035af211e3b83e98ad5e1bfbb98706924858df6558383b82ca05f870bdae90f8a14c8bf664f091ee928af52dcdebdfb98dc7387fdfe2e3a396
30 +DIST git-htmldocs-2.27.0.rc0.tar.xz 1325528 BLAKE2B 4846bd9e2260b99b8186ffd8b3d9a9fcfd27c21319b929415ab1a9cb19c75106974161dbf0afb16267c73a5db6b5ed3120677f62b9bfcac8b8aabacb0c432fb9 SHA512 af650c7f41b8f4716c02975af2f8c5dc2d8237661d8438b07dc5c8ab6064b9a008f9d0818aad4ffaa2dff15bf4503d6d1c679bdc3ba8503e243b362649dffd83
31 DIST git-manpages-2.23.3.tar.xz 449464 BLAKE2B bfc0153e43724df7210110e836d47f17258e45a876aa9bf4604c3f38e690e0e5379d4394df96c3dd84ea4d7371b7843729e6fb5d4b43fd7d4a9b4c3f4062a922 SHA512 a7b5fc48a5b840eb9b668b441ad3c30f65adc73c22cda461ffaca1cfddf154bf1974cab6c372b4534fd45a43a2e2ab96513364845a7db4285b88e31bf7619f8e
32 DIST git-manpages-2.24.3.tar.xz 454796 BLAKE2B b340b33593e596a7a87385110fea53a96b68f0b0c5c02e046a1aff5ff7c7a6bf3d7a55c4d33796db8e84824df72451ad51db9fc44df4840ecd0183c0ef49eba0 SHA512 22709e159196da27befc26eef3ab40dab9700c95abf6892860a81c8e5df7d85ad423c877e6c88949cfc611c4dfebd956f02a78f0340c1cd4d58c48f80e3e1cce
33 DIST git-manpages-2.25.4.tar.xz 459344 BLAKE2B b0ac88f691984f39f6cfbf41d2d61ab443573974277536641daddf0e9b7755ea9cb6bc96ecf3c14479809036171e461eff72cb498c63a56eea041341b8a65af5 SHA512 a67b881f289d5b3e2187ad55c5176258c30108c73fc7c18d50c1a6b42b241ce46dba28acf2f7bfc994b044444a6678096a35ad60936ea6cba07b52ddf647da17
34 DIST git-manpages-2.26.2.tar.xz 462052 BLAKE2B 27fc44360c9f890e9f7754e8423f5596548f076f5fec5dfc6c752e8b3caa5f64ba182c1566b67878b19fbb115297e08def1bf9d2711c7334cbb8e1b20fc039a1 SHA512 9591e94683a6b49d8b9f2afddc826576023fdfa6de6db4af3a28a2af00b175d5be710d86a31d0f1b8320cc38b6f27698e17fb3e8c1f2b0c5ced37296ef1109b6
35 +DIST git-manpages-2.27.0.rc0.tar.xz 470760 BLAKE2B 4910fe4c32c07f9bb8e917c4e60abd20febee7e56e79192a91ca0ef5bbfa48509f34a408a0aba86a086b2cf1b7b6d38cce90f7e1fc4467651f91b10a69808df7 SHA512 e4c821c4ea285a8ab48171302b86cce0f2cd30333b3e37760dcdd21c156ba6cfed203b256c01b12390d91a9ddf8fd816fdc7a564e9c96f32e4432d87249e1be5
36
37 diff --git a/dev-vcs/git/git-2.27.0_rc0.ebuild b/dev-vcs/git/git-2.27.0_rc0.ebuild
38 new file mode 100644
39 index 00000000000..35ba555d64a
40 --- /dev/null
41 +++ b/dev-vcs/git/git-2.27.0_rc0.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=( python3_{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 ~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_PTHREADS=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 +}