From 970892594b15b946667e02d2b521cf8a501f2662 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Mar 2010 15:27:54 +1100 Subject: build: override PACKAGE_VERSION in pkg-config generation for libraries we should use the vnum --- buildtools/wafsamba/wafsamba.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'buildtools') diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 291d8acb4b..1ab583fcc9 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -217,7 +217,7 @@ def SAMBA_LIBRARY(bld, libname, source, bld.PUBLIC_HEADERS(public_headers, header_path=header_path) if pc_files is not None: - bld.PKG_CONFIG_FILES(pc_files) + bld.PKG_CONFIG_FILES(pc_files, vnum=vnum) Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY @@ -761,16 +761,18 @@ def subst_at_vars(task): -def PKG_CONFIG_FILES(bld, pc_files): +def PKG_CONFIG_FILES(bld, pc_files, vnum=None): '''install some pkg_config pc files''' dest = '${PKGCONFIGDIR}' dest = bld.EXPAND_VARIABLES(dest) for f in TO_LIST(pc_files): base=os.path.basename(f) - bld.SAMBA_GENERATOR('PKGCONFIG_%s' % base, - rule=subst_at_vars, - source=f+'.in', - target=f) + t = bld.SAMBA_GENERATOR('PKGCONFIG_%s' % base, + rule=subst_at_vars, + source=f+'.in', + target=f) + if vnum: + t.env.PACKAGE_VERSION = vnum INSTALL_FILES(bld, dest, f, flat=True, destname=base) Build.BuildContext.PKG_CONFIG_FILES = PKG_CONFIG_FILES -- cgit