Update of /cvsroot/fink/fink/perlmod/Fink In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8578
Modified Files: ChangeLog PkgVersion.pm Validation.pm Log Message: Implement the new %type_num[] and %lib percent expansions. Correct the regex for detecting library architecture. Index: PkgVersion.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v retrieving revision 1.570 retrieving revision 1.571 diff -u -d -r1.570 -r1.571 --- PkgVersion.pm 14 Nov 2006 21:14:36 -0000 1.570 +++ PkgVersion.pm 5 Dec 2006 05:51:11 -0000 1.571 @@ -513,6 +513,17 @@ $self->{_type_hash} = $type_hash = $self->type_hash_from_string($self->param_default("Type", "")); foreach (keys %$type_hash) { ( $expand->{"type_pkg[$_]"} = $expand->{"type_raw[$_]"} = $type_hash->{$_} ) =~ s/\.//g; + ( $expand->{"type_num[$_]"} = $type_hash->{$_} ) =~ s/[^\d]//g; + } + $expand->{"lib"} = "lib"; + if ($type_hash->{"-64bit"} eq "-64bit") { + if ($config->param('Architecture') eq "powerpc" ) { + $expand->{"lib"} = "lib/ppc64"; + } elsif ($config->param('Architecture') eq "i386" ) { + $expand->{"lib"} = "lib/x86_64"; + } else { + die "Your Architecture is not suitable for 64bit libraries.\n"; + } } if ($self->has_parent()) { # get parent's Package for percent expansion Index: Validation.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Validation.pm,v retrieving revision 1.239 retrieving revision 1.240 diff -u -d -r1.239 -r1.240 --- Validation.pm 3 Dec 2006 23:47:04 -0000 1.239 +++ Validation.pm 5 Dec 2006 05:51:11 -0000 1.240 @@ -433,6 +433,17 @@ $type_hash = Fink::PkgVersion->type_hash_from_string($type,$filename); foreach (keys %$type_hash) { ( $expand->{"type_pkg[$_]"} = $expand->{"type_raw[$_]"} = $type_hash->{$_} ) =~ s/\.//g; + ( $expand->{"type_num[$_]"} = $type_hash->{$_} ) =~ s/[^\d]//g; + } + $expand->{"lib"} = "lib"; + if ($type_hash->{"-64bit"} eq "-64bit") { + if ($config->param('Architecture') eq "powerpc" ) { + $expand->{"lib"} = "lib/ppc64"; + } elsif ($config->param('Architecture') eq "i386" ) { + $expand->{"lib"} = "lib/x86_64"; + } else { + die "Your Architecture is not suitable for 64bit libraries.\n"; + } } $pkgname = &expand_percent($pkgname, $expand, $filename.' Package'); } @@ -1107,12 +1118,17 @@ # strip off the end of the last @shlib_deps entry (the stuff # beyond the final close-paren), which should consist of digits # and "-" only, and use as $libarch - if ($shlib_deps[$#shlib_deps] =~ /^(.*\))\s*([-\d]+)$/ ) { + if ($shlib_deps[$#shlib_deps] =~ /^(.*\))\s*([^\s^\)]+)$/ ) { $shlib_deps[$#shlib_deps] = $1; $libarch = $2; } + # This hack only allows one particular percent expansion in the + # $libarch field, because this subroutine doesn't do percent + # expansions. OK for now, but should be fixed eventually. + my $num_expand = {"type_num[-64bit]" => "64"}; + $libarch = &expand_percent($libarch, $num_expand, $filename.' Package'); if (not ($libarch eq "32" or $libarch eq "64" or $libarch eq "32-64")) { - print "Warning: Library architecture for \"$shlibs_parts[0]\" in field \"shlibs\"$splitoff_field is not one of the allowed types (32, 64, or 32-64). ($filename)\n"; + print "Warning: Library architecture \"$libarch\" for \"$shlibs_parts[0]\" in field \"shlibs\"$splitoff_field is not one of the allowed types (32, 64, or 32-64). ($filename)\n"; $looks_good = 0; } foreach (@shlib_deps) { Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v retrieving revision 1.1404 retrieving revision 1.1405 diff -u -d -r1.1404 -r1.1405 --- ChangeLog 3 Dec 2006 21:08:39 -0000 1.1404 +++ ChangeLog 5 Dec 2006 05:51:11 -0000 1.1405 @@ -1,3 +1,10 @@ +2006-12-04 Dave Morrison <[EMAIL PROTECTED]> + + * PkgVersion.pm: Implement the new %type_num[] and %lib percent + expansions. + * Validation.pm: Implement the new %type_num[] and %lib percent + expansions. Correct the regex for detecting library architecture. + 2006-12-03 Dave Morrison <[EMAIL PROTECTED]> * Validation.pm: Check for correct library architecture at the end ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits