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: Thu, 31 May 2018 22:51:16
Message-Id: 1527807061.c26dc163049d56571c740e43ceb75b29f3228d5d.whissi@gentoo
1 commit: c26dc163049d56571c740e43ceb75b29f3228d5d
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 31 22:50:50 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu May 31 22:51:01 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c26dc163
7
8 dev-vcs/git: security cleanup
9
10 Bug: https://bugs.gentoo.org/656868
11 Package-Manager: Portage-2.3.40, Repoman-2.3.9
12
13 dev-vcs/git/Manifest | 6 -
14 dev-vcs/git/git-2.16.1.ebuild | 699 ------------------------------------------
15 dev-vcs/git/git-2.16.3.ebuild | 699 ------------------------------------------
16 3 files changed, 1404 deletions(-)
17
18 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
19 index d9bcf01f766..f9c9796ab21 100644
20 --- a/dev-vcs/git/Manifest
21 +++ b/dev-vcs/git/Manifest
22 @@ -1,12 +1,6 @@
23 -DIST git-2.16.1.tar.xz 4961656 BLAKE2B d94328da5d027cb82f1f23804a12dfc5df1577bf2c28cc376d4bb5c9e34d317886437f7eee2ac4503b8e2639d2e24c35660ab82a50207f500b7ed6fb104d3624 SHA512 09e30ada7bcf41f78f15784908062c10162d58d2fd7a68ad27e42fd49dc37eb0e82c19ad21db31034a189a8cdd009013a29f943e1ae5d5ab5688c913d2a4d42a
24 -DIST git-2.16.3.tar.xz 4966248 BLAKE2B cd4d2573afd02a23766c4dd0da8397ac36193f68e18c162fc85d60d7595a50da7707f592ccc3a9f00a22fdcb8a8cada82139fe30f97af193fb367a4e392cbaa8 SHA512 73520cf3500b2d13b77eb1e5ec0d60263aad07732d25631732f0d986abd023f97b8a6db4abff64d342cb053018289b5f7a3e32f10b86bd9092a37ee0585adc8a
25 DIST git-2.16.4.tar.xz 4968252 BLAKE2B 77f76408bde02bfacdb99d22baca05893f63c96d1fb7508c7e92541f8f7ec9ced0dad650be788fd28a1e03b5d88b88708652d07a47bedaae60a9cbd4e2eec858 SHA512 f54e431e78289349dcb927ec34873dfb801c49a41cbb3d0138346d603af26bd7d86f9ac95e7a61a4831017f3503f33374510ccf68b0e62b0691fc5a43283f1ac
26 DIST git-2.17.1.tar.xz 5015484 BLAKE2B d3a61023872a15e3176e4dae6df83d4c2369a377244d44dfd7a63a15ecc3a7b145093afd5d6fa72e4eca98ba4f81f7ccd89ac2400c9cf8107ac04fd35d8bf6e4 SHA512 77c27569d40fbae1842130baa0cdda674a02e384631bd8fb1f2ddf67ce372dd4903b2ce6b4283a4ae506cdedd5daa55baa2afe6a6689528511e24e4beb864960
27 -DIST git-htmldocs-2.16.1.tar.xz 1160372 BLAKE2B d426fbc85772e5f04550071dea50a75e6d581fd040e8b37b3b342a8d6569d0dcf456445bab1dec3d84e254e82468c900afff7c6be1ebd6771e7fad5884b92515 SHA512 f2bb8b88ab5aa3d6204874aae583249d5137193c5fe3925df7ae1bcdaec0564b496df9a648c180bebb0c8ff4573f27e330802020d3c9207c2738ddd5c52d99c9
28 -DIST git-htmldocs-2.16.3.tar.xz 1164252 BLAKE2B 43d5b0317d3cb181c24347933b6ee3ce586f7be7e38ae30555bc732b369287f080879ff0408601db125a4104b665956f6bcef3f243496008d3ec1601110b06df SHA512 6271ff7780053347ceba47754db00fa8a0a39ff622c490e273ed286faa6ade3f7d6580fa396c913b4485a942b2ad0cdd898de467fde497de1d850fb6d3debd1e
29 DIST git-htmldocs-2.16.4.tar.xz 1164256 BLAKE2B 88a7ab5b094f15bc2b6c0f4d4c3eae185f6e6c0f00f4aca75492f0cc964428d1bf53002e0e43468b60b62058af5f13b061231061247e19b32bc70c2c8adb04eb SHA512 8f4a8c51656559af81296fb064ecf0f88444952c7f8ee91b85e5a61b20d200267d7432f720ded12046bab986361cff48cf7a2f5d21e05c1ac7648cc3168a0049
30 DIST git-htmldocs-2.17.1.tar.xz 1173296 BLAKE2B 5133a86fb73cd58d6a9d4ed05d32949f642c9a670a49ea67c7170dfb39c4ff3f63d5f220abebcc979f87a360ec2990ccf5a9e3c18e8fcb07082bac111ecb12c7 SHA512 69054b087ffd1c88532672c6edea3cd27e08421f25c09a1a304420ec6aa20806888f71e4ef21aac1bc2fed81a045a64ae164a9dc377eb48d61887bf8d787782c
31 -DIST git-manpages-2.16.1.tar.xz 417188 BLAKE2B 239fb33967d17c8b10efb2e0d1963f7be3404b7f262b49f89b3f4a538135d80268fbe7fe0e561c9cb2d86840eb46b61653ed363d8da27d1169c435d8e1d5e851 SHA512 20c7646b5f1e3c633ce6aae5ee5fcbe4ca1e59fc9253ec9a9e45c7cd8a8ac7a5e71e36258eb747e3bd6d51b3b7971137315dcdbdff493e0f8774ecd3e309735a
32 -DIST git-manpages-2.16.3.tar.xz 417152 BLAKE2B 2719a9a603dc49db1a61a2cec42427bdcdc96fab9d21d16c5a8c70d7dba271a1e5b29f4f83f32c525c4866e3497352017af3777a769893c9543e65d625972375 SHA512 b34a3658412a144fed6f818acc05c0b4be2453ae63f9430dcd53cda750f737bd3da50390bd3f4266e69befa521eddd222985fd531acca1ebd4ca62c6c5b2a85c
33 DIST git-manpages-2.16.4.tar.xz 417136 BLAKE2B 9a75913dae62fa2eb31cf48e77e266aa8d91c67b8a753c1740283b1d626dea1e9aa8d7cea06d9b97887f801b4d1f1b927014851105cefd3241ca7ab7330bfc8b SHA512 8029e9fac1eca542e809da1247f4eec3a2c81c0eb12d03aa816dcf120677011d3e409b06c28c8e7dbf41cbbcca873ec93846dc317bc73e57f4d4701ce7abf73d
34 DIST git-manpages-2.17.1.tar.xz 419400 BLAKE2B af8cef1ac43c6b5ee073c7e18c161ba3ebe0669e474833211c95e72b33524050c30ca133ada98e07c8b481ffc4a5cbce1e7d68427b7aeb9bb80534c2ef3623f0 SHA512 fbdd4ef99419d244bc7c03b10cf09e92d1f0894879fe159ee1f53262daebdc7fe72d6c2bbe9e21fe354f8afb26fa06b35788e54b0c078b686706b511bf7c33ee
35
36 diff --git a/dev-vcs/git/git-2.16.1.ebuild b/dev-vcs/git/git-2.16.1.ebuild
37 deleted file mode 100644
38 index e675a47660d..00000000000
39 --- a/dev-vcs/git/git-2.16.1.ebuild
40 +++ /dev/null
41 @@ -1,699 +0,0 @@
42 -# Copyright 1999-2018 Gentoo Foundation
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="mirror://kernel/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-fbsd ~x86-fbsd ~amd64-linux ~arm-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 -"
114 -
115 -RDEPEND="${CDEPEND}
116 - gpg? ( app-crypt/gnupg )
117 - mediawiki? (
118 - dev-perl/DateTime-Format-ISO8601
119 - dev-perl/HTML-Tree
120 - dev-perl/MediaWiki-API
121 - )
122 - perl? ( dev-perl/Error
123 - dev-perl/Net-SMTP-SSL
124 - dev-perl/Authen-SASL
125 - cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
126 - cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
127 - subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
128 - )
129 - python? ( ${PYTHON_DEPS} )
130 -"
131 -
132 -# This is how info docs are created with Git:
133 -# .txt/asciidoc --(asciidoc)---------> .xml/docbook
134 -# .xml/docbook --(docbook2texi.pl)--> .texi
135 -# .texi --(makeinfo)---------> .info
136 -DEPEND="${CDEPEND}
137 - doc? (
138 - app-text/asciidoc
139 - app-text/docbook2X
140 - sys-apps/texinfo
141 - app-text/xmlto
142 - )
143 - nls? ( sys-devel/gettext )
144 - test? ( app-crypt/gnupg )"
145 -
146 -# Live ebuild builds man pages and HTML docs, additionally
147 -if [[ ${PV} == *9999 ]]; then
148 - DEPEND="${DEPEND}
149 - app-text/asciidoc"
150 -fi
151 -
152 -SITEFILE=50${PN}-gentoo.el
153 -S="${WORKDIR}/${MY_P}"
154 -
155 -REQUIRED_USE="
156 - cgi? ( perl )
157 - cvs? ( perl )
158 - mediawiki? ( perl )
159 - mediawiki-experimental? ( mediawiki )
160 - subversion? ( perl )
161 - webdav? ( curl )
162 - pcre-jit? ( pcre )
163 - python? ( ${PYTHON_REQUIRED_USE} )
164 -"
165 -
166 -PATCHES=(
167 - # bug #350330 - automagic CVS when we don't want it is bad.
168 - "${FILESDIR}"/git-2.12.0-optional-cvs.patch
169 -
170 - # install mediawiki perl modules also in vendor_dir
171 - # hack, needs better upstream solution
172 - "${FILESDIR}"/git-1.8.5-mw-vendor.patch
173 -
174 - "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
175 -
176 - # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
177 - "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch
178 -)
179 -
180 -pkg_setup() {
181 - if use subversion && has_version "dev-vcs/subversion[dso]"; then
182 - ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
183 - ewarn "with USE=dso, there may be weird crashes in git-svn. You"
184 - ewarn "have been warned."
185 - fi
186 - if use python ; then
187 - python-single-r1_pkg_setup
188 - fi
189 -}
190 -
191 -# This is needed because for some obscure reasons future calls to make don't
192 -# pick up these exports if we export them in src_unpack()
193 -exportmakeopts() {
194 - local myopts
195 -
196 - if use blksha1 ; then
197 - myopts+=" BLK_SHA1=YesPlease"
198 - elif use ppcsha1 ; then
199 - myopts+=" PPC_SHA1=YesPlease"
200 - fi
201 -
202 - if use curl ; then
203 - use webdav || myopts+=" NO_EXPAT=YesPlease"
204 - else
205 - myopts+=" NO_CURL=YesPlease"
206 - fi
207 -
208 - # broken assumptions, because of static build system ...
209 - myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
210 - myopts+=" INSTALL=install TAR=tar"
211 - myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
212 - myopts+=" SANE_TOOL_PATH="
213 - myopts+=" OLD_ICONV="
214 - myopts+=" NO_EXTERNAL_GREP="
215 -
216 - # For svn-fe
217 - extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
218 -
219 - # can't define this to null, since the entire makefile depends on it
220 - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
221 -
222 - use iconv \
223 - || myopts+=" NO_ICONV=YesPlease"
224 - use nls \
225 - || myopts+=" NO_GETTEXT=YesPlease"
226 - use tk \
227 - || myopts+=" NO_TCLTK=YesPlease"
228 - if use pcre; then
229 - if use pcre-jit; then
230 - myopts+=" USE_LIBPCRE2=YesPlease"
231 - extlibs+=" -lpcre2-8"
232 - else
233 - myopts+=" USE_LIBPCRE1=YesPlease"
234 - myopts+=" NO_LIBPCRE1_JIT=YesPlease"
235 - extlibs+=" -lpcre"
236 - fi
237 - fi
238 - use perl \
239 - && myopts+=" INSTALLDIRS=vendor" \
240 - || myopts+=" NO_PERL=YesPlease"
241 - use python \
242 - || myopts+=" NO_PYTHON=YesPlease"
243 - use subversion \
244 - || myopts+=" NO_SVN_TESTS=YesPlease"
245 - use threads \
246 - && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
247 - || myopts+=" NO_PTHREADS=YesPlease"
248 - use cvs \
249 - || myopts+=" NO_CVS=YesPlease"
250 - use elibc_musl \
251 - && myopts+=" NO_REGEX=YesPlease"
252 -# Disabled until ~m68k-mint can be keyworded again
253 -# if [[ ${CHOST} == *-mint* ]] ; then
254 -# myopts+=" NO_MMAP=YesPlease"
255 -# myopts+=" NO_IPV6=YesPlease"
256 -# myopts+=" NO_STRLCPY=YesPlease"
257 -# myopts+=" NO_MEMMEM=YesPlease"
258 -# myopts+=" NO_MKDTEMP=YesPlease"
259 -# myopts+=" NO_MKSTEMPS=YesPlease"
260 -# fi
261 - if [[ ${CHOST} == ia64-*-hpux* ]]; then
262 - myopts+=" NO_NSEC=YesPlease"
263 - fi
264 - if [[ ${CHOST} == *-*-aix* ]]; then
265 - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
266 - fi
267 - if [[ ${CHOST} == *-solaris* ]]; then
268 - myopts+=" NEEDS_LIBICONV=YesPlease"
269 - myopts+=" HAVE_CLOCK_MONOTONIC=1"
270 - grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
271 - myopts+=" HAVE_GETDELIM=1"
272 - fi
273 -
274 - has_version '>=app-text/asciidoc-8.0' \
275 - && myopts+=" ASCIIDOC8=YesPlease"
276 - myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
277 -
278 - # Bug 290465:
279 - # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
280 - [[ "${CHOST}" == *-uclibc* ]] && \
281 - myopts+=" NO_NSEC=YesPlease"
282 -
283 - export MY_MAKEOPTS="${myopts}"
284 - export EXTLIBS="${extlibs}"
285 -}
286 -
287 -src_unpack() {
288 - if [[ ${PV} != *9999 ]]; then
289 - unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
290 - cd "${S}"
291 - unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
292 - use doc && \
293 - cd "${S}"/Documentation && \
294 - unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
295 - cd "${S}"
296 - else
297 - git-r3_src_unpack
298 - cd "${S}"
299 - #cp "${FILESDIR}"/GIT-VERSION-GEN .
300 - fi
301 -
302 -}
303 -
304 -src_prepare() {
305 - # add experimental patches to improve mediawiki support
306 - # see patches for origin
307 - if use mediawiki-experimental ; then
308 - PATCHES+=(
309 - "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
310 - "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
311 - "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
312 - )
313 - fi
314 -
315 - default
316 -
317 - sed -i \
318 - -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
319 - -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
320 - -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
321 - -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
322 - -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
323 - -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
324 - Makefile contrib/svn-fe/Makefile || die "sed failed"
325 -
326 - # Never install the private copy of Error.pm (bug #296310)
327 - sed -i \
328 - -e '/private-Error.pm/s,^,#,' \
329 - perl/Makefile.PL
330 -
331 - # Fix docbook2texi command
332 - sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
333 - Documentation/Makefile || die "sed failed"
334 -
335 - # Fix git-subtree missing DESTDIR
336 - sed -i \
337 - -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
338 - -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
339 - contrib/subtree/Makefile
340 -}
341 -
342 -git_emake() {
343 - # bug #320647: PYTHON_PATH
344 - PYTHON_PATH=""
345 - use python && PYTHON_PATH="${PYTHON}"
346 - emake ${MY_MAKEOPTS} \
347 - DESTDIR="${D}" \
348 - OPTCFLAGS="${CFLAGS}" \
349 - OPTLDFLAGS="${LDFLAGS}" \
350 - OPTCC="$(tc-getCC)" \
351 - OPTAR="$(tc-getAR)" \
352 - prefix="${EPREFIX}"/usr \
353 - htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
354 - sysconfdir="${EPREFIX}"/etc \
355 - PYTHON_PATH="${PYTHON_PATH}" \
356 - PERL_PATH="${EPREFIX}/usr/bin/perl" \
357 - PERL_MM_OPT="" \
358 - GIT_TEST_OPTS="--no-color" \
359 - V=1 \
360 - "$@"
361 -}
362 -
363 -src_configure() {
364 - exportmakeopts
365 -}
366 -
367 -src_compile() {
368 - if use perl ; then
369 - git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
370 - git_emake perl/perl.mak || die "emake perl/perl.mak failed"
371 - fi
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 - cd "${S}"/contrib/credential/osxkeychain || die
386 - git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
387 - || die "emake credential-osxkeychain"
388 - fi
389 -
390 - cd "${S}"/Documentation
391 - if [[ ${PV} == *9999 ]] ; then
392 - git_emake man \
393 - || die "emake man failed"
394 - if use doc ; then
395 - git_emake info html \
396 - || die "emake info html failed"
397 - fi
398 - else
399 - if use doc ; then
400 - git_emake info \
401 - || die "emake info html failed"
402 - fi
403 - fi
404 -
405 - if use subversion ; then
406 - cd "${S}"/contrib/svn-fe
407 - # by defining EXTLIBS we override the detection for libintl and
408 - # libiconv, bug #516168
409 - local nlsiconv=
410 - use nls && use !elibc_glibc && nlsiconv+=" -lintl"
411 - use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
412 - git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
413 - if use doc ; then
414 - git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
415 - fi
416 - cd "${S}"
417 - fi
418 -
419 - if use gnome-keyring ; then
420 - cd "${S}"/contrib/credential/libsecret
421 - git_emake || die "emake git-credential-libsecret failed"
422 - fi
423 -
424 - cd "${S}"/contrib/subtree || die
425 - git_emake
426 - use doc && git_emake doc
427 -
428 - cd "${S}"/contrib/diff-highlight || die
429 - git_emake
430 -
431 - if use mediawiki ; then
432 - cd "${S}"/contrib/mw-to-git
433 - git_emake
434 - fi
435 -}
436 -
437 -src_install() {
438 - git_emake \
439 - install || \
440 - die "make install failed"
441 -
442 - if [[ ${CHOST} == *-darwin* ]]; then
443 - dobin contrib/credential/osxkeychain/git-credential-osxkeychain
444 - fi
445 -
446 - # Depending on the tarball and manual rebuild of the documentation, the
447 - # manpages may exist in either OR both of these directories.
448 - find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
449 - find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
450 - dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
451 - use doc && dodir /usr/share/doc/${PF}/html
452 - for d in / /howto/ /technical/ ; do
453 - docinto ${d}
454 - dodoc Documentation${d}*.txt
455 - if use doc ; then
456 - docinto ${d}/html
457 - dodoc Documentation${d}*.html
458 - fi
459 - done
460 - docinto /
461 - # Upstream does not ship this pre-built :-(
462 - use doc && doinfo Documentation/{git,gitman}.info
463 -
464 - newbashcomp contrib/completion/git-completion.bash ${PN}
465 - bashcomp_alias git gitk
466 - # Not really a bash-completion file (bug #477920)
467 - # but still needed uncompressed (bug #507480)
468 - insinto /usr/share/${PN}
469 - doins contrib/completion/git-prompt.sh
470 -
471 - if use emacs ; then
472 - elisp-install ${PN} contrib/emacs/git.{el,elc}
473 - elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
474 - #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
475 - # don't add automatically to the load-path, so the sitefile
476 - # can do a conditional loading
477 - touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
478 - elisp-site-file-install "${FILESDIR}"/${SITEFILE}
479 - fi
480 -
481 - #dobin contrib/fast-import/git-p4 # Moved upstream
482 - #dodoc contrib/fast-import/git-p4.txt # Moved upstream
483 - newbin contrib/fast-import/import-tars.perl import-tars
484 - exeinto /usr/libexec/git-core/
485 - newexe contrib/git-resurrect.sh git-resurrect
486 -
487 - # git-subtree
488 - cd "${S}"/contrib/subtree
489 - git_emake install || die "Failed to emake install git-subtree"
490 - if use doc ; then
491 - git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
492 - fi
493 - newdoc README README.git-subtree
494 - dodoc git-subtree.txt
495 - cd "${S}"
496 -
497 - if use mediawiki ; then
498 - cd "${S}"/contrib/mw-to-git
499 - git_emake install
500 - cd "${S}"
501 - fi
502 -
503 - # diff-highlight
504 - dobin contrib/diff-highlight/diff-highlight
505 - newdoc contrib/diff-highlight/README README.diff-highlight
506 -
507 - # git-jump
508 - exeinto /usr/libexec/git-core/
509 - doexe contrib/git-jump/git-jump
510 - newdoc contrib/git-jump/README git-jump.txt
511 -
512 - # git-contacts
513 - exeinto /usr/libexec/git-core/
514 - doexe contrib/contacts/git-contacts
515 - dodoc contrib/contacts/git-contacts.txt
516 -
517 - if use gnome-keyring ; then
518 - cd "${S}"/contrib/credential/libsecret
519 - dobin git-credential-libsecret
520 - fi
521 -
522 - if use subversion ; then
523 - cd "${S}"/contrib/svn-fe
524 - dobin svn-fe
525 - dodoc svn-fe.txt
526 - if use doc ; then
527 - doman svn-fe.1
528 - docinto html
529 - dodoc svn-fe.html
530 - fi
531 - cd "${S}"
532 - fi
533 -
534 - dodir /usr/share/${PN}/contrib
535 - # The following are excluded:
536 - # completion - installed above
537 - # diff-highlight - done above
538 - # emacs - installed above
539 - # examples - these are stuff that is not used in Git anymore actually
540 - # git-jump - done above
541 - # gitview - installed above
542 - # p4import - excluded because fast-import has a better one
543 - # patches - stuff the Git guys made to go upstream to other places
544 - # persistent-https - TODO
545 - # mw-to-git - TODO
546 - # subtree - build seperately
547 - # svnimport - use git-svn
548 - # thunderbird-patch-inline - fixes thunderbird
549 - local contrib_objects=(
550 - buildsystems
551 - fast-import
552 - hg-to-git
553 - hooks
554 - remotes2config.sh
555 - rerere-train.sh
556 - stats
557 - workdir
558 - )
559 - for i in "${contrib_objects[@]}" ; do
560 - cp -rf \
561 - "${S}"/contrib/${i} \
562 - "${ED}"/usr/share/${PN}/contrib \
563 - || die "Failed contrib ${i}"
564 - done
565 -
566 - if use perl && use cgi ; then
567 - # We used to install in /usr/share/${PN}/gitweb
568 - # but upstream installs in /usr/share/gitweb
569 - # so we will install a symlink and use their location for compat with other
570 - # distros
571 - dosym /usr/share/gitweb /usr/share/${PN}/gitweb
572 -
573 - # INSTALL discusses configuration issues, not just installation
574 - docinto /
575 - newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
576 - newdoc "${S}"/gitweb/README README.gitweb
577 -
578 - for d in "${ED}"/usr/lib{64,}/perl5/ ; do
579 - if test -d "$d" ; then find "$d" \
580 - -name .packlist \
581 - -delete || die
582 - fi
583 - done
584 - else
585 - rm -rf "${ED}"/usr/share/gitweb
586 - fi
587 -
588 - if ! use subversion ; then
589 - rm -f "${ED}"/usr/libexec/git-core/git-svn \
590 - "${ED}"/usr/share/man/man1/git-svn.1*
591 - fi
592 -
593 - if use xinetd ; then
594 - insinto /etc/xinetd.d
595 - newins "${FILESDIR}"/git-daemon.xinetd git-daemon
596 - fi
597 -
598 - if use !prefix ; then
599 - newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
600 - newconfd "${FILESDIR}"/git-daemon.confd git-daemon
601 - systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
602 - systemd_dounit "${FILESDIR}/git-daemon.socket"
603 - fi
604 -
605 - perl_delete_localpod
606 -
607 - # Remove disabled linguas
608 - # we could remove sources in src_prepare, but install does not
609 - # handle missing locale dir well
610 - rm_loc() {
611 - if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
612 - rm -r "${ED}/usr/share/locale/${1}" || die
613 - fi
614 - }
615 - l10n_for_each_disabled_locale_do rm_loc
616 -}
617 -
618 -src_test() {
619 - local disabled=""
620 - local tests_cvs="t9200-git-cvsexportcommit.sh \
621 - t9400-git-cvsserver-server.sh \
622 - t9401-git-cvsserver-crlf.sh \
623 - t9402-git-cvsserver-refs.sh \
624 - t9600-cvsimport.sh \
625 - t9601-cvsimport-vendor-branch.sh \
626 - t9602-cvsimport-branches-tags.sh \
627 - t9603-cvsimport-patchsets.sh \
628 - t9604-cvsimport-timestamps.sh"
629 - local tests_perl="t3701-add-interactive.sh \
630 - t5502-quickfetch.sh \
631 - t5512-ls-remote.sh \
632 - t5520-pull.sh \
633 - t7106-reset-unborn-branch.sh \
634 - t7501-commit.sh"
635 - # Bug #225601 - t0004 is not suitable for root perm
636 - # Bug #219839 - t1004 is not suitable for root perm
637 - # t0001-init.sh - check for init notices EPERM* fails
638 - local tests_nonroot="t0001-init.sh \
639 - t0004-unwritable.sh \
640 - t0070-fundamental.sh \
641 - t1004-read-tree-m-u-wf.sh \
642 - t3700-add.sh \
643 - t7300-clean.sh"
644 - # t9100 still fails with symlinks in SVN 1.7
645 - local test_svn="t9100-git-svn-basic.sh"
646 -
647 - # Unzip is used only for the testcase code, not by any normal parts of Git.
648 - if ! has_version app-arch/unzip ; then
649 - einfo "Disabling tar-tree tests"
650 - disabled+=" t5000-tar-tree.sh"
651 - fi
652 -
653 - cvs=0
654 - use cvs && let cvs=$cvs+1
655 - if [[ ${EUID} -eq 0 ]]; then
656 - if [[ $cvs -eq 1 ]]; then
657 - ewarn "Skipping CVS tests because CVS does not work as root!"
658 - ewarn "You should retest with FEATURES=userpriv!"
659 - disabled+=" ${tests_cvs}"
660 - fi
661 - einfo "Skipping other tests that require being non-root"
662 - disabled+=" ${tests_nonroot}"
663 - else
664 - [[ $cvs -gt 0 ]] && \
665 - has_version dev-vcs/cvs && \
666 - let cvs=$cvs+1
667 - [[ $cvs -gt 1 ]] && \
668 - has_version "dev-vcs/cvs[server]" && \
669 - let cvs=$cvs+1
670 - if [[ $cvs -lt 3 ]]; then
671 - einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
672 - disabled+=" ${tests_cvs}"
673 - fi
674 - fi
675 -
676 - if ! use perl ; then
677 - einfo "Disabling tests that need Perl"
678 - disabled+=" ${tests_perl}"
679 - fi
680 -
681 - einfo "Disabling tests that fail with SVN 1.7"
682 - disabled+=" ${test_svn}"
683 -
684 - # Reset all previously disabled tests
685 - cd "${S}/t"
686 - for i in *.sh.DISABLED ; do
687 - [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
688 - done
689 - einfo "Disabled tests:"
690 - for i in ${disabled} ; do
691 - [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
692 - done
693 -
694 - # Avoid the test system removing the results because we want them ourselves
695 - sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
696 - -i "${S}"/t/Makefile
697 -
698 - # Clean old results first, must always run
699 - cd "${S}/t"
700 - nonfatal git_emake clean
701 -
702 - # Now run the tests, keep going if we hit an error, and don't terminate on
703 - # failure
704 - cd "${S}"
705 - einfo "Start test run"
706 - #MAKEOPTS=-j1
707 - nonfatal git_emake --keep-going test
708 - rc=$?
709 -
710 - # Display nice results, now print the results
711 - cd "${S}/t"
712 - nonfatal git_emake aggregate-results
713 -
714 - # And bail if there was a problem
715 - [ $rc -eq 0 ] || die "tests failed. Please file a bug."
716 -}
717 -
718 -showpkgdeps() {
719 - local pkg=$1
720 - shift
721 - elog " $(printf "%-17s:" ${pkg}) ${@}"
722 -}
723 -
724 -pkg_postinst() {
725 - use emacs && elisp-site-regen
726 - einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
727 - einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
728 - einfo "Note that the prompt bash code is now in that separate script"
729 - elog "These additional scripts need some dependencies:"
730 - echo
731 - showpkgdeps git-quiltimport "dev-util/quilt"
732 - showpkgdeps git-instaweb \
733 - "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
734 - echo
735 - use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
736 -}
737 -
738 -pkg_postrm() {
739 - use emacs && elisp-site-regen
740 -}
741
742 diff --git a/dev-vcs/git/git-2.16.3.ebuild b/dev-vcs/git/git-2.16.3.ebuild
743 deleted file mode 100644
744 index d0faf8d3a1f..00000000000
745 --- a/dev-vcs/git/git-2.16.3.ebuild
746 +++ /dev/null
747 @@ -1,699 +0,0 @@
748 -# Copyright 1999-2018 Gentoo Foundation
749 -# Distributed under the terms of the GNU General Public License v2
750 -
751 -EAPI=6
752 -
753 -GENTOO_DEPEND_ON_PERL=no
754 -
755 -# bug #329479: git-remote-testgit is not multiple-version aware
756 -PYTHON_COMPAT=( python2_7 )
757 -PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN"
758 -if [[ ${PV} == *9999 ]]; then
759 - SCM="git-r3"
760 - EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
761 - # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches.
762 - # See https://git-scm.com/docs/gitworkflows#_graduation
763 - # In order of stability:
764 - # 9999-r0: maint
765 - # 9999-r1: master
766 - # 9999-r2: next
767 - # 9999-r3: pu
768 - case "${PVR}" in
769 - 9999) EGIT_BRANCH=maint ;;
770 - 9999-r1) EGIT_BRANCH=master ;;
771 - 9999-r2) EGIT_BRANCH=next;;
772 - 9999-r3) EGIT_BRANCH=pu ;;
773 - esac
774 -fi
775 -
776 -inherit toolchain-funcs eutils elisp-common l10n perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
777 -
778 -MY_PV="${PV/_rc/.rc}"
779 -MY_P="${PN}-${MY_PV}"
780 -
781 -DOC_VER=${MY_PV}
782 -
783 -DESCRIPTION="stupid content tracker: distributed VCS designed for speed and efficiency"
784 -HOMEPAGE="https://www.git-scm.com/"
785 -if [[ ${PV} != *9999 ]]; then
786 - SRC_URI_SUFFIX="xz"
787 - SRC_URI_KORG="mirror://kernel/software/scm/git"
788 - [[ "${PV/rc}" != "${PV}" ]] && SRC_URI_KORG+='/testing'
789 - SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
790 - ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
791 - doc? (
792 - ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
793 - )"
794 - [[ "${PV}" = *_rc* ]] || \
795 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
796 -fi
797 -
798 -LICENSE="GPL-2"
799 -SLOT="0"
800 -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"
801 -
802 -# Common to both DEPEND and RDEPEND
803 -CDEPEND="
804 - gnome-keyring? ( app-crypt/libsecret )
805 - !libressl? ( dev-libs/openssl:0= )
806 - libressl? ( dev-libs/libressl:= )
807 - sys-libs/zlib
808 - pcre? (
809 - pcre-jit? ( dev-libs/libpcre2[jit(+)] )
810 - !pcre-jit? ( dev-libs/libpcre )
811 - )
812 - perl? ( dev-lang/perl:=[-build(-)] )
813 - tk? ( dev-lang/tk:0= )
814 - curl? (
815 - net-misc/curl
816 - webdav? ( dev-libs/expat )
817 - )
818 - emacs? ( virtual/emacs )
819 -"
820 -
821 -RDEPEND="${CDEPEND}
822 - gpg? ( app-crypt/gnupg )
823 - mediawiki? (
824 - dev-perl/DateTime-Format-ISO8601
825 - dev-perl/HTML-Tree
826 - dev-perl/MediaWiki-API
827 - )
828 - perl? ( dev-perl/Error
829 - dev-perl/Net-SMTP-SSL
830 - dev-perl/Authen-SASL
831 - cgi? ( dev-perl/CGI highlight? ( app-text/highlight ) )
832 - cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
833 - subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
834 - )
835 - python? ( ${PYTHON_DEPS} )
836 -"
837 -
838 -# This is how info docs are created with Git:
839 -# .txt/asciidoc --(asciidoc)---------> .xml/docbook
840 -# .xml/docbook --(docbook2texi.pl)--> .texi
841 -# .texi --(makeinfo)---------> .info
842 -DEPEND="${CDEPEND}
843 - doc? (
844 - app-text/asciidoc
845 - app-text/docbook2X
846 - sys-apps/texinfo
847 - app-text/xmlto
848 - )
849 - nls? ( sys-devel/gettext )
850 - test? ( app-crypt/gnupg )"
851 -
852 -# Live ebuild builds man pages and HTML docs, additionally
853 -if [[ ${PV} == *9999 ]]; then
854 - DEPEND="${DEPEND}
855 - app-text/asciidoc"
856 -fi
857 -
858 -SITEFILE=50${PN}-gentoo.el
859 -S="${WORKDIR}/${MY_P}"
860 -
861 -REQUIRED_USE="
862 - cgi? ( perl )
863 - cvs? ( perl )
864 - mediawiki? ( perl )
865 - mediawiki-experimental? ( mediawiki )
866 - subversion? ( perl )
867 - webdav? ( curl )
868 - pcre-jit? ( pcre )
869 - python? ( ${PYTHON_REQUIRED_USE} )
870 -"
871 -
872 -PATCHES=(
873 - # bug #350330 - automagic CVS when we don't want it is bad.
874 - "${FILESDIR}"/git-2.12.0-optional-cvs.patch
875 -
876 - # install mediawiki perl modules also in vendor_dir
877 - # hack, needs better upstream solution
878 - "${FILESDIR}"/git-1.8.5-mw-vendor.patch
879 -
880 - "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
881 -
882 - # Bug #493306, where FreeBSD 10.x merged libiconv into its libc.
883 - "${FILESDIR}"/git-2.5.1-freebsd-10.x-no-iconv.patch
884 -)
885 -
886 -pkg_setup() {
887 - if use subversion && has_version "dev-vcs/subversion[dso]"; then
888 - ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
889 - ewarn "with USE=dso, there may be weird crashes in git-svn. You"
890 - ewarn "have been warned."
891 - fi
892 - if use python ; then
893 - python-single-r1_pkg_setup
894 - fi
895 -}
896 -
897 -# This is needed because for some obscure reasons future calls to make don't
898 -# pick up these exports if we export them in src_unpack()
899 -exportmakeopts() {
900 - local myopts
901 -
902 - if use blksha1 ; then
903 - myopts+=" BLK_SHA1=YesPlease"
904 - elif use ppcsha1 ; then
905 - myopts+=" PPC_SHA1=YesPlease"
906 - fi
907 -
908 - if use curl ; then
909 - use webdav || myopts+=" NO_EXPAT=YesPlease"
910 - else
911 - myopts+=" NO_CURL=YesPlease"
912 - fi
913 -
914 - # broken assumptions, because of static build system ...
915 - myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
916 - myopts+=" INSTALL=install TAR=tar"
917 - myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
918 - myopts+=" SANE_TOOL_PATH="
919 - myopts+=" OLD_ICONV="
920 - myopts+=" NO_EXTERNAL_GREP="
921 -
922 - # For svn-fe
923 - extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
924 -
925 - # can't define this to null, since the entire makefile depends on it
926 - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
927 -
928 - use iconv \
929 - || myopts+=" NO_ICONV=YesPlease"
930 - use nls \
931 - || myopts+=" NO_GETTEXT=YesPlease"
932 - use tk \
933 - || myopts+=" NO_TCLTK=YesPlease"
934 - if use pcre; then
935 - if use pcre-jit; then
936 - myopts+=" USE_LIBPCRE2=YesPlease"
937 - extlibs+=" -lpcre2-8"
938 - else
939 - myopts+=" USE_LIBPCRE1=YesPlease"
940 - myopts+=" NO_LIBPCRE1_JIT=YesPlease"
941 - extlibs+=" -lpcre"
942 - fi
943 - fi
944 - use perl \
945 - && myopts+=" INSTALLDIRS=vendor" \
946 - || myopts+=" NO_PERL=YesPlease"
947 - use python \
948 - || myopts+=" NO_PYTHON=YesPlease"
949 - use subversion \
950 - || myopts+=" NO_SVN_TESTS=YesPlease"
951 - use threads \
952 - && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
953 - || myopts+=" NO_PTHREADS=YesPlease"
954 - use cvs \
955 - || myopts+=" NO_CVS=YesPlease"
956 - use elibc_musl \
957 - && myopts+=" NO_REGEX=YesPlease"
958 -# Disabled until ~m68k-mint can be keyworded again
959 -# if [[ ${CHOST} == *-mint* ]] ; then
960 -# myopts+=" NO_MMAP=YesPlease"
961 -# myopts+=" NO_IPV6=YesPlease"
962 -# myopts+=" NO_STRLCPY=YesPlease"
963 -# myopts+=" NO_MEMMEM=YesPlease"
964 -# myopts+=" NO_MKDTEMP=YesPlease"
965 -# myopts+=" NO_MKSTEMPS=YesPlease"
966 -# fi
967 - if [[ ${CHOST} == ia64-*-hpux* ]]; then
968 - myopts+=" NO_NSEC=YesPlease"
969 - fi
970 - if [[ ${CHOST} == *-*-aix* ]]; then
971 - myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
972 - fi
973 - if [[ ${CHOST} == *-solaris* ]]; then
974 - myopts+=" NEEDS_LIBICONV=YesPlease"
975 - myopts+=" HAVE_CLOCK_MONOTONIC=1"
976 - grep -q getdelim "${ROOT}"/usr/include/stdio.h && \
977 - myopts+=" HAVE_GETDELIM=1"
978 - fi
979 -
980 - has_version '>=app-text/asciidoc-8.0' \
981 - && myopts+=" ASCIIDOC8=YesPlease"
982 - myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
983 -
984 - # Bug 290465:
985 - # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
986 - [[ "${CHOST}" == *-uclibc* ]] && \
987 - myopts+=" NO_NSEC=YesPlease"
988 -
989 - export MY_MAKEOPTS="${myopts}"
990 - export EXTLIBS="${extlibs}"
991 -}
992 -
993 -src_unpack() {
994 - if [[ ${PV} != *9999 ]]; then
995 - unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
996 - cd "${S}"
997 - unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
998 - use doc && \
999 - cd "${S}"/Documentation && \
1000 - unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
1001 - cd "${S}"
1002 - else
1003 - git-r3_src_unpack
1004 - cd "${S}"
1005 - #cp "${FILESDIR}"/GIT-VERSION-GEN .
1006 - fi
1007 -
1008 -}
1009 -
1010 -src_prepare() {
1011 - # add experimental patches to improve mediawiki support
1012 - # see patches for origin
1013 - if use mediawiki-experimental ; then
1014 - PATCHES+=(
1015 - "${FILESDIR}"/git-2.7.0-mediawiki-namespaces.patch
1016 - "${FILESDIR}"/git-2.7.0-mediawiki-subpages.patch
1017 - "${FILESDIR}"/git-2.7.0-mediawiki-500pages.patch
1018 - )
1019 - fi
1020 -
1021 - default
1022 -
1023 - sed -i \
1024 - -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
1025 - -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
1026 - -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
1027 - -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
1028 - -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
1029 - -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
1030 - Makefile contrib/svn-fe/Makefile || die "sed failed"
1031 -
1032 - # Never install the private copy of Error.pm (bug #296310)
1033 - sed -i \
1034 - -e '/private-Error.pm/s,^,#,' \
1035 - perl/Makefile.PL
1036 -
1037 - # Fix docbook2texi command
1038 - sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
1039 - Documentation/Makefile || die "sed failed"
1040 -
1041 - # Fix git-subtree missing DESTDIR
1042 - sed -i \
1043 - -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
1044 - -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
1045 - contrib/subtree/Makefile
1046 -}
1047 -
1048 -git_emake() {
1049 - # bug #320647: PYTHON_PATH
1050 - PYTHON_PATH=""
1051 - use python && PYTHON_PATH="${PYTHON}"
1052 - emake ${MY_MAKEOPTS} \
1053 - DESTDIR="${D}" \
1054 - OPTCFLAGS="${CFLAGS}" \
1055 - OPTLDFLAGS="${LDFLAGS}" \
1056 - OPTCC="$(tc-getCC)" \
1057 - OPTAR="$(tc-getAR)" \
1058 - prefix="${EPREFIX}"/usr \
1059 - htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
1060 - sysconfdir="${EPREFIX}"/etc \
1061 - PYTHON_PATH="${PYTHON_PATH}" \
1062 - PERL_PATH="${EPREFIX}/usr/bin/perl" \
1063 - PERL_MM_OPT="" \
1064 - GIT_TEST_OPTS="--no-color" \
1065 - V=1 \
1066 - "$@"
1067 -}
1068 -
1069 -src_configure() {
1070 - exportmakeopts
1071 -}
1072 -
1073 -src_compile() {
1074 - if use perl ; then
1075 - git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
1076 - git_emake perl/perl.mak || die "emake perl/perl.mak failed"
1077 - fi
1078 - git_emake || die "emake failed"
1079 -
1080 - if use emacs ; then
1081 - elisp-compile contrib/emacs/git{,-blame}.el
1082 - fi
1083 -
1084 - if use perl && use cgi ; then
1085 - git_emake \
1086 - gitweb \
1087 - || die "emake gitweb (cgi) failed"
1088 - fi
1089 -
1090 - if [[ ${CHOST} == *-darwin* ]]; then
1091 - cd "${S}"/contrib/credential/osxkeychain || die
1092 - git_emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" \
1093 - || die "emake credential-osxkeychain"
1094 - fi
1095 -
1096 - cd "${S}"/Documentation
1097 - if [[ ${PV} == *9999 ]] ; then
1098 - git_emake man \
1099 - || die "emake man failed"
1100 - if use doc ; then
1101 - git_emake info html \
1102 - || die "emake info html failed"
1103 - fi
1104 - else
1105 - if use doc ; then
1106 - git_emake info \
1107 - || die "emake info html failed"
1108 - fi
1109 - fi
1110 -
1111 - if use subversion ; then
1112 - cd "${S}"/contrib/svn-fe
1113 - # by defining EXTLIBS we override the detection for libintl and
1114 - # libiconv, bug #516168
1115 - local nlsiconv=
1116 - use nls && use !elibc_glibc && nlsiconv+=" -lintl"
1117 - use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
1118 - git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
1119 - if use doc ; then
1120 - git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
1121 - fi
1122 - cd "${S}"
1123 - fi
1124 -
1125 - if use gnome-keyring ; then
1126 - cd "${S}"/contrib/credential/libsecret
1127 - git_emake || die "emake git-credential-libsecret failed"
1128 - fi
1129 -
1130 - cd "${S}"/contrib/subtree || die
1131 - git_emake
1132 - use doc && git_emake doc
1133 -
1134 - cd "${S}"/contrib/diff-highlight || die
1135 - git_emake
1136 -
1137 - if use mediawiki ; then
1138 - cd "${S}"/contrib/mw-to-git
1139 - git_emake
1140 - fi
1141 -}
1142 -
1143 -src_install() {
1144 - git_emake \
1145 - install || \
1146 - die "make install failed"
1147 -
1148 - if [[ ${CHOST} == *-darwin* ]]; then
1149 - dobin contrib/credential/osxkeychain/git-credential-osxkeychain
1150 - fi
1151 -
1152 - # Depending on the tarball and manual rebuild of the documentation, the
1153 - # manpages may exist in either OR both of these directories.
1154 - find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
1155 - find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
1156 - dodoc README* Documentation/{SubmittingPatches,CodingGuidelines}
1157 - use doc && dodir /usr/share/doc/${PF}/html
1158 - for d in / /howto/ /technical/ ; do
1159 - docinto ${d}
1160 - dodoc Documentation${d}*.txt
1161 - if use doc ; then
1162 - docinto ${d}/html
1163 - dodoc Documentation${d}*.html
1164 - fi
1165 - done
1166 - docinto /
1167 - # Upstream does not ship this pre-built :-(
1168 - use doc && doinfo Documentation/{git,gitman}.info
1169 -
1170 - newbashcomp contrib/completion/git-completion.bash ${PN}
1171 - bashcomp_alias git gitk
1172 - # Not really a bash-completion file (bug #477920)
1173 - # but still needed uncompressed (bug #507480)
1174 - insinto /usr/share/${PN}
1175 - doins contrib/completion/git-prompt.sh
1176 -
1177 - if use emacs ; then
1178 - elisp-install ${PN} contrib/emacs/git.{el,elc}
1179 - elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
1180 - #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
1181 - # don't add automatically to the load-path, so the sitefile
1182 - # can do a conditional loading
1183 - touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
1184 - elisp-site-file-install "${FILESDIR}"/${SITEFILE}
1185 - fi
1186 -
1187 - #dobin contrib/fast-import/git-p4 # Moved upstream
1188 - #dodoc contrib/fast-import/git-p4.txt # Moved upstream
1189 - newbin contrib/fast-import/import-tars.perl import-tars
1190 - exeinto /usr/libexec/git-core/
1191 - newexe contrib/git-resurrect.sh git-resurrect
1192 -
1193 - # git-subtree
1194 - cd "${S}"/contrib/subtree
1195 - git_emake install || die "Failed to emake install git-subtree"
1196 - if use doc ; then
1197 - git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
1198 - fi
1199 - newdoc README README.git-subtree
1200 - dodoc git-subtree.txt
1201 - cd "${S}"
1202 -
1203 - if use mediawiki ; then
1204 - cd "${S}"/contrib/mw-to-git
1205 - git_emake install
1206 - cd "${S}"
1207 - fi
1208 -
1209 - # diff-highlight
1210 - dobin contrib/diff-highlight/diff-highlight
1211 - newdoc contrib/diff-highlight/README README.diff-highlight
1212 -
1213 - # git-jump
1214 - exeinto /usr/libexec/git-core/
1215 - doexe contrib/git-jump/git-jump
1216 - newdoc contrib/git-jump/README git-jump.txt
1217 -
1218 - # git-contacts
1219 - exeinto /usr/libexec/git-core/
1220 - doexe contrib/contacts/git-contacts
1221 - dodoc contrib/contacts/git-contacts.txt
1222 -
1223 - if use gnome-keyring ; then
1224 - cd "${S}"/contrib/credential/libsecret
1225 - dobin git-credential-libsecret
1226 - fi
1227 -
1228 - if use subversion ; then
1229 - cd "${S}"/contrib/svn-fe
1230 - dobin svn-fe
1231 - dodoc svn-fe.txt
1232 - if use doc ; then
1233 - doman svn-fe.1
1234 - docinto html
1235 - dodoc svn-fe.html
1236 - fi
1237 - cd "${S}"
1238 - fi
1239 -
1240 - dodir /usr/share/${PN}/contrib
1241 - # The following are excluded:
1242 - # completion - installed above
1243 - # diff-highlight - done above
1244 - # emacs - installed above
1245 - # examples - these are stuff that is not used in Git anymore actually
1246 - # git-jump - done above
1247 - # gitview - installed above
1248 - # p4import - excluded because fast-import has a better one
1249 - # patches - stuff the Git guys made to go upstream to other places
1250 - # persistent-https - TODO
1251 - # mw-to-git - TODO
1252 - # subtree - build seperately
1253 - # svnimport - use git-svn
1254 - # thunderbird-patch-inline - fixes thunderbird
1255 - local contrib_objects=(
1256 - buildsystems
1257 - fast-import
1258 - hg-to-git
1259 - hooks
1260 - remotes2config.sh
1261 - rerere-train.sh
1262 - stats
1263 - workdir
1264 - )
1265 - for i in "${contrib_objects[@]}" ; do
1266 - cp -rf \
1267 - "${S}"/contrib/${i} \
1268 - "${ED}"/usr/share/${PN}/contrib \
1269 - || die "Failed contrib ${i}"
1270 - done
1271 -
1272 - if use perl && use cgi ; then
1273 - # We used to install in /usr/share/${PN}/gitweb
1274 - # but upstream installs in /usr/share/gitweb
1275 - # so we will install a symlink and use their location for compat with other
1276 - # distros
1277 - dosym /usr/share/gitweb /usr/share/${PN}/gitweb
1278 -
1279 - # INSTALL discusses configuration issues, not just installation
1280 - docinto /
1281 - newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
1282 - newdoc "${S}"/gitweb/README README.gitweb
1283 -
1284 - for d in "${ED}"/usr/lib{64,}/perl5/ ; do
1285 - if test -d "$d" ; then find "$d" \
1286 - -name .packlist \
1287 - -delete || die
1288 - fi
1289 - done
1290 - else
1291 - rm -rf "${ED}"/usr/share/gitweb
1292 - fi
1293 -
1294 - if ! use subversion ; then
1295 - rm -f "${ED}"/usr/libexec/git-core/git-svn \
1296 - "${ED}"/usr/share/man/man1/git-svn.1*
1297 - fi
1298 -
1299 - if use xinetd ; then
1300 - insinto /etc/xinetd.d
1301 - newins "${FILESDIR}"/git-daemon.xinetd git-daemon
1302 - fi
1303 -
1304 - if use !prefix ; then
1305 - newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
1306 - newconfd "${FILESDIR}"/git-daemon.confd git-daemon
1307 - systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service"
1308 - systemd_dounit "${FILESDIR}/git-daemon.socket"
1309 - fi
1310 -
1311 - perl_delete_localpod
1312 -
1313 - # Remove disabled linguas
1314 - # we could remove sources in src_prepare, but install does not
1315 - # handle missing locale dir well
1316 - rm_loc() {
1317 - if [[ -e "${ED}/usr/share/locale/${1}" ]]; then
1318 - rm -r "${ED}/usr/share/locale/${1}" || die
1319 - fi
1320 - }
1321 - l10n_for_each_disabled_locale_do rm_loc
1322 -}
1323 -
1324 -src_test() {
1325 - local disabled=""
1326 - local tests_cvs="t9200-git-cvsexportcommit.sh \
1327 - t9400-git-cvsserver-server.sh \
1328 - t9401-git-cvsserver-crlf.sh \
1329 - t9402-git-cvsserver-refs.sh \
1330 - t9600-cvsimport.sh \
1331 - t9601-cvsimport-vendor-branch.sh \
1332 - t9602-cvsimport-branches-tags.sh \
1333 - t9603-cvsimport-patchsets.sh \
1334 - t9604-cvsimport-timestamps.sh"
1335 - local tests_perl="t3701-add-interactive.sh \
1336 - t5502-quickfetch.sh \
1337 - t5512-ls-remote.sh \
1338 - t5520-pull.sh \
1339 - t7106-reset-unborn-branch.sh \
1340 - t7501-commit.sh"
1341 - # Bug #225601 - t0004 is not suitable for root perm
1342 - # Bug #219839 - t1004 is not suitable for root perm
1343 - # t0001-init.sh - check for init notices EPERM* fails
1344 - local tests_nonroot="t0001-init.sh \
1345 - t0004-unwritable.sh \
1346 - t0070-fundamental.sh \
1347 - t1004-read-tree-m-u-wf.sh \
1348 - t3700-add.sh \
1349 - t7300-clean.sh"
1350 - # t9100 still fails with symlinks in SVN 1.7
1351 - local test_svn="t9100-git-svn-basic.sh"
1352 -
1353 - # Unzip is used only for the testcase code, not by any normal parts of Git.
1354 - if ! has_version app-arch/unzip ; then
1355 - einfo "Disabling tar-tree tests"
1356 - disabled+=" t5000-tar-tree.sh"
1357 - fi
1358 -
1359 - cvs=0
1360 - use cvs && let cvs=$cvs+1
1361 - if [[ ${EUID} -eq 0 ]]; then
1362 - if [[ $cvs -eq 1 ]]; then
1363 - ewarn "Skipping CVS tests because CVS does not work as root!"
1364 - ewarn "You should retest with FEATURES=userpriv!"
1365 - disabled+=" ${tests_cvs}"
1366 - fi
1367 - einfo "Skipping other tests that require being non-root"
1368 - disabled+=" ${tests_nonroot}"
1369 - else
1370 - [[ $cvs -gt 0 ]] && \
1371 - has_version dev-vcs/cvs && \
1372 - let cvs=$cvs+1
1373 - [[ $cvs -gt 1 ]] && \
1374 - has_version "dev-vcs/cvs[server]" && \
1375 - let cvs=$cvs+1
1376 - if [[ $cvs -lt 3 ]]; then
1377 - einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
1378 - disabled+=" ${tests_cvs}"
1379 - fi
1380 - fi
1381 -
1382 - if ! use perl ; then
1383 - einfo "Disabling tests that need Perl"
1384 - disabled+=" ${tests_perl}"
1385 - fi
1386 -
1387 - einfo "Disabling tests that fail with SVN 1.7"
1388 - disabled+=" ${test_svn}"
1389 -
1390 - # Reset all previously disabled tests
1391 - cd "${S}/t"
1392 - for i in *.sh.DISABLED ; do
1393 - [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
1394 - done
1395 - einfo "Disabled tests:"
1396 - for i in ${disabled} ; do
1397 - [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
1398 - done
1399 -
1400 - # Avoid the test system removing the results because we want them ourselves
1401 - sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
1402 - -i "${S}"/t/Makefile
1403 -
1404 - # Clean old results first, must always run
1405 - cd "${S}/t"
1406 - nonfatal git_emake clean
1407 -
1408 - # Now run the tests, keep going if we hit an error, and don't terminate on
1409 - # failure
1410 - cd "${S}"
1411 - einfo "Start test run"
1412 - #MAKEOPTS=-j1
1413 - nonfatal git_emake --keep-going test
1414 - rc=$?
1415 -
1416 - # Display nice results, now print the results
1417 - cd "${S}/t"
1418 - nonfatal git_emake aggregate-results
1419 -
1420 - # And bail if there was a problem
1421 - [ $rc -eq 0 ] || die "tests failed. Please file a bug."
1422 -}
1423 -
1424 -showpkgdeps() {
1425 - local pkg=$1
1426 - shift
1427 - elog " $(printf "%-17s:" ${pkg}) ${@}"
1428 -}
1429 -
1430 -pkg_postinst() {
1431 - use emacs && elisp-site-regen
1432 - einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
1433 - einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
1434 - einfo "Note that the prompt bash code is now in that separate script"
1435 - elog "These additional scripts need some dependencies:"
1436 - echo
1437 - showpkgdeps git-quiltimport "dev-util/quilt"
1438 - showpkgdeps git-instaweb \
1439 - "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
1440 - echo
1441 - use mediawiki-experimental && ewarn "Using experimental git-mediawiki patches. The stability of cloned wiki filesystems is not guaranteed."
1442 -}
1443 -
1444 -pkg_postrm() {
1445 - use emacs && elisp-site-regen
1446 -}