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