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-util/git: ChangeLog git-1.6.2.2.ebuild
Date: Fri, 03 Apr 2009 06:15:11
Message-Id: E1LpcgH-0007J7-70@stork.gentoo.org
1 robbat2 09/04/03 06:15:09
2
3 Modified: ChangeLog
4 Added: git-1.6.2.2.ebuild
5 Log:
6 Version bump, also fixes bug #237210 for Emacs users.
7 (Portage version: 2.2_rc27/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.326 dev-util/git/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?rev=1.326&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?rev=1.326&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/ChangeLog?r1=1.325&r2=1.326
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v
19 retrieving revision 1.325
20 retrieving revision 1.326
21 diff -p -w -b -B -u -u -r1.325 -r1.326
22 --- ChangeLog 3 Apr 2009 06:12:33 -0000 1.325
23 +++ ChangeLog 3 Apr 2009 06:15:09 -0000 1.326
24 @@ -1,6 +1,11 @@
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.325 2009/04/03 06:12:33 robbat2 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.326 2009/04/03 06:15:09 robbat2 Exp $
29 +
30 +*git-1.6.2.2 (03 Apr 2009)
31 +
32 + 03 Apr 2009; Robin H. Johnson <robbat2@g.o> +git-1.6.2.2.ebuild:
33 + Version bump, also fixes bug #237210 for Emacs users.
34
35 03 Apr 2009; Robin H. Johnson <robbat2@g.o>
36 files/20090305-git-1.6.2-noperl.patch:
37
38
39
40 1.1 dev-util/git/git-1.6.2.2.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-1.6.2.2.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/git-1.6.2.2.ebuild?rev=1.1&content-type=text/plain
44
45 Index: git-1.6.2.2.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-1.6.2.2.ebuild,v 1.1 2009/04/03 06:15:09 robbat2 Exp $
50
51 EAPI=2
52
53 inherit toolchain-funcs eutils elisp-common perl-module bash-completion
54
55 MY_PV="${PV/_rc/.rc}"
56 MY_P="${PN}-${MY_PV}"
57
58 DOC_VER=${MY_PV}
59
60 DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
61 HOMEPAGE="http://www.git-scm.com/"
62 SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2
63 mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2
64 doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )"
65
66 LICENSE="GPL-2"
67 SLOT="0"
68 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
69 IUSE="curl cgi doc emacs gtk iconv mozsha1 perl ppcsha1 tk threads webdav xinetd cvs subversion"
70
71 DEPEND="
72 !app-misc/git
73 dev-libs/openssl
74 sys-libs/zlib
75 app-arch/cpio
76 perl? ( dev-lang/perl )
77 tk? ( dev-lang/tk )
78 curl? (
79 net-misc/curl
80 webdav? ( dev-libs/expat )
81 )
82 emacs? ( virtual/emacs )"
83
84 RDEPEND="${DEPEND}
85 perl? ( dev-perl/Error
86 dev-perl/Net-SMTP-SSL
87 dev-perl/Authen-SASL
88 cgi? ( virtual/perl-CGI )
89 cvs? ( >=dev-util/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
90 subversion? ( dev-util/subversion[-dso] dev-perl/libwww-perl dev-perl/TermReadKey )
91 )
92 gtk? ( >=dev-python/pygtk-2.8 )"
93
94 SITEFILE=50${PN}-gentoo.el
95 S="${WORKDIR}/${MY_P}"
96
97 pkg_setup() {
98 if ! use perl ; then
99 use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi"
100 use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs"
101 use subversion && ewarn "git-svn needs USE=perl, it won't work"
102 fi
103 if use webdav && ! use curl ; then
104 ewarn "USE=webdav needs USE=curl. Ignoring"
105 fi
106 if use subversion && has_version dev-util/subversion && built_with_use --missing false dev-util/subversion dso ; then
107 ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
108 ewarn "with USE=dso, there may be weird crashes in git-svn. You"
109 ewarn "have been warned."
110 fi
111 }
112
113 # This is needed because for some obscure reasons future calls to make don't
114 # pick up these exports if we export them in src_unpack()
115 exportmakeopts() {
116 local myopts
117
118 if use mozsha1 ; then
119 myopts="${myopts} MOZILLA_SHA1=YesPlease"
120 elif use ppcsha1 ; then
121 myopts="${myopts} PPC_SHA1=YesPlease"
122 fi
123
124 if use curl ; then
125 use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
126 else
127 myopts="${myopts} NO_CURL=YesPlease"
128 fi
129
130 use iconv || myopts="${myopts} NO_ICONV=YesPlease"
131 use tk || myopts="${myopts} NO_TCLTK=YesPlease"
132 use perl || myopts="${myopts} NO_PERL=YesPlease"
133 use threads && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
134 use subversion || myopts="${myopts} NO_SVN_TESTS=YesPlease"
135
136 export MY_MAKEOPTS="${myopts}"
137 }
138
139 src_unpack() {
140 unpack ${MY_P}.tar.bz2
141 cd "${S}"
142 unpack ${PN}-manpages-${DOC_VER}.tar.bz2
143 use doc && \
144 cd "${S}"/Documentation && \
145 unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2
146 cd "${S}"
147
148 epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch
149
150 sed -i \
151 -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
152 -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
153 -e 's:^\(CC = \).*$:\1$(OPTCC):' \
154 -e 's:^\(AR = \).*$:\1$(OPTAR):' \
155 Makefile || die "sed failed"
156 }
157
158 git_emake() {
159 emake ${MY_MAKEOPTS} \
160 DESTDIR="${D}" \
161 OPTCFLAGS="${CFLAGS}" \
162 OPTLDFLAGS="${LDFLAGS}" \
163 OPTCC="$(tc-getCC)" \
164 OPTAR="$(tc-getAR)" \
165 prefix=/usr \
166 htmldir=/usr/share/doc/${PF}/html \
167 "$@"
168 }
169
170 src_configure() {
171 exportmakeopts
172 }
173
174 src_compile() {
175 git_emake || die "emake failed"
176
177 if use emacs ; then
178 elisp-compile contrib/emacs/git.el || die "emacs modules failed"
179 fi
180 if use perl && use cgi ; then
181 git_emake \
182 gitweb/gitweb.cgi || die "emake gitweb/gitweb.cgi failed"
183 fi
184 }
185
186 src_install() {
187 git_emake \
188 install || \
189 die "make install failed"
190
191 doman man?/*
192
193 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
194 use doc && dodir /usr/share/doc/${PF}/html
195 for d in / /howto/ /technical/ ; do
196 docinto ${d}
197 dodoc Documentation${d}*.txt
198 use doc && dohtml -p ${d} Documentation${d}*.html
199 done
200 docinto /
201
202 dobashcompletion contrib/completion/git-completion.bash ${PN}
203
204 if use emacs ; then
205 elisp-install ${PN} contrib/emacs/git.{el,elc} || die
206 elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
207 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
208 # don't add automatically to the load-path, so the sitefile
209 # can do a conditional loading
210 touch "${D}${SITELISP}/${PN}/compat/.nosearch"
211 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
212 fi
213
214 if use gtk ; then
215 dobin "${S}"/contrib/gitview/gitview
216 dodoc "${S}"/contrib/gitview/gitview.txt
217 fi
218
219 dobin contrib/fast-import/git-p4
220 dodoc contrib/fast-import/git-p4.txt
221 newbin contrib/fast-import/import-tars.perl import-tars
222
223 dodir /usr/share/${PN}/contrib
224 # The following are excluded:
225 # svnimport - use git-svn
226 # p4import - excluded because fast-import has a better one
227 # examples - these are stuff that is not used in Git anymore actually
228 # patches - stuff the Git guys made to go upstream to other places
229 for i in continuous fast-import hg-to-git \
230 hooks remotes2config.sh stats \
231 workdir convert-objects blameview ; do
232 cp -rf \
233 "${S}"/contrib/${i} \
234 "${D}"/usr/share/${PN}/contrib \
235 || die "Failed contrib ${i}"
236 done
237
238 if use perl && use cgi ; then
239 dodir /usr/share/${PN}/gitweb
240 insinto /usr/share/${PN}/gitweb
241 doins "${S}"/gitweb/gitweb.cgi
242 doins "${S}"/gitweb/gitweb.css
243 doins "${S}"/gitweb/git-{favicon,logo}.png
244
245 # Make sure it can run
246 fperms 0755 /usr/share/${PN}/gitweb/gitweb.cgi
247
248 # INSTALL discusses configuration issues, not just installation
249 docinto /
250 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
251 newdoc "${S}"/gitweb/README README.gitweb
252 fi
253 if ! use subversion ; then
254 rm -f "${D}"/usr/libexec/git-core/git-svn \
255 "${D}"/usr/share/man/man1/git-svn.1*
256 fi
257
258 if use xinetd ; then
259 insinto /etc/xinetd.d
260 newins "${FILESDIR}"/git-daemon.xinetd git-daemon
261 fi
262
263 newinitd "${FILESDIR}"/git-daemon.initd git-daemon
264 newconfd "${FILESDIR}"/git-daemon.confd git-daemon
265
266 fixlocalpod
267 }
268
269 src_test() {
270 local disabled=""
271 local tests_cvs="t9200-git-cvsexportcommit.sh \
272 t9400-git-cvsserver-server.sh \
273 t9600-cvsimport.sh"
274 local tests_perl="t5502-quickfetch.sh \
275 t5512-ls-remote.sh \
276 t5520-pull.sh"
277
278 # Unzip is used only for the testcase code, not by any normal parts of Git.
279 if ! has_version app-arch/unzip ; then
280 einfo "Disabling tar-tree tests"
281 disabled="${disabled} t5000-tar-tree.sh"
282 fi
283
284 cvs=0
285 use cvs && let cvs=$cvs+1
286 if ! has userpriv "${FEATURES}"; then
287 if [[ $cvs -eq 1 ]]; then
288 ewarn "Skipping CVS tests because CVS does not work as root!"
289 ewarn "You should retest with FEATURES=userpriv!"
290 disabled="${disabled} ${tests_cvs}"
291 fi
292 # Bug #225601 - t0004 is not suitable for root perm
293 # Bug #219839 - t1004 is not suitable for root perm
294 disabled="${disabled} t0004-unwritable.sh t1004-read-tree-m-u-wf.sh"
295 else
296 [[ $cvs -gt 0 ]] && \
297 has_version dev-util/cvs && \
298 let cvs=$cvs+1
299 [[ $cvs -gt 0 ]] && \
300 built_with_use dev-util/cvs server && \
301 let cvs=$cvs+1
302 if [[ $cvs -lt 3 ]]; then
303 einfo "Disabling CVS tests (needs dev-util/cvs[USE=server])"
304 disabled="${disabled} ${tests_cvs}"
305 fi
306 fi
307
308 if ! use perl ; then
309 einfo "Disabling tests that need Perl"
310 disabled="${disabled} ${tests_perl}"
311 fi
312
313 # Reset all previously disabled tests
314 cd "${S}/t"
315 for i in *.sh.DISABLED ; do
316 [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
317 done
318 einfo "Disabled tests:"
319 for i in ${disabled} ; do
320 [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
321 done
322 cd "${S}"
323 # Now run the tests
324 einfo "Start test run"
325 git_emake \
326 test || die "tests failed"
327 }
328
329 showpkgdeps() {
330 local pkg=$1
331 shift
332 elog " $(printf "%-17s:" ${pkg}) ${@}"
333 }
334
335 pkg_postinst() {
336 use emacs && elisp-site-regen
337 if use subversion && has_version dev-util/subversion && ! built_with_use --missing false dev-util/subversion perl ; then
338 ewarn "You must build dev-util/subversion with USE=perl"
339 ewarn "to get the full functionality of git-svn!"
340 fi
341 elog "These additional scripts need some dependencies:"
342 echo
343 showpkgdeps git-quiltimport "dev-util/quilt"
344 showpkgdeps git-instaweb \
345 "|| ( www-servers/lighttpd www-servers/apache )"
346 echo
347 }
348
349 pkg_postrm() {
350 use emacs && elisp-site-regen
351 }