$OpenBSD: patch-buildtools_wafsamba_wafsamba_py,v 1.3 2016/04/22 11:44:48 jca Exp $

- allow the library version to be overriden

--- buildtools/wafsamba/wafsamba.py.orig	Fri Feb 19 22:02:02 2016
+++ buildtools/wafsamba/wafsamba.py	Sun Apr 17 19:28:35 2016
@@ -220,6 +220,12 @@ def SAMBA_LIBRARY(bld, libname, source,
     realname = bld.map_shlib_extension(realname, python=(target_type=='PYTHON'))
     link_name = bld.map_shlib_extension(link_name, python=(target_type=='PYTHON'))
 
+    if vnum is not None:
+        osvnum = os.getenv('LIB' + libname.replace('-', '_') + '_VERSION')
+        if osvnum:
+            print "Setup-specific version for library %s: %s" % (libname, osvnum)
+            vnum = osvnum
+
     # we don't want any public libraries without version numbers
     if (not private_library and target_type != 'PYTHON' and not realname):
         if vnum is None and soname is None:
