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