summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/build/smb_build/env.pm5
-rw-r--r--source4/build/smb_build/makefile.pm16
2 files changed, 15 insertions, 6 deletions
diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm
index 1466a8679c..eb798f5ad0 100644
--- a/source4/build/smb_build/env.pm
+++ b/source4/build/smb_build/env.pm
@@ -53,9 +53,9 @@ sub _set_config($$)
$self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
}
-sub PkgConfig($$$$$$$$$$$)
+sub PkgConfig($$$$$$$$$$$$)
{
- my ($self,$path,$name,$libs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
+ my ($self,$path,$name,$libs,$privlibs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
print __FILE__.": creating $path\n";
@@ -83,6 +83,7 @@ sub PkgConfig($$$$$$$$$$$)
print OUT "Requires.private: $privdep\n" if defined($privdep);
print OUT "Version: $version\n";
print OUT "Libs: $libs\n";
+ print OUT "Libs.private: $privlibs\n" if (defined($privlibs));
print OUT "Cflags: -I\${includedir} $cflags\n";
close(OUT);
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 63bf3c0916..3d5b5223d5 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -411,6 +411,7 @@ sub PkgConfig($$$)
my $pubs;
my $privs;
+ my $privlibs;
if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
@@ -425,12 +426,17 @@ sub PkgConfig($$$)
if (defined($ctx->{PRIVATE_DEPENDENCIES})) {
foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) {
- next unless ($other->{$_}->{TYPE} eq "LIBRARY");
+ if ($other->{$_}->{TYPE} eq "LIBRARY") {
+ s/^LIB//g;
+ $_ = lc($_);
- s/^LIB//g;
- $_ = lc($_);
+ $privs .= "$_ ";
+ } else {
+ s/^LIB//g;
+ $_ = lc($_);
- $privs .= "$_ ";
+ $privlibs .= "-l$_ ";
+ }
}
}
@@ -438,6 +444,7 @@ sub PkgConfig($$$)
$path,
$link_name,
"-L\${libdir} -l$link_name",
+ $privlibs,
"",
"$ctx->{VERSION}",
$ctx->{DESCRIPTION},
@@ -455,6 +462,7 @@ sub PkgConfig($$$)
"bin/pkgconfig/$link_name-uninstalled.pc",
$link_name,
"-Lbin/shared -Lbin/static -l$link_name",
+ $privlibs,
"-I. -Iinclude -Ilib -Ilib/replace",
"$ctx->{VERSION}",
$ctx->{DESCRIPTION},