r2465 - in packages/libextutils-f77-perl/trunk: . debian t

Krzysztof Krzyzaniak eloy at costa.debian.org
Tue Mar 21 12:52:47 UTC 2006


Author: eloy
Date: 2006-03-21 12:52:46 +0000 (Tue, 21 Mar 2006)
New Revision: 2465

Modified:
   packages/libextutils-f77-perl/trunk/CHANGES
   packages/libextutils-f77-perl/trunk/F77.pm
   packages/libextutils-f77-perl/trunk/debian/changelog
   packages/libextutils-f77-perl/trunk/debian/control
   packages/libextutils-f77-perl/trunk/debian/watch
   packages/libextutils-f77-perl/trunk/t/require.t
Log:
eloy: new upstream release


Modified: packages/libextutils-f77-perl/trunk/CHANGES
===================================================================
--- packages/libextutils-f77-perl/trunk/CHANGES	2006-03-21 12:41:49 UTC (rev 2464)
+++ packages/libextutils-f77-perl/trunk/CHANGES	2006-03-21 12:52:46 UTC (rev 2465)
@@ -1,6 +1,15 @@
 ExtUtils::F77 Changes list 
 --------------------------
 
+v1.15 released Jan 3rd, 2006
+----------------------------
+
+* Jim Edwards f90 patch for SGI irix64
+* Added version number print to the startup
+* Solaris patches from Diab Jerius
+* OSX warning patch from Doug Burke
+* Win32 patches from Rob - Sisyphus <kalinabears at iinet.net.au> (2005/1/25)
+
 v1.14 released Jun 15th 2001
 ----------------------------
 

Modified: packages/libextutils-f77-perl/trunk/F77.pm
===================================================================
--- packages/libextutils-f77-perl/trunk/F77.pm	2006-03-21 12:41:49 UTC (rev 2464)
+++ packages/libextutils-f77-perl/trunk/F77.pm	2006-03-21 12:52:46 UTC (rev 2465)
@@ -2,6 +2,7 @@
 package ExtUtils::F77;
 
 use Config;
+use File::Spec;
 
 =head1 NAME
 
@@ -32,8 +33,10 @@
 
 =cut
 
-$VERSION = "1.14";
+$VERSION = "1.15";
 
+warn "\nExtUtils::F77: Version $VERSION\n";
+
 # Database starts here. Basically we have a large hash specifying
 # entries for each os/compiler combination. Entries can be code refs
 # in which case they are executed and the returned value used. This
@@ -83,7 +86,7 @@
 $F77config{Solaris}{F77}{Link} = sub {
      my $NSPATH;
      my $dir;
- 
+
      #find the SUNWspro entry of nonstandard inst. in LD_LIBRARY_PATH
      if ( defined $ENV{'LD_LIBRARY_PATH'} &&
 	  $ENV{'LD_LIBRARY_PATH'} =~ m{([^:]*SUNWspro[^/]*)} )
@@ -122,7 +125,40 @@
      }
      return "" unless $dir; # Failure
      print "$Pkg: Found Fortran latest version lib dir $dir\n";
-     return "-L$dir -lF77 -lM77 -lsunmath -lm";
+
+     my @libs;
+
+     # determine libraries. Forte 7 doesn't have F77 or M77
+     if ( qx/$F77config{Solaris}{F77}{Compiler} -V 2>&1/ 
+                      =~ /Forte Developer 7/ )
+     {
+       push @libs, qw/
+		      -lf77compat
+		      -lfui
+		      -lfai
+		      -lfai2
+		      -lfsumai
+		      -lfprodai
+		      -lfminlai
+		      -lfmaxlai
+		      -lfminvai
+		      -lfmaxvai
+		      -lfsu 
+		      -lsunmath
+		      -lm
+		      /;
+     }
+     else
+     {
+       push @libs, qw/
+		      -lF77
+		      -lM77
+		      -lsunmath
+		      -lm
+		      /;
+     }
+
+     join( ' ', "-L$dir", @libs );
  };
 
 
@@ -229,12 +265,12 @@
   if ( $abi eq "-64" ){
     $libs = ( (-r "/usr/lib64/$mips_dir") && (-d _) && (-x _) ) ?
 	"-L/usr/lib64/$mips_dir" : "";
-    $libs .=  " -L/usr/lib64 -lftn -lm";
+    $libs .=  " -L/usr/lib64 -lfortran -lm";
   }
   if ( $abi eq "-n32" ){
     $libs = ( (-r "/usr/lib32/$mips_dir") && (-d _) && (-x _) ) ?
 	"-L/usr/lib32/$mips_dir" : "";
-    $libs .=  " -L/usr/lib32 -lftn -lm";
+    $libs .=  " -L/usr/lib32 -lfortran -lm";
   }
   if ( $abi eq "-o32" ){
     $libs = "-L/usr/lib -lF77 -lI77 -lU77 -lisam -lm";
@@ -291,6 +327,7 @@
 # a lot of the answers depend on a lot of the guesswork.
 
 sub import {
+   no warnings; # Shuts up complaints on Win32 when running PDL tests
    $Pkg    = shift;
    my $system   = ucfirst(shift);  # Set package variables
    my $compiler = ucfirst(shift);
@@ -302,17 +339,18 @@
    $system = 'Cygwin' if $system =~ /Cygwin/;
    $compiler = get $F77config{$system}{DEFAULT} unless $compiler;
 
-   print "$Pkg: Using system=$system compiler=$compiler\n";
-   
+   print "$Pkg: Using system=$system compiler=" .
+       (defined $compiler ? $compiler : "<undefined>") . "\n";
+
    if (defined($ENV{F77LIBS})) {
       print "Overriding Fortran libs from value of enviroment variable F77LIBS = $ENV{F77LIBS}\n";
       $Runtime = $ENV{F77LIBS};
    }
    else {
-      
+
      # Try this combination
 
-     if (defined( $F77config{$system} )){
+     if ( defined( $compiler ) and defined( $F77config{$system} )){
      	my $flibs = get ($F77config{$system}{$compiler}{Link});
         if ($flibs ne "") {
      	   $Runtime = $flibs;# . gcclibs();
@@ -345,13 +383,13 @@
     	 print "$Pkg: Well that didn't appear to validate. Well I will try it anyway.\n"
     	      unless $Runtime && $ok;
        }
- 
+
       $RuntimeOK = $ok;
-      
+
    } # Not overriding   
 
    # Now get the misc info for the methods.
-      
+
    if (defined( $F77config{$system}{$compiler}{Trail_} )){
       $Trail_  = get $F77config{$system}{$compiler}{Trail_};  
    }
@@ -363,9 +401,9 @@
 EOD
       $Trail_ = 1;
    }
-  
+
    if (defined( $F77config{$system}{$compiler}{Compiler} )) {
-	$Compiler = $F77config{$system}{$compiler}{Compiler};
+	$Compiler = get $F77config{$system}{$compiler}{Compiler};
    } else {
 	print << "EOD";
 $Pkg: There does not appear to be any configuration info about
@@ -376,7 +414,7 @@
 print "$Pkg: Compiler: $Compiler\n";
 
    if (defined( $F77config{$system}{$compiler}{Cflags} )) {
-	$Cflags = $F77config{$system}{$compiler}{Cflags};
+	$Cflags = get $F77config{$system}{$compiler}{Cflags} ;
    } else {
 	print << "EOD";
 $Pkg: There does not appear to be any configuration info about
@@ -387,7 +425,7 @@
    }
 
    print "$Pkg: Cflags: $Cflags\n";
-   
+
 } # End of import ()
 
 =head1 METHODS
@@ -466,7 +504,7 @@
 
     return pop @sorted_dirs; # Highest N
 }
-     
+
 # Validate a string of form "-Ldir -lfoo -lbar"
 
 sub validate_libs {
@@ -502,8 +540,10 @@
 
 
 sub testcompiler {
- 
-    my $file = "/tmp/testf77$$";
+
+    my $file = File::Spec->tmpdir . "/testf77$$";
+    $file =~ s/\\/\//g; # For Win32
+
     my $ret;
     open(OUT,">$file.f");
     print OUT "      print *, 'Hello World'\n";
@@ -555,7 +595,12 @@
 
 sub find_in_path {
    my @names = @_;
-   my @path = split(":",$ENV{PATH});
+   my @path;
+   if($^O =~ /mswin32/i) {
+     for(@names) { $_ .= '.exe'}
+     @path = split(";", $ENV{PATH});
+     }
+   else {@path = split(":",$ENV{PATH})}
    my ($name,$dir);
    for $name (@names) {
       for $dir (@path) {

Modified: packages/libextutils-f77-perl/trunk/debian/changelog
===================================================================
--- packages/libextutils-f77-perl/trunk/debian/changelog	2006-03-21 12:41:49 UTC (rev 2464)
+++ packages/libextutils-f77-perl/trunk/debian/changelog	2006-03-21 12:52:46 UTC (rev 2465)
@@ -1,3 +1,13 @@
+libextutils-f77-perl (1.15-1) unstable; urgency=low
+
+  * New upstream release
+  * debian/control:
+   - Standards-Version: bumped to 3.6.2 without additional changes
+   - Uploaders: Added me
+  * debian/watch: updated
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org>  Tue, 21 Mar 2006 13:42:01 +0100
+
 libextutils-f77-perl (1.14-3) unstable; urgency=low
 
   * New maintainer: Debian Perl Group (closes: #215542).

Modified: packages/libextutils-f77-perl/trunk/debian/control
===================================================================
--- packages/libextutils-f77-perl/trunk/debian/control	2006-03-21 12:41:49 UTC (rev 2464)
+++ packages/libextutils-f77-perl/trunk/debian/control	2006-03-21 12:52:46 UTC (rev 2465)
@@ -3,8 +3,8 @@
 Priority: optional
 Build-Depends-Indep: debhelper (>=4.1), perl (>= 5.6.0-17)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Luk Claes <luk.claes at ugent.be>
-Standards-Version: 3.6.1
+Uploaders: Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
+Standards-Version: 3.6.2
 
 Package: libextutils-f77-perl
 Architecture: all

Modified: packages/libextutils-f77-perl/trunk/debian/watch
===================================================================
--- packages/libextutils-f77-perl/trunk/debian/watch	2006-03-21 12:41:49 UTC (rev 2464)
+++ packages/libextutils-f77-perl/trunk/debian/watch	2006-03-21 12:52:46 UTC (rev 2465)
@@ -1,2 +1,3 @@
 version=2
-http://www.cpan.org/authors/id/KGB/ExtUtils-F77-(.*)\.tar\.gz
+http://mirrors.kernel.org/cpan/modules/by-module/ExtUtils/ExtUtils-F77-([\d\.]+)\.tar\.gz
+

Modified: packages/libextutils-f77-perl/trunk/t/require.t
===================================================================
--- packages/libextutils-f77-perl/trunk/t/require.t	2006-03-21 12:41:49 UTC (rev 2464)
+++ packages/libextutils-f77-perl/trunk/t/require.t	2006-03-21 12:52:46 UTC (rev 2465)
@@ -5,8 +5,48 @@
 use strict;
 use vars qw/$loaded/;
 
-BEGIN { $| = 1; print "1..1\n"; }
+BEGIN { $| = 1; print "1..2\n"; }
 END {print "not ok 1\n" unless $loaded;}
 use ExtUtils::F77;
 $loaded = 1;
 print "ok 1\n";
+
+# try compiling ?
+
+open(FH,">hello.f");
+print FH "
+      subroutine hello_fortran
+      print *, 'Hello from the wonderful world of fortran'
+c     $ExtUtils::F77::Compiler $ExtUtils::F77::Cflags $ExtUtils::F77::Runtime
+      return
+      end
+";
+
+close FH;
+unlink "hello.o" if(-e "hello.o");
+my $compile_command = "$ExtUtils::F77::Compiler  $ExtUtils::F77::Cflags -c hello.f ";
+my $rc = system($compile_command);
+$rc = 0xffff & $rc;
+if($rc){
+  if($rc == 0xff00){
+	 print "2  ERROR: $compile_command failed: $!";
+  }elsif ($rc > 0x80) {
+	 $rc >>= 8;
+	 print "2  WARNING: $compile_command returned non-zero exit status $rc\n";
+  }else{
+	 if($rc & 0x80){
+		print "2  $compile_command coredumped from signal $rc";
+	 }else{
+		print "2  $compile_command returned signal $rc";
+	 }
+  }  
+}else{
+  unlink "hello.f","hello.o";
+  print "ok 2\n" 
+}
+
+# how about linking - too complicated? 
+
+
+
+




More information about the Pkg-perl-cvs-commits mailing list