1 |
robbat2 09/12/26 00:10:35 |
2 |
|
3 |
Modified: ChangeLog git-9999.ebuild |
4 |
Added: git-1.6.6-r1.ebuild |
5 |
Log: |
6 |
Bug #298277: Fixup JS install for Gitweb. Also port all recent fixes to the live ebuild. |
7 |
(Portage version: 2.2_rc58/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.391 dev-util/git/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?rev=1.391&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?rev=1.391&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?r1=1.390&r2=1.391 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v |
19 |
retrieving revision 1.390 |
20 |
retrieving revision 1.391 |
21 |
diff -p -w -b -B -u -u -r1.390 -r1.391 |
22 |
--- ChangeLog 24 Dec 2009 19:34:28 -0000 1.390 |
23 |
+++ ChangeLog 26 Dec 2009 00:10:34 -0000 1.391 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for dev-util/git |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.390 2009/12/24 19:34:28 robbat2 Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.391 2009/12/26 00:10:34 robbat2 Exp $ |
29 |
+ |
30 |
+*git-1.6.6-r1 (26 Dec 2009) |
31 |
+ |
32 |
+ 26 Dec 2009; Robin H. Johnson <robbat2@g.o> +git-1.6.6-r1.ebuild, |
33 |
+ +files/git-1.6.6-always-install-js.patch, git-9999.ebuild: |
34 |
+ Bug #298277: Fixup JS install for Gitweb. Also port all recent fixes to |
35 |
+ the live ebuild. |
36 |
|
37 |
*git-1.6.6 (24 Dec 2009) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.18 dev-util/git/git-9999.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-9999.ebuild?rev=1.18&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-9999.ebuild?rev=1.18&content-type=text/plain |
46 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-9999.ebuild?r1=1.17&r2=1.18 |
47 |
|
48 |
Index: git-9999.ebuild |
49 |
=================================================================== |
50 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/git/git-9999.ebuild,v |
51 |
retrieving revision 1.17 |
52 |
retrieving revision 1.18 |
53 |
diff -p -w -b -B -u -u -r1.17 -r1.18 |
54 |
--- git-9999.ebuild 16 Nov 2009 20:57:10 -0000 1.17 |
55 |
+++ git-9999.ebuild 26 Dec 2009 00:10:34 -0000 1.18 |
56 |
@@ -1,6 +1,6 @@ |
57 |
# Copyright 1999-2009 Gentoo Foundation |
58 |
# Distributed under the terms of the GNU General Public License v2 |
59 |
-# $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-9999.ebuild,v 1.17 2009/11/16 20:57:10 darkside Exp $ |
60 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-9999.ebuild,v 1.18 2009/12/26 00:10:34 robbat2 Exp $ |
61 |
|
62 |
EAPI=2 |
63 |
|
64 |
@@ -18,7 +18,7 @@ if [ "$PV" != "9999" ]; then |
65 |
SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2 |
66 |
mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2 |
67 |
doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )" |
68 |
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
69 |
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
70 |
else |
71 |
SRC_URI="" |
72 |
EGIT_BRANCH="master" |
73 |
@@ -35,7 +35,6 @@ IUSE="+blksha1 +curl cgi doc emacs gtk i |
74 |
CDEPEND=" |
75 |
!blksha1? ( dev-libs/openssl ) |
76 |
sys-libs/zlib |
77 |
- app-arch/cpio |
78 |
perl? ( dev-lang/perl ) |
79 |
tk? ( dev-lang/tk ) |
80 |
curl? ( |
81 |
@@ -63,6 +62,7 @@ RDEPEND="${CDEPEND} |
82 |
# .xml/docbook --(docbook2texi.pl)--> .texi |
83 |
# .texi --(makeinfo)---------> .info |
84 |
DEPEND="${CDEPEND} |
85 |
+ app-arch/cpio |
86 |
doc? ( |
87 |
app-text/asciidoc |
88 |
app-text/docbook2X |
89 |
@@ -129,6 +129,11 @@ exportmakeopts() { |
90 |
&& myopts="${myopts} ASCIIDOC8=YesPlease" |
91 |
myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease" |
92 |
|
93 |
+ # Bug 290465: |
94 |
+ # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' |
95 |
+ [[ "${CHOST}" == *-uclibc* ]] && \ |
96 |
+ myopts="${myopts} NO_NSEC=YesPlease" |
97 |
+ |
98 |
export MY_MAKEOPTS="${myopts}" |
99 |
} |
100 |
|
101 |
@@ -157,6 +162,9 @@ src_prepare() { |
102 |
# Merged in 1.6.3 final 2009/05/07 |
103 |
#epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch |
104 |
|
105 |
+ # JS install fixup |
106 |
+ epatch "${FILESDIR}"/git-1.6.6-always-install-js.patch |
107 |
+ |
108 |
sed -i \ |
109 |
-e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ |
110 |
-e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ |
111 |
@@ -164,6 +172,11 @@ src_prepare() { |
112 |
-e 's:^\(AR = \).*$:\1$(OPTAR):' \ |
113 |
Makefile || die "sed failed" |
114 |
|
115 |
+ # Never install the private copy of Error.pm (bug #296310) |
116 |
+ sed -i \ |
117 |
+ -e '/private-Error.pm/s,^,#,' \ |
118 |
+ perl/Makefile.PL |
119 |
+ |
120 |
# Fix docbook2texi command |
121 |
sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \ |
122 |
Documentation/Makefile || die "sed failed" |
123 |
@@ -274,6 +288,9 @@ src_install() { |
124 |
insinto /usr/share/${PN}/gitweb |
125 |
doins "${S}"/gitweb/gitweb.cgi |
126 |
doins "${S}"/gitweb/gitweb.css |
127 |
+ js=gitweb.js |
128 |
+ [ -f "${S}"/gitweb/gitweb.min.js ] && js=gitweb.min.js |
129 |
+ doins "${S}"/gitweb/${js} |
130 |
doins "${S}"/gitweb/git-{favicon,logo}.png |
131 |
|
132 |
# Make sure it can run |
133 |
@@ -312,6 +329,14 @@ src_test() { |
134 |
local tests_perl="t5502-quickfetch.sh \ |
135 |
t5512-ls-remote.sh \ |
136 |
t5520-pull.sh" |
137 |
+ # Bug #225601 - t0004 is not suitable for root perm |
138 |
+ # Bug #219839 - t1004 is not suitable for root perm |
139 |
+ # t0001-init.sh - check for init notices EPERM* fails |
140 |
+ local tests_nonroot="t0001-init.sh \ |
141 |
+ t0004-unwritable.sh \ |
142 |
+ t1004-read-tree-m-u-wf.sh \ |
143 |
+ t3700-add.sh \ |
144 |
+ t7300-clean.sh" |
145 |
|
146 |
# Unzip is used only for the testcase code, not by any normal parts of Git. |
147 |
if ! has_version app-arch/unzip ; then |
148 |
@@ -327,9 +352,8 @@ src_test() { |
149 |
ewarn "You should retest with FEATURES=userpriv!" |
150 |
disabled="${disabled} ${tests_cvs}" |
151 |
fi |
152 |
- # Bug #225601 - t0004 is not suitable for root perm |
153 |
- # Bug #219839 - t1004 is not suitable for root perm |
154 |
- disabled="${disabled} t0004-unwritable.sh t1004-read-tree-m-u-wf.sh" |
155 |
+ einfo "Skipping other tests that require being non-root" |
156 |
+ disabled="${disabled} ${tests_nonroot}" |
157 |
else |
158 |
[[ $cvs -gt 0 ]] && \ |
159 |
has_version dev-util/cvs && \ |
160 |
|
161 |
|
162 |
|
163 |
1.1 dev-util/git/git-1.6.6-r1.ebuild |
164 |
|
165 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-1.6.6-r1.ebuild?rev=1.1&view=markup |
166 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-1.6.6-r1.ebuild?rev=1.1&content-type=text/plain |
167 |
|
168 |
Index: git-1.6.6-r1.ebuild |
169 |
=================================================================== |
170 |
# Copyright 1999-2009 Gentoo Foundation |
171 |
# Distributed under the terms of the GNU General Public License v2 |
172 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-1.6.6-r1.ebuild,v 1.1 2009/12/26 00:10:34 robbat2 Exp $ |
173 |
|
174 |
EAPI=2 |
175 |
|
176 |
inherit toolchain-funcs eutils elisp-common perl-module bash-completion |
177 |
[ "$PV" == "9999" ] && inherit git |
178 |
|
179 |
MY_PV="${PV/_rc/.rc}" |
180 |
MY_P="${PN}-${MY_PV}" |
181 |
|
182 |
DOC_VER=${MY_PV} |
183 |
|
184 |
DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team" |
185 |
HOMEPAGE="http://www.git-scm.com/" |
186 |
if [ "$PV" != "9999" ]; then |
187 |
SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2 |
188 |
mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2 |
189 |
doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )" |
190 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
191 |
else |
192 |
SRC_URI="" |
193 |
EGIT_BRANCH="master" |
194 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" |
195 |
# EGIT_REPO_URI="http://www.kernel.org/pub/scm/git/git.git" |
196 |
KEYWORDS="" |
197 |
fi |
198 |
|
199 |
LICENSE="GPL-2" |
200 |
SLOT="0" |
201 |
IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl ppcsha1 tk +threads +webdav xinetd cvs subversion" |
202 |
|
203 |
# Common to both DEPEND and RDEPEND |
204 |
CDEPEND=" |
205 |
!blksha1? ( dev-libs/openssl ) |
206 |
sys-libs/zlib |
207 |
perl? ( dev-lang/perl ) |
208 |
tk? ( dev-lang/tk ) |
209 |
curl? ( |
210 |
net-misc/curl |
211 |
webdav? ( dev-libs/expat ) |
212 |
) |
213 |
emacs? ( virtual/emacs )" |
214 |
|
215 |
RDEPEND="${CDEPEND} |
216 |
perl? ( dev-perl/Error |
217 |
dev-perl/Net-SMTP-SSL |
218 |
dev-perl/Authen-SASL |
219 |
cgi? ( virtual/perl-CGI ) |
220 |
cvs? ( >=dev-util/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite ) |
221 |
subversion? ( dev-util/subversion[-dso] dev-perl/libwww-perl dev-perl/TermReadKey ) |
222 |
) |
223 |
gtk? |
224 |
( |
225 |
>=dev-python/pygtk-2.8 |
226 |
|| ( dev-python/pygtksourceview:2 dev-python/gtksourceview-python ) |
227 |
)" |
228 |
|
229 |
# This is how info docs are created with Git: |
230 |
# .txt/asciidoc --(asciidoc)---------> .xml/docbook |
231 |
# .xml/docbook --(docbook2texi.pl)--> .texi |
232 |
# .texi --(makeinfo)---------> .info |
233 |
DEPEND="${CDEPEND} |
234 |
app-arch/cpio |
235 |
doc? ( |
236 |
app-text/asciidoc |
237 |
app-text/docbook2X |
238 |
sys-apps/texinfo |
239 |
)" |
240 |
|
241 |
# Live ebuild builds HTML docs, additionally |
242 |
if [ "$PV" == "9999" ]; then |
243 |
DEPEND="${DEPEND} |
244 |
doc? ( |
245 |
app-text/xmlto |
246 |
)" |
247 |
fi |
248 |
|
249 |
SITEFILE=50${PN}-gentoo.el |
250 |
S="${WORKDIR}/${MY_P}" |
251 |
|
252 |
pkg_setup() { |
253 |
if ! use perl ; then |
254 |
use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi" |
255 |
use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs" |
256 |
use subversion && ewarn "git-svn needs USE=perl, it won't work" |
257 |
fi |
258 |
if use webdav && ! use curl ; then |
259 |
ewarn "USE=webdav needs USE=curl. Ignoring" |
260 |
fi |
261 |
if use subversion && has_version dev-util/subversion && built_with_use --missing false dev-util/subversion dso ; then |
262 |
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" |
263 |
ewarn "with USE=dso, there may be weird crashes in git-svn. You" |
264 |
ewarn "have been warned." |
265 |
fi |
266 |
} |
267 |
|
268 |
# This is needed because for some obscure reasons future calls to make don't |
269 |
# pick up these exports if we export them in src_unpack() |
270 |
exportmakeopts() { |
271 |
local myopts |
272 |
|
273 |
if use blksha1 ; then |
274 |
myopts="${myopts} BLK_SHA1=YesPlease" |
275 |
elif use ppcsha1 ; then |
276 |
myopts="${myopts} PPC_SHA1=YesPlease" |
277 |
fi |
278 |
|
279 |
if use curl ; then |
280 |
use webdav || myopts="${myopts} NO_EXPAT=YesPlease" |
281 |
else |
282 |
myopts="${myopts} NO_CURL=YesPlease" |
283 |
fi |
284 |
|
285 |
use iconv \ |
286 |
|| myopts="${myopts} NO_ICONV=YesPlease" |
287 |
use tk \ |
288 |
|| myopts="${myopts} NO_TCLTK=YesPlease" |
289 |
use perl \ |
290 |
&& myopts="${myopts} INSTALLDIRS=vendor" \ |
291 |
|| myopts="${myopts} NO_PERL=YesPlease" |
292 |
use threads \ |
293 |
&& myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" |
294 |
use subversion \ |
295 |
|| myopts="${myopts} NO_SVN_TESTS=YesPlease" |
296 |
|
297 |
has_version '>=app-text/asciidoc-8.0' \ |
298 |
&& myopts="${myopts} ASCIIDOC8=YesPlease" |
299 |
myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease" |
300 |
|
301 |
# Bug 290465: |
302 |
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' |
303 |
[[ "${CHOST}" == *-uclibc* ]] && \ |
304 |
myopts="${myopts} NO_NSEC=YesPlease" |
305 |
|
306 |
export MY_MAKEOPTS="${myopts}" |
307 |
} |
308 |
|
309 |
src_unpack() { |
310 |
if [ "${PV}" != "9999" ]; then |
311 |
unpack ${MY_P}.tar.bz2 |
312 |
cd "${S}" |
313 |
unpack ${PN}-manpages-${DOC_VER}.tar.bz2 |
314 |
use doc && \ |
315 |
cd "${S}"/Documentation && \ |
316 |
unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2 |
317 |
cd "${S}" |
318 |
else |
319 |
git_src_unpack |
320 |
cd "${S}" |
321 |
#cp "${FILESDIR}"/GIT-VERSION-GEN . |
322 |
fi |
323 |
|
324 |
} |
325 |
|
326 |
src_prepare() { |
327 |
# Noperl is being merged to upstream as of 2009/04/05 |
328 |
#epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch |
329 |
|
330 |
# GetOpt-Long v2.38 is strict |
331 |
# Merged in 1.6.3 final 2009/05/07 |
332 |
#epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch |
333 |
|
334 |
# JS install fixup |
335 |
epatch "${FILESDIR}"/git-1.6.6-always-install-js.patch |
336 |
|
337 |
sed -i \ |
338 |
-e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ |
339 |
-e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ |
340 |
-e 's:^\(CC = \).*$:\1$(OPTCC):' \ |
341 |
-e 's:^\(AR = \).*$:\1$(OPTAR):' \ |
342 |
Makefile || die "sed failed" |
343 |
|
344 |
# Never install the private copy of Error.pm (bug #296310) |
345 |
sed -i \ |
346 |
-e '/private-Error.pm/s,^,#,' \ |
347 |
perl/Makefile.PL |
348 |
|
349 |
# Fix docbook2texi command |
350 |
sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \ |
351 |
Documentation/Makefile || die "sed failed" |
352 |
|
353 |
} |
354 |
|
355 |
git_emake() { |
356 |
emake ${MY_MAKEOPTS} \ |
357 |
DESTDIR="${D}" \ |
358 |
OPTCFLAGS="${CFLAGS}" \ |
359 |
OPTLDFLAGS="${LDFLAGS}" \ |
360 |
OPTCC="$(tc-getCC)" \ |
361 |
OPTAR="$(tc-getAR)" \ |
362 |
prefix=/usr \ |
363 |
htmldir=/usr/share/doc/${PF}/html \ |
364 |
"$@" |
365 |
} |
366 |
|
367 |
src_configure() { |
368 |
exportmakeopts |
369 |
} |
370 |
|
371 |
src_compile() { |
372 |
git_emake || die "emake failed" |
373 |
|
374 |
if use emacs ; then |
375 |
elisp-compile contrib/emacs/git{,-blame}.el \ |
376 |
|| die "emacs modules failed" |
377 |
fi |
378 |
|
379 |
if use perl && use cgi ; then |
380 |
git_emake \ |
381 |
gitweb/gitweb.cgi \ |
382 |
|| die "emake gitweb/gitweb.cgi failed" |
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 |
|
401 |
src_install() { |
402 |
git_emake \ |
403 |
install || \ |
404 |
die "make install failed" |
405 |
|
406 |
doman man?/*.[157] Documentation/*.[157] |
407 |
|
408 |
dodoc README Documentation/{SubmittingPatches,CodingGuidelines} |
409 |
use doc && dodir /usr/share/doc/${PF}/html |
410 |
for d in / /howto/ /technical/ ; do |
411 |
docinto ${d} |
412 |
dodoc Documentation${d}*.txt |
413 |
use doc && dohtml -p ${d} Documentation${d}*.html |
414 |
done |
415 |
docinto / |
416 |
# Upstream does not ship this pre-built :-( |
417 |
use doc && doinfo Documentation/{git,gitman}.info |
418 |
|
419 |
dobashcompletion contrib/completion/git-completion.bash ${PN} |
420 |
|
421 |
if use emacs ; then |
422 |
elisp-install ${PN} contrib/emacs/git.{el,elc} || die |
423 |
elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die |
424 |
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die |
425 |
# don't add automatically to the load-path, so the sitefile |
426 |
# can do a conditional loading |
427 |
touch "${D}${SITELISP}/${PN}/compat/.nosearch" |
428 |
elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die |
429 |
fi |
430 |
|
431 |
if use gtk ; then |
432 |
dobin "${S}"/contrib/gitview/gitview |
433 |
dodoc "${S}"/contrib/gitview/gitview.txt |
434 |
fi |
435 |
|
436 |
dobin contrib/fast-import/git-p4 |
437 |
dodoc contrib/fast-import/git-p4.txt |
438 |
newbin contrib/fast-import/import-tars.perl import-tars |
439 |
|
440 |
dodir /usr/share/${PN}/contrib |
441 |
# The following are excluded: |
442 |
# svnimport - use git-svn |
443 |
# p4import - excluded because fast-import has a better one |
444 |
# examples - these are stuff that is not used in Git anymore actually |
445 |
# patches - stuff the Git guys made to go upstream to other places |
446 |
for i in continuous fast-import hg-to-git \ |
447 |
hooks remotes2config.sh stats \ |
448 |
workdir convert-objects blameview ; do |
449 |
cp -rf \ |
450 |
"${S}"/contrib/${i} \ |
451 |
"${D}"/usr/share/${PN}/contrib \ |
452 |
|| die "Failed contrib ${i}" |
453 |
done |
454 |
|
455 |
if use perl && use cgi ; then |
456 |
dodir /usr/share/${PN}/gitweb |
457 |
insinto /usr/share/${PN}/gitweb |
458 |
doins "${S}"/gitweb/gitweb.cgi |
459 |
doins "${S}"/gitweb/gitweb.css |
460 |
js=gitweb.js |
461 |
[ -f "${S}"/gitweb/gitweb.min.js ] && js=gitweb.min.js |
462 |
doins "${S}"/gitweb/${js} |
463 |
doins "${S}"/gitweb/git-{favicon,logo}.png |
464 |
|
465 |
# Make sure it can run |
466 |
fperms 0755 /usr/share/${PN}/gitweb/gitweb.cgi |
467 |
|
468 |
# INSTALL discusses configuration issues, not just installation |
469 |
docinto / |
470 |
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb |
471 |
newdoc "${S}"/gitweb/README README.gitweb |
472 |
|
473 |
find "${D}"/usr/lib64/perl5/ \ |
474 |
-name .packlist \ |
475 |
-exec rm \{\} \; |
476 |
fi |
477 |
if ! use subversion ; then |
478 |
rm -f "${D}"/usr/libexec/git-core/git-svn \ |
479 |
"${D}"/usr/share/man/man1/git-svn.1* |
480 |
fi |
481 |
|
482 |
if use xinetd ; then |
483 |
insinto /etc/xinetd.d |
484 |
newins "${FILESDIR}"/git-daemon.xinetd git-daemon |
485 |
fi |
486 |
|
487 |
newinitd "${FILESDIR}"/git-daemon.initd git-daemon |
488 |
newconfd "${FILESDIR}"/git-daemon.confd git-daemon |
489 |
|
490 |
fixlocalpod |
491 |
} |
492 |
|
493 |
src_test() { |
494 |
local disabled="" |
495 |
local tests_cvs="t9200-git-cvsexportcommit.sh \ |
496 |
t9400-git-cvsserver-server.sh \ |
497 |
t9600-cvsimport.sh" |
498 |
local tests_perl="t5502-quickfetch.sh \ |
499 |
t5512-ls-remote.sh \ |
500 |
t5520-pull.sh" |
501 |
# Bug #225601 - t0004 is not suitable for root perm |
502 |
# Bug #219839 - t1004 is not suitable for root perm |
503 |
# t0001-init.sh - check for init notices EPERM* fails |
504 |
local tests_nonroot="t0001-init.sh \ |
505 |
t0004-unwritable.sh \ |
506 |
t1004-read-tree-m-u-wf.sh \ |
507 |
t3700-add.sh \ |
508 |
t7300-clean.sh" |
509 |
|
510 |
# Unzip is used only for the testcase code, not by any normal parts of Git. |
511 |
if ! has_version app-arch/unzip ; then |
512 |
einfo "Disabling tar-tree tests" |
513 |
disabled="${disabled} t5000-tar-tree.sh" |
514 |
fi |
515 |
|
516 |
cvs=0 |
517 |
use cvs && let cvs=$cvs+1 |
518 |
if [[ ${EUID} -eq 0 ]]; then |
519 |
if [[ $cvs -eq 1 ]]; then |
520 |
ewarn "Skipping CVS tests because CVS does not work as root!" |
521 |
ewarn "You should retest with FEATURES=userpriv!" |
522 |
disabled="${disabled} ${tests_cvs}" |
523 |
fi |
524 |
einfo "Skipping other tests that require being non-root" |
525 |
disabled="${disabled} ${tests_nonroot}" |
526 |
else |
527 |
[[ $cvs -gt 0 ]] && \ |
528 |
has_version dev-util/cvs && \ |
529 |
let cvs=$cvs+1 |
530 |
[[ $cvs -gt 1 ]] && \ |
531 |
built_with_use dev-util/cvs server && \ |
532 |
let cvs=$cvs+1 |
533 |
if [[ $cvs -lt 3 ]]; then |
534 |
einfo "Disabling CVS tests (needs dev-util/cvs[USE=server])" |
535 |
disabled="${disabled} ${tests_cvs}" |
536 |
fi |
537 |
fi |
538 |
|
539 |
if ! use perl ; then |
540 |
einfo "Disabling tests that need Perl" |
541 |
disabled="${disabled} ${tests_perl}" |
542 |
fi |
543 |
|
544 |
# Reset all previously disabled tests |
545 |
cd "${S}/t" |
546 |
for i in *.sh.DISABLED ; do |
547 |
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" |
548 |
done |
549 |
einfo "Disabled tests:" |
550 |
for i in ${disabled} ; do |
551 |
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" |
552 |
done |
553 |
cd "${S}" |
554 |
# Now run the tests |
555 |
einfo "Start test run" |
556 |
git_emake \ |
557 |
test || die "tests failed" |
558 |
} |
559 |
|
560 |
showpkgdeps() { |
561 |
local pkg=$1 |
562 |
shift |
563 |
elog " $(printf "%-17s:" ${pkg}) ${@}" |
564 |
} |
565 |
|
566 |
pkg_postinst() { |
567 |
use emacs && elisp-site-regen |
568 |
if use subversion && has_version dev-util/subversion && ! built_with_use --missing false dev-util/subversion perl ; then |
569 |
ewarn "You must build dev-util/subversion with USE=perl" |
570 |
ewarn "to get the full functionality of git-svn!" |
571 |
fi |
572 |
elog "These additional scripts need some dependencies:" |
573 |
echo |
574 |
showpkgdeps git-quiltimport "dev-util/quilt" |
575 |
showpkgdeps git-instaweb \ |
576 |
"|| ( www-servers/lighttpd www-servers/apache )" |
577 |
echo |
578 |
} |
579 |
|
580 |
pkg_postrm() { |
581 |
use emacs && elisp-site-regen |
582 |
} |