Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-vcs/git: git-9999-r3.ebuild ChangeLog git-9999-r1.ebuild git-9999.ebuild git-9999-r2.ebuild git-2.3.0.ebuild git-2.2.1.ebuild
Date: Fri, 06 Feb 2015 16:59:02
Message-Id: 20150206165857.E5FD51130F@oystercatcher.gentoo.org
1 polynomial-c 15/02/06 16:58:57
2
3 Modified: git-9999-r3.ebuild ChangeLog git-9999-r1.ebuild
4 git-9999.ebuild git-9999-r2.ebuild
5 Added: git-2.3.0.ebuild
6 Removed: git-2.2.1.ebuild
7 Log:
8 Version bump. Removed old. Fixed live ebuilds
9
10 (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
11
12 Revision Changes Path
13 1.11 dev-vcs/git/git-9999-r3.ebuild
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r3.ebuild?rev=1.11&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r3.ebuild?rev=1.11&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r3.ebuild?r1=1.10&r2=1.11
18
19 Index: git-9999-r3.ebuild
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r3.ebuild,v
22 retrieving revision 1.10
23 retrieving revision 1.11
24 diff -u -r1.10 -r1.11
25 --- git-9999-r3.ebuild 31 Dec 2014 08:44:10 -0000 1.10
26 +++ git-9999-r3.ebuild 6 Feb 2015 16:58:57 -0000 1.11
27 @@ -1,6 +1,6 @@
28 -# Copyright 1999-2014 Gentoo Foundation
29 +# Copyright 1999-2015 Gentoo Foundation
30 # Distributed under the terms of the GNU General Public License v2
31 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r3.ebuild,v 1.10 2014/12/31 08:44:10 vapier Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r3.ebuild,v 1.11 2015/02/06 16:58:57 polynomial-c Exp $
33
34 EAPI=5
35
36 @@ -222,12 +222,14 @@
37
38 src_prepare() {
39 # bug #350330 - automagic CVS when we don't want it is bad.
40 - epatch "${FILESDIR}"/git-2.0.0-r2-optional-cvs.patch
41 + epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
42
43 # install mediawiki perl modules also in vendor_dir
44 # hack, needs better upstream solution
45 epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
46
47 + epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
48 +
49 epatch_user
50
51 sed -i \
52
53
54
55 1.314 dev-vcs/git/ChangeLog
56
57 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.314&view=markup
58 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.314&content-type=text/plain
59 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?r1=1.313&r2=1.314
60
61 Index: ChangeLog
62 ===================================================================
63 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v
64 retrieving revision 1.313
65 retrieving revision 1.314
66 diff -u -r1.313 -r1.314
67 --- ChangeLog 21 Jan 2015 19:55:42 -0000 1.313
68 +++ ChangeLog 6 Feb 2015 16:58:57 -0000 1.314
69 @@ -1,6 +1,13 @@
70 # ChangeLog for dev-vcs/git
71 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
72 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.313 2015/01/21 19:55:42 polynomial-c Exp $
73 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.314 2015/02/06 16:58:57 polynomial-c Exp $
74 +
75 +*git-2.3.0 (06 Feb 2015)
76 +
77 + 06 Feb 2015; Lars Wendler <polynomial-c@g.o> -git-2.2.1.ebuild,
78 + +git-2.3.0.ebuild, git-9999.ebuild, git-9999-r1.ebuild, git-9999-r2.ebuild,
79 + git-9999-r3.ebuild:
80 + Version bump. Removed old. Fixed live ebuilds.
81
82 *git-2.2.2 (21 Jan 2015)
83
84
85
86
87 1.10 dev-vcs/git/git-9999-r1.ebuild
88
89 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r1.ebuild?rev=1.10&view=markup
90 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r1.ebuild?rev=1.10&content-type=text/plain
91 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r1.ebuild?r1=1.9&r2=1.10
92
93 Index: git-9999-r1.ebuild
94 ===================================================================
95 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r1.ebuild,v
96 retrieving revision 1.9
97 retrieving revision 1.10
98 diff -u -r1.9 -r1.10
99 --- git-9999-r1.ebuild 31 Dec 2014 08:44:10 -0000 1.9
100 +++ git-9999-r1.ebuild 6 Feb 2015 16:58:57 -0000 1.10
101 @@ -1,6 +1,6 @@
102 -# Copyright 1999-2014 Gentoo Foundation
103 +# Copyright 1999-2015 Gentoo Foundation
104 # Distributed under the terms of the GNU General Public License v2
105 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r1.ebuild,v 1.9 2014/12/31 08:44:10 vapier Exp $
106 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r1.ebuild,v 1.10 2015/02/06 16:58:57 polynomial-c Exp $
107
108 EAPI=5
109
110 @@ -222,12 +222,14 @@
111
112 src_prepare() {
113 # bug #350330 - automagic CVS when we don't want it is bad.
114 - epatch "${FILESDIR}"/git-2.0.0-r2-optional-cvs.patch
115 + epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
116
117 # install mediawiki perl modules also in vendor_dir
118 # hack, needs better upstream solution
119 epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
120
121 + epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
122 +
123 epatch_user
124
125 sed -i \
126
127
128
129 1.66 dev-vcs/git/git-9999.ebuild
130
131 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999.ebuild?rev=1.66&view=markup
132 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999.ebuild?rev=1.66&content-type=text/plain
133 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999.ebuild?r1=1.65&r2=1.66
134
135 Index: git-9999.ebuild
136 ===================================================================
137 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v
138 retrieving revision 1.65
139 retrieving revision 1.66
140 diff -u -r1.65 -r1.66
141 --- git-9999.ebuild 31 Dec 2014 08:44:10 -0000 1.65
142 +++ git-9999.ebuild 6 Feb 2015 16:58:57 -0000 1.66
143 @@ -1,6 +1,6 @@
144 -# Copyright 1999-2014 Gentoo Foundation
145 +# Copyright 1999-2015 Gentoo Foundation
146 # Distributed under the terms of the GNU General Public License v2
147 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v 1.65 2014/12/31 08:44:10 vapier Exp $
148 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v 1.66 2015/02/06 16:58:57 polynomial-c Exp $
149
150 EAPI=5
151
152 @@ -222,7 +222,7 @@
153
154 src_prepare() {
155 # bug #350330 - automagic CVS when we don't want it is bad.
156 - epatch "${FILESDIR}"/git-2.0.0-r2-optional-cvs.patch
157 + epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
158
159 # install mediawiki perl modules also in vendor_dir
160 # hack, needs better upstream solution
161
162
163
164 1.11 dev-vcs/git/git-9999-r2.ebuild
165
166 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r2.ebuild?rev=1.11&view=markup
167 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r2.ebuild?rev=1.11&content-type=text/plain
168 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999-r2.ebuild?r1=1.10&r2=1.11
169
170 Index: git-9999-r2.ebuild
171 ===================================================================
172 RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r2.ebuild,v
173 retrieving revision 1.10
174 retrieving revision 1.11
175 diff -u -r1.10 -r1.11
176 --- git-9999-r2.ebuild 31 Dec 2014 08:44:10 -0000 1.10
177 +++ git-9999-r2.ebuild 6 Feb 2015 16:58:57 -0000 1.11
178 @@ -1,6 +1,6 @@
179 -# Copyright 1999-2014 Gentoo Foundation
180 +# Copyright 1999-2015 Gentoo Foundation
181 # Distributed under the terms of the GNU General Public License v2
182 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r2.ebuild,v 1.10 2014/12/31 08:44:10 vapier Exp $
183 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999-r2.ebuild,v 1.11 2015/02/06 16:58:57 polynomial-c Exp $
184
185 EAPI=5
186
187 @@ -222,7 +222,7 @@
188
189 src_prepare() {
190 # bug #350330 - automagic CVS when we don't want it is bad.
191 - epatch "${FILESDIR}"/git-2.0.0-r2-optional-cvs.patch
192 + epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
193
194 # install mediawiki perl modules also in vendor_dir
195 # hack, needs better upstream solution
196
197
198
199 1.1 dev-vcs/git/git-2.3.0.ebuild
200
201 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-2.3.0.ebuild?rev=1.1&view=markup
202 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-2.3.0.ebuild?rev=1.1&content-type=text/plain
203
204 Index: git-2.3.0.ebuild
205 ===================================================================
206 # Copyright 1999-2015 Gentoo Foundation
207 # Distributed under the terms of the GNU General Public License v2
208 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-2.3.0.ebuild,v 1.1 2015/02/06 16:58:57 polynomial-c Exp $
209
210 EAPI=5
211
212 GENTOO_DEPEND_ON_PERL=no
213
214 # bug #329479: git-remote-testgit is not multiple-version aware
215 PYTHON_COMPAT=( python2_{6,7} )
216 [[ ${PV} == *9999 ]] && SCM="git-2"
217 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
218 EGIT_MASTER=pu
219
220 inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
221
222 MY_PV="${PV/_rc/.rc}"
223 MY_P="${PN}-${MY_PV}"
224
225 DOC_VER=${MY_PV}
226
227 DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
228 HOMEPAGE="http://www.git-scm.com/"
229 if [[ ${PV} != *9999 ]]; then
230 SRC_URI_SUFFIX="xz"
231 SRC_URI_GOOG="http://git-core.googlecode.com/files"
232 SRC_URI_KORG="mirror://kernel/software/scm/git"
233 SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX}
234 ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}
235 ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
236 ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
237 doc? (
238 ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
239 ${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
240 )"
241 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
242 fi
243
244 LICENSE="GPL-2"
245 SLOT="0"
246 IUSE="+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv mediawiki +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test"
247
248 # Common to both DEPEND and RDEPEND
249 CDEPEND="
250 dev-libs/openssl
251 sys-libs/zlib
252 pcre? ( dev-libs/libpcre )
253 perl? ( dev-lang/perl:=[-build(-)] )
254 tk? ( dev-lang/tk )
255 curl? (
256 net-misc/curl
257 webdav? ( dev-libs/expat )
258 )
259 emacs? ( virtual/emacs )
260 gnome-keyring? ( gnome-base/libgnome-keyring )"
261
262 RDEPEND="${CDEPEND}
263 gpg? ( app-crypt/gnupg )
264 mediawiki? (
265 dev-perl/HTML-Tree
266 dev-perl/MediaWiki-API
267 )
268 perl? ( dev-perl/Error
269 dev-perl/Net-SMTP-SSL
270 dev-perl/Authen-SASL
271 cgi? ( virtual/perl-CGI highlight? ( app-text/highlight ) )
272 cvs? ( >=dev-vcs/cvsps-2.1:0 dev-perl/DBI dev-perl/DBD-SQLite )
273 subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
274 )
275 python? ( gtk?
276 (
277 >=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
278 >=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
279 )
280 ${PYTHON_DEPS} )"
281
282 # This is how info docs are created with Git:
283 # .txt/asciidoc --(asciidoc)---------> .xml/docbook
284 # .xml/docbook --(docbook2texi.pl)--> .texi
285 # .texi --(makeinfo)---------> .info
286 DEPEND="${CDEPEND}
287 app-arch/cpio
288 doc? (
289 app-text/asciidoc
290 app-text/docbook2X
291 sys-apps/texinfo
292 app-text/xmlto
293 )
294 nls? ( sys-devel/gettext )
295 test? ( app-crypt/gnupg )"
296
297 # Live ebuild builds man pages and HTML docs, additionally
298 if [[ ${PV} == *9999 ]]; then
299 DEPEND="${DEPEND}
300 app-text/asciidoc"
301 fi
302
303 SITEFILE=50${PN}-gentoo.el
304 S="${WORKDIR}/${MY_P}"
305
306 REQUIRED_USE="
307 cgi? ( perl )
308 cvs? ( perl )
309 mediawiki? ( perl )
310 subversion? ( perl )
311 webdav? ( curl )
312 gtk? ( python )
313 python? ( ${PYTHON_REQUIRED_USE} )
314 "
315
316 pkg_setup() {
317 if use subversion && has_version "dev-vcs/subversion[dso]"; then
318 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
319 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
320 ewarn "have been warned."
321 fi
322 if use python ; then
323 python-single-r1_pkg_setup
324 fi
325 }
326
327 # This is needed because for some obscure reasons future calls to make don't
328 # pick up these exports if we export them in src_unpack()
329 exportmakeopts() {
330 local myopts
331
332 if use blksha1 ; then
333 myopts+=" BLK_SHA1=YesPlease"
334 elif use ppcsha1 ; then
335 myopts+=" PPC_SHA1=YesPlease"
336 fi
337
338 if use curl ; then
339 use webdav || myopts+=" NO_EXPAT=YesPlease"
340 else
341 myopts+=" NO_CURL=YesPlease"
342 fi
343
344 # broken assumptions, because of broken build system ...
345 myopts+=" NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
346 myopts+=" INSTALL=install TAR=tar"
347 myopts+=" SHELL_PATH=${EPREFIX}/bin/sh"
348 myopts+=" SANE_TOOL_PATH="
349 myopts+=" OLD_ICONV="
350 myopts+=" NO_EXTERNAL_GREP="
351
352 # For svn-fe
353 extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
354
355 # can't define this to null, since the entire makefile depends on it
356 sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
357
358 use iconv \
359 || myopts+=" NO_ICONV=YesPlease"
360 use nls \
361 || myopts+=" NO_GETTEXT=YesPlease"
362 use tk \
363 || myopts+=" NO_TCLTK=YesPlease"
364 use pcre \
365 && myopts+=" USE_LIBPCRE=yes" \
366 && extlibs+=" -lpcre"
367 use perl \
368 && myopts+=" INSTALLDIRS=vendor" \
369 || myopts+=" NO_PERL=YesPlease"
370 use python \
371 || myopts+=" NO_PYTHON=YesPlease"
372 use subversion \
373 || myopts+=" NO_SVN_TESTS=YesPlease"
374 use threads \
375 && myopts+=" THREADED_DELTA_SEARCH=YesPlease" \
376 || myopts+=" NO_PTHREADS=YesPlease"
377 use cvs \
378 || myopts+=" NO_CVS=YesPlease"
379 # Disabled until ~m68k-mint can be keyworded again
380 # if [[ ${CHOST} == *-mint* ]] ; then
381 # myopts+=" NO_MMAP=YesPlease"
382 # myopts+=" NO_IPV6=YesPlease"
383 # myopts+=" NO_STRLCPY=YesPlease"
384 # myopts+=" NO_MEMMEM=YesPlease"
385 # myopts+=" NO_MKDTEMP=YesPlease"
386 # myopts+=" NO_MKSTEMPS=YesPlease"
387 # fi
388 if [[ ${CHOST} == ia64-*-hpux* ]]; then
389 myopts+=" NO_NSEC=YesPlease"
390 fi
391 if [[ ${CHOST} == *-*-aix* ]]; then
392 myopts+=" NO_FNMATCH_CASEFOLD=YesPlease"
393 fi
394 if [[ ${CHOST} == *-solaris* ]]; then
395 myopts+=" NEEDS_LIBICONV=YesPlease"
396 fi
397
398 has_version '>=app-text/asciidoc-8.0' \
399 && myopts+=" ASCIIDOC8=YesPlease"
400 myopts+=" ASCIIDOC_NO_ROFF=YesPlease"
401
402 # Bug 290465:
403 # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
404 [[ "${CHOST}" == *-uclibc* ]] && \
405 myopts+=" NO_NSEC=YesPlease"
406
407 export MY_MAKEOPTS="${myopts}"
408 export EXTLIBS="${extlibs}"
409 }
410
411 src_unpack() {
412 if [[ ${PV} != *9999 ]]; then
413 unpack ${MY_P}.tar.${SRC_URI_SUFFIX}
414 cd "${S}"
415 unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}
416 use doc && \
417 cd "${S}"/Documentation && \
418 unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
419 cd "${S}"
420 else
421 git-2_src_unpack
422 cd "${S}"
423 #cp "${FILESDIR}"/GIT-VERSION-GEN .
424 fi
425
426 }
427
428 src_prepare() {
429 # bug #350330 - automagic CVS when we don't want it is bad.
430 epatch "${FILESDIR}"/git-2.2.2-optional-cvs.patch
431
432 # install mediawiki perl modules also in vendor_dir
433 # hack, needs better upstream solution
434 epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch
435
436 epatch "${FILESDIR}"/git-2.2.0-svn-fe-linking.patch
437
438 epatch_user
439
440 sed -i \
441 -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \
442 -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \
443 -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \
444 -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \
445 -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
446 -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \
447 Makefile contrib/svn-fe/Makefile || die "sed failed"
448
449 # Never install the private copy of Error.pm (bug #296310)
450 sed -i \
451 -e '/private-Error.pm/s,^,#,' \
452 perl/Makefile.PL
453
454 # Fix docbook2texi command
455 sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \
456 Documentation/Makefile || die "sed failed"
457
458 # Fix git-subtree missing DESTDIR
459 sed -i \
460 -e '/$(INSTALL)/s/ $(libexecdir)/ $(DESTDIR)$(libexecdir)/g' \
461 -e '/$(INSTALL)/s/ $(man1dir)/ $(DESTDIR)$(man1dir)/g' \
462 contrib/subtree/Makefile
463 }
464
465 git_emake() {
466 # bug #326625: PERL_PATH, PERL_MM_OPT
467 # bug #320647: PYTHON_PATH
468 PYTHON_PATH=""
469 use python && PYTHON_PATH="${PYTHON}"
470 emake ${MY_MAKEOPTS} \
471 DESTDIR="${D}" \
472 OPTCFLAGS="${CFLAGS}" \
473 OPTLDFLAGS="${LDFLAGS}" \
474 OPTCC="$(tc-getCC)" \
475 OPTAR="$(tc-getAR)" \
476 prefix="${EPREFIX}"/usr \
477 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
478 sysconfdir="${EPREFIX}"/etc \
479 PYTHON_PATH="${PYTHON_PATH}" \
480 PERL_MM_OPT="" \
481 GIT_TEST_OPTS="--no-color" \
482 V=1 \
483 "$@"
484 # This is the fix for bug #326625, but it also causes breakage, see bug
485 # #352693.
486 # PERL_PATH="${EPREFIX}/usr/bin/env perl" \
487 }
488
489 src_configure() {
490 exportmakeopts
491 }
492
493 src_compile() {
494 if use perl ; then
495 git_emake perl/PM.stamp || die "emake perl/PM.stamp failed"
496 git_emake perl/perl.mak || die "emake perl/perl.mak failed"
497 fi
498 git_emake || die "emake failed"
499
500 if use emacs ; then
501 elisp-compile contrib/emacs/git{,-blame}.el
502 fi
503
504 if use perl && use cgi ; then
505 git_emake \
506 gitweb/gitweb.cgi \
507 || die "emake gitweb/gitweb.cgi failed"
508 fi
509
510 if [[ ${CHOST} == *-darwin* ]]; then
511 cd "${S}"/contrib/credential/osxkeychain || die "cd credential/osxkeychain"
512 git_emake || die "emake credential-osxkeychain"
513 fi
514
515 cd "${S}"/Documentation
516 if [[ ${PV} == *9999 ]] ; then
517 git_emake man \
518 || die "emake man failed"
519 if use doc ; then
520 git_emake info html \
521 || die "emake info html failed"
522 fi
523 else
524 if use doc ; then
525 git_emake info \
526 || die "emake info html failed"
527 fi
528 fi
529
530 if use subversion ; then
531 cd "${S}"/contrib/svn-fe
532 # by defining EXTLIBS we override the detection for libintl and
533 # libiconv, bug #516168
534 local nlsiconv=
535 use nls && use !elibc_glibc && nlsiconv+=" -lintl"
536 use iconv && use !elibc_glibc && nlsiconv+=" -liconv"
537 git_emake EXTLIBS="${EXTLIBS} ${nlsiconv}" || die "emake svn-fe failed"
538 if use doc ; then
539 git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
540 fi
541 cd "${S}"
542 fi
543
544 if use gnome-keyring ; then
545 cd "${S}"/contrib/credential/gnome-keyring
546 git_emake || die "emake git-credential-gnome-keyring failed"
547 fi
548
549 cd "${S}"/contrib/subtree
550 git_emake
551 use doc && git_emake doc
552
553 if use mediawiki ; then
554 cd "${S}"/contrib/mw-to-git
555 git_emake
556 fi
557 }
558
559 src_install() {
560 git_emake \
561 install || \
562 die "make install failed"
563
564 if [[ ${CHOST} == *-darwin* ]]; then
565 dobin contrib/credential/osxkeychain/git-credential-osxkeychain
566 fi
567
568 # Depending on the tarball and manual rebuild of the documentation, the
569 # manpages may exist in either OR both of these directories.
570 find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
571 find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
572
573 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
574 use doc && dodir /usr/share/doc/${PF}/html
575 for d in / /howto/ /technical/ ; do
576 docinto ${d}
577 dodoc Documentation${d}*.txt
578 use doc && dohtml -p ${d} Documentation${d}*.html
579 done
580 docinto /
581 # Upstream does not ship this pre-built :-(
582 use doc && doinfo Documentation/{git,gitman}.info
583
584 newbashcomp contrib/completion/git-completion.bash ${PN}
585 bashcomp_alias git gitk
586 # Not really a bash-completion file (bug #477920)
587 # but still needed uncompressed (bug #507480)
588 insinto /usr/share/${PN}
589 doins contrib/completion/git-prompt.sh
590
591 if use emacs ; then
592 elisp-install ${PN} contrib/emacs/git.{el,elc}
593 elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
594 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
595 # don't add automatically to the load-path, so the sitefile
596 # can do a conditional loading
597 touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
598 elisp-site-file-install "${FILESDIR}"/${SITEFILE}
599 fi
600
601 if use python && use gtk ; then
602 python_doscript "${S}"/contrib/gitview/gitview
603 dodoc "${S}"/contrib/gitview/gitview.txt
604 fi
605
606 #dobin contrib/fast-import/git-p4 # Moved upstream
607 #dodoc contrib/fast-import/git-p4.txt # Moved upstream
608 newbin contrib/fast-import/import-tars.perl import-tars
609 exeinto /usr/libexec/git-core/
610 newexe contrib/git-resurrect.sh git-resurrect
611
612 # git-subtree
613 cd "${S}"/contrib/subtree
614 git_emake install || die "Failed to emake install git-subtree"
615 if use doc ; then
616 git_emake install-man install-doc || die "Failed to emake install-doc install-mangit-subtree"
617 fi
618 newdoc README README.git-subtree
619 dodoc git-subtree.txt
620 cd "${S}"
621
622 if use mediawiki ; then
623 cd "${S}"/contrib/mw-to-git
624 git_emake install
625 cd "${S}"
626 fi
627
628 # diff-highlight
629 dobin contrib/diff-highlight/diff-highlight
630 newdoc contrib/diff-highlight/README README.diff-highlight
631
632 # git-jump
633 exeinto /usr/libexec/git-core/
634 doexe contrib/git-jump/git-jump
635 newdoc contrib/git-jump/README git-jump.txt
636
637 # git-contacts
638 exeinto /usr/libexec/git-core/
639 doexe contrib/contacts/git-contacts
640 dodoc contrib/contacts/git-contacts.txt
641
642 if use gnome-keyring ; then
643 cd "${S}"/contrib/credential/gnome-keyring
644 dobin git-credential-gnome-keyring
645 fi
646
647 if use subversion ; then
648 cd "${S}"/contrib/svn-fe
649 dobin svn-fe
650 dodoc svn-fe.txt
651 use doc && doman svn-fe.1 && dohtml svn-fe.html
652 cd "${S}"
653 fi
654
655 dodir /usr/share/${PN}/contrib
656 # The following are excluded:
657 # completion - installed above
658 # credential/gnome-keyring TODO
659 # diff-highlight - done above
660 # emacs - installed above
661 # examples - these are stuff that is not used in Git anymore actually
662 # git-jump - done above
663 # gitview - installed above
664 # p4import - excluded because fast-import has a better one
665 # patches - stuff the Git guys made to go upstream to other places
666 # persistent-https - TODO
667 # mw-to-git - TODO
668 # subtree - build seperately
669 # svnimport - use git-svn
670 # thunderbird-patch-inline - fixes thunderbird
671 for i in \
672 buildsystems convert-objects fast-import \
673 hg-to-git hooks remotes2config.sh rerere-train.sh \
674 stats workdir \
675 ; do
676 cp -rf \
677 "${S}"/contrib/${i} \
678 "${ED}"/usr/share/${PN}/contrib \
679 || die "Failed contrib ${i}"
680 done
681
682 if use perl && use cgi ; then
683 # We used to install in /usr/share/${PN}/gitweb
684 # but upstream installs in /usr/share/gitweb
685 # so we will install a symlink and use their location for compat with other
686 # distros
687 dosym /usr/share/gitweb /usr/share/${PN}/gitweb
688
689 # INSTALL discusses configuration issues, not just installation
690 docinto /
691 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
692 newdoc "${S}"/gitweb/README README.gitweb
693
694 find "${ED}"/usr/lib64/perl5/ \
695 -name .packlist \
696 -exec rm \{\} \;
697 else
698 rm -rf "${ED}"/usr/share/gitweb
699 fi
700
701 if ! use subversion ; then
702 rm -f "${ED}"/usr/libexec/git-core/git-svn \
703 "${ED}"/usr/share/man/man1/git-svn.1*
704 fi
705
706 if use xinetd ; then
707 insinto /etc/xinetd.d
708 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
709 fi
710
711 if use !prefix ; then
712 newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon
713 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
714 systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service"
715 systemd_dounit "${FILESDIR}/git-daemon.socket"
716 fi
717
718 perl_delete_localpod
719 }
720
721 src_test() {
722 local disabled="" #t7004-tag.sh" #520270
723 local tests_cvs="t9200-git-cvsexportcommit.sh \
724 t9400-git-cvsserver-server.sh \
725 t9401-git-cvsserver-crlf.sh \
726 t9402-git-cvsserver-refs.sh \
727 t9600-cvsimport.sh \
728 t9601-cvsimport-vendor-branch.sh \
729 t9602-cvsimport-branches-tags.sh \
730 t9603-cvsimport-patchsets.sh \
731 t9604-cvsimport-timestamps.sh"
732 local tests_perl="t3701-add-interactive.sh \
733 t5502-quickfetch.sh \
734 t5512-ls-remote.sh \
735 t5520-pull.sh \
736 t7106-reset-unborn-branch.sh \
737 t7501-commit.sh"
738 # Bug #225601 - t0004 is not suitable for root perm
739 # Bug #219839 - t1004 is not suitable for root perm
740 # t0001-init.sh - check for init notices EPERM* fails
741 local tests_nonroot="t0001-init.sh \
742 t0004-unwritable.sh \
743 t0070-fundamental.sh \
744 t1004-read-tree-m-u-wf.sh \
745 t3700-add.sh \
746 t7300-clean.sh"
747 # t9100 still fails with symlinks in SVN 1.7
748 local test_svn="t9100-git-svn-basic.sh"
749
750 # Unzip is used only for the testcase code, not by any normal parts of Git.
751 if ! has_version app-arch/unzip ; then
752 einfo "Disabling tar-tree tests"
753 disabled="${disabled} t5000-tar-tree.sh"
754 fi
755
756 cvs=0
757 use cvs && let cvs=$cvs+1
758 if [[ ${EUID} -eq 0 ]]; then
759 if [[ $cvs -eq 1 ]]; then
760 ewarn "Skipping CVS tests because CVS does not work as root!"
761 ewarn "You should retest with FEATURES=userpriv!"
762 disabled="${disabled} ${tests_cvs}"
763 fi
764 einfo "Skipping other tests that require being non-root"
765 disabled="${disabled} ${tests_nonroot}"
766 else
767 [[ $cvs -gt 0 ]] && \
768 has_version dev-vcs/cvs && \
769 let cvs=$cvs+1
770 [[ $cvs -gt 1 ]] && \
771 has_version "dev-vcs/cvs[server]" && \
772 let cvs=$cvs+1
773 if [[ $cvs -lt 3 ]]; then
774 einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
775 disabled="${disabled} ${tests_cvs}"
776 fi
777 fi
778
779 if ! use perl ; then
780 einfo "Disabling tests that need Perl"
781 disabled="${disabled} ${tests_perl}"
782 fi
783
784 einfo "Disabling tests that fail with SVN 1.7"
785 disabled="${disabled} ${test_svn}"
786
787 # Reset all previously disabled tests
788 cd "${S}/t"
789 for i in *.sh.DISABLED ; do
790 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
791 done
792 einfo "Disabled tests:"
793 for i in ${disabled} ; do
794 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
795 done
796
797 # Avoid the test system removing the results because we want them ourselves
798 sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \
799 -i "${S}"/t/Makefile
800
801 # Clean old results first, must always run
802 cd "${S}/t"
803 nonfatal git_emake clean
804
805 # Now run the tests, keep going if we hit an error, and don't terminate on
806 # failure
807 cd "${S}"
808 einfo "Start test run"
809 #MAKEOPTS=-j1
810 nonfatal git_emake --keep-going test
811 rc=$?
812
813 # Display nice results, now print the results
814 cd "${S}/t"
815 nonfatal git_emake aggregate-results
816
817 # And bail if there was a problem
818 [ $rc -eq 0 ] || die "tests failed. Please file a bug."
819 }
820
821 showpkgdeps() {
822 local pkg=$1
823 shift
824 elog " $(printf "%-17s:" ${pkg}) ${@}"
825 }
826
827 pkg_postinst() {
828 use emacs && elisp-site-regen
829 einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
830 einfo "Please read /usr/share/git/git-prompt.sh for Git bash prompt"
831 einfo "Note that the prompt bash code is now in that separate script"
832 elog "These additional scripts need some dependencies:"
833 echo
834 showpkgdeps git-quiltimport "dev-util/quilt"
835 showpkgdeps git-instaweb \
836 "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )"
837 echo
838 }
839
840 pkg_postrm() {
841 use emacs && elisp-site-regen
842 }