Gentoo Archives: gentoo-commits

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