--- libf2c2-20090411.orig/debian/README.debian
+++ libf2c2-20090411/debian/README.debian
@@ -0,0 +1,19 @@
+libf2c for debian
+-----------------
+
+Original source downloaded from:
+ftp://netlib.bell-labs.com/netlib/f2c/libf2c.zip
+
+As sugested by upstream in their README, f2c.h was extended to use only
+'int' instead of 'long int' on architectures where the size of the latter
+is 8 bytes (alpha, ia64, amd64 and sparc64) and makes libf2c not
+compatible with g77. All other architectures still use "long int".
+
+The libF77 has been MODIFIED to work on MC68k machines. Thus the
+libf77 file now differs from that in the original version. I hope
+this will be temporary until the M68K is fully supported by f2c. This
+only affects the new -trapuv (trap unitialised values) flag which
+requires the co-processor exception control mask to be set up.
+
+ Alan Bain <afrb2@debian.org> Sat, 10 May 2008
+ Evgeni Golov (32/64-bit update) <sargentd@die-welt.net> Sat, 03 Jan 2009
--- libf2c2-20090411.orig/debian/changelog
+++ libf2c2-20090411/debian/changelog
@@ -0,0 +1,78 @@
+libf2c2 (20090411-2) unstable; urgency=low
+
+ * Small code changes to uninit.c to fix compilation problems
+ on armel architecture
+
+ -- Alan Bain <afrb2@debian.org> Thu, 6 Aug 2009 20:25:32 +0100
+
+
+libf2c2 (20090411-1) unstable; urgency=low
+
+ * New upstream source including C++ const correctness changes
+ and avoid use of default return type of int
+ * Incorporate changes from NMU and remove f2c_master.h
+ * Remove .comment section from the shared libraries
+
+ -- Alan Bain <afrb2@debian.org> Wed, 5 Aug 2009 21:45:54 +0100
+
+libf2c2 (20061008-4.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Don't sed away long on alpha and ia64, that was an ugly hack.
+ * Instead add some ifdefs to f2c.h so we catch all archs where
+ a long is 8 bytes and use only int there (make sure not to break
+ other architectures by keeping long int there).
+ Update README.debian accordingly.
+ Also update f2c.h0 and f2c_master.h, so the files match, even if
+ they are unused.
+ Closes: #442018, #508565.
+ * Clean debian/*.debhelper.log.
+
+ -- Evgeni Golov <sargentd@die-welt.net> Sat, 03 Jan 2009 03:41:30 +0100
+
+libf2c2 (20061008-4) unstable; urgency=low
+ * Remove CVS directory left in source package
+ -- Alan Bain <afrb2@debian.org> Mon, 19 May 2008 22:50:54 +0100
+
+libf2c2 (20061008-3) unstable; urgency=low
+ * fix broken symlinks in -dev package
+ -- Alan Bain <afrb2@debian.org> Sat, 17 May 2008 00:40:40 +0100
+
+libf2c2 (20061008-2) unstable; urgency=low
+ * fixes to shared library integer size in IO calls; normal
+ version was being overwritten by version for -I2 option,
+ causing segmentation faults with certain IO operations.
+ -- Alan Bain <afrb2@debian.org> Fri, 16 May 2008 23:00:40 +0100
+
+libf2c2 (20061008-1) unstable; urgency=low
+ * new upstream source fixes various problems on 64 bit platforms
+ * fixes for the _i2 library in build (file IO with short int params)
+ * fixes for int size for IA64
+ * don't set DH_COMPAT but use debian/compat
+ * include notes on integer size in debian README
+ * avoid use of ${Source-Version}
+
+ -- Alan Bain <afrb2@debian.org> Sat, 10 May 2008 14:40:40 +0100
+
+
+
+libf2c2 (20050501-3) unstable; urgency=low
+ * Remove bashishm from debian/rules (closes: bug#477611)
+ * Generate md5sums
+ * Use the nostrip option (closes: bug#437370)
+ * This package is not orphaned (closes: bug#465911)
+ -- Alan Bain <afrb2@debian.org> Sun, 27 Apr 2008 16:40:40 +0100
+
+libf2c2 (20050501-2) unstable; urgency=low
+ * Previous version erroneously assumed f2c.h was on include
+ path, now fixed (closes: bug#328938)
+
+ -- Alan Bain <afrb2@debian.org> Sun, 18 Sep 2005 20:27:40 +0100
+
+libf2c2 (20050501-1) unstable; urgency=low
+ * Initial Release after separating from f2c
+ * As per debian policy the shared libraries to support programs
+ build using f2c should not be part of the f2c package.
+
+ -- Alan Bain <afrb2@debian.org> Mon, 22 Aug 2005 20:23:49 +0100
+
--- libf2c2-20090411.orig/debian/compat
+++ libf2c2-20090411/debian/compat
@@ -0,0 +1 @@
+5
--- libf2c2-20090411.orig/debian/control
+++ libf2c2-20090411/debian/control
@@ -0,0 +1,30 @@
+Source: libf2c2
+Section: devel
+Priority: optional
+Maintainer: Alan Bain <afrb2@debian.org>
+Standards-Version: 3.8.2
+Build-Depends: debhelper(>=5.0)
+
+Package: libf2c2
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Conflicts: f2c (<< 20050501-1)
+Description: Shared libraries for use with FORTRAN applications
+ These are the shared libraries required for running
+ applications containing a component written in FORTRAN
+ which was converted to C using the FORTRAN to C translator
+ f2c.
+
+Package: libf2c2-dev
+Section: libdevel
+Architecture: any
+Depends: libf2c2 (= ${binary:Version}), libc6-dev
+Conflicts: f2c (<< 20050501-1)
+Description: Development libraries for use with f2c
+ These are the necessary static libraries and header
+ files for an implementation of the fortran intrinsic
+ functions and IO functions.
+ .
+ They are required when linking applications built from the
+ C output from the FORTRAN to C translator f2c.
--- libf2c2-20090411.orig/debian/copyright
+++ libf2c2-20090411/debian/copyright
@@ -0,0 +1,23 @@
+/****************************************************************
+Copyright 1990 - 1995 by AT&T Bell Laboratories and Bellcore.
+
+Permission to use, copy, modify, and distribute this software
+and its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the names of AT&T Bell Laboratories or
+Bellcore or any of their entities not be used in advertising or
+publicity pertaining to distribution of the software without
+specific, written prior permission.
+
+AT&T and Bellcore disclaim all warranties with regard to this
+software, including all implied warranties of merchantability
+and fitness. In no event shall AT&T or Bellcore be liable for
+any special, indirect or consequential damages or any damages
+whatsoever resulting from loss of use, data or profits, whether
+in an action of contract, negligence or other tortious action,
+arising out of or in connection with the use or performance of
+this software.
+****************************************************************/
+
--- libf2c2-20090411.orig/debian/make_lib
+++ libf2c2-20090411/debian/make_lib
@@ -0,0 +1,19 @@
+#/usr/bin/make -f
+
+all:
+ cd ..
+ $(MAKE) -f makefile.u CFLAGS="$(GCCOPT) -fPIC \
+ -I ../ -DNON_UNIX_STDIO -D$(INTSIZE)"
+
+ gcc -shared -Wl,-soname,lib$(INTSIZE).so.2\
+ -o lib$(INTSIZE).so.2.1 *.o -lc -lm
+
+ ar r lib$(INTSIZE).a *.o
+ ranlib lib$(INTSIZE).a
+ touch build_$(INTSIZE)
+
+clean:
+ cd ..
+ $(MAKE) -f makefile.u clean
+
+
--- libf2c2-20090411.orig/debian/postinst
+++ libf2c2-20090411/debian/postinst
@@ -0,0 +1,8 @@
+#! /bin/sh
+set -e
+
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
+
+
--- libf2c2-20090411.orig/debian/postrm
+++ libf2c2-20090411/debian/postrm
@@ -0,0 +1,8 @@
+#! /bin/sh
+set -e
+if [ "$1" = "remove" ]; then
+ ldconfig
+fi
+
+
+
--- libf2c2-20090411.orig/debian/rules
+++ libf2c2-20090411/debian/rules
@@ -0,0 +1,169 @@
+#!/usr/bin/make -f
+# -*- mode: makefile; -*-
+
+# debian.rules file - for libf2c
+
+
+package=libf2c2
+package-dev=libf2c2-dev
+prefix-dev=debian/libf2c2-dev
+prefix=debian/libf2c2
+
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+dir=$(package)-$(version)
+file=$(package)_$(version)-$(debian)
+flibmajorver=2
+flibver=2.1
+
+
+
+INSTALL = /usr/bin/install
+INSTALL_LIB = $(INSTALL) -o root -g root -m 0644
+
+CDEBUGFLAGS = -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CDEBUGFLAGS += -O0
+else
+ CDEBUGFLAGS += -O2
+endif
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_LIB += -s
+endif
+
+
+
+# Optimization options.
+GCCOP2=-ansi $(CDEBUGFLAGS) -fomit-frame-pointer -mieee-fp -D_GNU_SOURCE -DDEBIAN
+GCCOP1=-ansi $(CDEBUGFLAGS) -fomit-frame-pointer -D_GNU_SOURCE -DDDEBIAN
+
+## Avoid using -mieee-fp on anything other than the i386 platform
+## as it is a gcc i386 specific option
+ifeq ($(DEB_HOST_ARCH),i386)
+ GCCOPT=$(GCCOP2)
+else
+ GCCOPT=$(GCCOP1)
+endif
+
+build:
+ $(checkdir)
+
+
+
+ if [ $(DEB_HOST_ARCH) = "i386" ] ;\
+ then echo "Building for i386" ;\
+ fi
+
+## These take gcc options from GCCOPT
+ $(MAKE) -f ./debian/make_lib INTSIZE=f2c GCCOPT="$(GCCOPT)"
+## Make sure everything rebuilt for -I2 lib
+ $(MAKE) -f ./debian/make_lib clean
+ $(MAKE) -f ./debian/make_lib INTSIZE=f2c_i2 GCCOPT="$(GCCOPT)"
+ touch build
+
+clean:
+ $(checkdir)
+ $(MAKE) -f ./debian/make_lib clean
+ rm -f libf2c* *.tmp __* *~
+ rm -f build build_f2c build_f2c_i2
+ rm -rf debian/libf2c2-dev
+ rm -rf debian/libf2c2
+ rm -rf debian/*~ debian/files* debian/substvars.* debian/*.debhelper.log
+
+binary-indep: checkroot build
+ ${checkdir}
+
+
+binary-arch: checkroot
+ rm -rf debian/libf2c-dev
+ rm -rf debian/libf2c
+ install -d ${prefix} ${prefix}/DEBIAN
+ install -d ${prefix-dev} ${prefix-dev}/DEBIAN
+ install -d ${prefix}/usr/share/doc/${package}
+ install -d ${prefix-dev}/usr/share/doc/${package-dev}
+
+ install -c -m 0644 debian/shlibs.libf2c2 ${prefix}/DEBIAN/shlibs
+
+ install -c -m 0755 debian/postinst ${prefix}/DEBIAN
+ install -c -m 0755 debian/postrm ${prefix}/DEBIAN
+
+ install -d -m 0755 ${prefix-dev}/usr/lib
+ install -d -m 0755 ${prefix}/usr/lib
+# static libraries in -dev package
+ install -c -m 0644 libf2c.a ${prefix-dev}/usr/lib/libf2c.a
+ install -c -m 0644 libf2c_i2.a ${prefix-dev}/usr/lib/libf2c_i2.a
+ install -d -m 0755 ${prefix-dev}/usr/include
+ install -c -m 0644 f2c.h0 ${prefix-dev}/usr/include/f2c.h
+
+# shared libs in shared lib package
+ $(INSTALL_LIB) libf2c.so.$(flibver) \
+ ${prefix}/usr/lib/libf2c.so.$(flibver)
+ $(INSTALL_LIB) libf2c_i2.so.$(flibver) \
+ ${prefix}/usr/lib/libf2c_i2.so.$(flibver)
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ strip --remove-section=.comment --remove-section=.note ${prefix}/usr/lib/libf2c.so.$(flibver)
+ strip --remove-section=.comment --remove-section=.note ${prefix}/usr/lib/libf2c_i2.so.$(flibver)
+endif
+
+ (cd ${prefix}/usr/lib; ln -s libf2c.so.$(flibver) libf2c.so.$(flibmajorver); \
+ ln -s libf2c_i2.so.$(flibver) libf2c_i2.so.$(flibmajorver) )
+
+ (cd ${prefix-dev}/usr/lib; ln -sf libf2c.so.$(flibver) libf2c.so ; \
+ ln -s libf2c_i2.so.$(flibver) libf2c_i2.so )
+
+
+ install -d -m 0755 ${prefix-dev}/usr/share/doc/$(package-dev)
+ install -d -m 0755 ${prefix}/usr/share/doc/$(package)
+ install -c -m 0644 changes ${prefix}/usr/share/doc/$(package)/changelog
+ install -c -m 0644 changes ${prefix-dev}/usr/share/doc/$(package-dev)/changelog
+ install -c -m 0644 README ${prefix}/usr/share/doc/$(package)/README
+ install -c -m 0644 README ${prefix-dev}/usr/share/doc/$(package-dev)/README
+ install -c -m 0644 debian/changelog \
+ ${prefix-dev}/usr/share/doc/$(package-dev)/changelog.Debian
+ install -c -m 0644 debian/changelog \
+ ${prefix}/usr/share/doc/$(package)/changelog.Debian
+ install -c -m 0644 debian/README.debian \
+ ${prefix-dev}/usr/share/doc/$(package-dev)/README.debian
+ install -c -m 0644 debian/README.debian \
+ ${prefix}/usr/share/doc/$(package)/README.debian
+ (cd ${prefix}/usr/share/doc/$(package); gzip -9v *)
+ (cd ${prefix-dev}/usr/share/doc/$(package-dev); gzip -9v *)
+ install -c -m 0644 debian/copyright \
+ ${prefix-dev}/usr/share/doc/$(package-dev)/copyright
+ install -c -m 0644 debian/copyright \
+ ${prefix}/usr/share/doc/$(package)/copyright
+
+
+ dpkg-shlibdeps -Tdebian/substvars.libf2c2 debian/libf2c2/usr/lib/*
+ dpkg-gencontrol -isp -plibf2c2-dev -Pdebian/libf2c2-dev
+ dpkg-gencontrol -isp -plibf2c2 -Pdebian/libf2c2 -Tdebian/substvars.libf2c2
+ dh_md5sums
+ chown -R root.root ${prefix-dev}
+ chown -R root.root ${prefix}
+ chmod -R go-ws ${prefix-dev}
+ chmod -R go-ws ${prefix}
+ dpkg --build ${prefix-dev} ..
+ dpkg --build ${prefix} ..
+
+
+## Below Here is Generic
+
+define checkdir
+ test -f ./fio.h
+endef
+
+binary: binary-indep binary-arch
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+dist: binary source diff changes
+
+checkroot:
+ $(checkdir)
+ test root = "`whoami`"
+
+.PHONY: binary source diff clean checkroot changes dist
+
--- libf2c2-20090411.orig/debian/shlibs.libf2c2
+++ libf2c2-20090411/debian/shlibs.libf2c2
@@ -0,0 +1,2 @@
+libf2c 2 libf2c2
+libf2c_i2 2 libf2c2
--- libf2c2-20090411.orig/debian/watch
+++ libf2c2-20090411/debian/watch
@@ -0,0 +1,7 @@
+# Netlib
+# Unfortunately it is not easy to determine the version
+# number from upstream. It is contained in a source code
+# file src/version.c
+# http://www.netlib.org/f2c/index.html
+
+