1 |
robbat2 11/01/07 02:01:49 |
2 |
|
3 |
Modified: ChangeLog git-9999.ebuild |
4 |
Added: git-1.7.4_rc1-r1.ebuild |
5 |
Log: |
6 |
Port the 1.7.3.5-r1 Prefix USE=python code to newer ebuilds since Prefix team ha tested. |
7 |
|
8 |
(Portage version: 2.2.0_alpha13/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.71 dev-vcs/git/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.71&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?rev=1.71&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/ChangeLog?r1=1.70&r2=1.71 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v |
20 |
retrieving revision 1.70 |
21 |
retrieving revision 1.71 |
22 |
diff -p -w -b -B -u -u -r1.70 -r1.71 |
23 |
--- ChangeLog 6 Jan 2011 20:40:46 -0000 1.70 |
24 |
+++ ChangeLog 7 Jan 2011 02:01:48 -0000 1.71 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for dev-vcs/git |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.70 2011/01/06 20:40:46 robbat2 Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.71 2011/01/07 02:01:48 robbat2 Exp $ |
30 |
+ |
31 |
+*git-1.7.4_rc1-r1 (07 Jan 2011) |
32 |
+ |
33 |
+ 07 Jan 2011; Robin H. Johnson <robbat2@g.o> +git-1.7.4_rc1-r1.ebuild, |
34 |
+ git-9999.ebuild: |
35 |
+ Port the 1.7.3.5-r1 Prefix USE=python code to newer ebuilds since Prefix team |
36 |
+ has tested. |
37 |
|
38 |
*git-1.7.3.5-r1 (06 Jan 2011) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.9 dev-vcs/git/git-9999.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999.ebuild?rev=1.9&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999.ebuild?rev=1.9&content-type=text/plain |
47 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-9999.ebuild?r1=1.8&r2=1.9 |
48 |
|
49 |
Index: git-9999.ebuild |
50 |
=================================================================== |
51 |
RCS file: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v |
52 |
retrieving revision 1.8 |
53 |
retrieving revision 1.9 |
54 |
diff -p -w -b -B -u -u -r1.8 -r1.9 |
55 |
--- git-9999.ebuild 11 Nov 2010 01:04:46 -0000 1.8 |
56 |
+++ git-9999.ebuild 7 Jan 2011 02:01:48 -0000 1.9 |
57 |
@@ -1,6 +1,6 @@ |
58 |
-# Copyright 1999-2010 Gentoo Foundation |
59 |
+# Copyright 1999-2011 Gentoo Foundation |
60 |
# Distributed under the terms of the GNU General Public License v2 |
61 |
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v 1.8 2010/11/11 01:04:46 sping Exp $ |
62 |
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v 1.9 2011/01/07 02:01:48 robbat2 Exp $ |
63 |
|
64 |
EAPI=3 |
65 |
|
66 |
@@ -30,13 +30,14 @@ fi |
67 |
|
68 |
LICENSE="GPL-2" |
69 |
SLOT="0" |
70 |
-IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl ppcsha1 tk +threads +webdav xinetd cvs subversion" |
71 |
+IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion" |
72 |
|
73 |
# Common to both DEPEND and RDEPEND |
74 |
CDEPEND=" |
75 |
!blksha1? ( dev-libs/openssl ) |
76 |
sys-libs/zlib |
77 |
perl? ( dev-lang/perl[-build] ) |
78 |
+ python? ( dev-lang/python ) |
79 |
tk? ( dev-lang/tk ) |
80 |
curl? ( |
81 |
net-misc/curl |
82 |
@@ -52,11 +53,11 @@ RDEPEND="${CDEPEND} |
83 |
cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite ) |
84 |
subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) |
85 |
) |
86 |
- gtk? |
87 |
+ python? ( gtk? |
88 |
( |
89 |
>=dev-python/pygtk-2.8 |
90 |
|| ( dev-python/pygtksourceview:2 dev-python/gtksourceview-python ) |
91 |
- )" |
92 |
+ ) )" |
93 |
|
94 |
# This is how info docs are created with Git: |
95 |
# .txt/asciidoc --(asciidoc)---------> .xml/docbook |
96 |
@@ -135,10 +136,12 @@ exportmakeopts() { |
97 |
use perl \ |
98 |
&& myopts="${myopts} INSTALLDIRS=vendor" \ |
99 |
|| myopts="${myopts} NO_PERL=YesPlease" |
100 |
- use threads \ |
101 |
- && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" |
102 |
+ use python \ |
103 |
+ || myopts="${myopts} NO_PYTHON=YesPlease" |
104 |
use subversion \ |
105 |
|| myopts="${myopts} NO_SVN_TESTS=YesPlease" |
106 |
+ use threads \ |
107 |
+ && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" |
108 |
# Disabled until ~m68k-mint can be keyworded again |
109 |
# if [[ ${CHOST} == *-mint* ]] ; then |
110 |
# myopts="${myopts} NO_MMAP=YesPlease" |
111 |
@@ -196,6 +199,15 @@ src_prepare() { |
112 |
# Gentoo bug #321895 |
113 |
#epatch "${FILESDIR}"/git-1.7.1-noiconv-segfault-fix.patch |
114 |
|
115 |
+ # Fix false positives with t3404 due to SHELL=/bin/false for the portage |
116 |
+ # user. |
117 |
+ # Merged upstream |
118 |
+ #epatch "${FILESDIR}"/git-1.7.3.4-avoid-shell-issues.patch |
119 |
+ |
120 |
+ # bug #350075: t9001: fix missing prereq on some tests |
121 |
+ # Merged upstream |
122 |
+ #epatch "${FILESDIR}"/git-1.7.3.4-fix-perl-test-prereq.patch |
123 |
+ |
124 |
sed -i \ |
125 |
-e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ |
126 |
-e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ |
127 |
@@ -215,10 +227,15 @@ src_prepare() { |
128 |
Documentation/Makefile || die "sed failed" |
129 |
|
130 |
# bug #318289 |
131 |
- epatch "${FILESDIR}"/git-1.7.3.2-interix.patch |
132 |
+ # Merged upstream |
133 |
+ #epatch "${FILESDIR}"/git-1.7.3.2-interix.patch |
134 |
} |
135 |
|
136 |
git_emake() { |
137 |
+ # bug #326625: PERL_PATH, PERL_MM_OPT |
138 |
+ # bug #320647: PYTHON_PATH |
139 |
+ PYTHON_PATH="" |
140 |
+ use python && PYTHON_PATH="${EPREFIX}/usr/bin/python" |
141 |
emake ${MY_MAKEOPTS} \ |
142 |
DESTDIR="${D}" \ |
143 |
OPTCFLAGS="${CFLAGS}" \ |
144 |
@@ -228,6 +245,10 @@ git_emake() { |
145 |
prefix="${EPREFIX}"/usr \ |
146 |
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
147 |
sysconfdir="${EPREFIX}"/etc \ |
148 |
+ PYTHON_PATH="${PYTHON_PATH}" \ |
149 |
+ PERL_PATH="${EPREFIX}/usr/bin/env perl" \ |
150 |
+ PERL_MM_OPT="" \ |
151 |
+ GIT_TEST_OPTS="--no-color" \ |
152 |
"$@" |
153 |
} |
154 |
|
155 |
@@ -298,7 +319,7 @@ src_install() { |
156 |
elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die |
157 |
fi |
158 |
|
159 |
- if use gtk ; then |
160 |
+ if use python && use gtk ; then |
161 |
dobin "${S}"/contrib/gitview/gitview |
162 |
dodoc "${S}"/contrib/gitview/gitview.txt |
163 |
fi |
164 |
@@ -330,14 +351,11 @@ src_install() { |
165 |
done |
166 |
|
167 |
if use perl && use cgi ; then |
168 |
- exeinto /usr/share/${PN}/gitweb |
169 |
- doexe "${S}"/gitweb/gitweb.cgi |
170 |
- insinto /usr/share/${PN}/gitweb/static |
171 |
- doins "${S}"/gitweb/static/gitweb.css |
172 |
- js=gitweb.js |
173 |
- [ -f "${S}"/gitweb/static/gitweb.min.js ] && js=gitweb.min.js |
174 |
- doins "${S}"/gitweb/static/${js} |
175 |
- doins "${S}"/gitweb/static/git-{favicon,logo}.png |
176 |
+ # We used to install in /usr/share/${PN}/gitweb |
177 |
+ # but upstream installs in /usr/share/gitweb |
178 |
+ # so we will install a symlink and use their location for compat with other |
179 |
+ # distros |
180 |
+ dosym /usr/share/gitweb /usr/share/${PN}/gitweb |
181 |
|
182 |
# INSTALL discusses configuration issues, not just installation |
183 |
docinto / |
184 |
@@ -347,7 +365,10 @@ src_install() { |
185 |
find "${ED}"/usr/lib64/perl5/ \ |
186 |
-name .packlist \ |
187 |
-exec rm \{\} \; |
188 |
+ else |
189 |
+ rm -rf "${D}"/usr/share/gitweb |
190 |
fi |
191 |
+ |
192 |
if ! use subversion ; then |
193 |
rm -f "${ED}"/usr/libexec/git-core/git-svn \ |
194 |
"${ED}"/usr/share/man/man1/git-svn.1* |
195 |
@@ -428,11 +449,27 @@ src_test() { |
196 |
for i in ${disabled} ; do |
197 |
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" |
198 |
done |
199 |
- cd "${S}" |
200 |
+ |
201 |
+ # Avoid the test system removing the results because we want them ourselves |
202 |
+ sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ |
203 |
+ -i "${S}"/t/Makefile |
204 |
+ |
205 |
+ # Clean old results first |
206 |
+ cd "${S}/t" |
207 |
+ git_emake clean |
208 |
+ |
209 |
# Now run the tests |
210 |
+ cd "${S}" |
211 |
einfo "Start test run" |
212 |
- git_emake \ |
213 |
- test || die "tests failed" |
214 |
+ git_emake test |
215 |
+ rc=$? |
216 |
+ |
217 |
+ # Display nice results |
218 |
+ cd "${S}/t" |
219 |
+ git_emake aggregate-results |
220 |
+ |
221 |
+ # And exit |
222 |
+ [ $rc -eq 0 ] || die "tests failed. Please file a bug." |
223 |
} |
224 |
|
225 |
showpkgdeps() { |
226 |
|
227 |
|
228 |
|
229 |
1.1 dev-vcs/git/git-1.7.4_rc1-r1.ebuild |
230 |
|
231 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.7.4_rc1-r1.ebuild?rev=1.1&view=markup |
232 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/git/git-1.7.4_rc1-r1.ebuild?rev=1.1&content-type=text/plain |
233 |
|
234 |
Index: git-1.7.4_rc1-r1.ebuild |
235 |
=================================================================== |
236 |
# Copyright 1999-2011 Gentoo Foundation |
237 |
# Distributed under the terms of the GNU General Public License v2 |
238 |
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.7.4_rc1-r1.ebuild,v 1.1 2011/01/07 02:01:48 robbat2 Exp $ |
239 |
|
240 |
EAPI=3 |
241 |
|
242 |
GENTOO_DEPEND_ON_PERL=no |
243 |
inherit toolchain-funcs eutils elisp-common perl-module bash-completion |
244 |
[ "$PV" == "9999" ] && inherit git |
245 |
|
246 |
MY_PV="${PV/_rc/.rc}" |
247 |
MY_P="${PN}-${MY_PV}" |
248 |
|
249 |
DOC_VER=${MY_PV} |
250 |
|
251 |
DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team" |
252 |
HOMEPAGE="http://www.git-scm.com/" |
253 |
if [ "$PV" != "9999" ]; then |
254 |
SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2 |
255 |
mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2 |
256 |
doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )" |
257 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
258 |
else |
259 |
SRC_URI="" |
260 |
EGIT_BRANCH="master" |
261 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" |
262 |
# EGIT_REPO_URI="http://www.kernel.org/pub/scm/git/git.git" |
263 |
KEYWORDS="" |
264 |
fi |
265 |
|
266 |
LICENSE="GPL-2" |
267 |
SLOT="0" |
268 |
IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion" |
269 |
|
270 |
# Common to both DEPEND and RDEPEND |
271 |
CDEPEND=" |
272 |
!blksha1? ( dev-libs/openssl ) |
273 |
sys-libs/zlib |
274 |
perl? ( dev-lang/perl[-build] ) |
275 |
python? ( dev-lang/python ) |
276 |
tk? ( dev-lang/tk ) |
277 |
curl? ( |
278 |
net-misc/curl |
279 |
webdav? ( dev-libs/expat ) |
280 |
) |
281 |
emacs? ( virtual/emacs )" |
282 |
|
283 |
RDEPEND="${CDEPEND} |
284 |
perl? ( dev-perl/Error |
285 |
dev-perl/Net-SMTP-SSL |
286 |
dev-perl/Authen-SASL |
287 |
cgi? ( virtual/perl-CGI ) |
288 |
cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite ) |
289 |
subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) |
290 |
) |
291 |
python? ( gtk? |
292 |
( |
293 |
>=dev-python/pygtk-2.8 |
294 |
|| ( dev-python/pygtksourceview:2 dev-python/gtksourceview-python ) |
295 |
) )" |
296 |
|
297 |
# This is how info docs are created with Git: |
298 |
# .txt/asciidoc --(asciidoc)---------> .xml/docbook |
299 |
# .xml/docbook --(docbook2texi.pl)--> .texi |
300 |
# .texi --(makeinfo)---------> .info |
301 |
DEPEND="${CDEPEND} |
302 |
app-arch/cpio |
303 |
doc? ( |
304 |
app-text/asciidoc |
305 |
app-text/docbook2X |
306 |
sys-apps/texinfo |
307 |
)" |
308 |
|
309 |
# Live ebuild builds man pages and HTML docs, additionally |
310 |
if [ "$PV" == "9999" ]; then |
311 |
DEPEND="${DEPEND} |
312 |
app-text/asciidoc |
313 |
app-text/xmlto" |
314 |
fi |
315 |
|
316 |
SITEFILE=50${PN}-gentoo.el |
317 |
S="${WORKDIR}/${MY_P}" |
318 |
|
319 |
pkg_setup() { |
320 |
if ! use perl ; then |
321 |
use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi" |
322 |
use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs" |
323 |
use subversion && ewarn "git-svn needs USE=perl, it won't work" |
324 |
fi |
325 |
if use webdav && ! use curl ; then |
326 |
ewarn "USE=webdav needs USE=curl. Ignoring" |
327 |
fi |
328 |
if use subversion && has_version dev-vcs/subversion && built_with_use --missing false dev-vcs/subversion dso ; then |
329 |
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" |
330 |
ewarn "with USE=dso, there may be weird crashes in git-svn. You" |
331 |
ewarn "have been warned." |
332 |
fi |
333 |
} |
334 |
|
335 |
# This is needed because for some obscure reasons future calls to make don't |
336 |
# pick up these exports if we export them in src_unpack() |
337 |
exportmakeopts() { |
338 |
local myopts |
339 |
|
340 |
if use blksha1 ; then |
341 |
myopts="${myopts} BLK_SHA1=YesPlease" |
342 |
elif use ppcsha1 ; then |
343 |
myopts="${myopts} PPC_SHA1=YesPlease" |
344 |
fi |
345 |
|
346 |
if use curl ; then |
347 |
use webdav || myopts="${myopts} NO_EXPAT=YesPlease" |
348 |
else |
349 |
myopts="${myopts} NO_CURL=YesPlease" |
350 |
fi |
351 |
|
352 |
# broken assumptions, because of broken build system ... |
353 |
myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease" |
354 |
myopts="${myopts} INSTALL=install TAR=tar" |
355 |
myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh" |
356 |
myopts="${myopts} SANE_TOOL_PATH=" |
357 |
myopts="${myopts} OLD_ICONV=" |
358 |
myopts="${myopts} NO_EXTERNAL_GREP=" |
359 |
|
360 |
# can't define this to null, since the entire makefile depends on it |
361 |
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile |
362 |
|
363 |
use iconv \ |
364 |
|| einfo "Forcing iconv for ${PVR} due to bugs #321895, #322205." |
365 |
# || myopts="${myopts} NO_ICONV=YesPlease" |
366 |
# because, above, we need to do this unconditionally (no "&& use iconv") |
367 |
use !elibc_glibc && myopts="${myopts} NEEDS_LIBICONV=YesPlease" |
368 |
|
369 |
use tk \ |
370 |
|| myopts="${myopts} NO_TCLTK=YesPlease" |
371 |
use perl \ |
372 |
&& myopts="${myopts} INSTALLDIRS=vendor" \ |
373 |
|| myopts="${myopts} NO_PERL=YesPlease" |
374 |
use python \ |
375 |
|| myopts="${myopts} NO_PYTHON=YesPlease" |
376 |
use subversion \ |
377 |
|| myopts="${myopts} NO_SVN_TESTS=YesPlease" |
378 |
use threads \ |
379 |
&& myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" |
380 |
# Disabled until ~m68k-mint can be keyworded again |
381 |
# if [[ ${CHOST} == *-mint* ]] ; then |
382 |
# myopts="${myopts} NO_MMAP=YesPlease" |
383 |
# myopts="${myopts} NO_IPV6=YesPlease" |
384 |
# myopts="${myopts} NO_STRLCPY=YesPlease" |
385 |
# myopts="${myopts} NO_MEMMEM=YesPlease" |
386 |
# myopts="${myopts} NO_MKDTEMP=YesPlease" |
387 |
# myopts="${myopts} NO_MKSTEMPS=YesPlease" |
388 |
# fi |
389 |
if [[ ${CHOST} == ia64-*-hpux* ]]; then |
390 |
myopts="${myopts} NO_NSEC=YesPlease" |
391 |
fi |
392 |
|
393 |
has_version '>=app-text/asciidoc-8.0' \ |
394 |
&& myopts="${myopts} ASCIIDOC8=YesPlease" |
395 |
myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease" |
396 |
|
397 |
# Bug 290465: |
398 |
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' |
399 |
[[ "${CHOST}" == *-uclibc* ]] && \ |
400 |
myopts="${myopts} NO_NSEC=YesPlease" |
401 |
|
402 |
export MY_MAKEOPTS="${myopts}" |
403 |
} |
404 |
|
405 |
src_unpack() { |
406 |
if [ "${PV}" != "9999" ]; then |
407 |
unpack ${MY_P}.tar.bz2 |
408 |
cd "${S}" |
409 |
unpack ${PN}-manpages-${DOC_VER}.tar.bz2 |
410 |
use doc && \ |
411 |
cd "${S}"/Documentation && \ |
412 |
unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2 |
413 |
cd "${S}" |
414 |
else |
415 |
git_src_unpack |
416 |
cd "${S}" |
417 |
#cp "${FILESDIR}"/GIT-VERSION-GEN . |
418 |
fi |
419 |
|
420 |
} |
421 |
|
422 |
src_prepare() { |
423 |
# Noperl is being merged to upstream as of 2009/04/05 |
424 |
#epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch |
425 |
|
426 |
# GetOpt-Long v2.38 is strict |
427 |
# Merged in 1.6.3 final 2009/05/07 |
428 |
#epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch |
429 |
|
430 |
# JS install fixup |
431 |
epatch "${FILESDIR}"/git-1.7.2-always-install-js.patch |
432 |
|
433 |
# USE=-iconv causes segfaults, fixed post 1.7.1 |
434 |
# Gentoo bug #321895 |
435 |
#epatch "${FILESDIR}"/git-1.7.1-noiconv-segfault-fix.patch |
436 |
|
437 |
# Fix false positives with t3404 due to SHELL=/bin/false for the portage |
438 |
# user. |
439 |
# Merged upstream |
440 |
#epatch "${FILESDIR}"/git-1.7.3.4-avoid-shell-issues.patch |
441 |
|
442 |
# bug #350075: t9001: fix missing prereq on some tests |
443 |
# Merged upstream |
444 |
#epatch "${FILESDIR}"/git-1.7.3.4-fix-perl-test-prereq.patch |
445 |
|
446 |
sed -i \ |
447 |
-e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ |
448 |
-e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ |
449 |
-e 's:^\(CC = \).*$:\1$(OPTCC):' \ |
450 |
-e 's:^\(AR = \).*$:\1$(OPTAR):' \ |
451 |
-e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \ |
452 |
-e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \ |
453 |
Makefile || die "sed failed" |
454 |
|
455 |
# Never install the private copy of Error.pm (bug #296310) |
456 |
sed -i \ |
457 |
-e '/private-Error.pm/s,^,#,' \ |
458 |
perl/Makefile.PL |
459 |
|
460 |
# Fix docbook2texi command |
461 |
sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \ |
462 |
Documentation/Makefile || die "sed failed" |
463 |
|
464 |
# bug #318289 |
465 |
# Merged upstream |
466 |
#epatch "${FILESDIR}"/git-1.7.3.2-interix.patch |
467 |
} |
468 |
|
469 |
git_emake() { |
470 |
# bug #326625: PERL_PATH, PERL_MM_OPT |
471 |
# bug #320647: PYTHON_PATH |
472 |
PYTHON_PATH="" |
473 |
use python && PYTHON_PATH="${EPREFIX}/usr/bin/python" |
474 |
emake ${MY_MAKEOPTS} \ |
475 |
DESTDIR="${D}" \ |
476 |
OPTCFLAGS="${CFLAGS}" \ |
477 |
OPTLDFLAGS="${LDFLAGS}" \ |
478 |
OPTCC="$(tc-getCC)" \ |
479 |
OPTAR="$(tc-getAR)" \ |
480 |
prefix="${EPREFIX}"/usr \ |
481 |
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
482 |
sysconfdir="${EPREFIX}"/etc \ |
483 |
PYTHON_PATH="${PYTHON_PATH}" \ |
484 |
PERL_PATH="${EPREFIX}/usr/bin/env perl" \ |
485 |
PERL_MM_OPT="" \ |
486 |
GIT_TEST_OPTS="--no-color" \ |
487 |
"$@" |
488 |
} |
489 |
|
490 |
src_configure() { |
491 |
exportmakeopts |
492 |
} |
493 |
|
494 |
src_compile() { |
495 |
git_emake || die "emake failed" |
496 |
|
497 |
if use emacs ; then |
498 |
elisp-compile contrib/emacs/git{,-blame}.el \ |
499 |
|| die "emacs modules failed" |
500 |
fi |
501 |
|
502 |
if use perl && use cgi ; then |
503 |
git_emake \ |
504 |
gitweb/gitweb.cgi \ |
505 |
|| die "emake gitweb/gitweb.cgi failed" |
506 |
fi |
507 |
|
508 |
cd "${S}"/Documentation |
509 |
if [[ "$PV" == "9999" ]] ; then |
510 |
git_emake man \ |
511 |
|| die "emake man failed" |
512 |
if use doc ; then |
513 |
git_emake info html \ |
514 |
|| die "emake info html failed" |
515 |
fi |
516 |
else |
517 |
if use doc ; then |
518 |
git_emake info \ |
519 |
|| die "emake info html failed" |
520 |
fi |
521 |
fi |
522 |
} |
523 |
|
524 |
src_install() { |
525 |
git_emake \ |
526 |
install || \ |
527 |
die "make install failed" |
528 |
|
529 |
# Depending on the tarball and manual rebuild of the documentation, the |
530 |
# manpages may exist in either OR both of these directories. |
531 |
find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] |
532 |
find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] |
533 |
|
534 |
dodoc README Documentation/{SubmittingPatches,CodingGuidelines} |
535 |
use doc && dodir /usr/share/doc/${PF}/html |
536 |
for d in / /howto/ /technical/ ; do |
537 |
docinto ${d} |
538 |
dodoc Documentation${d}*.txt |
539 |
use doc && dohtml -p ${d} Documentation${d}*.html |
540 |
done |
541 |
docinto / |
542 |
# Upstream does not ship this pre-built :-( |
543 |
use doc && doinfo Documentation/{git,gitman}.info |
544 |
|
545 |
dobashcompletion contrib/completion/git-completion.bash ${PN} |
546 |
|
547 |
if use emacs ; then |
548 |
elisp-install ${PN} contrib/emacs/git.{el,elc} || die |
549 |
elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die |
550 |
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die |
551 |
# don't add automatically to the load-path, so the sitefile |
552 |
# can do a conditional loading |
553 |
touch "${ED}${SITELISP}/${PN}/compat/.nosearch" |
554 |
elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die |
555 |
fi |
556 |
|
557 |
if use python && use gtk ; then |
558 |
dobin "${S}"/contrib/gitview/gitview |
559 |
dodoc "${S}"/contrib/gitview/gitview.txt |
560 |
fi |
561 |
|
562 |
dobin contrib/fast-import/git-p4 |
563 |
dodoc contrib/fast-import/git-p4.txt |
564 |
newbin contrib/fast-import/import-tars.perl import-tars |
565 |
newbin contrib/git-resurrect.sh git-resurrect |
566 |
|
567 |
dodir /usr/share/${PN}/contrib |
568 |
# The following are excluded: |
569 |
# completion - installed above |
570 |
# emacs - installed above |
571 |
# examples - these are stuff that is not used in Git anymore actually |
572 |
# gitview - installed above |
573 |
# p4import - excluded because fast-import has a better one |
574 |
# patches - stuff the Git guys made to go upstream to other places |
575 |
# svnimport - use git-svn |
576 |
# thunderbird-patch-inline - fixes thunderbird |
577 |
for i in \ |
578 |
blameview buildsystems ciabot continuous convert-objects fast-import \ |
579 |
hg-to-git hooks remotes2config.sh remotes2config.sh rerere-train.sh \ |
580 |
stats svn-fe vim workdir \ |
581 |
; do |
582 |
cp -rf \ |
583 |
"${S}"/contrib/${i} \ |
584 |
"${ED}"/usr/share/${PN}/contrib \ |
585 |
|| die "Failed contrib ${i}" |
586 |
done |
587 |
|
588 |
if use perl && use cgi ; then |
589 |
# We used to install in /usr/share/${PN}/gitweb |
590 |
# but upstream installs in /usr/share/gitweb |
591 |
# so we will install a symlink and use their location for compat with other |
592 |
# distros |
593 |
dosym /usr/share/gitweb /usr/share/${PN}/gitweb |
594 |
|
595 |
# INSTALL discusses configuration issues, not just installation |
596 |
docinto / |
597 |
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb |
598 |
newdoc "${S}"/gitweb/README README.gitweb |
599 |
|
600 |
find "${ED}"/usr/lib64/perl5/ \ |
601 |
-name .packlist \ |
602 |
-exec rm \{\} \; |
603 |
else |
604 |
rm -rf "${D}"/usr/share/gitweb |
605 |
fi |
606 |
|
607 |
if ! use subversion ; then |
608 |
rm -f "${ED}"/usr/libexec/git-core/git-svn \ |
609 |
"${ED}"/usr/share/man/man1/git-svn.1* |
610 |
fi |
611 |
|
612 |
if use xinetd ; then |
613 |
insinto /etc/xinetd.d |
614 |
newins "${FILESDIR}"/git-daemon.xinetd git-daemon |
615 |
fi |
616 |
|
617 |
newinitd "${FILESDIR}"/git-daemon.initd git-daemon |
618 |
newconfd "${FILESDIR}"/git-daemon.confd git-daemon |
619 |
|
620 |
fixlocalpod |
621 |
} |
622 |
|
623 |
src_test() { |
624 |
local disabled="" |
625 |
local tests_cvs="t9200-git-cvsexportcommit.sh \ |
626 |
t9400-git-cvsserver-server.sh \ |
627 |
t9401-git-cvsserver-crlf.sh \ |
628 |
t9600-cvsimport.sh \ |
629 |
t9601-cvsimport-vendor-branch.sh \ |
630 |
t9602-cvsimport-branches-tags.sh \ |
631 |
t9603-cvsimport-patchsets.sh" |
632 |
local tests_perl="t5502-quickfetch.sh \ |
633 |
t5512-ls-remote.sh \ |
634 |
t5520-pull.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 |
t1004-read-tree-m-u-wf.sh \ |
641 |
t3700-add.sh \ |
642 |
t7300-clean.sh" |
643 |
|
644 |
# Unzip is used only for the testcase code, not by any normal parts of Git. |
645 |
if ! has_version app-arch/unzip ; then |
646 |
einfo "Disabling tar-tree tests" |
647 |
disabled="${disabled} t5000-tar-tree.sh" |
648 |
fi |
649 |
|
650 |
cvs=0 |
651 |
use cvs && let cvs=$cvs+1 |
652 |
if [[ ${EUID} -eq 0 ]]; then |
653 |
if [[ $cvs -eq 1 ]]; then |
654 |
ewarn "Skipping CVS tests because CVS does not work as root!" |
655 |
ewarn "You should retest with FEATURES=userpriv!" |
656 |
disabled="${disabled} ${tests_cvs}" |
657 |
fi |
658 |
einfo "Skipping other tests that require being non-root" |
659 |
disabled="${disabled} ${tests_nonroot}" |
660 |
else |
661 |
[[ $cvs -gt 0 ]] && \ |
662 |
has_version dev-vcs/cvs && \ |
663 |
let cvs=$cvs+1 |
664 |
[[ $cvs -gt 1 ]] && \ |
665 |
built_with_use dev-vcs/cvs server && \ |
666 |
let cvs=$cvs+1 |
667 |
if [[ $cvs -lt 3 ]]; then |
668 |
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" |
669 |
disabled="${disabled} ${tests_cvs}" |
670 |
fi |
671 |
fi |
672 |
|
673 |
if ! use perl ; then |
674 |
einfo "Disabling tests that need Perl" |
675 |
disabled="${disabled} ${tests_perl}" |
676 |
fi |
677 |
|
678 |
# Reset all previously disabled tests |
679 |
cd "${S}/t" |
680 |
for i in *.sh.DISABLED ; do |
681 |
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" |
682 |
done |
683 |
einfo "Disabled tests:" |
684 |
for i in ${disabled} ; do |
685 |
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" |
686 |
done |
687 |
|
688 |
# Avoid the test system removing the results because we want them ourselves |
689 |
sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ |
690 |
-i "${S}"/t/Makefile |
691 |
|
692 |
# Clean old results first |
693 |
cd "${S}/t" |
694 |
git_emake clean |
695 |
|
696 |
# Now run the tests |
697 |
cd "${S}" |
698 |
einfo "Start test run" |
699 |
git_emake test |
700 |
rc=$? |
701 |
|
702 |
# Display nice results |
703 |
cd "${S}/t" |
704 |
git_emake aggregate-results |
705 |
|
706 |
# And exit |
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 |
if use subversion && has_version dev-vcs/subversion && ! built_with_use --missing false dev-vcs/subversion perl ; then |
719 |
ewarn "You must build dev-vcs/subversion with USE=perl" |
720 |
ewarn "to get the full functionality of git-svn!" |
721 |
fi |
722 |
elog "These additional scripts need some dependencies:" |
723 |
echo |
724 |
showpkgdeps git-quiltimport "dev-util/quilt" |
725 |
showpkgdeps git-instaweb \ |
726 |
"|| ( www-servers/lighttpd www-servers/apache )" |
727 |
echo |
728 |
} |
729 |
|
730 |
pkg_postrm() { |
731 |
use emacs && elisp-site-regen |
732 |
} |