gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
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
>
> # 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
I'm not sure how this should work? Perhaps you mean something like:
echo "#!/usr/bin/ruby ..."
> dobin $1
|| die, (or use EAPI=4)
06-18-2011, 10:34 AM
Stanislav Ochotnicky
gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
Excerpts from Hans de Graaff's message of Sat Jun 18 08:16:25 +0200 2011:
> 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.
>
Good to know. Moved to EAPI4, with it few "|| die" things went away.
> > 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"
Fixed
> > # 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.
>
Fixed.
> > mkdir "${WORKDIR}/${rubyv}"
>
> || die
>
> > cp -prl "${S}" "${WORKDIR}/${rubyv}/${RUBY_S}"
>
> || die
>
Fixed on second iteration :-)
> > done
> > }
> >
> > each_ruby_install() {
> > siteruby=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
> > insinto ${siteruby}
>
> insinto ruby_rbconfig("sitedir")
This didn't really work so I used
insinto $(ruby_rbconfig_value 'sitedir')
> > doins *.rb || die "Installation of rb files failes"
>
> Typo.
Fixed
>
> >
> > 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 ..."
>
In the end I fixed up upstream scripts because they had no shebangs and
isntalled them directly without any wrappers. They still use
/usr/bin/ruby where it would be nicer to have specific script for each
ruby version.
> > dobin $1
>
> || die, (or use EAPI=4)
EAPI4 it is
--
Stanislav Ochotnicky
PGP: 7B087241
jabber: stanislav@ochotnicky.com
06-18-2011, 11:14 AM
Petteri Räty
gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
On 18.06.2011 09:16, Hans de Graaff wrote:
>
>> 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"
>
This stacking is automatically handled by the package manager.
Regards,
Petteri
06-19-2011, 08:06 AM
Hans de Graaff
gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
On Sat, 2011-06-18 at 14:14 +0300, Petteri Räty wrote:
> On 18.06.2011 09:16, Hans de Graaff wrote:
> >
> >> 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"
> >
>
> This stacking is automatically handled by the package manager.
We also add dependencies to RDEPEND in the eclass and I seem to remember
from previous bug hunting that just setting RDEPEND and/or DEPEND caused
problems with these dependencies disappearing. It's been too long ago so
I don't have details, but if that is considered a bug then I can
probably try to track that down again.
Kind regards,
Hans
06-19-2011, 08:57 AM
Petteri Räty
gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
On 19.06.2011 11:06, Hans de Graaff wrote:
> On Sat, 2011-06-18 at 14:14 +0300, Petteri Räty wrote:
>> On 18.06.2011 09:16, Hans de Graaff wrote:
>>>
>>>> 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"
>>>
>>
>> This stacking is automatically handled by the package manager.
>
> We also add dependencies to RDEPEND in the eclass and I seem to remember
> from previous bug hunting that just setting RDEPEND and/or DEPEND caused
> problems with these dependencies disappearing. It's been too long ago so
> I don't have details, but if that is considered a bug then I can
> probably try to track that down again.
>
> Kind regards,
>
> Hans
Yes it would be a bug. The rules are here:
http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-11600011.2
Regards,
Petteri
06-19-2011, 01:38 PM
Diego Elio Pettenò
gentoo-x86 commit in dev-ruby/fromcvs: metadata.xml ChangeLog fromcvs-0_pre132.ebuild
Il giorno sab, 18/06/2011 alle 14.14 +0300, Petteri Räty ha scritto:
>
> This stacking is automatically handled by the package manager.
No it isn't because the calls to ruby_add_bdepend/ruby_add_rdepend work
on the EBUILD values not the ECLASS ones.
--
Diego Elio Pettenò — Flameeyes
http://blog.flameeyes.eu/