summaryrefslogtreecommitdiff
blob: c771e66f57fada30c4c00fd0bb104ed02ec740ec (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-office/rabbit/rabbit-1.0.6.ebuild,v 1.1 2012/05/08 17:13:01 graaff Exp $

EAPI=4
USE_RUBY="ruby18"

inherit ruby-ng elisp-common eutils

DESCRIPTION="An application to do presentation with RD document"
HOMEPAGE="http://rabbit-shockers.org/"
SRC_URI="http://rabbit-shockers.org/download/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="nls gs migemo tgif enscript emacs markdown"

CDEPEND="emacs? ( virtual/emacs )"
DEPEND="${DEPEND} ${CDEPEND}"
RDEPEND="${RDEPEND} ${CDEPEND}
	nls? ( dev-ruby/ruby-gettext )
	gs? ( app-text/ghostscript-gpl )
	migemo? ( app-text/migemo )
	enscript? ( app-text/enscript )
	tgif? ( media-gfx/tgif )"

ruby_add_rdepend "
	>=dev-ruby/coderay-1.0.0
	>=dev-ruby/ruby-gdkpixbuf2-0.15.0
	dev-ruby/ruby-gtk2
	dev-ruby/ruby-poppler
	>=dev-ruby/ruby-rsvg-1.0.3
	dev-ruby/rdtool
	dev-ruby/haml
	markdown? ( dev-ruby/kramdown )
	dev-ruby/sinatra
	enscript? ( dev-ruby/nokogiri )
	emacs? ( dev-ruby/nokogiri ) "

each_ruby_configure() {
	${RUBY} setup.rb config --prefix=/usr || die
	${RUBY} setup.rb setup || die
}

all_ruby_compile() {
	if use emacs; then
		cd "${S}/misc/emacs"
		elisp-compile rabbit-mode.el
	fi
}

each_ruby_install() {
	${RUBY} setup.rb install --prefix="${D}"
}

all_ruby_install() {
	dodoc -r doc

	if use emacs; then
		cd "${S}/misc/emacs"
		elisp-install rabbit-mode rabbit-mode.el{,c}
		elisp-site-file-install "${FILESDIR}/50rabbit-mode-gentoo.el"
	fi

	insinto /usr/share/doc/${PF}
	doins -r sample
}

pkg_postinst() {
	use emacs && elisp-site-regen
}

pkg_postrm() {
	use emacs && elisp-site-regen
}