summaryrefslogtreecommitdiff
blob: 04d885bbf6c4140d04763f4d9f03c94a2bd1a62c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rdtool/rdtool-0.6.14-r1.ebuild,v 1.10 2004/10/10 12:19:21 blubb Exp $

IUSE="emacs"

inherit ruby elisp-common

DESCRIPTION="A multipurpose documentation format for Ruby"
HOMEPAGE="http://raa.ruby-lang.org/list.rhtml?name=rdtool"
SRC_URI="http://www2.pos.to/~tosh/ruby/rdtool/archive/${P}.tar.gz"
LICENSE="Ruby GPL-2"
SLOT="0"
KEYWORDS="x86 ~sparc alpha ppc ~amd64"

USE_RUBY="any"

DEPEND="|| ( >=dev-lang/ruby-1.8.0
	( ~dev-lang/ruby-1.6.8 dev-ruby/shim-ruby18 )
		dev-lang/ruby-cvs )
	dev-ruby/amstd
	emacs? ( virtual/emacs )"

src_unpack() {
	unpack ${A}
	cd ${S}
	sed -i -e 's:^BIN_DIR = :&$(DESTDIR):' \
	       -e 's:^SITE_RUBY = :&$(DESTDIR):' rdtoolconf.rb \
		|| die "sed failed"
	mv rdtoolconf.rb extconf.rb
}

src_install() {
	dodir /usr/bin
	ruby_src_install

	if use emacs ; then
		elisp-install . utils/rd-mode.el
		elisp-site-file-install ${FILESDIR}/50rdtool-gentoo.el
	fi
}

pkg_postinst() {

	use emacs && elisp-site-regen
}

pkg_postrm() {

	use emacs && elisp-site-regen
}