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

Charles Lesire-Cabaniols charles.lesire at gmail.com
Wed Sep 12 11:02:37 CEST 2012


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

>  On 09/12/2012 10:01 AM, Charles Lesire-Cabaniols wrote:
>
>
>
> 2012/9/12 Sylvain Joyeux <sylvain.joyeux at dfki.de>
>
>>  On 09/11/2012 05:48 PM, Charles Lesire-Cabaniols wrote:
>>
>>> Hi guys,
>>>
>>> I would like autoproj to manage a local install of a specific boost
>>> version one of my packages are depending on.
>>> As boost, uses a specific bootstraph.sh / b2 install process, I would
>>> like to define a specific configure/build process for my boost package.
>>>
>>> I tried redefining functions of an import_package, but it does not have
>>> configure/build methods (only prepare seems relevant).
>>> I then tried to inherit from Configurable and define a BoostPackage as
>>> done in CMake for instance, but without succes.
>>>
>>> Could I have some tips on how to do it right?
>>>
>>  If you want a configure stage, subclassing Configurable is definitely
>> the way to go.
>>
>> Could you send the code you have so far and tell us what is going wrong ?
>>
>
> I have tried to put on my init.rb the following class definition:
>
> require 'autobuild/configurable'
> module Autobuild
>     def self.boost_package(name, &block)
>         BoostPackage.new(name, &block)
>     end
>     class BoostPackage < Configurable
>     def configure
>         Autobuild::Subprocess.run(self, 'configure', './bootstrap.sh',
> "--prefix=#{prefix}")
>     end
>     def build
>         Autobuild::Subprocess.run(self, 'build', './b2 install')
>     end
>     def install; end
>     end
> end
>
> 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?


>
> Sylvain
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20120912/5db2abf2/attachment.htm 


More information about the Rock-dev mailing list