[Rock-dev] [Autoproj] Defining a custom package type for boost
Sylvain Joyeux
sylvain.joyeux at dfki.de
Wed Sep 12 13:35:37 CEST 2012
>> 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
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
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20120912/b8f48028/attachment.htm
More information about the Rock-dev
mailing list