Gentoo Archives: gentoo-commits

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