diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-10-27 02:54:56 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-10-27 05:07:22 +0200 |
commit | 073d3bf1fc8b129ed7cd74b51608e40640b499c5 (patch) | |
tree | 0155e3be0bb29fc4455363fd69331ddc2aa0e5b1 /buildtools/wafsamba | |
parent | a06192b33bf0f046c9ea95ca75c95fad63609c4f (diff) | |
download | samba-073d3bf1fc8b129ed7cd74b51608e40640b499c5.tar.gz samba-073d3bf1fc8b129ed7cd74b51608e40640b499c5.tar.bz2 samba-073d3bf1fc8b129ed7cd74b51608e40640b499c5.zip |
wafsamba: support 'soname' attribute on SAMBA_LIBRARY()
It's sometimes needed to specifiy the soname directly.
metze
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_install.py | 13 | ||||
-rw-r--r-- | buildtools/wafsamba/wafsamba.py | 4 |
2 files changed, 16 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py index 56e979ed53..0d43236d97 100644 --- a/buildtools/wafsamba/samba_install.py +++ b/buildtools/wafsamba/samba_install.py @@ -98,6 +98,10 @@ def install_library(self): if not self.private_library: # only generate the dev link for non-bundled libs dev_link = bld.make_libname(self.target) + elif getattr(self, 'soname', ''): + install_name = bld.make_libname(self.target) + install_link = self.soname + inst_name = bld.make_libname(t.target) else: install_name = bld.make_libname(self.target) install_link = None @@ -119,6 +123,15 @@ def install_library(self): install_name) +@feature('cshlib') +@after('apply_implib') +@before('apply_vnum') +def apply_soname(self): + '''install a library, taking account of the different rpath varients''' + + if self.env.SONAME_ST and getattr(self, 'soname', ''): + self.env.append_value('LINKFLAGS', self.env.SONAME_ST % self.soname) + self.env.SONAME_ST = '' ############################## # handle the creation of links for libraries and binaries in the build tree diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 6ba0f3727c..d19b045da4 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -97,6 +97,7 @@ def SAMBA_LIBRARY(bld, libname, source, header_path=None, pc_files=None, vnum=None, + soname=None, cflags='', external_library=False, realname=None, @@ -170,7 +171,7 @@ def SAMBA_LIBRARY(bld, libname, source, link_name = bld.map_shlib_extension(link_name, python=(target_type=='PYTHON')) # we don't want any public libraries without version numbers - if not private_library and vnum is None and target_type != 'PYTHON' and not realname: + if not private_library and vnum is None and soname is None and target_type != 'PYTHON' and not realname: raise Utils.WafError("public library '%s' must have a vnum" % libname) if target_type == 'PYTHON' or realname or not private_library: @@ -207,6 +208,7 @@ def SAMBA_LIBRARY(bld, libname, source, samba_includes = includes, local_include = local_include, vnum = vnum, + soname = soname, install_path = None, samba_inst_path = install_path, name = libname, |