Stanislav asked me to review. I'm also including the list since other people may also be interested how to handle ruby ebuilds.
On Wed, 2011-06-15 at 22:04 +0000, Stanislav Ochotnicky (sochotnicky)
wrote:
> sochotnicky 11/06/15 22:04:56
>
> Added: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
> Log:
> New ebuild for fromcvs added to the tree. Fixes #173341
>
> EAPI=2
>
> USE_RUBY="ruby18 ree18"
>
> #mercurial after ruby!
> inherit ruby-ng mercurial
>
> MY_PV="${PV#0_pre}"
>
> DESCRIPTION="fromcvs converts cvs to git and hg"
> 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="test"
>
> RUBY_S="${PN}-${PV}"
RUBY_S is only supported in EAPI=4. You are getting away with this
because you are using a custom unpack method.
> RDEPEND="dev-ruby/rcsparse >=dev-ruby/rbtree-0.3.0-r2 dev-vcs/git"
The ruby-ng eclasses frob RDEPEND, so you should always add to it, e.g.
RDEPEND="${RDEPEND} dev-vcs/git"
Also, all ruby dependencies should be handled via ruby_add_rdepend to
ensure that your list in USE_RUBY is properly passed down to the
dependencies:
ruby_add_rdepend "dev-ruby/rcsparse >=dev-ruby/rb-tree-0.3.0-r2"
> # this is a workaround because combination of ruby-ng and mercurial is
> # not working correctly for unpacking
> src_prepare() {
> for rubyv in ${USE_RUBY};do
Missing "all" target.
> mkdir "${WORKDIR}/${rubyv}"
|| die
> cp -prl "${S}" "${WORKDIR}/${rubyv}/${RUBY_S}"
|| die
> done
> }
>
> each_ruby_install() {
> siteruby=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
> insinto ${siteruby}
insinto ruby_rbconfig("sitedir")
> doins *.rb || die "Installation of rb files failes"
Typo.
>
> make_script togit
> make_script tohg
> }
>
> make_script() {
> echo "ruby /usr/$(get_libdir)/ruby/site_ruby/$1.rb \$@" > $1
I'm not sure how this should work? Perhaps you mean something like:
echo "#!/usr/bin/ruby ..."
> dobin $1
|| die, (or use EAPI=4)
signature.asc
Description: This is a digitally signed message part
