--- fort77-1.15.orig/Makefile +++ fort77-1.15/Makefile @@ -1,6 +1,6 @@ PREFIX=$(DESTDIR)/usr BINDIR=$(PREFIX)/bin -MANDIR=$(PREFIX)/man/man1 +MANDIR=$(PREFIX)/share/man/man1 VERSION=1.15 DISTFILES= Makefile fort77.1 tests/baz/bazfoo.f tests/test.pl \ tests/mainmiss.f tests/foo.f tests/long.c tests/long.f tests/synerr.f \ --- fort77-1.15.orig/debian/README.debian +++ fort77-1.15/debian/README.debian @@ -0,0 +1,11 @@ +fort77 for DEBIAN +----------------- + +The Debian package of fort77 is the last upstream release (version 1.15) +with a few bugfixes applied: + + * If f2c fails an error code is returned. + * Some harmless perl warnings are turned off. + * Use /lib/cpp instead of + + -- Mark Brown --- fort77-1.15.orig/debian/changelog +++ fort77-1.15/debian/changelog @@ -0,0 +1,110 @@ +fort77 (1.15-11) unstable; urgency=low + + * Disable mainmiss test to work around an apparent f2c/gcc issue + (closes: #616191). + + -- Mark Brown Sun, 03 Jul 2016 14:43:06 +0200 + +fort77 (1.15-10) unstable; urgency=low + + * Use sh -e for error handling in maintainer scripts. + * No need to ignore distclean errors, we don't delete Makefile. + * Policy 3.9.5 (no changes). + + -- Mark Brown Tue, 04 Feb 2014 13:16:00 +0000 + +fort77 (1.15-9) unstable; urgency=low + + * Policy 3.9.4. + * Use debhelper 9. + + -- Mark Brown Fri, 03 May 2013 14:21:32 +0100 + +fort77 (1.15-8) unstable; urgency=low + + * Accept source files outside the current directory when generating + debug symbols (closes: #507397). + + -- Mark Brown Sun, 07 Dec 2008 11:38:37 +0000 + +fort77 (1.15-7) unstable; urgency=low + + * Policy 3.6.2 (no changes). + * Update to debhelper 4. + + -- Mark Brown Mon, 2 Jan 2006 12:27:02 +0000 + +fort77 (1.15-6) unstable; urgency=low + + * Support .for extension for source files (closes: #248298). + * Policy 3.6.1. + + -- Mark Brown Mon, 10 May 2004 21:01:30 +0100 + +fort77 (1.15-5) unstable; urgency=low + + * Make build deps architecture independant. + * Policy 3.5.8. + + -- Mark Brown Sat, 18 Jan 2003 09:30:22 +0000 + +fort77 (1.15-4) unstable; urgency=low + + * Add support for the f2c option -trapuv as a first class option + (closes: #103510). + * Update manual page. + * Add build depends. + * Updated to policy 3.5.6. + + -- Mark Brown Wed, 4 Jul 2001 20:56:26 +0100 + +fort77 (1.15-3) unstable; urgency=low + + * New maintainer. + * Convert to debhelper. + * Point alternative for f77.1 into /usr/share/man (closes: #46172). + * Apply patch from Michael Fulbright to "fix slightly + so as not to split (harmless) Perl warning messages", taken from + RedHat's 1.14a-3 RPM. + * Depend on perl|perl5 to ease backwards compatibility. + * Use patches from NMUs (closes: #15254, #24423, #29818, #31092, #32399) + * Standards version 3.0.1 (no changes). + + -- Mark Brown Wed, 20 Oct 1999 16:04:20 +0100 + +fort77 (1.15-2.2) unstable; urgency=low + + * NMU for the perl upgrade. Closes: #41482 + * Corrected the perl dependeny. + * Upgraded standards-version to 3.0.0. Uses debstd. + * Bug 32399 is not a bug. Set the severity to fixed. Closes: #32399 + + -- Raphael Hertzog Thu, 22 Jul 1999 20:24:45 +0200 + +fort77 (1.15-2.1) unstable; urgency=low + + * Non-maintainer update. + * Use /lib/cpp instead of gcc as a preprocessor, and added + dependancy on it (fixes #24423 using method in supplied + patch). + * Return an error code when f2c fails (fixes #31092). + * Provide fortran77-compiler (fixes #15254). + * Use /etc/alternatives to provide f77 (fixes wishlist #29818). + + -- Mark Brown Mon, 25 Jan 1999 00:40:35 +0000 + +fort77 (1.15-2) unstable; urgency=high + + * fixed bug in debian/rules which resulted in fort77 not being + included in the binary archive + + -- Thomas Koenig Tue, 15 Jul 1997 13:13:32 +0200 + +fort77 (1.15-1) unstable; urgency=low + + * + * New maintainer release. + * New source code format. + * New "upstream" release + + -- Thomas Koenig Sun, 13 Jul 1997 18:33:49 +0200 --- fort77-1.15.orig/debian/compat +++ fort77-1.15/debian/compat @@ -0,0 +1 @@ +9 --- fort77-1.15.orig/debian/control +++ fort77-1.15/debian/control @@ -0,0 +1,15 @@ +Source: fort77 +Section: devel +Priority: optional +Maintainer: Mark Brown +Standards-Version: 3.9.5 +Build-Depends: f2c, debhelper (>= 9) + +Package: fort77 +Architecture: all +Depends: perl|perl5, f2c, cpp, ${misc:Depends} +Provides: fortran77-compiler +Description: Invoke f2c like a real compiler + The fort77 script invokes the f2c command transparently, so it can be + used like a real Fortran compiler. It can be used to compile Fortran, + C and assembler code, and to link it with the f2c libraries. --- fort77-1.15.orig/debian/copyright +++ fort77-1.15/debian/copyright @@ -0,0 +1,9 @@ +This package was debianized by Thomas Koenig on +Sun, 13 Jul 1997 18:33:49 +0200 and is now maintained by Mark Brown +. + +Upstream author: Thomas Koenig + +Copyright: + +Public domain. Use at your own risk. --- fort77-1.15.orig/debian/fort77.dirs +++ fort77-1.15/debian/fort77.dirs @@ -0,0 +1,2 @@ +usr/share/man/man1 +usr/bin --- fort77-1.15.orig/debian/fort77.files +++ fort77-1.15/debian/fort77.files @@ -0,0 +1 @@ +fort77_1.15-6_all.deb devel optional --- fort77-1.15.orig/debian/fort77.postinst +++ fort77-1.15/debian/fort77.postinst @@ -0,0 +1,4 @@ +#!/bin/sh -e +update-alternatives --install /usr/bin/f77 f77 /usr/bin/fort77 10 --slave /usr/share/man/man1/f77.1.gz f77.1.gz /usr/share/man/man1/fort77.1.gz + +#DEBHELPER# --- fort77-1.15.orig/debian/fort77.prerm +++ fort77-1.15/debian/fort77.prerm @@ -0,0 +1,4 @@ +#!/bin/sh -e +update-alternatives --remove f77 /usr/bin/fort77 + +#DEBHELPER# --- fort77-1.15.orig/debian/rules +++ fort77-1.15/debian/rules @@ -0,0 +1,48 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=fort77 + +build-arch: +build-indep: build +build: + $(checkdir) + ./configure --prefix=/usr + make CFLAGS="-O2 -g -Wall" + + touch build + +clean: + $(checkdir) + -rm -f build + make distclean + -rm -f `find . -name "*~"` + -rm -rf debian/files* core debian/substvars + dh_clean + +binary-arch: build + +binary-indep: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + make install DESTDIR=`pwd`/debian/fort77 + dh_installdocs -i + dh_installchangelogs -i + dh_compress -i + dh_fixperms -i + dh_shlibdeps -i + dh_perl -i + dh_gencontrol -i + dh_installdeb -i + dh_md5sums -i + dh_builddeb -i + + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: binary binary-arch binary-indep clean checkroot --- fort77-1.15.orig/fort77.1 +++ fort77-1.15/fort77.1 @@ -96,6 +96,9 @@ Send output to .BR outfile . .TP 8 +.B -trapuv +Have f2c generate code to trap uninitialized values. +.TP 8 .BR -Wx,arg1 [, arg2 ...] Pass the argument[s] .B argi @@ -147,7 +150,8 @@ .BR -ext , .BR -!bs , .BR -W[n] , -.BR -w8 +.BR -trapuv , +.BR -w8 , .BR -r8 and .BR -w66 . @@ -201,5 +205,10 @@ script does not strictly conform to Posix.2, because it acceppts long options with one leading slash. This is done for gcc compatibility. +.SH SEE ALSO +.BR f2c (1), +.BR cc (1), +.BR as (1), +.BR ld (1) .SH AUTHOR Thomas Koenig, ig25@rz.uni-karlsruhe.de --- fort77-1.15.orig/fort77.in +++ fort77-1.15/fort77.in @@ -12,6 +12,8 @@ $debug = 0; $debugcmd = ""; +$cppcmd = "/lib/cpp -traditional"; + # Loop over all options; pull all options from @ARGV and put all # arguments into @argv. This is needed because, apparently, UNIX # compilers acceppt options anywhere on the command line. @@ -32,7 +34,7 @@ if (/^-[CUuaEhRrz]$/ || /^-I[24]$/ || /^-onetrip$/ || /^-![clPR]$/ || /^-ext$/ || /^-!bs$/ || /^-W[1-9][0-9]*$/ || /^-w8$/ || /^-w66$/ || - /^-r8$/ || /^-N[^n][0-9]+$/) { + /^-r8$/ || /^-N[^n][0-9]+$/ || /^-trapuv$/) { push (@fopts, $_); } elsif (/^-Nn[0-9]+$/) { @@ -208,7 +210,7 @@ $lfile = ""; $basefile = ""; - if (/\.[fF]$/) { + if (/\.[fF]$/ || (/\.[fF][oO][rR]$/)) { $ffile = $_; $basefile = $ffile; } @@ -229,12 +231,12 @@ $cfile = "$tmpdir/fort77-$$-$seq.c"; } if ($debug) { - $debugcmd = ' | @PERL@ -p -e \'s/^(#line.*)""/$1"' - . $ffile . '"/\' ' + $debugcmd = ' | @PERL@ -p -e \'s|^(#line.*)""|$1"' + . $ffile . '"|\' ' } if ($cpp || ($ffile =~ /\.F$/)) { # Backslashes at the end of comment lines confuse cpp... - $pipe = "| @CPP@ -traditional " . + $pipe = "| $cppcmd " . join(' ',@cppopts) . " | @F2C@ " . join(' ',@fopts) . $debugcmd . " > $cfile"; print STDERR "$0: Running \"$pipe\"" if $verbose; @@ -258,6 +260,7 @@ if ($retcode && !$keep_c) { print STDERR "$0: unlinking $cfile\n" if $verbose; unlink $cfile; + $? = $retcode; # Is this right? Seems to work -- broonie die "$0: aborting compilation\n"; } @@ -266,9 +269,9 @@ if ($extract_prototypes) { $pfile = ($basefile =~ /([^\/]*\.).$/)[0] . "P"; open(CFILE, "$cfile") || die ("$0: Cannot open $cfile\n"); - while (($line = ) && - ($line !~ '#ifdef P_R_O_T_O_T_Y_P_E_S\n')) { - print $line; + while (() && + ($_ !~ '#ifdef P_R_O_T_O_T_Y_P_E_S\n')) { + print $_; } if ($_) { open(PFILE, ">$pfile") || die ("$0: Cannot open $pfile\n"); @@ -289,7 +292,7 @@ push(@command,'-o',$output,$compile_only); } elsif ((!$compile_only) || ($compile_only eq '-c')) { - $lfile = ($basefile =~ /([^\/]*\.).$/)[0] . "o"; + $lfile = ($basefile =~ /([^\/\.]*\.).*$/)[0] . "o"; push(@command, '-c', '-o', $lfile); } elsif ($compile_only eq '-S') { --- fort77-1.15.orig/tests/foo.inc +++ fort77-1.15/tests/foo.inc @@ -0,0 +1,3 @@ + programme memain + write (*,*) 'Hello, world!' + end --- fort77-1.15.orig/tests/fooinclude.f +++ fort77-1.15/tests/fooinclude.f @@ -0,0 +1 @@ + INCLUDE 'foo.inc' --- fort77-1.15.orig/tests/test.pl +++ fort77-1.15/tests/test.pl @@ -19,13 +19,14 @@ [ "../fort77 -k foo.f", qw(a.out foo.c) ], [ "../fort77 -g -k foo.f", qw(foo.c a.out) ], [ "../fort77 -c -f long.f", qw(long.o) ], - [ "../fort77 mainmiss.f" ], +# [ "../fort77 mainmiss.f" ], [ "../fort77 -c foo.f && ../fort77 -c mainmiss.f && ../fort77 -o foo foo.o mainmiss.o", qw(foo.o mainmiss.o foo) ], [ "../fort77 -c foo.f && ../fort77 -o foo foo.o mainmiss.f", qw(foo.o foo) ], [ "../fort77 synerr.f && touch gna" ], - [ "../fort77 ishift.f", qw(a.out) ] + [ "../fort77 ishift.f", qw(a.out) ], + [ "if test ! -d subtest; then mkdir subtest; fi && cd subtest && ../../fort77 -g -c -o fooinclude.o -I ../ ../fooinclude.f", qw(subtest/fooinclude.o) ] ]; #