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