1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-14 01:57:53 +03:00

build: remove support for automatically building .pc files.

This commit is contained in:
Jelmer Vernooij 2008-01-22 18:47:18 +01:00
parent 4b83dc0647
commit e9f9973267
3 changed files with 1 additions and 149 deletions

View File

@ -54,42 +54,6 @@ sub _set_config($$)
$self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
}
sub PkgConfig($$$$$$$$$$$$)
{
my ($self,$path,$name,$libs,$privlibs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
print __FILE__.": creating $path\n";
if ($self->{config}->{libreplace_cv_immediate_structures} eq "yes") {
$cflags .= " -DHAVE_IMMEDIATE_STRUCTURES=1";
}
mkpath(dirname($path),0,0755);
open(OUT, ">$path") or die("Can't open $path: $!");
foreach (@$dirs) {
print OUT "$_\n";
}
if ($hasmodules) {
print OUT "modulesdir=$self->{config}->{modulesdir}/$name\n" ;
}
print OUT "\n";
print OUT "Name: $name\n";
if (defined($desc)) {
print OUT "Description: $desc\n";
}
print OUT "Requires: $pubdep\n" if defined($pubdep);
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);
}
sub Import($$)
{
my ($self,$items) = @_;

View File

@ -61,10 +61,7 @@ foreach my $key (values %$OUTPUT) {
$mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
if (defined($key->{PC_FILE})) {
push(@{$mkenv->{pc_files}}, $key->{PC_FILE});
} else {
$mkenv->PkgConfig($key, $OUTPUT) if $key->{TYPE} eq "LIBRARY"
and defined($key->{VERSION});
push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}");
}
$mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});

View File

@ -552,115 +552,6 @@ sub Manpage($$)
push (@{$self->{manpages}}, $path);
}
sub PkgConfig($$$)
{
my ($self,$ctx,$other) = @_;
my $link_name = $ctx->{NAME};
$link_name =~ s/^LIB//g;
$link_name = lc($link_name);
return if (not defined($ctx->{DESCRIPTION}));
my $path = output::add_dir_str($ctx->{BASEDIR}, "$link_name.pc");
push (@{$self->{pc_files}}, $path);
my $pubs;
my $privs;
my $privlibs;
my $publibs = "";
if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
next if ($other->{$_}->{ENABLE} eq "NO");
if (defined($other->{$_}->{PC_NAME})) {
$pubs .= "$other->{$_}->{PC_NAME} ";
} elsif ($other->{$_}->{TYPE} eq "EXT_LIB") {
my $e = $other->{$_};
my $ldflags = join(" ", @{$e->{LDFLAGS}});
$ldflags .= " " unless $ldflags eq "";
my $libs = join(" ", @{$e->{LIBS}});
$libs .= " " unless $libs eq "";
$publibs .= $ldflags.$libs;
} else {
s/^LIB//g;
$_ = lc($_);
$privlibs .= "-l$_ ";
}
}
}
if (defined($ctx->{PRIVATE_DEPENDENCIES})) {
foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) {
next if ($other->{$_}->{ENABLE} eq "NO");
if ($other->{$_}->{TYPE} eq "EXT_LIB") {
my $e = $other->{$_};
my $ldflags = join(" ", @{$e->{LDFLAGS}});
$ldflags .= " " unless $ldflags eq "";
my $libs = join(" ", @{$e->{LIBS}});
$libs .= " " unless $libs eq "";
$privlibs .= $ldflags.$libs;
} elsif ($other->{$_}->{TYPE} eq "LIBRARY") {
s/^LIB//g;
$_ = lc($_);
$privs .= "$_ ";
} else {
s/^LIB//g;
$_ = lc($_);
$privlibs .= "-l$_ ";
}
}
}
smb_build::env::PkgConfig($self,
$path,
$link_name,
"-L\${libdir} -l$link_name $publibs",
$privlibs,
"",
"$ctx->{VERSION}",
$ctx->{DESCRIPTION},
defined($ctx->{INIT_FUNCTIONS}),
$pubs,
"",
[
"prefix=$self->{config}->{prefix}",
"exec_prefix=$self->{config}->{exec_prefix}",
"libdir=$self->{config}->{libdir}",
"includedir=$self->{config}->{includedir}"
]
);
my $abs_srcdir = abs_path($self->{config}->{srcdir});
smb_build::env::PkgConfig($self,
"bin/pkgconfig/$link_name-uninstalled.pc",
$link_name,
"-Lbin/shared -Lbin/static -l$link_name",
$privlibs,
join(' ',
"-I$abs_srcdir",
"-I$abs_srcdir/include",
"-I$abs_srcdir/lib",
"-I$abs_srcdir/lib/replace"),
"$ctx->{VERSION}",
$ctx->{DESCRIPTION},
defined($ctx->{INIT_FUNCTIONS}),
$pubs,
$privs,
[
"prefix=bin/",
"includedir=$ctx->{BASEDIR}"
]
);
}
sub ProtoHeader($$)
{
my ($self,$ctx) = @_;