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