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