summaryrefslogtreecommitdiff
blob: 08ab27bcc42bec9689ef3edad864293706a4188a (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-client/ci/ci-1.1.5.ebuild,v 1.2 2006/10/12 10:13:35 flameeyes Exp $

IUSE=""

DESCRIPTION="C.i. - Compact Interface for 2ch"
HOMEPAGE="http://wids.net/lab/Ci.html"
if [ "${P/_/}" = "${P}" ] ; then
	# normal release
	#MY_P=${PN}.nr${PV%%.*}
	MY_PV=delta${PV##*.}
	MY_P=${PN}.${MY_PV}
	SRC_URI="http://wids.net/archive/Ci/${MY_P}.tar.gz"
else
	# snapshot
	MY_PV=${PV#*_p}
	MY_P=${PN}.snapshot-${MY_PV}
	SRC_URI="http://wids.net/archive/Ci/snapshot/${MY_P}.tar.gz"
fi

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"

DEPEND="virtual/ruby
	=x11-libs/gtk+-1.2*
	>=dev-ruby/ruby-gtk-0.28"
RDEPEND="${DEPEND}
	media-fonts/monafont"

S=${WORKDIR}/Ci-${MY_PV}

src_compile() {

	local rubycmd bindir libdir datadir

	if [ -d /usr/share/migemo ] ; then
		local migemoDict=/usr/share/migemo/migemo-dict
		local migemoDictCache=/usr/share/migemo/migemo-dict.cache
		sed -i -e "/^migemoDict /s|''|'${migemoDict}'|" \
			-e "/^migemoDictCache /s|''|'${migemoDictCache}'|" \
			Ci.rb
	fi
	sed -i -e "/^scriptRoot = ''/s:'':'/usr/share/ci/':" Ci.rb

	sed -i -e "/^rubycmd = ''/s:'':'/usr/bin/ruby':" \
		-e "/^bindir  = ''/s:'':'/usr/bin':" \
		-e "/^libdir  = ''/s:'':'/usr/lib/ruby/site_ruby':" \
		-e "/^datadir = ''/s:'':'/usr/share':" \
		install.rb || die

	ruby install.rb config || die
}

src_install() {

	sed -i -e "/^bindir/s:/usr:${D}/usr:" \
		-e "/^libdir/s:/usr:${D}/usr:" \
		-e "/^datadir/s:/usr:${D}/usr:" \
		install.rb || die
	ruby install.rb install || die

	dosed /usr/lib/ruby/site_ruby/ci/siteconfig.rb || die
	#dosed /usr/lib/ruby/site_ruby/ci/gtkext.rb || die
	dosed /usr/lib/ruby/site_ruby/ci/sitecfg.rb || die

	dodoc Changelog README *.sample doc/*.rd
	cd doc
	dohtml -r .
}