Package: binfmtc Version: 0.15-1 Severity: wishlist G77 is not available in lenny.
Gfortran does Fortran 95 and is available. You can work around the hard coded compiler with ln -s `which gfortran` /usr/local/bin/g77 or export G77=`which gfortran` but the hard coded magic starts with 'c' rather than '!'. Fortran 95 comments start with '!' rather than 'c' or some times 'C' in the first column. I have changed switches in the diff to the ones I need in C. You may want to change them back.
diff -Nur binfmtc-0.15/Makefile.am binfmtc_0.15.local/Makefile.am --- binfmtc-0.15/Makefile.am 2007-07-14 17:05:24.000000000 +0800 +++ binfmtc_0.15.local/Makefile.am 2008-10-02 21:50:47.000000000 +0800 @@ -1,5 +1,6 @@ bin_PROGRAMS=binfmtc-interpreter \ binfmtf-interpreter \ + binfmtf95-interpreter \ binfmtp-interpreter \ binfmtcxx-interpreter \ binfmtasm-interpreter \ @@ -8,6 +9,7 @@ binfmtcxx_interpreter_SOURCES=binfmtc-interpreter.c binfmtc-lang-cxx.c binfmtc.h binfmtc_interpreter_SOURCES=binfmtc-interpreter.c binfmtc-lang-c.c binfmtc.h binfmtf_interpreter_SOURCES=binfmtc-interpreter.c binfmtc-lang-f.c binfmtc.h +binfmtf95_interpreter_SOURCES=binfmtc-interpreter.c binfmtc-lang-f95.c binfmtc.h binfmtp_interpreter_SOURCES=binfmtc-interpreter.c binfmtc-lang-p.c binfmtc.h binfmtasm_interpreter_SOURCES=binfmtc-interpreter.c binfmtc-lang-asm.c binfmtc.h binfmtgcj_interpreter_SOURCES=binfmtc-interpreter.c binfmtc-lang-gcj.c binfmtc.h @@ -31,6 +33,7 @@ dist_man_MANS= binfmtc-interpreter.1 binfmtcxx-interpreter.1 realcsh.c.1 binfmtasm-interpreter.1 \ binfmtf-interpreter.1 \ + binfmtf95-interpreter.1 \ binfmtp-interpreter.1 \ binfmtgcj-interpreter.1 \ realksh.c.8 \ diff -Nur binfmtc-0.15/Makefile.in binfmtc_0.15.local/Makefile.in --- binfmtc-0.15/Makefile.in 2007-09-02 10:02:44.000000000 +0800 +++ binfmtc_0.15.local/Makefile.in 2008-10-02 21:56:12.000000000 +0800 @@ -36,9 +36,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = binfmtc-interpreter$(EXEEXT) \ - binfmtf-interpreter$(EXEEXT) binfmtp-interpreter$(EXEEXT) \ - binfmtcxx-interpreter$(EXEEXT) binfmtasm-interpreter$(EXEEXT) \ - binfmtgcj-interpreter$(EXEEXT) + binfmtf-interpreter$(EXEEXT) binfmtf95-interpreter$(EXEEXT) \ + binfmtp-interpreter$(EXEEXT) binfmtcxx-interpreter$(EXEEXT) \ + binfmtasm-interpreter$(EXEEXT) binfmtgcj-interpreter$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_bin_SCRIPTS) \ $(dist_man_MANS) $(dist_sbin_SCRIPTS) $(srcdir)/Makefile.am \ @@ -75,6 +75,10 @@ binfmtc-lang-f.$(OBJEXT) binfmtf_interpreter_OBJECTS = $(am_binfmtf_interpreter_OBJECTS) binfmtf_interpreter_LDADD = $(LDADD) +am_binfmtf95_interpreter_OBJECTS = binfmtc-interpreter.$(OBJEXT) \ + binfmtc-lang-f95.$(OBJEXT) +binfmtf95_interpreter_OBJECTS = $(am_binfmtf95_interpreter_OBJECTS) +binfmtf95_interpreter_LDADD = $(LDADD) am_binfmtgcj_interpreter_OBJECTS = binfmtc-interpreter.$(OBJEXT) \ binfmtc-lang-gcj.$(OBJEXT) binfmtgcj_interpreter_OBJECTS = $(am_binfmtgcj_interpreter_OBJECTS) @@ -97,12 +101,14 @@ $(binfmtc_interpreter_SOURCES) \ $(binfmtcxx_interpreter_SOURCES) \ $(binfmtf_interpreter_SOURCES) \ + $(binfmtf95_interpreter_SOURCES) \ $(binfmtgcj_interpreter_SOURCES) \ $(binfmtp_interpreter_SOURCES) DIST_SOURCES = $(binfmtasm_interpreter_SOURCES) \ $(binfmtc_interpreter_SOURCES) \ $(binfmtcxx_interpreter_SOURCES) \ $(binfmtf_interpreter_SOURCES) \ + $(binfmtf95_interpreter_SOURCES) \ $(binfmtgcj_interpreter_SOURCES) \ $(binfmtp_interpreter_SOURCES) man1dir = $(mandir)/man1 @@ -212,6 +218,7 @@ binfmtcxx_interpreter_SOURCES = binfmtc-interpreter.c binfmtc-lang-cxx.c binfmtc.h binfmtc_interpreter_SOURCES = binfmtc-interpreter.c binfmtc-lang-c.c binfmtc.h binfmtf_interpreter_SOURCES = binfmtc-interpreter.c binfmtc-lang-f.c binfmtc.h +binfmtf95_interpreter_SOURCES = binfmtc-interpreter.c binfmtc-lang-f95.c binfmtc.h binfmtp_interpreter_SOURCES = binfmtc-interpreter.c binfmtc-lang-p.c binfmtc.h binfmtasm_interpreter_SOURCES = binfmtc-interpreter.c binfmtc-lang-asm.c binfmtc.h binfmtgcj_interpreter_SOURCES = binfmtc-interpreter.c binfmtc-lang-gcj.c binfmtc.h @@ -234,6 +241,7 @@ dist_man_MANS = binfmtc-interpreter.1 binfmtcxx-interpreter.1 realcsh.c.1 binfmtasm-interpreter.1 \ binfmtf-interpreter.1 \ + binfmtf95-interpreter.1 \ binfmtp-interpreter.1 \ binfmtgcj-interpreter.1 \ realksh.c.8 \ @@ -352,6 +360,9 @@ binfmtf-interpreter$(EXEEXT): $(binfmtf_interpreter_OBJECTS) $(binfmtf_interpreter_DEPENDENCIES) @rm -f binfmtf-interpreter$(EXEEXT) $(LINK) $(binfmtf_interpreter_LDFLAGS) $(binfmtf_interpreter_OBJECTS) $(binfmtf_interpreter_LDADD) $(LIBS) +binfmtf95-interpreter$(EXEEXT): $(binfmtf95_interpreter_OBJECTS) $(binfmtf95_interpreter_DEPENDENCIES) + @rm -f binfmtf95-interpreter$(EXEEXT) + $(LINK) $(binfmtf95_interpreter_LDFLAGS) $(binfmtf95_interpreter_OBJECTS) $(binfmtf95_interpreter_LDADD) $(LIBS) binfmtgcj-interpreter$(EXEEXT): $(binfmtgcj_interpreter_OBJECTS) $(binfmtgcj_interpreter_DEPENDENCIES) @rm -f binfmtgcj-interpreter$(EXEEXT) $(LINK) $(binfmtgcj_interpreter_LDFLAGS) $(binfmtgcj_interpreter_OBJECTS) $(binfmtgcj_interpreter_LDADD) $(LIBS) @@ -408,6 +419,7 @@ @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@ @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@ @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@ [EMAIL PROTECTED]@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@ @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@ @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@ diff -Nur binfmtc-0.15/binfmtc-lang-f95.c binfmtc_0.15.local/binfmtc-lang-f95.c --- binfmtc-0.15/binfmtc-lang-f95.c 1970-01-01 08:00:00.000000000 +0800 +++ binfmtc_0.15.local/binfmtc-lang-f95.c 2008-10-02 21:42:47.000000000 +0800 @@ -0,0 +1,40 @@ +/* + * binfmt_misc C Interpreter + * Copyright (C) 2005 Junichi Uekawa + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Fortran bindings. + * + */ +#include <stdio.h> +#include <stdlib.h> +#include "binfmtc.h" + +const char* gcc_x = " -x f95 "; +const char* language_type = "Fortran 95"; +const char* binfmtc_magic="! BINFMTF95:"; + +const char* compiler_name(void) +{ + return getenv("GFORTRAN")?: + "gfortran"; +} + +const char* default_options(void) +{ + return getenv("BINFMTC_GFORTRAN_OPTS")?: + " -O -Wall -Wuninitialized -Werror -pedantic-errors "; +} diff -Nur binfmtc-0.15/binfmtf-interpreter.1 binfmtc_0.15.local/binfmtf-interpreter.1 --- binfmtc-0.15/binfmtf-interpreter.1 2007-07-14 17:05:24.000000000 +0800 +++ binfmtc_0.15.local/binfmtf-interpreter.1 2008-10-02 22:13:43.000000000 +0800 @@ -65,6 +65,7 @@ .B "http://www.netfort.gr.jp/~dancer/software/" .SH "SEE ALSO" +.BR "binfmtf95-interpreter" "(1), " .BR "binfmtc-interpreter" "(1), " .BR "binfmtcxx-interpreter" "(1), " .BR "binfmtgcj-interpreter" "(1), " diff -Nur binfmtc-0.15/binfmtf95-interpreter.1 binfmtc_0.15.local/binfmtf95-interpreter.1 --- binfmtc-0.15/binfmtf95-interpreter.1 1970-01-01 08:00:00.000000000 +0800 +++ binfmtc_0.15.local/binfmtf95-interpreter.1 2008-10-02 21:53:11.000000000 +0800 @@ -0,0 +1,71 @@ +.TH "binfmtf" 1 "2005 Jun 4" "binfmt_misc Dancer" "binfmt_C" +.SH NAME +binfmtf-interpreter \- binfmt_misc fortran handler +.SH SYNOPSIS +.BI "binfmtf-interpreter " "fortran-source-file-name" " [" "command-line opions ..." "]" +.SH "DESCRIPTION" +.B "binfmtf-interpreter" +compiles a fortran source file specified on the command-line using +the g77 compiler, and executes the resulting file. + +It is designed to be used as a handler for +.B "binfmt_misc" +handler, which is a system used in Linux for handling arbitrary files +as executables. + +The command-line options are passed on to the +compiled binary. + +.SH "FILE MAGIC" + +There is a requirement for C source files to have the +magic characters +.B "! BINFMTF:" +at the beginning of the file. + +That line also is used to specify the additional command-line options +for C compiler. + +.SH "ENVIRONMENT" +.TP +.B "GFORTRAN" +The compiler used. +The default is to use +.B "gfortran" + +.TP +.B "BINFMTCTMPDIR" + +Temporary directory used for binary and execution. + +Falls back to +.B "$TMPDIR" +.B "$TEMPDIR" +or +.B "/tmp" + +.TP +.B "BINFMTC_DEBUG" +enables debug output if set. + +.TP +.B "BINFMTC_GFORTRAN_OPTS" +Additional Gfortran options. +Use +.B "BINFMTC_DEBUG" +to verify the options being passed on to gfortran. + +The default is +.B " -O -Wall -Wuninitialized -Werror -pedantic-errors " + +.SH "AUTHOR" +Junichi Uekawa ([EMAIL PROTECTED]) + +Upstream page is available at +.B "http://www.netfort.gr.jp/~dancer/software/" + +.SH "SEE ALSO" +.BR "binfmtc-interpreter" "(1), " +.BR "binfmtcxx-interpreter" "(1), " +.BR "binfmtgcj-interpreter" "(1), " +.BR "binfmtasm-interpreter" "(1)" diff -Nur binfmtc-0.15/binfmtp-interpreter.1 binfmtc_0.15.local/binfmtp-interpreter.1 --- binfmtc-0.15/binfmtp-interpreter.1 2007-07-14 17:05:24.000000000 +0800 +++ binfmtc_0.15.local/binfmtp-interpreter.1 2008-10-02 22:12:41.000000000 +0800 @@ -69,4 +69,5 @@ .BR "binfmtcxx-interpreter" "(1), " .BR "binfmtgcj-interpreter" "(1), " .BR "binfmtf-interpreter" "(1), " +.BR "binfmtf95-interpreter" "(1), " .BR "binfmtasm-interpreter" "(1)"