Gentoo Archives: gentoo-commits

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