--- /usr/portage/dev-util/git/git-1.3.3.ebuild 2006-05-17 10:04:05.000000000 +0200 +++ /usr/local/portage/dev-util/git/git-1.3.3.ebuild 2006-05-20 17:44:57.000000000 +0200 @@ -1,8 +1,8 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-1.3.3.ebuild,v 1.1 2006/05/17 08:04:05 ferdy Exp $ +# $Header: $ -inherit python toolchain-funcs eutils +inherit python toolchain-funcs eutils elisp-common DOC_VER=${PV} @@ -15,7 +15,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" -IUSE="mozsha1 ppcsha1 doc curl X webdav" +IUSE="mozsha1 ppcsha1 doc curl X webdav emacs" DEPEND="dev-libs/openssl sys-libs/zlib @@ -73,6 +73,9 @@ src_compile() { emake ${MY_MAKEOPTS} prefix=/usr || die "make failed" + if use emacs ; then + elisp-compile contrib/emacs/{,vc-}git.el || die "Emacs modules failed!" + fi } src_install() { @@ -89,6 +92,12 @@ cp -r ${WORKDIR}/${PN}-html-${DOC_VER}/* ${D}/usr/share/doc/${PF}/html fi + if use emacs ; then + insinto "${SITELISP}" + doins contrib/emacs/{,vc-}git.el* + elisp-site-file-install "${FILESDIR}/70git-gentoo.el" + fi + newinitd "${FILESDIR}/git-daemon.initd" git-daemon newconfd "${FILESDIR}/git-daemon.confd" git-daemon } @@ -99,6 +108,7 @@ } pkg_postinst() { + use emacs && elisp-site-regen einfo einfo "If you want to import arch repositories into git, consider using the" einfo "git-archimport command. You should install dev-util/tla before" @@ -113,3 +123,9 @@ einfo "dev-perl/DBI and dev-perl/DBD-SQLite" einfo } + +pkg_postrm() { + # regenerate site-gentoo if we are merged USE=emacs and unmerged + # USE=-emacs + has_version virtual/emacs && elisp-site-regen +}