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

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


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.


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


More information about the Rock-dev mailing list