Hello community, here is the log from the commit of package perl-ExtUtils-Depends checked in at Thu Apr 3 01:53:08 CEST 2008. -------- --- perl-ExtUtils-Depends/perl-ExtUtils-Depends.changes 2006-01-25 21:39:40.000000000 +0100 +++ perl-ExtUtils-Depends/perl-ExtUtils-Depends.changes 2008-04-02 13:55:54.000000000 +0200 @@ -1,0 +2,14 @@ +Wed Apr 2 13:49:41 CEST 2008 - anicka@suse.cz + +- update to 0.300 + - On MSWin32 and cygwin, find the link libraries of dependencies + and put them into LIBS. + - Add tests. + - Correct typos in the documentation. + - In get_makefile_vars, comment out the code that put the + installed libraries into @OBJECT, which caused them to get + deleted on realclean. + - In Makefile.PL, don't use the bogus package "MAIN". + - Remove debug spew. + +------------------------------------------------------------------- Old: ---- ExtUtils-Depends-0.205.tar.bz2 New: ---- ExtUtils-Depends-0.300.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-ExtUtils-Depends.spec ++++++ --- /var/tmp/diff_new_pack.Bk4794/_old 2008-04-03 01:49:41.000000000 +0200 +++ /var/tmp/diff_new_pack.Bk4794/_new 2008-04-03 01:49:41.000000000 +0200 @@ -1,23 +1,24 @@ # -# spec file for package perl-ExtUtils-Depends (Version 0.205) +# spec file for package perl-ExtUtils-Depends (Version 0.300) # -# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild + Name: perl-ExtUtils-Depends -URL: http://cpan.org/modules/by-module/ExtUtils/ +Url: http://cpan.org/modules/by-module/ExtUtils/ License: Artistic License Group: Development/Libraries/Perl Requires: perl = %{perl_version} -Autoreqprov: on +AutoReqProv: on Summary: ExtUtils-Depends Perl module -Version: 0.205 +Version: 0.300 Release: 1 Source: ExtUtils-Depends-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -61,10 +62,21 @@ %{perl_vendorarch}/auto/ExtUtils /var/adm/perl-modules/%{name} -%changelog -n perl-ExtUtils-Depends -* Wed Jan 25 2006 - mls@suse.de +%changelog +* Wed Apr 02 2008 anicka@suse.cz +- update to 0.300 + - On MSWin32 and cygwin, find the link libraries of dependencies + and put them into LIBS. + - Add tests. + - Correct typos in the documentation. + - In get_makefile_vars, comment out the code that put the + installed libraries into @OBJECT, which caused them to get + deleted on realclean. + - In Makefile.PL, don't use the bogus package "MAIN". + - Remove debug spew. +* Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Fri Jul 29 2005 - mjancar@suse.cz +* Fri Jul 29 2005 mjancar@suse.cz - update to 0.205 -* Tue Nov 02 2004 - mcihar@suse.cz +* Tue Nov 02 2004 mcihar@suse.cz - initial packaging ++++++ ExtUtils-Depends-0.205.tar.bz2 -> ExtUtils-Depends-0.300.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/Changes new/ExtUtils-Depends-0.300/Changes --- old/ExtUtils-Depends-0.205/Changes 2005-01-23 19:21:30.000000000 +0100 +++ new/ExtUtils-Depends-0.300/Changes 2008-03-30 17:35:10.000000000 +0200 @@ -1,5 +1,16 @@ Revision history for Perl extension ExtUtils::Depends. +0.300 Sun Mar 30 17:35:35 CEST 2008 + - On MSWin32 and cygwin, find the link libraries of dependencies and + put them into LIBS. + - Add tests. + - Correct typos in the documentation. + - In get_makefile_vars, comment out the code that put the installed + libraries into @OBJECT, which caused them to get deleted on + realclean. + - In Makefile.PL, don't use the bogus package "MAIN". + - Remove debug spew. + 0.205 Sun Jan 23 13:20:14 EST 2005 - Disable the RPM-related postamble on Win32. The 'date' command on windows is interactive, and caused Makefile.PL to hang. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/lib/ExtUtils/Depends.pm new/ExtUtils-Depends-0.300/lib/ExtUtils/Depends.pm --- old/ExtUtils-Depends-0.205/lib/ExtUtils/Depends.pm 2005-01-23 19:49:49.000000000 +0100 +++ new/ExtUtils-Depends-0.300/lib/ExtUtils/Depends.pm 2008-03-30 17:36:23.000000000 +0200 @@ -1,5 +1,5 @@ # -# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/ExtUtils-Depends/lib/ExtUtils/Depends.pm,v 1.14 2005/01/23 18:49:49 muppetman Exp $ +# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/ExtUtils-Depends/lib/ExtUtils/Depends.pm,v 1.18 2008/03/30 15:36:23 kaffeetisch Exp $ # package ExtUtils::Depends; @@ -7,10 +7,11 @@ use strict; use warnings; use Carp; +use File::Find; use File::Spec; use Data::Dumper; -our $VERSION = '0.205'; +our $VERSION = '0.300'; sub import { my $class = shift; @@ -114,7 +115,6 @@ use IO::File; my ($self, $filename) = @_; - warn "Writing $filename\n"; my $file = IO::File->new (">".$filename) or croak "can't open '$filename' for writing: $!\n"; @@ -182,10 +182,7 @@ croak "No dependency information found for $dep" unless $instpath; - warn "Found $dep in $instpath\n"; - if (not File::Spec->file_name_is_absolute ($instpath)) { - warn "instpath is not absolute; using cwd...\n"; $instpath = File::Spec->rel2abs ($instpath); } @@ -281,9 +278,10 @@ my %vars = ( INC => join (' ', uniquify @incbits), - LIBS => join (' ', uniquify @libsbits), + LIBS => join (' ', uniquify $self->find_extra_libs, @libsbits), TYPEMAPS => [@typemaps], ); + # we don't want to provide these if there is no data in them; # that way, the caller can still get default behavior out of # MakeMaker when INC, LIBS and TYPEMAPS are all that are required. @@ -299,6 +297,38 @@ %vars; } +sub find_extra_libs { + my $self = shift; + + my %mappers = ( + MSWin32 => sub { $_[0] . '.lib' }, + cygwin => sub { 'lib' . $_[0] . '.dll.a'}, + ); + my $mapper = $mappers{$^O}; + return () unless defined $mapper; + + my @found_libs = (); + foreach my $name (keys %{ $self->{deps} }) { + (my $stem = $name) =~ s/^.*:://; + my $lib = $mapper->($stem); + my $pattern = qr/$lib$/; + + my $matching_file; + find (sub { + if ((not $matching_file) && /$pattern/) {; + $matching_file = $File::Find::name; + } + }, map { -d $_ ? ($_) : () } @INC); # only extant dirs + + if ($matching_file && -f $matching_file) { + push @found_libs, $matching_file; + next; + } + } + + return @found_libs; +} + 1; __END__ @@ -313,7 +343,7 @@ $package = new ExtUtils::Depends ('pkg::name', 'base::package') # set the flags and libraries to compile and link the module $package->set_inc("-I/opt/blahblah"); - $package->set_lib("-lmylib"); + $package->set_libs("-lmylib"); # add a .c and an .xs file to compile $package->add_c('code.c'); $package->add_xs('module-code.xs'); @@ -409,7 +439,7 @@ Add C files to be compiled. -=item $depends->typemaps (@typemaps) +=item $depends->add_typemaps (@typemaps) Add typemap files to be used and installed. @@ -492,11 +522,6 @@ =head1 BUGS -As written, this module expects that RTLD_GLOBAL works on your platform, -which is not always true, most notably, on win32. We need to include a -way to find the actual shared libraries created for extension modules -so new extensions may be linked explicitly with them. - Version 0.2 discards some of the more esoteric features provided by the older versions. As they were completely undocumented, and this module has yet to reach 1.0, this may not exactly be a bug. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/Makefile.PL new/ExtUtils-Depends-0.300/Makefile.PL --- old/ExtUtils-Depends-0.205/Makefile.PL 2005-01-23 19:22:56.000000000 +0100 +++ new/ExtUtils-Depends-0.300/Makefile.PL 2008-03-25 19:11:53.000000000 +0100 @@ -10,9 +10,9 @@ 'VERSION_FROM' => 'lib/ExtUtils/Depends.pm', ); -package MY; use Cwd; -sub postamble + +sub MY::postamble { # none of this rpm stuff is useful on win32, and actually it can cause # nmake to barf. @@ -29,7 +29,7 @@ 'SOURCE' => '$(DISTNAME)-$(VERSION).tar.gz', 'DATE' => $date, ); - + my $substitute = '$(PERL) -npe \''.join('; ', map { "s/\\\@$_\\\@/$subs{$_}/g"; } keys %subs).'\''; @@ -57,4 +57,3 @@ rpmbuild -bs --define \"_topdir \$(RPMS_DIR)\" perl-\$(DISTNAME).spec " } -package MAIN; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/MANIFEST new/ExtUtils-Depends-0.300/MANIFEST --- old/ExtUtils-Depends-0.205/MANIFEST 2004-02-27 18:31:23.000000000 +0100 +++ new/ExtUtils-Depends-0.300/MANIFEST 2008-03-30 17:48:18.000000000 +0200 @@ -1,5 +1,5 @@ -Changes .cvsignore +Changes lib/ExtUtils/Depends.pm Makefile.PL MANIFEST @@ -7,3 +7,9 @@ perl-ExtUtils-Depends.spec.in README t/01_load.t +t/02_save_load.t +t/03_deps.t +t/04_extra_libs.t +t/inc/DepTest/DepTest.lib +t/inc/DepTest/Install/.keep +t/inc/DepTest/libDepTest.dll.a diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/META.yml new/ExtUtils-Depends-0.300/META.yml --- old/ExtUtils-Depends-0.205/META.yml 2005-01-23 19:51:00.000000000 +0100 +++ new/ExtUtils-Depends-0.300/META.yml 2008-03-30 17:50:19.000000000 +0200 @@ -1,10 +1,12 @@ -# http://module-build.sourceforge.net/META-spec.html -#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# -name: ExtUtils-Depends -version: 0.205 -version_from: lib/ExtUtils/Depends.pm -installdirs: site -requires: - -distribution_type: module -generated_by: ExtUtils::MakeMaker version 6.17 +--- #YAML:1.0 +name: ExtUtils-Depends +version: 0.300 +abstract: ~ +license: ~ +author: ~ +generated_by: ExtUtils::MakeMaker version 6.44 +distribution_type: module +requires: +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.3.html + version: 1.3 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/README new/ExtUtils-Depends-0.300/README --- old/ExtUtils-Depends-0.205/README 2005-01-23 19:51:00.000000000 +0100 +++ new/ExtUtils-Depends-0.300/README 2008-03-30 17:50:19.000000000 +0200 @@ -7,7 +7,7 @@ $package = new ExtUtils::Depends ('pkg::name', 'base::package') # set the flags and libraries to compile and link the module $package->set_inc("-I/opt/blahblah"); - $package->set_lib("-lmylib"); + $package->set_libs("-lmylib"); # add a .c and an .xs file to compile $package->add_c('code.c'); $package->add_xs('module-code.xs'); @@ -92,7 +92,7 @@ $depends->add_c (@c_files) Add C files to be compiled. - $depends->typemaps (@typemaps) + $depends->add_typemaps (@typemaps) Add typemap files to be used and installed. $depends->add_headers (list) @@ -155,11 +155,6 @@ you want to call "get_deps" after calling "add_deps" manually. BUGS - As written, this module expects that RTLD_GLOBAL works on your platform, - which is not always true, most notably, on win32. We need to include a - way to find the actual shared libraries created for extension modules so - new extensions may be linked explicitly with them. - Version 0.2 discards some of the more esoteric features provided by the older versions. As they were completely undocumented, and this module has yet to reach 1.0, this may not exactly be a bug. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/t/01_load.t new/ExtUtils-Depends-0.300/t/01_load.t --- old/ExtUtils-Depends-0.205/t/01_load.t 2003-06-20 23:38:17.000000000 +0200 +++ new/ExtUtils-Depends-0.300/t/01_load.t 2008-03-30 15:51:09.000000000 +0200 @@ -1,4 +1,6 @@ -use Test; -BEGIN { plan tests => 1 } +#!/usr/bin/perl +use strict; +use warnings; +use Test::More tests => 1; -use ExtUtils::Depends; ok(1); +use_ok ('ExtUtils::Depends'); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/t/02_save_load.t new/ExtUtils-Depends-0.300/t/02_save_load.t --- old/ExtUtils-Depends-0.205/t/02_save_load.t 1970-01-01 01:00:00.000000000 +0100 +++ new/ExtUtils-Depends-0.300/t/02_save_load.t 2008-03-30 17:18:37.000000000 +0200 @@ -0,0 +1,85 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use Test::More tests => 24; +use ExtUtils::Depends; + +my $dep_info = ExtUtils::Depends->new ('DepTest'); + +my $inc = '-Iinclude -I/usr/local/include -W -Wall -Werror -ansi'; +$dep_info->set_inc ($inc); + +my $libs = '-L/usr/local/lib -lfoobar'; +$dep_info->set_libs ($libs); + +my %pm_mapping = ('DepTest.pm' => 'build/DepTest.pm', + 'DepTest/Helper.pm' => 'build/DepTest/Helper.pm'); +$dep_info->add_pm (%pm_mapping); + +my @xs_files = qw(DepTestFoo.xs + DepTestBar.xs); +$dep_info->add_xs (@xs_files); + +my @c_files = qw(dep-test-foo.c + dep-test-bar.c); +$dep_info->add_c (@c_files); + +my @typemaps = qw(build/foo.typemap + build/bar.typemap); +$dep_info->add_typemaps (@typemaps); + +my @installed_files = qw(dep.h + dep-private.h); +$dep_info->install (@installed_files); + +$dep_info->save_config ('t/inc/DepTest/Install/Files.pm'); + +# --------------------------------------------------------------------------- # + +my %vars = $dep_info->get_makefile_vars; +is_deeply ($vars{TYPEMAPS}, \@typemaps); +is ($vars{INC}, $inc); +is ($vars{LIBS}, $libs); + +foreach my $pm (keys %pm_mapping) { + like ($vars{PM}{$pm}, qr/\Q$pm_mapping{$pm}\E/); +} + +ok (exists $vars{PM}{'t/inc/DepTest/Install/Files.pm'}); + +foreach my $file (@installed_files) { + like ($vars{PM}{$file}, qr/\Q$file\E/); +} + +foreach my $xs_file (@xs_files) { + ok (exists $vars{XS}{$xs_file}); +} + +foreach my $file (@c_files, @xs_files) { + (my $stem = $file) =~ s/\.(?:c|xs)\z//; + like ($vars{OBJECT}, qr/\Q$stem\E/); + like ($vars{clean}{FILES}, qr/\Q$stem\E/); +} + +# --------------------------------------------------------------------------- # + +use lib qw(t/inc); + +my $info = ExtUtils::Depends::load ('DepTest'); + +my $install_part = qr|DepTest.Install|; +like ($info->{inc}, $install_part); +ok (-1 != index $info->{inc}, $inc); + +isa_ok ($info->{typemaps}, 'ARRAY'); + +like ($info->{instpath}, $install_part); + +is_deeply ($info->{deps}, []); + +is ($info->{libs}, $libs); + +# --------------------------------------------------------------------------- # + +unlink 't/inc/DepTest/Install/Files.pm'; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/t/03_deps.t new/ExtUtils-Depends-0.300/t/03_deps.t --- old/ExtUtils-Depends-0.205/t/03_deps.t 1970-01-01 01:00:00.000000000 +0100 +++ new/ExtUtils-Depends-0.300/t/03_deps.t 2008-03-30 16:52:12.000000000 +0200 @@ -0,0 +1,31 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use Test::More tests => 2; +use ExtUtils::Depends; + +my $dep_info = ExtUtils::Depends->new ('DepTest'); +$dep_info->save_config ('t/inc/DepTest/Install/Files.pm'); + +# --------------------------------------------------------------------------- # + +use lib qw(t/inc); + +my $info = ExtUtils::Depends->new ('UseTest', 'DepTest'); + +my %deps = $info->get_deps; +ok (exists $deps{DepTest}); + +# --------------------------------------------------------------------------- # + +$info = ExtUtils::Depends->new ('UseTest'); +$info->add_deps ('DepTest'); +$info->load_deps; + +%deps = $info->get_deps; +ok (exists $deps{DepTest}); + +# --------------------------------------------------------------------------- # + +unlink 't/inc/DepTest/Install/Files.pm'; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ExtUtils-Depends-0.205/t/04_extra_libs.t new/ExtUtils-Depends-0.300/t/04_extra_libs.t --- old/ExtUtils-Depends-0.205/t/04_extra_libs.t 1970-01-01 01:00:00.000000000 +0100 +++ new/ExtUtils-Depends-0.300/t/04_extra_libs.t 2008-03-30 17:01:08.000000000 +0200 @@ -0,0 +1,26 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use Test::More; +use ExtUtils::Depends; + +plan (($^O eq 'MSWin32' || $^O eq 'cygwin') ? + (tests => 1) : + (skip_all => 'test only applicable to MSWin32 and cygwin')); + +my $dep_info = ExtUtils::Depends->new ('DepTest'); +$dep_info->save_config ('t/inc/DepTest/Install/Files.pm'); + +# --------------------------------------------------------------------------- # + +use lib qw(t/inc); + +my $use_info = ExtUtils::Depends->new ('UseTest', 'DepTest'); +my %vars = $use_info->get_makefile_vars; + +like ($vars{LIBS}, qr/DepTest/); + +# --------------------------------------------------------------------------- # + +unlink 't/inc/DepTest/Install/Files.pm'; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org