/[gentoo-x86]/dev-vcs/git/git-9999.ebuild
Gentoo

Diff of /dev-vcs/git/git-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.6
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v 1.5 2010/08/16 05:47:29 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-9999.ebuild,v 1.6 2010/10/27 07:44:41 robbat2 Exp $
4 4
5EAPI=2 5EAPI=3
6 6
7GENTOO_DEPEND_ON_PERL=no 7GENTOO_DEPEND_ON_PERL=no
8inherit toolchain-funcs eutils elisp-common perl-module bash-completion 8inherit toolchain-funcs eutils elisp-common perl-module bash-completion
9[ "$PV" == "9999" ] && inherit git 9[ "$PV" == "9999" ] && inherit git
10 10
17HOMEPAGE="http://www.git-scm.com/" 17HOMEPAGE="http://www.git-scm.com/"
18if [ "$PV" != "9999" ]; then 18if [ "$PV" != "9999" ]; then
19 SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2 19 SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2
20 mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2 20 mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2
21 doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )" 21 doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )"
22 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" 22 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"
23else 23else
24 SRC_URI="" 24 SRC_URI=""
25 EGIT_BRANCH="master" 25 EGIT_BRANCH="master"
26 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git" 26 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
27 # EGIT_REPO_URI="http://www.kernel.org/pub/scm/git/git.git" 27 # EGIT_REPO_URI="http://www.kernel.org/pub/scm/git/git.git"
28 KEYWORDS="" 28 KEYWORDS="~ppc ~ppc64"
29fi 29fi
30 30
31LICENSE="GPL-2" 31LICENSE="GPL-2"
32SLOT="0" 32SLOT="0"
33IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl ppcsha1 tk +threads +webdav xinetd cvs subversion" 33IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl ppcsha1 tk +threads +webdav xinetd cvs subversion"
112 use webdav || myopts="${myopts} NO_EXPAT=YesPlease" 112 use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
113 else 113 else
114 myopts="${myopts} NO_CURL=YesPlease" 114 myopts="${myopts} NO_CURL=YesPlease"
115 fi 115 fi
116 116
117 # broken assumptions, because of broken build system ...
118 myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
119 myopts="${myopts} INSTALL=install TAR=tar"
120 myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
121 myopts="${myopts} SANE_TOOL_PATH="
122 myopts="${myopts} OLD_ICONV="
123 myopts="${myopts} NO_EXTERNAL_GREP="
124
125 # can't define this to null, since the entire makefile depends on it
126 sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
127
117 use iconv \ 128 use iconv \
129 || einfo "Forcing iconv for ${PVR} due to bugs #321895, #322205."
118 || myopts="${myopts} NO_ICONV=YesPlease" 130 # || myopts="${myopts} NO_ICONV=YesPlease"
131 # because, above, we need to do this unconditionally (no "&& use iconv")
132 use !elibc_glibc && myopts="${myopts} NEEDS_LIBICONV=YesPlease"
133
119 use tk \ 134 use tk \
120 || myopts="${myopts} NO_TCLTK=YesPlease" 135 || myopts="${myopts} NO_TCLTK=YesPlease"
121 use perl \ 136 use perl \
122 && myopts="${myopts} INSTALLDIRS=vendor" \ 137 && myopts="${myopts} INSTALLDIRS=vendor" \
123 || myopts="${myopts} NO_PERL=YesPlease" 138 || myopts="${myopts} NO_PERL=YesPlease"
124 use threads \ 139 use threads \
125 && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" 140 && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
126 use subversion \ 141 use subversion \
127 || myopts="${myopts} NO_SVN_TESTS=YesPlease" 142 || myopts="${myopts} NO_SVN_TESTS=YesPlease"
143# Disabled until ~m68k-mint can be keyworded again
144# if [[ ${CHOST} == *-mint* ]] ; then
145# myopts="${myopts} NO_MMAP=YesPlease"
146# myopts="${myopts} NO_IPV6=YesPlease"
147# myopts="${myopts} NO_STRLCPY=YesPlease"
148# myopts="${myopts} NO_MEMMEM=YesPlease"
149# myopts="${myopts} NO_MKDTEMP=YesPlease"
150# myopts="${myopts} NO_MKSTEMPS=YesPlease"
151# fi
152 if [[ ${CHOST} == ia64-*-hpux* ]]; then
153 myopts="${myopts} NO_NSEC=YesPlease"
154 fi
128 155
129 has_version '>=app-text/asciidoc-8.0' \ 156 has_version '>=app-text/asciidoc-8.0' \
130 && myopts="${myopts} ASCIIDOC8=YesPlease" 157 && myopts="${myopts} ASCIIDOC8=YesPlease"
131 myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease" 158 myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
132 159
162 # GetOpt-Long v2.38 is strict 189 # GetOpt-Long v2.38 is strict
163 # Merged in 1.6.3 final 2009/05/07 190 # Merged in 1.6.3 final 2009/05/07
164 #epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch 191 #epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch
165 192
166 # JS install fixup 193 # JS install fixup
167 epatch "${FILESDIR}"/git-1.7.0-always-install-js.patch 194 epatch "${FILESDIR}"/git-1.7.2-always-install-js.patch
195
196 # USE=-iconv causes segfaults, fixed post 1.7.1
197 # Gentoo bug #321895
198 #epatch "${FILESDIR}"/git-1.7.1-noiconv-segfault-fix.patch
168 199
169 sed -i \ 200 sed -i \
170 -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ 201 -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
171 -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ 202 -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
172 -e 's:^\(CC = \).*$:\1$(OPTCC):' \ 203 -e 's:^\(CC = \).*$:\1$(OPTCC):' \
173 -e 's:^\(AR = \).*$:\1$(OPTAR):' \ 204 -e 's:^\(AR = \).*$:\1$(OPTAR):' \
205 -e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
206 -e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
174 Makefile || die "sed failed" 207 Makefile || die "sed failed"
175 208
176 # Never install the private copy of Error.pm (bug #296310) 209 # Never install the private copy of Error.pm (bug #296310)
177 sed -i \ 210 sed -i \
178 -e '/private-Error.pm/s,^,#,' \ 211 -e '/private-Error.pm/s,^,#,' \
180 213
181 # Fix docbook2texi command 214 # Fix docbook2texi command
182 sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \ 215 sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \
183 Documentation/Makefile || die "sed failed" 216 Documentation/Makefile || die "sed failed"
184 217
218 # bug #318289
219 epatch "${FILESDIR}"/git-1.7.3.2-interix.patch
185} 220}
186 221
187git_emake() { 222git_emake() {
188 emake ${MY_MAKEOPTS} \ 223 emake ${MY_MAKEOPTS} \
189 DESTDIR="${D}" \ 224 DESTDIR="${D}" \
190 OPTCFLAGS="${CFLAGS}" \ 225 OPTCFLAGS="${CFLAGS}" \
191 OPTLDFLAGS="${LDFLAGS}" \ 226 OPTLDFLAGS="${LDFLAGS}" \
192 OPTCC="$(tc-getCC)" \ 227 OPTCC="$(tc-getCC)" \
193 OPTAR="$(tc-getAR)" \ 228 OPTAR="$(tc-getAR)" \
194 prefix=/usr \ 229 prefix="${EPREFIX}"/usr \
195 htmldir=/usr/share/doc/${PF}/html \ 230 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
231 sysconfdir="${EPREFIX}"/etc \
196 "$@" 232 "$@"
197} 233}
198 234
199src_configure() { 235src_configure() {
200 exportmakeopts 236 exportmakeopts
233src_install() { 269src_install() {
234 git_emake \ 270 git_emake \
235 install || \ 271 install || \
236 die "make install failed" 272 die "make install failed"
237 273
238 doman man?/*.[157] Documentation/*.[157] 274 # Depending on the tarball and manual rebuild of the documentation, the
275 # manpages may exist in either OR both of these directories.
276 find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157]
277 find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157]
239 278
240 dodoc README Documentation/{SubmittingPatches,CodingGuidelines} 279 dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
241 use doc && dodir /usr/share/doc/${PF}/html 280 use doc && dodir /usr/share/doc/${PF}/html
242 for d in / /howto/ /technical/ ; do 281 for d in / /howto/ /technical/ ; do
243 docinto ${d} 282 docinto ${d}
254 elisp-install ${PN} contrib/emacs/git.{el,elc} || die 293 elisp-install ${PN} contrib/emacs/git.{el,elc} || die
255 elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die 294 elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
256 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die 295 #elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
257 # don't add automatically to the load-path, so the sitefile 296 # don't add automatically to the load-path, so the sitefile
258 # can do a conditional loading 297 # can do a conditional loading
259 touch "${D}${SITELISP}/${PN}/compat/.nosearch" 298 touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
260 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die 299 elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
261 fi 300 fi
262 301
263 if use gtk ; then 302 if use gtk ; then
264 dobin "${S}"/contrib/gitview/gitview 303 dobin "${S}"/contrib/gitview/gitview
266 fi 305 fi
267 306
268 dobin contrib/fast-import/git-p4 307 dobin contrib/fast-import/git-p4
269 dodoc contrib/fast-import/git-p4.txt 308 dodoc contrib/fast-import/git-p4.txt
270 newbin contrib/fast-import/import-tars.perl import-tars 309 newbin contrib/fast-import/import-tars.perl import-tars
310 newbin contrib/git-resurrect.sh git-resurrect
271 311
272 dodir /usr/share/${PN}/contrib 312 dodir /usr/share/${PN}/contrib
273 # The following are excluded: 313 # The following are excluded:
314 # completion - installed above
315 # emacs - installed above
316 # examples - these are stuff that is not used in Git anymore actually
317 # gitview - installed above
318 # p4import - excluded because fast-import has a better one
319 # patches - stuff the Git guys made to go upstream to other places
274 # svnimport - use git-svn 320 # svnimport - use git-svn
275 # p4import - excluded because fast-import has a better one 321 # thunderbird-patch-inline - fixes thunderbird
276 # examples - these are stuff that is not used in Git anymore actually 322 for i in \
277 # patches - stuff the Git guys made to go upstream to other places 323 blameview buildsystems ciabot continuous convert-objects fast-import \
278 for i in continuous fast-import hg-to-git \ 324 hg-to-git hooks remotes2config.sh remotes2config.sh rerere-train.sh \
279 hooks remotes2config.sh stats \ 325 stats svn-fe vim workdir \
280 workdir convert-objects blameview ; do 326 ; do
281 cp -rf \ 327 cp -rf \
282 "${S}"/contrib/${i} \ 328 "${S}"/contrib/${i} \
283 "${D}"/usr/share/${PN}/contrib \ 329 "${ED}"/usr/share/${PN}/contrib \
284 || die "Failed contrib ${i}" 330 || die "Failed contrib ${i}"
285 done 331 done
286 332
287 if use perl && use cgi ; then 333 if use perl && use cgi ; then
288 dodir /usr/share/${PN}/gitweb
289 insinto /usr/share/${PN}/gitweb 334 exeinto /usr/share/${PN}/gitweb
290 doins "${S}"/gitweb/gitweb.cgi 335 doexe "${S}"/gitweb/gitweb.cgi
336 insinto /usr/share/${PN}/gitweb/static
291 doins "${S}"/gitweb/gitweb.css 337 doins "${S}"/gitweb/static/gitweb.css
292 js=gitweb.js 338 js=gitweb.js
293 [ -f "${S}"/gitweb/gitweb.min.js ] && js=gitweb.min.js 339 [ -f "${S}"/gitweb/static/gitweb.min.js ] && js=gitweb.min.js
294 doins "${S}"/gitweb/${js} 340 doins "${S}"/gitweb/static/${js}
295 doins "${S}"/gitweb/git-{favicon,logo}.png 341 doins "${S}"/gitweb/static/git-{favicon,logo}.png
296
297 # Make sure it can run
298 fperms 0755 /usr/share/${PN}/gitweb/gitweb.cgi
299 342
300 # INSTALL discusses configuration issues, not just installation 343 # INSTALL discusses configuration issues, not just installation
301 docinto / 344 docinto /
302 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb 345 newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
303 newdoc "${S}"/gitweb/README README.gitweb 346 newdoc "${S}"/gitweb/README README.gitweb
304 347
305 find "${D}"/usr/lib64/perl5/ \ 348 find "${ED}"/usr/lib64/perl5/ \
306 -name .packlist \ 349 -name .packlist \
307 -exec rm \{\} \; 350 -exec rm \{\} \;
308 fi 351 fi
309 if ! use subversion ; then 352 if ! use subversion ; then
310 rm -f "${D}"/usr/libexec/git-core/git-svn \ 353 rm -f "${ED}"/usr/libexec/git-core/git-svn \
311 "${D}"/usr/share/man/man1/git-svn.1* 354 "${ED}"/usr/share/man/man1/git-svn.1*
312 fi 355 fi
313 356
314 if use xinetd ; then 357 if use xinetd ; then
315 insinto /etc/xinetd.d 358 insinto /etc/xinetd.d
316 newins "${FILESDIR}"/git-daemon.xinetd git-daemon 359 newins "${FILESDIR}"/git-daemon.xinetd git-daemon

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20