Hello community, here is the log from the commit of package perl-ExtUtils-F77 for openSUSE:Factory checked in at 2017-10-23 16:51:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-ExtUtils-F77 (Old) and /work/SRC/openSUSE:Factory/.perl-ExtUtils-F77.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-ExtUtils-F77" Mon Oct 23 16:51:52 2017 rev:24 rq:534923 version:1.20 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-ExtUtils-F77/perl-ExtUtils-F77.changes 2011-11-18 16:39:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-ExtUtils-F77.new/perl-ExtUtils-F77.changes 2017-10-23 16:51:54.312578456 +0200 @@ -1,0 +2,53 @@ +Mon Oct 16 10:28:49 UTC 2017 - [email protected] + +- updated to 1.20 + see /usr/share/doc/packages/perl-ExtUtils-F77/CHANGES + + v1.20 released May 28th 2016 + ------------------------------ + + * Apply upstream FreeBSD patch thanks to srezic for submitting + + * Fix fallback compiler logic to support gcc-5.x and higher + + * Limited Improved gfortran linking on OS X Yosemite+ to OS X + + + v1.19_3 released May 28th 2016 + ------------------------------ + + * Apply upstream FreeBSD patch thanks to srezic for submitting + + + v1.19_2 released May 28th 2016 + ------------------------------ + + * Fix fallback compiler logic to support gcc-5.x and higher + + + v1.19_1 released Mar 6th 2016 + ---------------------------- + + * Limited Improved gfortran linking on OS X Yosemite+ to OS X + + + v1.19 released Dec 12th 2015 + ---------------------------- + + * Improved gfortran linking on OS X Yosemite+ which avoids PERL_DL_NONLAZY meltdowns + + + v1.18 released Jul 7th 2015 + --------------------------- + * resolve rt.cpan.org bug #104495: MinGW now needs to link to libquadmath.a + Thanks for the patch, kmx. + + + v1.17_01 released Jul 6th 2014 + ------------------------------ + + * Graham Bell's fix to "Add check for GNU fortran .so files as well as .a." + * Typo fix by dsteinbrunner + * Fix Cygwin table to use Generic GNU settings + +------------------------------------------------------------------- Old: ---- ExtUtils-F77-1.17.tar.gz New: ---- ExtUtils-F77-1.20.tar.gz cpanspec.yml ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-ExtUtils-F77.spec ++++++ --- /var/tmp/diff_new_pack.39c0sJ/_old 2017-10-23 16:51:54.864552623 +0200 +++ /var/tmp/diff_new_pack.39c0sJ/_new 2017-10-23 16:51:54.868552436 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-ExtUtils-F77 # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,58 +15,69 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: perl-ExtUtils-F77 -BuildRequires: gcc-fortran gmp-devel perl -BuildRequires: perl-macros -Version: 1.17 -Release: 1 -AutoReqProv: on -Group: Development/Libraries/Perl -License: Artistic-1.0 -Url: http://cpan.org/modules/by-module/ExtUtils/ +Version: 1.20 +Release: 0 +%define cpan_name ExtUtils-F77 Summary: Simple interface to F77 libs -Source: ExtUtils-F77-%{version}.tar.gz +License: Artistic-1.0 or GPL-1.0+ +Group: Development/Libraries/Perl +Url: http://search.cpan.org/dist/ExtUtils-F77/ +Source0: https://cpan.metacpan.org/authors/id/C/CH/CHM/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml +BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: perl +BuildRequires: perl-macros %{perl_requires} +# MANUAL BEGIN +BuildRequires: gcc-fortran +BuildRequires: gmp-devel +# MANUAL END %description This module tries to figure out how to link C programs with Fortran subroutines on your system. Basically one must add a list of Fortran -runtime libraries. The problem is their location and name varies with -each OS/compiler combination! - +runtime libraries. The problem is their location and name varies with each +OS/compiler combination! - -Authors: --------- - Karl Glazebrook <[email protected]> +This module tries to implement a simple 'rule-of-thumb' database for +various flavours of UNIX systems. A simple self-documenting Perl database +of knowledge/code for figuring out how to link for various combinations of +OS and compiler is embedded in the modules Perl code. Please help save the +world by sending database entries for your system to [email protected] + +Note the default on most systems is now to search for a generic 'GNU' +compiler which can be g77, gfortran or g95 and then find the appropriate +link libraries automatically. (This is the 'Generic' 'GNU' database entry +in the code.) + +The library list which the module returns can be explicitly overridden by +setting the environment variable F77LIBS, e.g. + + % setenv F77LIBS "-lfoo -lbar" + % perl Makefile.PL + ... %prep -%setup -q -n ExtUtils-F77-%{version} +%setup -q -n %{cpan_name}-%{version} %build -perl Makefile.PL -make %{?_smp_mflags} +%{__perl} Makefile.PL INSTALLDIRS=vendor +%{__make} %{?_smp_mflags} %check -make test +%{__make} test %install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install_vendor +%perl_make_install %perl_process_packlist +%perl_gen_filelist -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-, root, root) -%doc COPYING CHANGES README -%doc %{_mandir}/man?/* -%{perl_vendorarch}/auto/ExtUtils -%{perl_vendorlib}/ExtUtils +%files -f %{name}.files +%defattr(-,root,root,755) +%doc CHANGES README +%license COPYING %changelog ++++++ ExtUtils-F77-1.17.tar.gz -> ExtUtils-F77-1.20.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExtUtils-F77-1.17/CHANGES new/ExtUtils-F77-1.20/CHANGES --- old/ExtUtils-F77-1.17/CHANGES 2011-01-01 02:54:54.000000000 +0100 +++ new/ExtUtils-F77-1.20/CHANGES 2016-05-28 21:56:39.000000000 +0200 @@ -1,6 +1,54 @@ ExtUtils::F77 Changes list -------------------------- +v1.20 released May 28th 2016 +------------------------------ + +* Apply upstream FreeBSD patch thanks to srezic for submitting + +* Fix fallback compiler logic to support gcc-5.x and higher + +* Limited Improved gfortran linking on OS X Yosemite+ to OS X + + +v1.19_3 released May 28th 2016 +------------------------------ + +* Apply upstream FreeBSD patch thanks to srezic for submitting + + +v1.19_2 released May 28th 2016 +------------------------------ + +* Fix fallback compiler logic to support gcc-5.x and higher + + +v1.19_1 released Mar 6th 2016 +---------------------------- + +* Limited Improved gfortran linking on OS X Yosemite+ to OS X + + +v1.19 released Dec 12th 2015 +---------------------------- + +* Improved gfortran linking on OS X Yosemite+ which avoids PERL_DL_NONLAZY meltdowns + + +v1.18 released Jul 7th 2015 +--------------------------- +* resolve rt.cpan.org bug #104495: MinGW now needs to link to libquadmath.a + Thanks for the patch, kmx. + + +v1.17_01 released Jul 6th 2014 +------------------------------ + +* Graham Bell's fix to "Add check for GNU fortran .so files as well as .a." +* Typo fix by dsteinbrunner +* Fix Cygwin table to use Generic GNU settings + + v1.17 released Jan 1st 2011 --------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExtUtils-F77-1.17/F77.pm new/ExtUtils-F77-1.20/F77.pm --- old/ExtUtils-F77-1.17/F77.pm 2011-01-01 02:53:06.000000000 +0100 +++ new/ExtUtils-F77-1.20/F77.pm 2016-05-28 21:55:38.000000000 +0200 @@ -38,7 +38,7 @@ =cut -$VERSION = "1.17"; +$VERSION = "1.20"; warn "\nExtUtils::F77: Version $VERSION\n"; @@ -56,73 +56,74 @@ %F77config=(); ########## Win32 Specific ############## -if($^O =~ /MSWin/i) { - my @version; - if($Config{cc} =~ /x86_64\-w64\-mingw32\-gcc/) { - # This must be gcc-4.x.x - $gcc = 'x86_64-w64-mingw32-gcc'; - $gfortran = 'x86_64-w64-mingw32-gfortran'; - $fallback_compiler = 'GFortran'; - } - elsif($Config{gccversion}) { - # Could be either gcc-4.x.x or gcc-3.x.x - $gcc = 'gcc'; - @version = split /\./, $Config{gccversion}; - $fallback_compiler = $version[0] == 4 ? 'GFortran' : 'G77'; - $gfortran = 'gfortran'; - } - else { + +if ($^O =~ /MSWin/i) { + my @version; + if ($Config{cc} =~ /x86_64\-w64\-mingw32\-gcc/) { + # This must be gcc-4.x.x + $gcc = 'x86_64-w64-mingw32-gcc'; + $gfortran = 'x86_64-w64-mingw32-gfortran'; + $fallback_compiler = 'GFortran'; + } + elsif ($Config{gccversion}) { + # Different fortran compiler for gcc-4.x.x (and later) versus gcc-3.x.x + $gcc = 'gcc'; + @version = split /\./, $Config{gccversion}; + $fallback_compiler = $version[0] >= 4 ? 'GFortran' : 'G77'; + $gfortran = 'gfortran'; + } + else { + $gcc = 'gcc'; + $gfortran = 'gfortran'; + $fallback_compiler = 'G77'; + } +} +else { + # No change from version 1.16. $gcc = 'gcc'; $gfortran = 'gfortran'; $fallback_compiler = 'G77'; - } -} -else { - # No change from version 1.16. - $gcc = 'gcc'; - $gfortran = 'gfortran'; - $fallback_compiler = 'G77'; } ############## End of Win32 Specific ############## $F77config{MinGW}{G77}{Link} = sub { - my @libs = ('g2c', 'f2c'); - my ($dir, $lib, $test); - foreach $test (@libs) { + my @libs = ('g2c', 'f2c'); + my ($dir, $lib, $test); + foreach $test (@libs) { $dir = `g77 -print-file-name=lib$test.a`; chomp $dir; # Note that -print-file-name returns just the library name # if it cant be found - make sure that we only accept the # directory if it returns a proper path (or matches a /) if (defined $dir && $dir ne "lib$test.a") { - $lib = $test; # Found an existing library - last; + $lib = $test; # Found an existing library + last; } - } + } - if( defined $dir && defined $lib) { - $dir =~ s,/lib$lib.a$,,; - } else { - $dir = "/usr/local/lib"; - $lib = "f2c"; - } - return( "-L$dir -L/usr/lib -l$lib -lm" ); + if ( defined $dir && defined $lib) { + $dir =~ s,/lib$lib.a$,,; + } else { + $dir = "/usr/local/lib"; + $lib = "f2c"; + } + return( "-L$dir -L/usr/lib -l$lib -lm" ); }; $F77config{MinGW}{GFortran}{Link} = sub { - $dir = `$gfortran -print-file-name=libgfortran.a`; - chomp $dir; - # Note that -print-file-name returns just the library name - # if it cant be found - make sure that we only accept the - # directory if it returns a proper path (or matches a /) + $dir = `$gfortran -print-file-name=libgfortran.a`; + chomp $dir; + # Note that -print-file-name returns just the library name + # if it cant be found - make sure that we only accept the + # directory if it returns a proper path (or matches a /) - if( defined $dir ) { - $dir =~ s,/libgfortran.a$,,; - } else { - $dir = "/usr/local/lib"; - } - return( "-L$dir -L/usr/lib -lgfortran -lm" ); + if ( defined $dir ) { + $dir =~ s,/libgfortran.a$,,; + } else { + $dir = "/usr/local/lib"; + } + return( "-L$dir -L/usr/lib -lgfortran -lquadmath -lm" ); }; $F77config{MinGW}{G77}{Trail_} = 1; @@ -138,10 +139,10 @@ # Returns false if it can't find anything sensible. $F77config{Sunos}{F77}{Link} = sub { - $dir = find_highest_SC("/usr/lang/SC*"); - return "" unless $dir; # Failure - print "$Pkg: Found Fortran latest version lib dir $dir\n"; - return "-L$dir -lF77 -lm"; + $dir = find_highest_SC("/usr/lang/SC*"); + return "" unless $dir; # Failure + print "$Pkg: Found Fortran latest version lib dir $dir\n"; + return "-L$dir -lF77 -lm"; }; # Whether symbols (subroutine names etc.) have trailing underscores @@ -166,85 +167,85 @@ ### Solaris ### $F77config{Solaris}{F77}{Link} = sub { - my $NSPATH; - my $dir; + 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[^/]*)} ) - { - $NSPATH = $1; - } - - elsif ( defined $ENV{'PATH'} ) { - - foreach ( split (/:/,$ENV{PATH}) ) { - if ( m{(.*SUNWspro[^/]*)} ) { - $NSPATH = $1; - last; - } - } - } - - - if (defined $NSPATH) { - - print "$Pkg: Found F77 path:--->$NSPATH\n"; - - $dir = find_highest_SC("$NSPATH/WS*/lib") || - find_highest_SC("$NSPATH/SC*/lib") || - find_highest_SC("$NSPATH/sunwspro*/SUNWspro/SC*/lib"); - - # that failed. try $NSPATH/lib. use glob to - # match for libF77.*, as libF77.a isn't there anymore? - unless ( $dir ) - { - print "$Pkg: Trying $NSPATH/lib\n"; - $dir = "$NSPATH/lib" if glob("$NSPATH/lib/libF77*"); - } - - } else { - } - return "" unless $dir; # Failure - print "$Pkg: Found Fortran latest version lib dir $dir\n"; - - my @libs; - - # determine libraries. F77 and M77 aren't available in the latest - # compilers - my $vcruft = qx/$F77config{Solaris}{F77}{Compiler} -V 2>&1/; - if ( $vcruft =~ /Forte Developer 7/ - || $vcruft =~ /f90:/ - ) - { - push @libs, qw/ - -lf77compat - -lfui - -lfai - -lfai2 - -lfsumai - -lfprodai - -lfminlai - -lfmaxlai - -lfminvai - -lfmaxvai - -lfsu - -lsunmath - -lm - /; - } - else - { - push @libs, qw/ - -lF77 - -lM77 - -lsunmath - -lm - /; - } + #find the SUNWspro entry of nonstandard inst. in LD_LIBRARY_PATH + if ( defined $ENV{'LD_LIBRARY_PATH'} && + $ENV{'LD_LIBRARY_PATH'} =~ m{([^:]*SUNWspro[^/]*)} ) + { + $NSPATH = $1; + } + + elsif ( defined $ENV{'PATH'} ) { + + foreach ( split (/:/,$ENV{PATH}) ) { + if ( m{(.*SUNWspro[^/]*)} ) { + $NSPATH = $1; + last; + } + } + } + + + if (defined $NSPATH) { + + print "$Pkg: Found F77 path:--->$NSPATH\n"; + + $dir = find_highest_SC("$NSPATH/WS*/lib") || + find_highest_SC("$NSPATH/SC*/lib") || + find_highest_SC("$NSPATH/sunwspro*/SUNWspro/SC*/lib"); + + # that failed. try $NSPATH/lib. use glob to + # match for libF77.*, as libF77.a isn't there anymore? + unless ( $dir ) + { + print "$Pkg: Trying $NSPATH/lib\n"; + $dir = "$NSPATH/lib" if glob("$NSPATH/lib/libF77*"); + } + + } else { + } + return "" unless $dir; # Failure + print "$Pkg: Found Fortran latest version lib dir $dir\n"; - join( ' ', "-L$dir", @libs ); - }; + my @libs; + + # determine libraries. F77 and M77 aren't available in the latest + # compilers + my $vcruft = qx/$F77config{Solaris}{F77}{Compiler} -V 2>&1/; + if ( $vcruft =~ /Forte Developer 7/ + || $vcruft =~ /f90:/ + ) + { + 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 ); +}; $F77config{Solaris}{F77}{Trail_} = 1; @@ -261,20 +262,12 @@ $F77config{Generic}{DEFAULT} = 'GNU'; ### cygwin ### -#"-lg2c -lm"; -# needed this on my cygwin system to get things working properly -sub getcyglink { - return join ' ', map {my $lp = `g77 -print-file-name=lib$_.a`; - $lp =~ s|/[^/]+$||; - $lp =~ s|L([a-z,A-Z]):|L//$1|g; - "-L$lp -l$_"} qw/g2c m/; -} -$F77config{Cygwin}{G77}{Trail_} = 1; -$F77config{Cygwin}{G77}{Compiler} = 'g77'; -$F77config{Cygwin}{G77}{Cflags} = '-O'; -$F77config{Cygwin}{G77}{Link} = \&getcyglink; -$F77config{Cygwin}{DEFAULT} = 'G77'; +$F77config{Cygwin}{GNU}{Trail_} = 1; +$F77config{Cygwin}{GNU}{Cflags} = '-O'; # <---need this space! +$F77config{Cygwin}{GNU}{Link} = link_gnufortran_compiler('g77', 'gfortran', 'g95', 'fort77'); +$F77config{Cygwin}{GNU}{Compiler} = find_in_path('g77', "$gfortran", 'g95','fort77'); +$F77config{Cygwin}{DEFAULT} = 'GNU'; ### Linux ### @@ -309,38 +302,38 @@ if (ucfirst($Config{'osname'}) eq "Irix") { - my ($cflags,$mips,$default_abi,$abi,$mips_dir,$libs); - $cflags = $Config{cc}; - ($mips) = ($cflags =~ /(-mips\d)/g); - $mips = "" if ! defined($mips); - $mips_dir = $mips;$mips_dir =~ s/-//g; - $default_abi = $Config{osvers} >= 6.4 ? "-n32" : "-o32"; - GET_ABI: - { - # -32 seems to be synonymous for -o32 (CS) - $abi = "-o32",last GET_ABI if $cflags =~ /-o?32/; - $abi = "-n32",last GET_ABI if $cflags =~ /-n32/; - $abi = "-64",last GET_ABI if $cflags =~ /-64/; - $abi = $default_abi; - } - if ( $abi eq "-64" ){ - $libs = ( (-r "/usr/lib64/$mips_dir") && (-d _) && (-x _) ) ? - "-L/usr/lib64/$mips_dir" : ""; - $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 -lfortran -lm"; - } - if ( $abi eq "-o32" ){ - $libs = "-L/usr/lib -lF77 -lI77 -lU77 -lisam -lm"; - } - $F77config{Irix}{F77}{Cflags} = "$abi $mips"; - $F77config{Irix}{F77}{Link} = "$libs"; - $F77config{Irix}{F77}{Trail_} = 1; - $F77config{Irix}{F77}{Compiler} = "f77 $abi"; - $F77config{Irix}{DEFAULT} = 'F77'; + my ($cflags,$mips,$default_abi,$abi,$mips_dir,$libs); + $cflags = $Config{cc}; + ($mips) = ($cflags =~ /(-mips\d)/g); + $mips = "" if ! defined($mips); + $mips_dir = $mips;$mips_dir =~ s/-//g; + $default_abi = $Config{osvers} >= 6.4 ? "-n32" : "-o32"; + GET_ABI: + { + # -32 seems to be synonymous for -o32 (CS) + $abi = "-o32",last GET_ABI if $cflags =~ /-o?32/; + $abi = "-n32",last GET_ABI if $cflags =~ /-n32/; + $abi = "-64",last GET_ABI if $cflags =~ /-64/; + $abi = $default_abi; + } + if ( $abi eq "-64" ){ + $libs = ( (-r "/usr/lib64/$mips_dir") && (-d _) && (-x _) ) ? + "-L/usr/lib64/$mips_dir" : ""; + $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 -lfortran -lm"; + } + if ( $abi eq "-o32" ){ + $libs = "-L/usr/lib -lF77 -lI77 -lU77 -lisam -lm"; + } + $F77config{Irix}{F77}{Cflags} = "$abi $mips"; + $F77config{Irix}{F77}{Link} = "$libs"; + $F77config{Irix}{F77}{Trail_} = 1; + $F77config{Irix}{F77}{Compiler} = "f77 $abi"; + $F77config{Irix}{DEFAULT} = 'F77'; } ### AIX ### @@ -351,9 +344,49 @@ ### FreeBSD ### -$F77config{Freebsd}{F77}{Trail_} = 1; -$F77config{Freebsd}{F77}{Link} = '-L/usr/lib -lf2c -lm'; -$F77config{Freebsd}{DEFAULT} = 'F77'; +if($^O =~ /Freebsd/i) { + $gfortran = 'gfortran48'; # requires rewrite + $fallback_compiler = 'G77'; +} + +$F77config{Freebsd}{G77}{Link} = sub { + $dir = `g77-34 -print-file-name=libg2c.a`; + chomp $dir; + # Note that -print-file-name returns just the library name + # if it cant be found - make sure that we only accept the + # directory if it returns a proper path (or matches a /) + + if( defined $dir ) { + $dir =~ s,/libg2c.a$,,; + } else { + $dir = "/usr/local/lib"; + } + return( "-L$dir -L/usr/lib -lg2c -lm" ); +}; + +$F77config{Freebsd}{GFortran}{Link} = sub { + $dir = `$gfortran -print-file-name=libgfortran.a`; + chomp $dir; + # Note that -print-file-name returns just the library name + # if it cant be found - make sure that we only accept the + # directory if it returns a proper path (or matches a /) + + if( defined $dir ) { + $dir =~ s,/libgfortran.a$,,; + } else { + $dir = "/usr/local/lib"; + } + return( "-L$dir -L/usr/lib -lgfortran -lm" ); +}; + +$F77config{Freebsd}{G77}{Trail_} = 1; +$F77config{Freebsd}{GFortran}{Trail_} = 1; +$F77config{Freebsd}{G77}{Compiler} = 'g77-34'; +$F77config{Freebsd}{GFortran}{Compiler} = "$gfortran"; +$F77config{Freebsd}{G77}{Cflags} = '-O2'; +$F77config{Freebsd}{GFortran}{Cflags} = '-O2'; +$F77config{Freebsd}{DEFAULT} = 'GFortran'; + ### VMS ### @@ -408,7 +441,7 @@ $compiler = get $F77config{$system}{DEFAULT} unless $compiler; print "$Pkg: Using system=$system compiler=" . - (defined $compiler ? $compiler : "<undefined>") . "\n"; + (defined $compiler ? $compiler : "<undefined>") . "\n"; if (defined($ENV{F77LIBS})) { print "Overriding Fortran libs from value of enviroment variable F77LIBS = $ENV{F77LIBS}\n"; @@ -416,44 +449,50 @@ } else { - # Try this combination + # Try this combination - if ( defined( $compiler ) and defined( $F77config{$system} )){ - my $flibs = get ($F77config{$system}{$compiler}{Link}); - if ($flibs ne "") { - $Runtime = $flibs;# . gcclibs(); - # We don't want to append gcc libs if we are using - # non gnu compilers. Initially, explicitly check for - # use of sun compiler - #$Runtime .= gcclibs($flibs) unless $flibs =~ /sunmath/; - #(Note appending gcclibs seems to be no longer required) - $Runtime =~ s|L([a-z,A-Z]):|L//$1|g if $^O =~ /cygwin/i; - $Runtime = ' ' if $^O eq 'VMS'; # <-- need this space! - print "Runtime: $Runtime\n"; - $ok = 1; - $ok = validate_libs($Runtime) if $flibs ne ""; - } - }else { - $Runtime = $ok = ""; - } + if ( defined( $compiler ) and defined( $F77config{$system} )){ + my $flibs = get ($F77config{$system}{$compiler}{Link}); + if ($flibs ne "") { + $Runtime = $flibs;# . gcclibs(); + # We don't want to append gcc libs if we are using + # non gnu compilers. Initially, explicitly check for + # use of sun compiler + #$Runtime .= gcclibs($flibs) unless $flibs =~ /sunmath/; + #(Note appending gcclibs seems to be no longer required) + $Runtime =~ s|L([a-z,A-Z]):|L//$1|g if $^O =~ /cygwin/i; + $Runtime = ' ' if $^O eq 'VMS'; # <-- need this space! + print "Runtime: $Runtime\n"; + $ok = 1; + if ($compiler eq 'GNU') { # Special gfortran case since it seems to have lots of random libs + print "Found compiler=$compiler - skipping validation of $Runtime \n"; + + }else { + $ok = validate_libs($Runtime) if $flibs ne "" ; + } + } + }else { + $Runtime = $ok = ""; + } - # If it doesn't work try Generic + GNU77 + # If it doesn't work try Generic + GNU77 unless (("$Runtime" ne "-LSNAFU -lwontwork") && $ok) { - print <<"EOD"; -$Pkg: Unable to guess and/or validate system/compiler configuration -$Pkg: Will try system=Generic Compiler=$fallback_compiler + print <<"EOD"; + $Pkg: Unable to guess and/or validate system/compiler configuration + $Pkg: Will try system=Generic Compiler=$fallback_compiler EOD - $system = - $Config{cc} =~ /\bgcc/ && $^O =~ /MSWin32/i ? "MinGW" - :"Generic"; - $compiler = $fallback_compiler; - my $flibs = get ($F77config{$system}{$compiler}{Link}); - $Runtime = $flibs ; #. gcclibs($flibs); # Note gcclibs appears to be no longer required. - $ok = validate_libs($Runtime) if $flibs ne ""; - print "$Pkg: Well that didn't appear to validate. Well I will try it anyway.\n" - unless $Runtime && $ok; - } + $system = + $Config{cc} =~ /\bgcc/ && $^O =~ /MSWin32/i ? "MinGW" + : $^O =~ /Freebsd/i ? "Freebsd" + :"Generic"; + $compiler = $fallback_compiler; + my $flibs = get ($F77config{$system}{$compiler}{Link}); + $Runtime = $flibs ; #. gcclibs($flibs); # Note gcclibs appears to be no longer required. + $ok = validate_libs($Runtime) if $flibs ne ""; + print "$Pkg: Well that didn't appear to validate. Well I will try it anyway.\n" + unless $Runtime && $ok; + } $RuntimeOK = $ok; @@ -466,33 +505,33 @@ } else{ print << "EOD"; -$Pkg: There does not appear to be any configuration info about -$Pkg: names with trailing underscores for system $system. Will assume -$Pkg: F77 names have trailing underscores. + $Pkg: There does not appear to be any configuration info about + $Pkg: names with trailing underscores for system $system. Will assume + $Pkg: F77 names have trailing underscores. EOD $Trail_ = 1; } if (defined( $F77config{$system}{$compiler}{Compiler} )) { - $Compiler = get $F77config{$system}{$compiler}{Compiler}; + $Compiler = get $F77config{$system}{$compiler}{Compiler}; } else { - print << "EOD"; -$Pkg: There does not appear to be any configuration info about -$Pkg: the F77 compiler name. Will assume 'f77'. + print << "EOD"; + $Pkg: There does not appear to be any configuration info about + $Pkg: the F77 compiler name. Will assume 'f77'. EOD - $Compiler = 'f77'; + $Compiler = 'f77'; } -print "$Pkg: Compiler: $Compiler\n"; + print "$Pkg: Compiler: $Compiler\n"; if (defined( $F77config{$system}{$compiler}{Cflags} )) { - $Cflags = get $F77config{$system}{$compiler}{Cflags} ; + $Cflags = get $F77config{$system}{$compiler}{Cflags} ; } else { - print << "EOD"; -$Pkg: There does not appear to be any configuration info about -$Pkg: the options for the F77 compiler. Will assume none -$Pkg: necessary. + print << "EOD"; + $Pkg: There does not appear to be any configuration info about + $Pkg: the options for the F77 compiler. Will assume none + $Pkg: necessary. EOD - $Cflags = ''; + $Cflags = ''; } print "$Pkg: Cflags: $Cflags\n"; @@ -536,7 +575,7 @@ More methods will probably be added in the future. =cut - + sub runtime { return $Runtime; } sub runtimeok { return $RuntimeOK; } sub trail_ { return $Trail_; } @@ -552,28 +591,28 @@ # Test if any files exist matching glob sub any_exists { - my @glob = glob(shift); - return scalar(@glob); + my @glob = glob(shift); + return scalar(@glob); } # Find highest version number of SCN.N(.N) directories # (Nasty SunOS/Solaris naming scheme for F77 libs] sub find_highest_SC { - print "$Pkg: Scanning for $_[0]\n"; - my @glob = glob(shift); - my %n=(); - for (@glob) { + print "$Pkg: Scanning for $_[0]\n"; + my @glob = glob(shift); + my %n=(); + for (@glob) { #print "Found $_\n"; - if ( m|/SC(\d)\.(\d)/?.*$| ) { - $n{$_} = $1 *100 + $2 * 10; - } - if ( m|/SC(\d)\.(\d)\.(\d)/?.*$| ) { - $n{$_} = $1 *100 + $2 * 10 + $3; - } - } - my @sorted_dirs = grep {-f "$_/libF77.a"} sort {$n{$a} <=> $n{$b}} @glob; + if ( m|/SC(\d)\.(\d)/?.*$| ) { + $n{$_} = $1 *100 + $2 * 10; + } + if ( m|/SC(\d)\.(\d)\.(\d)/?.*$| ) { + $n{$_} = $1 *100 + $2 * 10 + $3; + } + } + my @sorted_dirs = grep {-f "$_/libF77.a"} sort {$n{$a} <=> $n{$b}} @glob; - return pop @sorted_dirs; # Highest N + return pop @sorted_dirs; # Highest N } # Validate a string of form "-Ldir -lfoo -lbar" @@ -603,7 +642,7 @@ print "\n$Pkg: Unable to find library $_" ; $ret = 0; } - } + } } print $ret ? "[ok]\n" : "\n"; return $ret; @@ -612,33 +651,33 @@ sub testcompiler { - my $file = File::Spec->tmpdir . "/testf77$$"; - $file =~ s/\\/\//g; # For Win32 + my $file = File::Spec->tmpdir . "/testf77$$"; + $file =~ s/\\/\//g; # For Win32 - my $ret; - open(OUT,">$file.f"); - print OUT " print *, 'Hello World'\n"; - print OUT " end\n"; - close(OUT); - print "Compiling the test Fortran program...\n"; - system "$Compiler $Cflags $file.f -o ${file}_exe"; - print "Executing the test program...\n"; - if (`${file}_exe` ne " Hello World\n") { - print "Test of Fortran Compiler FAILED. \n"; - print "Do not know how to compile Fortran on your system\n"; - $ret=0; - } - else{ - print "Congratulations you seem to have a working f77!\n"; - $ret=1; - } - unlink("${file}_exe"); unlink("$file.f"); unlink("$file.o") if -e "$file.o"; - return $ret; + my $ret; + open(OUT,">$file.f"); + print OUT " print *, 'Hello World'\n"; + print OUT " end\n"; + close(OUT); + print "Compiling the test Fortran program...\n"; + system "$Compiler $Cflags $file.f -o ${file}_exe"; + print "Executing the test program...\n"; + if (`${file}_exe` ne " Hello World\n") { + print "Test of Fortran Compiler FAILED. \n"; + print "Do not know how to compile Fortran on your system\n"; + $ret=0; + } + else{ + print "Congratulations you seem to have a working f77!\n"; + $ret=1; + } + unlink("${file}_exe"); unlink("$file.f"); unlink("$file.o") if -e "$file.o"; + return $ret; }; # gcclibs() routine # Return gcc link libs (e.g. -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3_U1/2.7.0 -lgcc) -# Note this routine appears to be no longer requred - gcc3 or 4 change? - and is +# Note this routine appears to be no longer required - gcc3 or 4 change? - and is # NO LONGER CALLED from anywhere in the code. Use of this routine in the future # is DEPRECATED. Retain here just in case this logic is ever needed again, # - Karl Glazebrook Dec/2010 @@ -651,25 +690,25 @@ $isgcc = 1 if $Config{gccversion}; my $string; if ($isgcc) { - $string = "Compiler is gcc version $Config{gccversion}"; - $string .= "\n" unless $string =~ /\n$/; + $string = "Compiler is gcc version $Config{gccversion}"; + $string .= "\n" unless $string =~ /\n$/; } else { - $string = "Not gcc\n"; + $string = "Not gcc\n"; } print $string; } if ($isgcc or ($flibs =~ /-lg2c/) or ($flibs =~ /-lf2c/) ) { - # Don't link to libgcc on MS Windows iff we're using gfortran. - unless($fallback_compiler eq 'GFortran' && $^O =~ /MSWin/i) { + # Don't link to libgcc on MS Windows iff we're using gfortran. + unless($fallback_compiler eq 'GFortran' && $^O =~ /MSWin/i) { $gccdir = `$gcc -m32 -print-libgcc-file-name`; chomp $gccdir; $gccdir =~ s/\/libgcc.a//; return " -L$gccdir -lgcc"; - }else{ + }else{ return ""; - } + } }else{ - return ""; + return ""; } } @@ -678,20 +717,20 @@ sub find_in_path { my @names = @_; my @path; - if($^O =~ /mswin32/i) { - for(@names) { $_ .= '.exe'} - @path = split(";", $ENV{PATH}); - } + if ($^O =~ /mswin32/i) { + for(@names) { $_ .= '.exe'} + @path = split(";", $ENV{PATH}); + } else {@path = split(":",$ENV{PATH})} my ($name,$dir); for $name (@names) { return $name if exists $CACHE{$name}; for $dir (@path) { if (-x $dir."/$name") { - print "Found compiler $name\n"; - $CACHE{$name}++; - return $name; - } + print "Found compiler $name\n"; + $CACHE{$name}++; + return $name; + } } } return '' if $^O eq 'VMS'; @@ -702,36 +741,57 @@ # Based on code from Tim Jeness, tries to figure out the correct GNU # fortran compiler libs sub link_gnufortran_compiler { - return () if $^O =~ /MSWin32/i; # Unneeded for MinGW, emits warnings if allowed to proceed. - my @try = @_; - my $compiler = find_in_path( @try ); - # all the compilers and their libraries - my %complibs = ( - g77 => [qw/ g2c f2c /], - f77 => [qw/ g2c f2c /], - fort77 => [qw/ g2c f2c /], - gfortran => [qw/ gfortran /], - g95 => [qw/ f95 /], - ); - return () unless defined $compiler; - my @libs = @{$complibs{$compiler}}; - my ($dir, $lib, $test); - foreach $test (@libs) { + return () if $^O =~ /MSWin32/i; # Unneeded for MinGW, emits warnings if allowed to proceed. + my @try = @_; + my $compiler = find_in_path( @try ); + # all the compilers and their libraries + my %complibs = ( + g77 => [qw/ g2c f2c /], + f77 => [qw/ g2c f2c /], + fort77 => [qw/ g2c f2c /], + gfortran => [qw/ gfortran /], + g95 => [qw/ f95 /], + ); + return () unless defined $compiler; + my @libs = @{$complibs{$compiler}}; + my ($dir, $lib, $test); + foreach $test (@libs) { $dir = `$compiler -print-file-name=lib$test.a`; - chomp $dir; - # Note that -print-file-name returns just the library name - # if it cant be found - make sure that we only accept the - # directory if it returns a proper path (or matches a /) - if (defined $dir && $dir ne "lib$test.a") { - $lib = $test; # Found an existing library - $dir =~ s,/lib$lib.a$,,; - last; - } else { - $dir = "/usr/local/lib"; - $lib = "f2c"; - } - } - return( "-L$dir -L/usr/lib -l$lib -lm" ); + chomp $dir; + # Note that -print-file-name returns just the library name + # if it cant be found - make sure that we only accept the + # directory if it returns a proper path (or matches a /) + if (defined $dir && $dir ne "lib$test.a") { + $lib = $test; # Found an existing library + $dir =~ s,/lib$lib.a$,,; + last; + } else { + # Try the same thing again but looking for the .so file + # rather than the .a file. + $dir = `$compiler -print-file-name=lib$test.so`; + chomp $dir; + if (defined $dir && $dir ne "lib$test.so") { + $lib = $test; # Found an existing library + $dir =~ s,/lib$lib.so$,,; + last; + } else { + $dir = "/usr/local/lib"; + $lib = "f2c"; + } + } + } + # Get compiler version number + my @t =`$compiler --version`; $t[0] =~ /(\d+).(\d)+.(\d+)/; + my $version = "$1.$2"; # Major version number + print "ExtUtils::F77: $compiler version $version.$3\n"; + # Sigh special case random extra gfortran libs to avoid PERL_DL_NONLAZY meltdowns. KG 25/10/2015 + $append = ""; + if ( $Config{osname} =~ /darwin/ && $Config{osvers} >= 14 + && $compiler eq 'gfortran' && $version >= 4.9 ) { # Add extra libs for gfortran versions >= 4.9 and OS X + $append = "-lgcc_ext.10.5 -lgcc_s.10.5 -lquadmath"; + return( "-L$dir $append -L/usr/lib -l$lib -lm" ); + } + return( "-L$dir -L/usr/lib -l$lib -lm" ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExtUtils-F77-1.17/MANIFEST new/ExtUtils-F77-1.20/MANIFEST --- old/ExtUtils-F77-1.17/MANIFEST 2007-04-02 06:53:11.000000000 +0200 +++ new/ExtUtils-F77-1.20/MANIFEST 2016-05-28 21:57:33.000000000 +0200 @@ -1,8 +1,9 @@ CHANGES -README -Makefile.PL +COPYING F77.pm -MANIFEST +Makefile.PL +MANIFEST This list of files +META.yml +README t/require.t -COPYING -META.yml Module meta-data (added by MakeMaker) +META.json Module JSON meta-data (added by MakeMaker) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExtUtils-F77-1.17/META.json new/ExtUtils-F77-1.20/META.json --- old/ExtUtils-F77-1.17/META.json 1970-01-01 01:00:00.000000000 +0100 +++ new/ExtUtils-F77-1.20/META.json 2016-05-28 21:57:33.000000000 +0200 @@ -0,0 +1,39 @@ +{ + "abstract" : "a simple interface to F77 libs", + "author" : [ + "Karl Glazebrook <[email protected]>" + ], + "dynamic_config" : 1, + "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "ExtUtils-F77", + "no_index" : { + "directory" : [ + "t", + "inc" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "0" + } + }, + "runtime" : { + "requires" : {} + } + }, + "release_status" : "stable", + "version" : "1.20" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExtUtils-F77-1.17/META.yml new/ExtUtils-F77-1.20/META.yml --- old/ExtUtils-F77-1.17/META.yml 2011-01-01 03:01:51.000000000 +0100 +++ new/ExtUtils-F77-1.20/META.yml 2016-05-28 21:57:33.000000000 +0200 @@ -1,18 +1,21 @@ ---- #YAML:1.0 -name: ExtUtils-F77 -version: 1.17 -abstract: ~ -author: [] -license: unknown -distribution_type: module +--- +abstract: 'a simple interface to F77 libs' +author: + - 'Karl Glazebrook <[email protected]>' +build_requires: + ExtUtils::MakeMaker: '0' configure_requires: - ExtUtils::MakeMaker: 0 -requires: {} -no_index: - directory: - - t - - inc -generated_by: ExtUtils::MakeMaker version 6.48 + ExtUtils::MakeMaker: '0' +dynamic_config: 1 +generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001' +license: perl meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: '1.4' +name: ExtUtils-F77 +no_index: + directory: + - t + - inc +requires: {} +version: '1.20' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ExtUtils-F77-1.17/Makefile.PL new/ExtUtils-F77-1.20/Makefile.PL --- old/ExtUtils-F77-1.17/Makefile.PL 1999-05-11 10:32:44.000000000 +0200 +++ new/ExtUtils-F77-1.20/Makefile.PL 2015-12-12 20:04:45.000000000 +0100 @@ -5,9 +5,11 @@ # # See lib/ExtUtils/MakeMaker.pm for details of how to influence # # the contents of the Makefile that is written. WriteMakefile( - 'NAME' => 'ExtUtils::F77', - 'VERSION_FROM' => 'F77.pm', - 'linkext' => {LINKTYPE => ''}, # Only .pm files in this directory - 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" } + 'NAME' => 'ExtUtils::F77', + 'ABSTRACT' => 'a simple interface to F77 libs', + 'AUTHOR' => 'Karl Glazebrook <[email protected]>', + 'LICENSE' => 'perl_5', + 'VERSION_FROM' => 'F77.pm', + 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" }, # Is this still needed? ); ++++++ cpanspec.yml ++++++ --- #description_paragraphs: 3 #description: |- # override description from CPAN #summary: override summary from CPAN #no_testing: broken upstream #sources: # - source1 # - source2 #patches: # foo.patch: -p1 # bar.patch: preamble: |- BuildRequires: gcc-fortran gmp-devel #post_prep: |- # hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` # sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL #post_build: |- # rm unused.files #post_install: |- # sed on %{name}.files #license: SUSE-NonFree #skip_noarch: 1 #custom_build: |- #./Build build flags=%{?_smp_mflags} --myflag #custom_test: |- #startserver && make test #ignore_requires: Bizarre::Module
