[Rock-dev] [Autoproj] Defining a custom package type for boost

Charles Lesire-Cabaniols charles.lesire at gmail.com
Wed Sep 12 14:09:12 CEST 2012


2012/9/12 Sylvain Joyeux <sylvain.joyeux at dfki.de>

>
>      But then in my .autobuild file, I guessed that boost_package
>> 'boost1.48' would have worked, but autoproj complains that boost_package
>> does not exist.
>> In source.yml, I have set the archive url for boost1.48.
>>
>>  OK ... You need to have a look in autoproj/autobuild.rb. That is where
>> the package types are made available for autoproj users (in short: you need
>> to define the boost_package method at the toplevel, not on the Autobuild
>> module). This is a bit of a historical thing ...
>>
>
> ok. but I don't find where the ':cmake' package type is defined... how
> should I call package_common to point to the BoostPackage class I have
> defined?
>
> This sucks ... Thanks for pointing it out.
>
> The chain is:
>
>   at toplevel: def cmake_package ... end
>   calls: package_common(:cmake, ...)
>   calls: Autoproj.define(:cmake, options)
>   calls: Autobuild.cmake(options)
>
> So, you do need to define the method on Autobuild (the way you did) and
> then define the boost_package at toplevel, which
>

Could you give me an example with :boost instead of :cmake? Cause cmake is
working, for sure, but when I call package_common(:boost, options), I have
the following error:
ample.autobuild(package_set=rose):43: undefined method `boost' for
Autobuild:Module
  in /home/lesire/work/robotis/autoproj/remotes/rose/init.rb:25:in
`boost_package'
  in /home/lesire/work/robotis/autoproj/remotes/rose/ample.autobuild:43

And I don't know what to put instead...



> In the future, I will change this so that the code gets package classes
> directly (while keeping backward compatibility), which makes a lot more
> sense. Instead of defining your own package type (which is a one-time thing
> ...) you will then be able to directly define the whole package in an
> autobuild file:
>
>   package_common(Autobuild::Configurable, 'boost') do |pkg|
>     def pkg.configure
>        ...
>     end
>     def pkg.build
>        ...
>     end
>   end
>
> Sylvain
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20120912/d7b8594e/attachment.htm 


More information about the Rock-dev mailing list