Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

77 lines (73 sloc) 3.42 KB
from gub import misc
from gub import repository
from gub import target
from gub import tools
class Libtool (target.AutoBuild):
source = ''
#source = 'git://'
dependencies = ['tools::libtool']
configure_variables = (target.AutoBuild.configure_variables
.replace ('SHELL=', 'CONFIG_SHELL='))
if 'stat' in misc.librestrict ():
configure_command = ('CONFIG_SHELL=%(tools_prefix)s/bin/bash '
'LD_PRELOAD=%(tools_prefix)s/lib/ '
+ target.AutoBuild.configure_command
.replace ('/sh', '/bash')
.replace ('SHELL=', 'CONFIG_SHELL='))
def __init__ (self, settings, source):
target.AutoBuild.__init__ (self, settings, source)
# repository patched in method.
def version_from_VERSION (self):
return '2.2.7'
if isinstance (source, repository.Git):
source.version = misc.bind_method (version_from_VERSION, source)
source._version = '2.2.7'
Libtool.set_sover (self)
if isinstance (self.source, repository.Git):
self.dependencies += ['tools::libtool', 'tools::automake']
def autoupdate (self):
# automagic works, but takes forever
if isinstance (self.source, repository.Git):
self.system ('cd %(srcdir)s && reconfdirs=". libltdl" ./bootstrap')
# target.AutoBuild.autoupdate (self)
def set_sover (self):
# FIXME: how to automate this?
self.so_version = '3'
if self.source._version in ('2.2.4', '2.2.6.a', '2.2.7'):
self.so_version = '7'
subpackage_names = ['devel', 'doc', 'runtime', '']
def get_subpackage_definitions (self):
d = target.AutoBuild.get_subpackage_definitions (self)
d['devel'].append (self.settings.prefix_dir + '/bin/libtool*')
d['devel'].append (self.settings.prefix_dir + '/share/libltdl')
return d
def update_libtool (self):
config_cache_overrides = (target.AutoBuild.config_cache_overrides + '''
class Libtool__darwin (Libtool):
def install (self):
Libtool.install (self)
## necessary for programs that load dynamic modules.
self.dump ("prependdir DYLD_LIBRARY_PATH=$INSTALLER_PREFIX/lib",
class Libtool__tools (tools.AutoBuild, Libtool):
def __init__ (self, settings, source):
tools.AutoBuild.__init__ (self, settings, source)
Libtool.set_sover (self)
update_libtool = tools.AutoBuild.nop
def install (self):
tools.AutoBuild.install (self)
# FIXME: urg. Are we doing something wrong? Why does libtool
# ignore [have /usr prevail over] --prefix ?
self.file_sub ([(' (/usr/lib/*[" ])', r' %(system_prefix)s/lib \1'),
('((-L| )/usr/lib/../lib/* )', r'\2%(system_prefix)s/lib \1')],
if 'stat' in misc.librestrict ():
configure_command = ('SHELL=/bin/bash CONFIG_SHELL=/bin/bash '
+ tools.AutoBuild.configure_command)
Jump to Line
Something went wrong with that request. Please try again.