39 lines
1.7 KiB
Text
39 lines
1.7 KiB
Text
- allow the library version to be overriden
|
|
|
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9774
|
|
|
|
- make sure we don't clobber the version that ends up in tdb.pc
|
|
|
|
Index: buildtools/wafsamba/wafsamba.py
|
|
--- buildtools/wafsamba/wafsamba.py.orig
|
|
+++ buildtools/wafsamba/wafsamba.py
|
|
@@ -278,6 +278,17 @@ def SAMBA_LIBRARY(bld, libname, source,
|
|
# the library itself will depend on that object target
|
|
samba_deps.append(dep_target)
|
|
|
|
+ saved_lib_version = vnum
|
|
+ osvnum = os.getenv('LIB' + libname.replace('-', '_').replace('.', '_') + '_VERSION')
|
|
+ if osvnum:
|
|
+ vnum = osvnum
|
|
+ if realname: realname = re.sub(r'(\.[0-9]+)+$', '.' + osvnum, realname)
|
|
+ if link_name: link_name = re.sub(r'(\.[0-9]+)+$', '.' + osvnum, link_name)
|
|
+ if soname: soname = re.sub(r'(\.[0-9]+)+$', '.' + osvnum, soname)
|
|
+ else:
|
|
+ if vnum is not None and "cpython" in libname:
|
|
+ raise Errors.WafError("No override for %s" % libname)
|
|
+
|
|
realname = bld.map_shlib_extension(realname, python=(target_type=='PYTHON'))
|
|
link_name = bld.map_shlib_extension(link_name, python=(target_type=='PYTHON'))
|
|
|
|
@@ -398,9 +409,9 @@ def SAMBA_LIBRARY(bld, libname, source,
|
|
|
|
if pc_files is not None and not private_library:
|
|
if pyembed:
|
|
- bld.PKG_CONFIG_FILES(pc_files, vnum=vnum, extra_name=bld.env['PYTHON_SO_ABI_FLAG'])
|
|
+ bld.PKG_CONFIG_FILES(pc_files, vnum=saved_lib_version, extra_name=bld.env['PYTHON_SO_ABI_FLAG'])
|
|
else:
|
|
- bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
|
|
+ bld.PKG_CONFIG_FILES(pc_files, vnum=saved_lib_version)
|
|
|
|
if (manpages is not None and 'XSLTPROC_MANPAGES' in bld.env and
|
|
bld.env['XSLTPROC_MANPAGES']):
|