From: Jelmer Vernooij Date: Tue, 22 Jan 2008 17:47:18 +0000 (+0100) Subject: build: remove support for automatically building .pc files. X-Git-Tag: samba-4.0.0alpha3~432^2~33^2~2 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=e9f99732677f46d599c270cfcb5042c11d34d338;hp=4b83dc06471818089790c42157b972964d8d02e2 build: remove support for automatically building .pc files. --- diff --git a/source/build/smb_build/env.pm b/source/build/smb_build/env.pm index 8fbbe9cfd5b..bbb72b520fd 100644 --- a/source/build/smb_build/env.pm +++ b/source/build/smb_build/env.pm @@ -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) = @_; diff --git a/source/build/smb_build/main.pl b/source/build/smb_build/main.pl index cdeaeeb1c8c..fb769103d05 100644 --- a/source/build/smb_build/main.pl +++ b/source/build/smb_build/main.pl @@ -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}}); diff --git a/source/build/smb_build/makefile.pm b/source/build/smb_build/makefile.pm index 7e715b47eb3..452e4254a34 100644 --- a/source/build/smb_build/makefile.pm +++ b/source/build/smb_build/makefile.pm @@ -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) = @_;