svn commit: samba r19863 - in branches/SAMBA_4_0/source: . bin
bin/pkgconfig build/smb_build lib/ldb script script/tests
jelmer at samba.org
jelmer at samba.org
Thu Nov 23 18:03:12 GMT 2006
Author: jelmer
Date: 2006-11-23 18:03:11 +0000 (Thu, 23 Nov 2006)
New Revision: 19863
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19863
Log:
Create -uninstalled.pc files. This should reenable compilation and running
of the pidl testsuite as part of the testsuite.
Added:
branches/SAMBA_4_0/source/bin/pkgconfig/
Modified:
branches/SAMBA_4_0/source/build/smb_build/env.pm
branches/SAMBA_4_0/source/build/smb_build/main.pl
branches/SAMBA_4_0/source/build/smb_build/makefile.pm
branches/SAMBA_4_0/source/dynconfig.mk
branches/SAMBA_4_0/source/lib/ldb/config.mk
branches/SAMBA_4_0/source/script/pkg-config
branches/SAMBA_4_0/source/script/tests/selftest.sh
Changeset:
Property changes on: branches/SAMBA_4_0/source/bin/pkgconfig
___________________________________________________________________
Name: svn:ignore
+ *.pc
Modified: branches/SAMBA_4_0/source/build/smb_build/env.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/env.pm 2006-11-23 17:50:47 UTC (rev 19862)
+++ branches/SAMBA_4_0/source/build/smb_build/env.pm 2006-11-23 18:03:11 UTC (rev 19863)
@@ -53,9 +53,9 @@
$self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
}
-sub PkgConfig($$$$$$$$$$)
+sub PkgConfig($$$$$$$$$$$)
{
- my ($self,$path,$name,$libs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep) = @_;
+ my ($self,$path,$name,$libs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
print __FILE__.": creating $path\n";
@@ -66,13 +66,9 @@
mkpath(dirname($path),0,0755);
open(OUT, ">$path") or die("Can't open $path: $!");
- print OUT <<"__EOF__";
-prefix=$self->{config}->{prefix}
-exec_prefix=$self->{config}->{exec_prefix}
-libdir=$self->{config}->{libdir}
-includedir=$self->{config}->{includedir}
-__EOF__
-
+ foreach (keys %$dirs) {
+ print OUT "$_=" . $dirs->{$_} . "\n";
+ }
if ($hasmodules) {
print OUT "modulesdir=$self->{config}->{modulesdir}/$name\n" ;
}
@@ -86,7 +82,7 @@
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: -L\${libdir} $libs\n";
+ print OUT "Libs: $libs\n";
print OUT "Cflags: -I\${includedir} $cflags\n";
close(OUT);
Modified: branches/SAMBA_4_0/source/build/smb_build/main.pl
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/main.pl 2006-11-23 17:50:47 UTC (rev 19862)
+++ branches/SAMBA_4_0/source/build/smb_build/main.pl 2006-11-23 18:03:11 UTC (rev 19863)
@@ -53,7 +53,7 @@
next unless defined $key->{OUTPUT_TYPE};
$mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
- $mkenv->PkgConfig($key) if $key->{TYPE} eq "LIBRARY"
+ $mkenv->PkgConfig($key, $OUTPUT) if $key->{TYPE} eq "LIBRARY"
and defined($key->{VERSION});
$mkenv->SharedLibrary($key) if grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}});
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-11-23 17:50:47 UTC (rev 19862)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-11-23 18:03:11 UTC (rev 19863)
@@ -265,8 +265,7 @@
my $soarg = "";
my $soargdebug = "";
- if ($self->{config}->{SONAMEFLAG} ne "" and
- defined($ctx->{LIBRARY_SONAME})) {
+ if ($self->{config}->{SONAMEFLAG} ne "" and defined($ctx->{LIBRARY_SONAME})) {
$soarg = "$self->{config}->{SONAMEFLAG}$ctx->{LIBRARY_SONAME} ";
if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) {
$soargdebug = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}";
@@ -291,7 +290,7 @@
\$($ctx->{TYPE}_$ctx->{NAME}\_FULL_OBJ_LIST) \\
\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $extraflags \\
$soarg \\
- $init_obj $singlesoarg
+ $init_obj $singlesoarg$soargdebug
__EOD__
);
@@ -395,9 +394,9 @@
push (@{$self->{manpages}}, "$dir/$ctx->{MANPAGE}");
}
-sub PkgConfig($$)
+sub PkgConfig($$$)
{
- my ($self,$ctx) = @_;
+ my ($self,$ctx,$other) = @_;
my $link_name = $ctx->{NAME};
@@ -415,31 +414,58 @@
if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
-# next unless ($self-> ) {
+ next unless ($other->{$_}->{TYPE} eq "LIBRARY");
-#FIXME $pubs .= "$_ ";
+ s/^LIB//g;
+ $_ = lc($_);
+
+ $pubs .= "$_ ";
}
}
if (defined($ctx->{PRIVATE_DEPENDENCIES})) {
foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) {
-# next unless ($self-> ) {
+ next unless ($other->{$_}->{TYPE} eq "LIBRARY");
-#FIXME $privs .= "$_ ";
+ s/^LIB//g;
+ $_ = lc($_);
+
+ $privs .= "$_ ";
}
}
smb_build::env::PkgConfig($self,
$path,
$link_name,
- "-l$link_name",
+ "-L\${libdir} -l$link_name",
"",
"$ctx->{VERSION}",
$ctx->{DESCRIPTION},
defined($ctx->{INIT_FUNCTIONS}),
$pubs,
- $privs
+ $privs,
+ {
+ "prefix" => $self->{config}->{prefix},
+ "exec_prefix" => $self->{config}->{exec_prefix},
+ "libdir" => $self->{config}->{libdir},
+ "includedir" => $self->{config}->{includedir}
+ }
);
+ smb_build::env::PkgConfig($self,
+ "bin/pkgconfig/$link_name-uninstalled.pc",
+ $link_name,
+ "-Lbin/shared -Lbin/static -l$link_name",
+ "-I. -Iinclude -Ilib -Ilib/replace",
+ "$ctx->{VERSION}",
+ $ctx->{DESCRIPTION},
+ defined($ctx->{INIT_FUNCTIONS}),
+ $pubs,
+ $privs,
+ {
+ "prefix" => "bin/",
+ "includedir" => "$ctx->{BASEDIR}"
+ }
+ );
}
sub ProtoHeader($$)
Modified: branches/SAMBA_4_0/source/dynconfig.mk
===================================================================
--- branches/SAMBA_4_0/source/dynconfig.mk 2006-11-23 17:50:47 UTC (rev 19862)
+++ branches/SAMBA_4_0/source/dynconfig.mk 2006-11-23 18:03:11 UTC (rev 19863)
@@ -1,6 +1,4 @@
-[LIBRARY::DYNCONFIG]
-VERSION = 0.0.1
-SO_VERSION = 0
+[SUBSYSTEM::DYNCONFIG]
OBJ_FILES = dynconfig.o
PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" \
Modified: branches/SAMBA_4_0/source/lib/ldb/config.mk
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/config.mk 2006-11-23 17:50:47 UTC (rev 19862)
+++ branches/SAMBA_4_0/source/lib/ldb/config.mk 2006-11-23 18:03:11 UTC (rev 19863)
@@ -167,9 +167,10 @@
common/ldb_controls.o \
common/qsort.o
PUBLIC_DEPENDENCIES = \
- LIBTALLOC \
+ LIBTALLOC
+PRIVATE_DEPENDENCIES = \
DYNCONFIG \
- SOCKET_WRAPPER
+ SOCKET_WRAPPER
MANPAGE = man/ldb.3
PUBLIC_HEADERS = include/ldb.h include/ldb_errors.h
#
@@ -181,7 +182,7 @@
[SUBSYSTEM::LDBSAMBA]
PRIVATE_DEPENDENCIES = ldb
PRIVATE_PROTO_HEADER = samba/ldif_handlers.h
-PUBLIC_DEPENDENCIES = LIBSECURITY SAMDB
+PRIVATE_DEPENDENCIES = LIBSECURITY SAMDB
OBJ_FILES = \
samba/ldif_handlers.o
# End SUBSYSTEM LDBSAMBA
@@ -192,8 +193,8 @@
[SUBSYSTEM::LIBLDB_CMDLINE]
OBJ_FILES= \
tools/cmdline.o
-PUBLIC_DEPENDENCIES = ldb LIBSAMBA-UTIL LIBPOPT POPT_SAMBA POPT_CREDENTIALS
-PRIVATE_DEPENDENCIES = gensec
+PUBLIC_DEPENDENCIES = ldb LIBPOPT
+PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL POPT_SAMBA POPT_CREDENTIALS gensec
# End SUBSYSTEM LIBLDB_CMDLINE
################################################
Modified: branches/SAMBA_4_0/source/script/pkg-config
===================================================================
--- branches/SAMBA_4_0/source/script/pkg-config 2006-11-23 17:50:47 UTC (rev 19862)
+++ branches/SAMBA_4_0/source/script/pkg-config 2006-11-23 18:03:11 UTC (rev 19863)
@@ -27,6 +27,7 @@
print "pkg-config replacement in perl\n";
print "Copyright (C) 2006 Jelmer Vernooij <jelmer\@samba.org>\n";
print "\n";
+ print "Usage: pkg-config [OPTIONS] PACKAGE...\n";
print " --help Print this help message\n";
print " --static Print flags for static libraries\n";
print " --libs Print linker flags\n";
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh 2006-11-23 17:50:47 UTC (rev 19862)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh 2006-11-23 18:03:11 UTC (rev 19863)
@@ -47,6 +47,9 @@
LD_LIBRARY_PATH=$OLD_PWD/bin/shared:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
+PKG_CONFIG_PATH=$OLD_PWD/bin/pkgconfig:$PKG_CONFIG_PATH
+export PKG_CONFIG_PATH
+
incdir=`dirname $ARG0`
echo -n "PROVISIONING..."
. $incdir/mktestsetup.sh $PREFIX || exit 1
More information about the samba-cvs
mailing list