[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Tue Oct 26 21:54:01 MDT 2010


The branch, master has been updated
       via  4c634a3 talloc: fix waf build for libtalloc-compat1
       via  073d3bf wafsamba: support 'soname' attribute on SAMBA_LIBRARY()
      from  a06192b waf: sped up the project rules checking

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4c634a3b2e22b45027a1d376573575463a460846
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 27 02:56:10 2010 +0200

    talloc: fix waf build for libtalloc-compat1
    
    We need to use 'libtalloc.so.1' as soname, otherwise the
    compat library is useless.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Wed Oct 27 03:53:21 UTC 2010 on sn-devel-104

commit 073d3bf1fc8b129ed7cd74b51608e40640b499c5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 27 02:54:56 2010 +0200

    wafsamba: support 'soname' attribute on SAMBA_LIBRARY()
    
    It's sometimes needed to specifiy the soname directly.
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/samba_install.py |   13 +++++++++++++
 buildtools/wafsamba/wafsamba.py      |    4 +++-
 lib/talloc/wscript                   |    8 ++++----
 3 files changed, 20 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 56e979e..0d43236 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)
 
 
+ at feature('cshlib')
+ at after('apply_implib')
+ at 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 6ba0f37..d19b045 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,
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 6da1a66..4e5131c 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -80,11 +80,11 @@ def build(bld):
         vnum = VERSION
 
         # should we also install the symlink to libtalloc1.so here?
-        bld.SAMBA_LIBRARY('talloc-compat1',
+        bld.SAMBA_LIBRARY('talloc-compat1-%s' % (VERSION),
                           'compat/talloc_compat1.c',
-                          deps='talloc',
-                          enabled=bld.env.TALLOC_COMPAT1,
-                          vnum=VERSION)
+                          public_deps='talloc',
+                          soname='libtalloc.so.1',
+                          enabled=bld.env.TALLOC_COMPAT1)
 
         if not bld.env.disable_python:
             bld.PKG_CONFIG_FILES('pytalloc-util.pc', vnum=VERSION)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list