blob: 196335a6b1a0c3d0f3397791fe3636df48e6392d (
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
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/fromcvs/fromcvs-0_pre132-r1.ebuild,v 1.2 2011/06/18 10:08:55 sochotnicky Exp $
EAPI=4
USE_RUBY="ruby18 ree18"
#mercurial after ruby!
inherit ruby-ng mercurial
MY_PV="${PV#0_pre}"
DESCRIPTION="fromcvs converts cvs to git, hg or sqlite database"
HOMEPAGE="http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs"
SRC_URI=""
EHG_REPO_URI="http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs"
EHG_REVISION="${MY_PV}"
LICENSE="BSD-4"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+git mercurial sqlite"
RUBY_S="${P}"
# return S to default after ruby-ng has modified it
S="${WORKDIR}/${RUBY_S}"
RDEPEND="${RDEPEND}
git? ( dev-vcs/git )
mercurial? ( dev-vcs/mercurial )"
ruby_add_rdepend "dev-ruby/rcsparse
>=dev-ruby/rbtree-0.3.0-r2
sqlite? ( dev-ruby/sqlite3-ruby )"
src_prepare() {
# prepare scripts that will go into bin
for script in togit.rb tohg.rb todb.rb;do
sed -i '1 i #!/usr/bin/ruby' ${script} || die
mv ${script} ${script%.rb} || die
done
# this is a workaround because combination of ruby-ng and mercurial is
# not working correctly for unpacking
for rubyv in ${USE_RUBY} all;do
mkdir "${WORKDIR}/${rubyv}" || die
cp -prl "${S}" "${WORKDIR}/${rubyv}/${RUBY_S}" || die
done
}
each_ruby_install() {
insinto $(ruby_rbconfig_value 'sitedir')
doins *.rb || die "Installation of rb files failed"
use git && dobin togit
use mercurial && dobin tohg
use sqlite && dobin todb
}
|