wafsamba: Only install .pc files if libraries are public.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 21 Aug 2011 01:02:58 +0000 (03:02 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 21 Aug 2011 01:22:05 +0000 (03:22 +0200)
buildtools/wafsamba/wafsamba.py
lib/ldb/wscript
lib/talloc/wscript
lib/tdb/wscript
lib/tevent/wscript

index 544b491..338bc3d 100644 (file)
@@ -279,7 +279,7 @@ def SAMBA_LIBRARY(bld, libname, source,
     if link_name:
         t.link_name = link_name
 
-    if pc_files is not None:
+    if pc_files is not None and not private_library:
         bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
 
     if (manpages is not None and 'XSLTPROC_MANPAGES' in bld.env and 
index bf1b4a6..0713464 100755 (executable)
@@ -84,12 +84,8 @@ def build(bld):
 
     if bld.env.standalone_ldb:
         private_library = False
-        ldb_pc_files='ldb.pc'
-        pyldb_pc_files='pyldb-util.pc'
     else:
         private_library = True
-        ldb_pc_files=None
-        pyldb_pc_files=None
 
     LDB_MAP_SRC = bld.SUBDIR('ldb_map',
                              'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c')
@@ -123,7 +119,7 @@ def build(bld):
                           public_headers_install=not private_library,
                           vnum=VERSION,
                           private_library=private_library,
-                          pc_files=pyldb_pc_files,
+                          pc_files='pyldb-util.pc',
                           pyext=True,
                           abi_directory='ABI',
                           abi_match='pyldb_*')
@@ -145,7 +141,7 @@ def build(bld):
                           public_headers='include/ldb.h include/ldb_errors.h '\
                           'include/ldb_module.h include/ldb_handlers.h',
                           public_headers_install=not private_library,
-                          pc_files=ldb_pc_files,
+                          pc_files='ldb.pc',
                           vnum=VERSION,
                           private_library=private_library,
                           manpages='man/ldb.3',
index c43c661..af9a8ff 100644 (file)
@@ -74,7 +74,6 @@ def build(bld):
     if bld.env.standalone_talloc:
         bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
         bld.env.TALLOC_VERSION = VERSION
-        bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION)
         private_library = False
 
         # should we also install the symlink to libtalloc1.so here?
@@ -82,10 +81,8 @@ def build(bld):
                           'compat/talloc_compat1.c',
                           public_deps='talloc',
                           soname='libtalloc.so.1',
+                          pc_files='talloc.pc',
                           enabled=bld.env.TALLOC_COMPAT1)
-
-        if not bld.env.disable_python:
-            bld.PKG_CONFIG_FILES('pytalloc-util.pc', vnum=VERSION)
     else:
         private_library = True
 
@@ -104,7 +101,6 @@ def build(bld):
                           manpages='talloc.3')
 
     if not bld.CONFIG_SET('USING_SYSTEM_PYTALLOC_UTIL') and not bld.env.disable_python:
-
         bld.SAMBA_LIBRARY('pytalloc-util',
             source='pytalloc_util.c',
             public_deps='talloc',
@@ -114,7 +110,8 @@ def build(bld):
             abi_directory='ABI',
             abi_match='pytalloc_*',
             private_library=private_library,
-            public_headers='pytalloc.h'
+            public_headers='pytalloc.h',
+            pc_files='pytalloc-util.pc'
             )
         bld.SAMBA_PYTHON('pytalloc',
                          'pytalloc.c',
index 7cebc88..02f009b 100644 (file)
@@ -65,10 +65,8 @@ def build(bld):
 
     if bld.env.standalone_tdb:
         bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
-        pc_files = 'tdb.pc'
         private_library = False
     else:
-        pc_files = []
         private_library = True
 
     if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
@@ -82,7 +80,7 @@ def build(bld):
                           vnum=VERSION,
                           public_headers='include/tdb.h',
                           public_headers_install=not private_library,
-                          pc_files=pc_files,
+                          pc_files='tdb.pc',
                           private_library=private_library)
 
         bld.SAMBA_BINARY('tdbtorture',
index 68430ea..9c4d4c3 100644 (file)
@@ -70,7 +70,6 @@ def build(bld):
 
     if bld.env.standalone_tevent:
         bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
-        bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION)
         private_library = False
     else:
         private_library = True
@@ -86,6 +85,7 @@ def build(bld):
                           vnum=VERSION,
                           public_headers='tevent.h',
                           public_headers_install=not private_library,
+                          pc_files='tevent.pc',
                           private_library=private_library)
 
     bld.SAMBA_PYTHON('pytevent',