build: remove support for automatically building .pc files.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 22 Jan 2008 17:47:18 +0000 (18:47 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 22 Jan 2008 17:47:18 +0000 (18:47 +0100)
(This used to be commit e9f99732677f46d599c270cfcb5042c11d34d338)

source4/build/smb_build/env.pm
source4/build/smb_build/main.pl
source4/build/smb_build/makefile.pm

index 8fbbe9cfd5b6ce7589cd6f34333b65e03831c1ef..bbb72b520fdc9797df74552b68aa8a518ac5bb04 100644 (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) = @_;
index cdeaeeb1c8c6b46240f0e83954a71a8b35029304..fb769103d05ceeea3f7cf1270dcab000d826d0fd 100644 (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}});
index 7e715b47eb349db20413b0f2d78a90b52d473b70..452e4254a346fe4783366de80b6812c4646ba54a 100644 (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) = @_;