Blob Blame History Raw
--- geant321-3.21.14.dfsg.orig/debian/control
+++ geant321-3.21.14.dfsg/debian/control
@@ -0,0 +1,75 @@
+Source: geant321
+Maintainer: Kevin B. McCarty <kmccarty@debian.org>
+Standards-Version: 3.7.2
+Priority: optional
+Section: science
+Build-Depends: dpatch (>= 2.0.9), patch, mawk | gawk, xutils-dev, debhelper (>= 5.0.0), g77, cernlib-base (>= 2005.05.09.dfsg-9), libgrafx11-1-dev, libgraflib1-dev, libkernlib1-dev, libpacklib1-dev, libpacklib1-lesstif-dev, libpawlib2-dev, libpawlib2-lesstif-dev, kuipc
+
+Package: geant321-data
+Architecture: all
+Section: science
+Depends: cernlib-base
+Description: [Physics] Data for Geant 3.21 detector simulator
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes data files for use by Geant.
+
+Package: geant321-doc
+Architecture: all
+Section: doc
+Depends: cernlib-base
+Description: [Physics] Documentation for Geant 3.21
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes some documentation about Geant.
+
+Package: geant321
+Architecture: all
+Section: science
+Depends: libgeant321-2-dev, geant321-data, cernlib-base, g77
+Suggests: kxterm, geant321-doc
+Description: [Physics] Particle detector description and simulation tool
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes gxint, the script used to perform this linking step.
+
+Package: libgeant321-2-dev
+Architecture: any
+Section: libdevel
+Depends: libgeant321-2 (= ${Source-Version}), libpawlib2-lesstif-dev
+Recommends: geant321
+Conflicts: libgeant1-dev
+Replaces: libgeant1-dev
+Description: [Physics] Library for Geant 3.21 (development files)
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes a static version of the libgeant321 library required
+ by Geant.  C and FORTRAN header files are also included.
+
+Package: libgeant321-2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, geant321-data
+Recommends: geant321, kxterm
+Description: [Physics] Library for Geant 3.21
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes the libgeant321 library required by Geant 3.21.  Note
+ that in order to compile and link programs against this library, you must
+ also install the libgeant321-2-dev package.
+
--- geant321-3.21.14.dfsg.orig/debian/copyright
+++ geant321-3.21.14.dfsg/debian/copyright
@@ -0,0 +1,146 @@
+This package was debianized by Kevin B. McCarty <kmccarty@debian.org>.
+It was downloaded from the web page
+http://wwwinfo.cern.ch/asd/cernlib/download/2005_source/tar/
+
+
+COPYRIGHT
+---------
+
+Cernlib, including GEANT 3.21, is copyright (C) CERN and others.  As of this
+writing (5 July 2006), the web page
+http://wwwinfo.cern.ch/asd/cernlib/conditions.html (which gives the terms under
+which Cernlib may be used) states:
+
+  CERNLIB Availability
+
+  (C) Copyright CERN except where explicitly stated otherwise. Permission to
+  use and/or redistribute this work is granted under the terms of the GNU
+  General Public License. FLUKA routines included in GEANT3 are joint copyright
+  of INFN and CERN and are not licensed under the GPL: permission to use and/or
+  redistribute outside GEANT3 should be negotiated. The software and
+  documentation made available under the terms of this license are provided
+  with no warranty.
+
+  Last modified: 18-March-2004
+
+On Debian systems, the complete text of the GNU General Public License can be
+found in the file `/usr/share/common-licenses/GPL'.
+
+The aforementioned FLUKA routines have been excised from the GEANT 3.21 source
+code and binary packages distributed by Debian.
+
+
+EXCEPTIONS
+----------
+
+The file geant321.h in the libgeant321-2-dev binary package, and all files
+included in the tarball upstream/src_cfortran.tar.gz in the mclibs source
+package, are instead
+
+  Copyright (C) 1990-2003  Burkhard Burow, <burow@desy.de>,
+  http://www-zeus.desy.de/~burow/cfortran/index.htm
+
+and are licensed (at your choice) under either the GNU Library General Public
+License or an alternate non-free license.
+
+On Debian systems, the complete text of the GNU Library General Public License
+can be found in the file `/usr/share/common-licenses/LGPL-2'.
+
+The alternate license for the cfortran-related files is as follows:
+
+THIS PACKAGE, I.E. CFORTRAN.H, THIS DOCUMENT, AND THE CFORTRAN.H EXAMPLE
+PROGRAMS ARE PROPERTY OF THE AUTHOR WHO RESERVES ALL RIGHTS. THIS PACKAGE AND
+THE CODE IT PRODUCES MAY BE FREELY DISTRIBUTED WITHOUT FEES, SUBJECT TO THE
+FOLLOWING RESTRICTIONS:
+- YOU MUST ACCOMPANY ANY COPIES OR DISTRIBUTION WITH THIS (UNALTERED) NOTICE.
+- YOU MAY NOT RECEIVE MONEY FOR THE DISTRIBUTION OR FOR ITS MEDIA
+  (E.G. TAPE, DISK, COMPUTER, PAPER.)
+- YOU MAY NOT PREVENT OTHERS FROM COPYING IT FREELY.
+- YOU MAY NOT DISTRIBUTE MODIFIED VERSIONS WITHOUT CLEARLY DOCUMENTING YOUR
+  CHANGES AND NOTIFYING THE AUTHOR.
+- YOU MAY NOT MISREPRESENTED THE ORIGIN OF THIS SOFTWARE, EITHER BY EXPLICIT
+  CLAIM OR BY OMISSION.
+
+THE INTENT OF THE ABOVE TERMS IS TO ENSURE THAT THE CFORTRAN.H PACKAGE NOT BE
+USED FOR PROFIT MAKING ACTIVITIES UNLESS SOME ROYALTY ARRANGEMENT IS ENTERED
+INTO WITH ITS AUTHOR.
+
+THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST
+OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. THE AUTHOR IS NOT RESPONSIBLE
+FOR ANY SUPPORT OR SERVICE OF THE CFORTRAN.H PACKAGE.
+
+                                              Burkhard Burow
+                                              burow@desy.de
+
+
+DELETIA
+-------
+
+The following files and directories have been removed from the Debian source
+package of GEANT 3.21 due to license ambiguities or incompatibilities with the
+GPL (e.g. positive BSD advertising clause).  If needed, they may be found in
+the upstream source tarballs.
+
+car/geanf.car
+car/geanf321.car
+car/jetset74.car
+geant321/block/
+geant321/data/flukaaf.dat
+geant321/fiface/
+geant321/fluka/
+geant321/geant321/aadat.inc
+geant321/geant321/auxpar.inc
+geant321/geant321/balanc.inc
+geant321/geant321/bamjcm.inc
+geant321/geant321/cmsres.inc
+geant321/geant321/comcon.inc
+geant321/geant321/corinc.inc
+geant321/geant321/dblprc.inc
+geant321/geant321/decayc.inc
+geant321/geant321/decayc2.inc
+geant321/geant321/depnuc.inc
+geant321/geant321/dimpar.inc
+geant321/geant321/eva0.inc
+geant321/geant321/eva1.inc
+geant321/geant321/fheavy.inc
+geant321/geant321/finlsp.inc
+geant321/geant321/finlsp2.inc
+geant321/geant321/finlsp3.inc
+geant321/geant321/finpar.inc
+geant321/geant321/finpar2.inc
+geant321/geant321/finuc.inc
+geant321/geant321/finuc2.inc
+geant321/geant321/finuct.inc
+geant321/geant321/hadflg.inc
+geant321/geant321/hadpar.inc
+geant321/geant321/higfis.inc
+geant321/geant321/inpdat.inc
+geant321/geant321/inpdat2.inc
+geant321/geant321/inpflg.inc
+geant321/geant321/iounit.inc
+geant321/geant321/isotop.inc
+geant321/geant321/labcos.inc
+geant321/geant321/mapa.inc
+geant321/geant321/metlsp.inc
+geant321/geant321/nucdat.inc
+geant321/geant321/nucgeo.inc
+geant321/geant321/nuclev.inc
+geant321/geant321/nucpar.inc
+geant321/geant321/nucstf.inc
+geant321/geant321/paprop.inc
+geant321/geant321/parevt.inc
+geant321/geant321/parnuc.inc
+geant321/geant321/part.inc
+geant321/geant321/part2.inc
+geant321/geant321/part3.inc
+geant321/geant321/qquark.inc
+geant321/geant321/reac.inc
+geant321/geant321/redver.inc
+geant321/geant321/resnuc.inc
+geant321/geant321/split.inc
+geant321/geant321/xsepar.inc
+geant321/miface/gfmdis.F
+geant321/miface/gfmfin.F
+geant321/peanut/
--- geant321-3.21.14.dfsg.orig/debian/rules
+++ geant321-3.21.14.dfsg/debian/rules
@@ -0,0 +1,55 @@
+#!/usr/bin/make -f
+
+# source package name and modules included in the source package
+MY_NAME = geant321
+MY_MODULES = Imakefile car cfortran geant321 include scripts 
+
+include /usr/share/cernlib/cernlib-debian.mk
+
+binary-arch: install-arch
+	dh_testdir
+	dh_testroot
+	dh_install -a
+	dh_installdocs -a
+	dh_installexamples -a
+	set -e ; \
+	# Lintian overrides of spurious warnings
+	for file in `cd debian/lintian && ls -1` ; do \
+		cp -p debian/lintian/$$file \
+		debian/$$file/usr/share/lintian/overrides/ ; \
+	done
+	dh_installmenu -a
+	dh_installman -a
+	dh_installchangelogs -a
+	dh_installdebconf -a
+	dh_strip -a
+	dh_link -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -plibgeant321-2 -V"libgeant321-2 (>= 2005.05.09.dfsg)"
+	dh_shlibdeps -a -lshlib
+	dh_installdeb -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary-indep: install-indep
+	dh_testdir
+	dh_testroot
+	dh_install -i
+	dh_installdocs -i
+	dh_installexamples -i
+	dh_installman -i
+	dh_installchangelogs -i
+	dh_link -i
+	dh_compress -i -X.dat -X.kumac -X.F -X.sh
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-indep binary-arch
+
--- geant321-3.21.14.dfsg.orig/debian/copyright.in
+++ geant321-3.21.14.dfsg/debian/copyright.in
@@ -0,0 +1,86 @@
+This package was debianized by Kevin B. McCarty <kmccarty@debian.org>.
+It was downloaded from the web page
+http://wwwinfo.cern.ch/asd/cernlib/download/2005_source/tar/
+
+
+COPYRIGHT
+---------
+
+Cernlib, including GEANT 3.21, is copyright (C) CERN and others.  As of this
+writing (5 July 2006), the web page
+http://wwwinfo.cern.ch/asd/cernlib/conditions.html (which gives the terms under
+which Cernlib may be used) states:
+
+  CERNLIB Availability
+
+  (C) Copyright CERN except where explicitly stated otherwise. Permission to
+  use and/or redistribute this work is granted under the terms of the GNU
+  General Public License. FLUKA routines included in GEANT3 are joint copyright
+  of INFN and CERN and are not licensed under the GPL: permission to use and/or
+  redistribute outside GEANT3 should be negotiated. The software and
+  documentation made available under the terms of this license are provided
+  with no warranty.
+
+  Last modified: 18-March-2004
+
+On Debian systems, the complete text of the GNU General Public License can be
+found in the file `/usr/share/common-licenses/GPL'.
+
+The aforementioned FLUKA routines have been excised from the GEANT 3.21 source
+code and binary packages distributed by Debian.
+
+
+EXCEPTIONS
+----------
+
+The file geant321.h in the libgeant321-2-dev binary package, and all files
+included in the tarball upstream/src_cfortran.tar.gz in the mclibs source
+package, are instead
+
+  Copyright (C) 1990-2003  Burkhard Burow, <burow@desy.de>,
+  http://www-zeus.desy.de/~burow/cfortran/index.htm
+
+and are licensed (at your choice) under either the GNU Library General Public
+License or an alternate non-free license.
+
+On Debian systems, the complete text of the GNU Library General Public License
+can be found in the file `/usr/share/common-licenses/LGPL-2'.
+
+The alternate license for the cfortran-related files is as follows:
+
+THIS PACKAGE, I.E. CFORTRAN.H, THIS DOCUMENT, AND THE CFORTRAN.H EXAMPLE
+PROGRAMS ARE PROPERTY OF THE AUTHOR WHO RESERVES ALL RIGHTS. THIS PACKAGE AND
+THE CODE IT PRODUCES MAY BE FREELY DISTRIBUTED WITHOUT FEES, SUBJECT TO THE
+FOLLOWING RESTRICTIONS:
+- YOU MUST ACCOMPANY ANY COPIES OR DISTRIBUTION WITH THIS (UNALTERED) NOTICE.
+- YOU MAY NOT RECEIVE MONEY FOR THE DISTRIBUTION OR FOR ITS MEDIA
+  (E.G. TAPE, DISK, COMPUTER, PAPER.)
+- YOU MAY NOT PREVENT OTHERS FROM COPYING IT FREELY.
+- YOU MAY NOT DISTRIBUTE MODIFIED VERSIONS WITHOUT CLEARLY DOCUMENTING YOUR
+  CHANGES AND NOTIFYING THE AUTHOR.
+- YOU MAY NOT MISREPRESENTED THE ORIGIN OF THIS SOFTWARE, EITHER BY EXPLICIT
+  CLAIM OR BY OMISSION.
+
+THE INTENT OF THE ABOVE TERMS IS TO ENSURE THAT THE CFORTRAN.H PACKAGE NOT BE
+USED FOR PROFIT MAKING ACTIVITIES UNLESS SOME ROYALTY ARRANGEMENT IS ENTERED
+INTO WITH ITS AUTHOR.
+
+THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST
+OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. THE AUTHOR IS NOT RESPONSIBLE
+FOR ANY SUPPORT OR SERVICE OF THE CFORTRAN.H PACKAGE.
+
+                                              Burkhard Burow
+                                              burow@desy.de
+
+
+DELETIA
+-------
+
+The following files and directories have been removed from the Debian source
+package of GEANT 3.21 due to license ambiguities or incompatibilities with the
+GPL (e.g. positive BSD advertising clause).  If needed, they may be found in
+the upstream source tarballs.
+
+DEADPOOL_LIST_GOES_HERE
--- geant321-3.21.14.dfsg.orig/debian/patches/00list
+++ geant321-3.21.14.dfsg/debian/patches/00list
@@ -0,0 +1,17 @@
+000-unpack.sh.dpatch
+001-fix-missing-fluka.dpatch
+002-compile-only-geant.dpatch
+003-geant-dummy-functions.dpatch
+109-fix-broken-xsneut95.dat-link.dpatch
+114-install-scripts-properly.dpatch
+117-fix-optimizer-bug-in-gphot.dpatch
+203-compile-geant-with-ertrak.dpatch
+210-improve-cfortran-header-files.dpatch
+301-datafiles-comply-with-FHS.dpatch
+302-scripts-comply-with-FHS.dpatch
+306-patch-assert.h-for-makedepend.dpatch
+307-use-canonical-cfortran.dpatch
+315-fixes-for-MacOSX.dpatch
+602-debianize-kuip-helper-apps.dpatch
+802-create-shared-libraries.dpatch
+806-bump-mathlib-and-dependents-sonames.dpatch
--- geant321-3.21.14.dfsg.orig/debian/patches/002-compile-only-geant.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/002-compile-only-geant.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 002-compile-only-geant.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad geant321-2005.05.09.dfsg~/src/Imakefile geant321-2005.05.09.dfsg/src/Imakefile
+--- geant321-2005.05.09.dfsg~/src/Imakefile	1996-12-16 10:08:41.000000000 -0500
++++ geant321-2005.05.09.dfsg/src/Imakefile	2006-07-05 17:58:27.882911257 -0400
+@@ -2,7 +2,7 @@
+ #define PassCDebugFlags
+ 
+ 
+-LIBDIRS= packlib pawlib graflib mathlib geant321 mclibs phtools
++LIBDIRS= geant321
+ 
+ SUBDIRS= $(LIBDIRS) patchy cfortran
+ 
--- geant321-3.21.14.dfsg.orig/debian/patches/301-datafiles-comply-with-FHS.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/301-datafiles-comply-with-FHS.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 301-datafiles-comply-with-FHS.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Put data files under /usr/share (defined in add-ons/Makefile).
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09/src/geant321/miface/gmorin.F /tmp/dpep.5a0xP1/cernlib-2005.05.09/src/geant321/miface/gmorin.F
+--- cernlib-2005.05.09/src/geant321/miface/gmorin.F	1996-09-30 10:26:05.000000000 -0400
++++ /tmp/dpep.5a0xP1/cernlib-2005.05.09/src/geant321/miface/gmorin.F	2005-06-08 16:39:21.850830809 -0400
+@@ -112,7 +112,8 @@
+          OPEN(UNIT=MICROS,FILE=XSFILE, STATUS='OLD',READONLY)
+ #endif
+ #if defined(CERNLIB_UNIX)||defined(CERNLIB_CRAY)
+-         XSFILE = 'xsneut95.dat'
++         XSFILE = '/usr/share'
++     +   // '/geant321-data/xsneut95.dat'
+          INQUIRE(FILE=XSFILE,EXIST=EXISTS)
+          IF(.NOT.EXISTS) THEN
+             CHROOT=' '
--- geant321-3.21.14.dfsg.orig/debian/patches/000-unpack.sh.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/000-unpack.sh.dpatch
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# This is a fake patch used to convince dpatch-edit-patch to unpack the
+# Cernlib source code before trying to generate a diff from it.
+# This is a no-op if called when the source has already been unpacked, e.g.
+# if running "fakeroot debian/rules patch".
+# 
+# Yes, this is an ugly hack.
+
+set -e
+case "$1" in
+	-patch)   [ -e Makefile ] || cp -p debian/add-ons/Makefile .
+		  make prefix=/usr stampdir/configure-stamp ;;
+	-unpatch) exit 0 ;;
+	*)	  exit 1 ;;
+esac
--- geant321-3.21.14.dfsg.orig/debian/patches/307-use-canonical-cfortran.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/307-use-canonical-cfortran.dpatch
@@ -0,0 +1,470 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 307-use-canonical-cfortran.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use the most recent version of cfortran.h and cfortran.doc from
+## DP: Debian package of cfortran, version 4.4-6.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/cfortran/cfortran.doc cernlib-2005.05.09.dfsg/src/cfortran/cfortran.doc
+--- cernlib-2005.05.09.dfsg~/src/cfortran/cfortran.doc	1998-12-11 12:17:09.000000000 -0500
++++ cernlib-2005.05.09.dfsg/src/cfortran/cfortran.doc	2006-05-16 16:45:01.329802364 -0400
+@@ -195,13 +195,13 @@
+ HP9000> f77 -c cfortex.f
+ HP9000> CC -o cfortest cfortest.c cfortex.o -lI77 -lF77 && cfortest
+ 
+-HP0000> # If old-style f77 +800 compiled objects are required:
++HP9000> # If old-style f77 +800 compiled objects are required:
+ HP9000> # #define hpuxFortran800
+ HP9000> cc -c -Aa -DhpuxFortran800 cfortest.c
+ HP9000> f77 +800 -o cfortest cfortest.o cfortex.f
+ 
+ f2c> # In the following, 'CC' is any C compiler.
+-f2c> f2c -R cfortex.f
++f2c> f2c cfortex.f
+ f2c> CC -o cfortest -Df2cFortran cfortest.c cfortex.c -lf2c  &&  cfortest
+ 
+ Portland Group $ # Presumably other C compilers also work.
+@@ -533,9 +533,10 @@
+ FORTRAN_REAL thus corresponds to FORTRAN's REAL on all machines, including t3e.
+ 
+ 
+-o f2c
+-  f2c, by default promotes REAL functions to double. cfortran.h does not (yet)
+-support this, so the f2c -R option must be used to turn this promotion off.
++o f2c / g77
++  f2c and g77 by default promote REAL functions to double.  As of December 9,
++2005, the Debian package of cfortran supports this behavior, so the f2c -R
++option must *NOT* be used to turn this promotion off.
+ 
+ o f2c
+ [Thanks to Dario Autiero for pointing out the following.]
+@@ -573,6 +574,11 @@
+ #endif
+ /* Last three lines are a work-around for the strange f2c naming feature. */
+ 
++o gfortran
++  gfortran behaves similarly to f2c and g77, EXCEPT that it does NOT by default
++promote REAL functions to double.  Therefore you should use -DgFortran instead
++of -Dg77Fortran or -Df2cFortran to let cfortran.h know about this difference.
++
+ o NAG f90
+   The Fortran 77 subset of Fortran 90 is supported. Extending cfortran.h to 
+ interface C with all of Fortran 90 has not yet been examined.
+@@ -643,7 +649,7 @@
+    [For an ancient math.h on a 386 or sparc, get similar from a new math.h.]
+    #ifdef mc68000     /* 5 lines Copyright (c) 1988 by Sun Microsystems, Inc. */
+    #define FLOATFUNCTIONTYPE	int
+-   #define RETURNFLOAT(x) 		return (*(int *)(&(x)))
++   #define RETURNFLOAT(x) 	return (*(int *)(&(x)))
+    #define ASSIGNFLOAT(x,y)	*(int *)(&x) = y
+    #endif
+ 
+@@ -874,7 +880,7 @@
+ works everywhere and would seem to be an obvious choice.
+ 
+ 
+-3. <BYTE|DOUBLE|BYTE|DOUBLE|FLOAT|INT|LOGICAL|LONG|SHORT><V|VV|VVV|...>
++3. <BYTE|DOUBLE|FLOAT|INT|LOGICAL|LONG|SHORT><V|VV|VVV|...>
+ 
+ cfortran.h encourages the exact specification of the type and dimension of
+ array parameters because it allows the C compiler to detect errors in the
+@@ -1835,7 +1841,7 @@
+ 
+ Unlike all other C compilers supported by cfortran.h,
+ 'gcc -traditional' promotes to double all functions returning float
+-as demonstrated bu the following example.
++as demonstrated by the following example.
+ 
+ /* m.c */
+ #include <stdio.h>
+@@ -2017,8 +2023,9 @@
+ 
+ THIS PACKAGE, I.E. CFORTRAN.H, THIS DOCUMENT, AND THE CFORTRAN.H EXAMPLE
+ PROGRAMS ARE PROPERTY OF THE AUTHOR WHO RESERVES ALL RIGHTS. THIS PACKAGE AND
+-THE CODE IT PRODUCES MAY BE FREELY DISTRIBUTED WITHOUT FEES, SUBJECT TO THE
+-FOLLOWING RESTRICTIONS:
++THE CODE IT PRODUCES MAY BE FREELY DISTRIBUTED WITHOUT FEES, SUBJECT
++(AT YOUR CHOICE) EITHER TO THE GNU LIBRARY GENERAL PUBLIC LICENSE
++AT http://www.gnu.org/licenses/lgpl.html OR TO THE FOLLOWING RESTRICTIONS:
+ - YOU MUST ACCOMPANY ANY COPIES OR DISTRIBUTION WITH THIS (UNALTERED) NOTICE.
+ - YOU MAY NOT RECEIVE MONEY FOR THE DISTRIBUTION OR FOR ITS MEDIA 
+   (E.G. TAPE, DISK, COMPUTER, PAPER.)
+diff -urNad cernlib-2005.05.09.dfsg~/src/cfortran/cfortran.h cernlib-2005.05.09.dfsg/src/cfortran/cfortran.h
+--- cernlib-2005.05.09.dfsg~/src/cfortran/cfortran.h	2002-09-11 13:05:51.000000000 -0400
++++ cernlib-2005.05.09.dfsg/src/cfortran/cfortran.h	2006-05-16 16:44:47.680553957 -0400
+@@ -1,4 +1,4 @@
+-/* cfortran.h  4.4_cernlib2002 */
++/* cfortran.h  4.4 */
+ /* http://www-zeus.desy.de/~burow/cfortran/                   */
+ /* Burkhard Burow  burow@desy.de                 1990 - 2002. */
+ 
+@@ -11,11 +11,71 @@
+    MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
+ */
+ 
++/* The following modifications were made by the authors of CFITSIO or by me. 
++ * They are flagged below with CFITSIO, the author's initials, or KMCCARTY.
++ * PDW = Peter Wilson
++ * DM  = Doug Mink
++ * LEB = Lee E Brotzman
++ * MR  = Martin Reinecke
++ * WDP = William D Pence
++ * -- Kevin McCarty, for Debian (19 Dec. 2005) */
++
++/*******
++   Modifications:
++      Oct 1997: Changed symbol name extname to appendus (PDW/HSTX)
++                (Conflicted with a common variable name in FTOOLS)
++      Nov 1997: If g77Fortran defined, also define f2cFortran (PDW/HSTX)
++      Feb 1998: Let VMS see the NUM_ELEMS code. Lets programs treat
++                single strings as vectors with single elements
++      Nov 1999: If macintoxh defined, also define f2cfortran (for Mac OS-X)
++      Apr 2000: If WIN32 defined, also define PowerStationFortran and
++                VISUAL_CPLUSPLUS (Visual C++)
++      Jun 2000: If __GNUC__ and linux defined, also define f2cFortran
++                (linux/gcc environment detection)
++      Apr 2002: If __CYGWIN__ is defined, also define f2cFortran
++      Nov 2002: If __APPLE__ defined, also define f2cfortran (for Mac OS-X)
++
++      Nov 2003: If __INTEL_COMPILER or INTEL_COMPILER defined, also define
++                f2cFortran (KMCCARTY)
++      Dec 2005: If f2cFortran is defined, enforce REAL functions in FORTRAN
++                returning "double" in C.  This was one of the items on
++		Burkhard's TODO list. (KMCCARTY)
++      Dec 2005: Modifications to support 8-byte integers. (MR)
++		USE AT YOUR OWN RISK!
++      Feb 2006  Added logic to typedef the symbol 'LONGLONG' to an appropriate
++                intrinsic 8-byte integer datatype  (WDP)
++      Apr 2006: Modifications to support gfortran (and g77 with -fno-f2c flag)
++                since by default it returns "float" for FORTRAN REAL function.
++                (KMCCARTY)
++ *******/
++
+ /* 
+   Avoid symbols already used by compilers and system *.h:
+   __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c
+ 
+- */
++*/
++
++/* 
++   Determine what 8-byte integer data type is available.
++  'long long' is now supported by most compilers, but older
++  MS Visual C++ compilers before V7.0 use '__int64' instead. (WDP)
++*/
++
++#ifndef LONGLONG_TYPE   /* this may have been previously defined */
++#if defined(_MSC_VER)   /* Microsoft Visual C++ */
++
++#if (_MSC_VER < 1300)   /* versions earlier than V7.0 do not have 'long long' */
++    typedef __int64 LONGLONG;
++#else                   /* newer versions do support 'long long' */
++    typedef long long LONGLONG; 
++#endif
++
++#else
++    typedef long long LONGLONG; 
++#endif
++
++#define LONGLONG_TYPE
++#endif  
+ 
+ 
+ /* First prepare for the C compiler. */
+@@ -75,7 +135,9 @@
+ 
+ /* Remainder of cfortran.h depends on the Fortran compiler. */
+ 
+-#if defined(CLIPPERFortran) || defined(pgiFortran)
++/* 11/29/2003 (KMCCARTY): add *INTEL_COMPILER symbols here */
++/* 04/05/2006 (KMCCARTY): add gFortran symbol here */
++#if defined(CLIPPERFortran) || defined(pgiFortran) || defined(__INTEL_COMPILER) || defined(INTEL_COMPILER) || defined(gFortran)
+ #define f2cFortran
+ #endif
+ 
+@@ -90,6 +152,27 @@
+                            Support f2c or f77 with gcc, vcc with f2c. 
+                            f77 with vcc works, missing link magic for f77 I/O.*/
+ #endif
++/* 04/13/00 DM (CFITSIO): Add these lines for NT */
++/*   with PowerStationFortran and and Visual C++ */
++#if defined(WIN32) && !defined(__CYGWIN__)
++#define PowerStationFortran   
++#define VISUAL_CPLUSPLUS
++#endif
++#if defined(g77Fortran)                        /* 11/03/97 PDW (CFITSIO) */
++#define f2cFortran
++#endif
++#if        defined(__CYGWIN__)                 /* 04/11/02 LEB (CFITSIO) */
++#define       f2cFortran 
++#endif
++#if        defined(__GNUC__) && defined(linux) /* 06/21/00 PDW (CFITSIO) */
++#define       f2cFortran 
++#endif
++#if defined(macintosh)                         /* 11/1999 (CFITSIO) */
++#define f2cFortran
++#endif
++#if defined(__APPLE__)                         /* 11/2002 (CFITSIO) */
++#define f2cFortran
++#endif
+ #if defined(__hpux)             /* 921107: Use __hpux instead of __hp9000s300 */
+ #define       hpuxFortran       /*         Should also allow hp9000s7/800 use.*/
+ #endif
+@@ -131,6 +214,7 @@
+ #if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran))
+ /* If your compiler barfs on ' #error', replace # with the trigraph for #     */
+  #error "cfortran.h:  Can't find your environment among:\
++    - GNU gcc (g77) on Linux.                                            \
+     - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...)     \
+     - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000     \
+     - VAX   VMS CC 3.1 and FORTRAN 5.4.                                  \
+@@ -147,11 +231,14 @@
+     - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77.             \
+     -            f77 with vcc works; but missing link magic for f77 I/O. \
+     -            NO fort. None of gcc, cc or vcc generate required names.\
+-    - f2c    : Use #define    f2cFortran, or cc -Df2cFortran             \
++    - f2c/g77:   Use #define    f2cFortran, or cc -Df2cFortran           \
++    - gfortran:  Use #define    gFortran,   or cc -DgFortran             \
++                 (also necessary for g77 with -fno-f2c option)           \
+     - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran          \
+     - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran \
+     - Absoft Pro Fortran: Use #define AbsoftProFortran \
+-    - Portland Group Fortran: Use #define pgiFortran"
++    - Portland Group Fortran: Use #define pgiFortran \
++    - Intel Fortran: Use #define INTEL_COMPILER"
+ /* Compiler must throw us out at this point! */
+ #endif
+ #endif
+@@ -164,7 +251,8 @@
+ 
+ /* Throughout cfortran.h we use: UN = Uppercase Name.  LN = Lowercase Name.   */
+ 
+-#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(extname)
++/* "extname" changed to "appendus" below (CFITSIO) */
++#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(appendus)
+ #define CFC_(UN,LN)            _(LN,_)      /* Lowercase FORTRAN symbols.     */
+ #define orig_fcallsc(UN,LN)    CFC_(UN,LN)
+ #else 
+@@ -268,7 +356,8 @@
+ #endif
+ 
+ #ifndef apolloFortran
+-#define COMMON_BLOCK_DEF(DEFINITION, NAME) DEFINITION NAME
++/* "extern" removed (CFITSIO) */
++#define COMMON_BLOCK_DEF(DEFINITION, NAME) /* extern */ DEFINITION NAME
+ #define CF_NULL_PROTO
+ #else                                         /* HP doesn't understand #elif. */
+ /* Without ANSI prototyping, Apollo promotes float functions to double.    */
+@@ -512,7 +601,7 @@
+                     *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO)  ),   \
+   (F).dsc$a_a0    =  ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length          ,(F))
+ 
+-#else
++#endif      /* PDW: 2/10/98 (CFITSIO) -- Let VMS see NUM_ELEMS definitions */
+ #define _NUM_ELEMS      -1
+ #define _NUM_ELEM_ARG   -2
+ #define NUM_ELEMS(A)    A,_NUM_ELEMS
+@@ -538,9 +627,14 @@
+   if (i==(unsigned)num_term) break;
+   else strv += elem_len-i;
+ }
++if (0) {  /* to prevent not used warnings in gcc (added by ROOT) */
++   c2fstrv(0, 0, 0, 0); f2cstrv(0, 0, 0, 0); kill_trailing(0, 0);
++   vkill_trailing(0, 0, 0, 0); num_elem(0, 0, 0, 0);
++}
+ return (int)num;
+ }
+-#endif
++/* #endif removed 2/10/98 (CFITSIO) */
++
+ /*-------------------------------------------------------------------------*/
+ 
+ /*           UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS       */
+@@ -1318,6 +1412,7 @@
+ #define     INTVVVVVVV_cfTYPE int
+ #define LOGICALVVVVVVV_cfTYPE int
+ #define    LONGVVVVVVV_cfTYPE long
++#define LONGLONGVVVVVVV_cfTYPE LONGLONG   /* added by MR December 2005 */
+ #define   SHORTVVVVVVV_cfTYPE short
+ #define          PBYTE_cfTYPE INTEGER_BYTE
+ #define        PDOUBLE_cfTYPE DOUBLE_PRECISION 
+@@ -1325,6 +1420,7 @@
+ #define           PINT_cfTYPE int
+ #define       PLOGICAL_cfTYPE int
+ #define          PLONG_cfTYPE long
++#define      PLONGLONG_cfTYPE LONGLONG  /* added by MR December 2005 */
+ #define         PSHORT_cfTYPE short
+ 
+ #define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A)
+@@ -1342,6 +1438,7 @@
+ #define            INT_cfINT(N,A,B,X,Y,Z)        DOUBLE_cfINT(N,A,B,X,Y,Z)
+ #define        LOGICAL_cfINT(N,A,B,X,Y,Z)        DOUBLE_cfINT(N,A,B,X,Y,Z)
+ #define           LONG_cfINT(N,A,B,X,Y,Z)        DOUBLE_cfINT(N,A,B,X,Y,Z)
++#define       LONGLONG_cfINT(N,A,B,X,Y,Z)        DOUBLE_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
+ #define          SHORT_cfINT(N,A,B,X,Y,Z)        DOUBLE_cfINT(N,A,B,X,Y,Z)
+ #define          PBYTE_cfINT(N,A,B,X,Y,Z)       PDOUBLE_cfINT(N,A,B,X,Y,Z)
+ #define        PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0)
+@@ -1349,6 +1446,7 @@
+ #define           PINT_cfINT(N,A,B,X,Y,Z)       PDOUBLE_cfINT(N,A,B,X,Y,Z)
+ #define       PLOGICAL_cfINT(N,A,B,X,Y,Z)       PDOUBLE_cfINT(N,A,B,X,Y,Z)
+ #define          PLONG_cfINT(N,A,B,X,Y,Z)       PDOUBLE_cfINT(N,A,B,X,Y,Z)
++#define      PLONGLONG_cfINT(N,A,B,X,Y,Z)       PDOUBLE_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
+ #define         PSHORT_cfINT(N,A,B,X,Y,Z)       PDOUBLE_cfINT(N,A,B,X,Y,Z)
+ #define          BYTEV_cfINT(N,A,B,X,Y,Z)       DOUBLEV_cfINT(N,A,B,X,Y,Z)
+ #define         BYTEVV_cfINT(N,A,B,X,Y,Z)      DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+@@ -1392,6 +1490,13 @@
+ #define      LONGVVVVV_cfINT(N,A,B,X,Y,Z)   DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
+ #define     LONGVVVVVV_cfINT(N,A,B,X,Y,Z)  DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
+ #define    LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
++#define      LONGLONGV_cfINT(N,A,B,X,Y,Z)       DOUBLEV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
++#define     LONGLONGVV_cfINT(N,A,B,X,Y,Z)      DOUBLEVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
++#define    LONGLONGVVV_cfINT(N,A,B,X,Y,Z)     DOUBLEVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
++#define   LONGLONGVVVV_cfINT(N,A,B,X,Y,Z)    DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
++#define  LONGLONGVVVVV_cfINT(N,A,B,X,Y,Z)   DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
++#define LONGLONGVVVVVV_cfINT(N,A,B,X,Y,Z)  DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
++#define LONGLONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) /* added by MR December 2005 */
+ #define         SHORTV_cfINT(N,A,B,X,Y,Z)       DOUBLEV_cfINT(N,A,B,X,Y,Z)
+ #define        SHORTVV_cfINT(N,A,B,X,Y,Z)      DOUBLEVV_cfINT(N,A,B,X,Y,Z)
+ #define       SHORTVVV_cfINT(N,A,B,X,Y,Z)     DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
+@@ -1451,7 +1556,12 @@
+ #define      BYTE_cfPU(A)   CFextern INTEGER_BYTE      FCALLSC_QUALIFIER A
+ #define    DOUBLE_cfPU(A)   CFextern DOUBLE_PRECISION  FCALLSC_QUALIFIER A
+ #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
++#if defined (f2cFortran) && ! defined (gFortran)
++/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */
++#define     FLOAT_cfPU(A)   CFextern DOUBLE_PRECISION  FCALLSC_QUALIFIER A
++#else
+ #define     FLOAT_cfPU(A)   CFextern FORTRAN_REAL      FCALLSC_QUALIFIER A
++#endif
+ #else				   	                   
+ #define     FLOAT_cfPU(A)   CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
+ #endif				   	                   
+@@ -1589,6 +1699,7 @@
+ #define            INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define        LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E)
+ #define           LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
++#define       LONGLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
+ #define          SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define          BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define         BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+@@ -1632,6 +1743,13 @@
+ #define      LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define     LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define    LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
++#define      LONGLONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
++#define     LONGLONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
++#define    LONGLONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
++#define   LONGLONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
++#define  LONGLONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
++#define LONGLONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
++#define LONGLONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
+ #define         SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define        SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define       SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+@@ -1645,6 +1763,7 @@
+ #define           PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define       PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E)
+ #define          PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
++#define      PLONGLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) /* added by MR December 2005 */
+ #define         PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
+ #define         STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E)
+ #define        PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E)
+@@ -1957,6 +2076,7 @@
+ #define            INT_cfT(M,I,A,B,D) *A
+ #define        LOGICAL_cfT(M,I,A,B,D)  F2CLOGICAL(*A)
+ #define           LONG_cfT(M,I,A,B,D) *A
++#define       LONGLONG_cfT(M,I,A,B,D) *A /* added by MR December 2005 */
+ #define          SHORT_cfT(M,I,A,B,D) *A
+ #define          BYTEV_cfT(M,I,A,B,D)  A
+ #define        DOUBLEV_cfT(M,I,A,B,D)  A
+@@ -1964,6 +2084,7 @@
+ #define           INTV_cfT(M,I,A,B,D)  A
+ #define       LOGICALV_cfT(M,I,A,B,D)  A
+ #define          LONGV_cfT(M,I,A,B,D)  A
++#define      LONGLONGV_cfT(M,I,A,B,D)  A /* added by MR December 2005 */
+ #define         SHORTV_cfT(M,I,A,B,D)  A
+ #define         BYTEVV_cfT(M,I,A,B,D)  (void *)A /* We have to cast to void *,*/
+ #define        BYTEVVV_cfT(M,I,A,B,D)  (void *)A /* since we don't know the   */
+@@ -2001,6 +2122,12 @@
+ #define      LONGVVVVV_cfT(M,I,A,B,D)  (void *)A
+ #define     LONGVVVVVV_cfT(M,I,A,B,D)  (void *)A
+ #define    LONGVVVVVVV_cfT(M,I,A,B,D)  (void *)A
++#define     LONGLONGVV_cfT(M,I,A,B,D)  (void *)A /* added by MR December 2005 */
++#define    LONGLONGVVV_cfT(M,I,A,B,D)  (void *)A /* added by MR December 2005 */
++#define   LONGLONGVVVV_cfT(M,I,A,B,D)  (void *)A /* added by MR December 2005 */
++#define  LONGLONGVVVVV_cfT(M,I,A,B,D)  (void *)A /* added by MR December 2005 */
++#define LONGLONGVVVVVV_cfT(M,I,A,B,D)  (void *)A /* added by MR December 2005 */
++#define LONGLONGVVVVVVV_cfT(M,I,A,B,D)  (void *)A /* added by MR December 2005 */
+ #define        SHORTVV_cfT(M,I,A,B,D)  (void *)A
+ #define       SHORTVVV_cfT(M,I,A,B,D)  (void *)A
+ #define      SHORTVVVV_cfT(M,I,A,B,D)  (void *)A
+@@ -2013,6 +2140,7 @@
+ #define           PINT_cfT(M,I,A,B,D)  A
+ #define       PLOGICAL_cfT(M,I,A,B,D)  ((*A=F2CLOGICAL(*A)),A)
+ #define          PLONG_cfT(M,I,A,B,D)  A
++#define      PLONGLONG_cfT(M,I,A,B,D)  A /* added by MR December 2005 */
+ #define         PSHORT_cfT(M,I,A,B,D)  A
+ #define          PVOID_cfT(M,I,A,B,D)  A
+ #if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
+@@ -2083,12 +2211,18 @@
+ #define     INT_cfFZ(UN,LN) int   FCALLSC_QUALIFIER fcallsc(UN,LN)(
+ #define LOGICAL_cfFZ(UN,LN) int   FCALLSC_QUALIFIER fcallsc(UN,LN)(
+ #define    LONG_cfFZ(UN,LN) long  FCALLSC_QUALIFIER fcallsc(UN,LN)(
++#define LONGLONG_cfFZ(UN,LN) LONGLONG FCALLSC_QUALIFIER fcallsc(UN,LN)( /* added by MR December 2005 */
+ #define   SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)(
+ #define    VOID_cfFZ(UN,LN) void  FCALLSC_QUALIFIER fcallsc(UN,LN)(
+ #ifndef __CF__KnR
+ /* The void is req'd by the Apollo, to make this an ANSI function declaration.
+    The Apollo promotes K&R float functions to double. */
+-#define   FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
++#if defined (f2cFortran) && ! defined (gFortran)
++/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */
++#define FLOAT_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(void
++#else
++#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
++#endif
+ #ifdef vmsFortran
+ #define  STRING_cfFZ(UN,LN) void  FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
+ #else
+@@ -2104,7 +2238,12 @@
+ #endif
+ #else
+ #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
++#if defined (f2cFortran) && ! defined (gFortran)
++/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */
++#define   FLOAT_cfFZ(UN,LN) DOUBLE_PRECISION  FCALLSC_QUALIFIER fcallsc(UN,LN)(
++#else
+ #define   FLOAT_cfFZ(UN,LN) FORTRAN_REAL      FCALLSC_QUALIFIER fcallsc(UN,LN)(
++#endif
+ #else
+ #define   FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
+ #endif
+@@ -2118,13 +2257,19 @@
+ #define    BYTE_cfF(UN,LN)     BYTE_cfFZ(UN,LN)
+ #define  DOUBLE_cfF(UN,LN)   DOUBLE_cfFZ(UN,LN)
+ #ifndef __CF_KnR
++#if defined (f2cFortran) && ! defined (gFortran)
++/* f2c/g77 return double from FORTRAN REAL functions. (KMCCARTY, 2005/12/09) */
++#define   FLOAT_cfF(UN,LN)  DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(
++#else
+ #define   FLOAT_cfF(UN,LN)  FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
++#endif
+ #else
+ #define   FLOAT_cfF(UN,LN)    FLOAT_cfFZ(UN,LN)
+ #endif
+ #define     INT_cfF(UN,LN)      INT_cfFZ(UN,LN)
+ #define LOGICAL_cfF(UN,LN)  LOGICAL_cfFZ(UN,LN)
+ #define    LONG_cfF(UN,LN)     LONG_cfFZ(UN,LN)
++#define LONGLONG_cfF(UN,LN) LONGLONG_cfFZ(UN,LN) /* added by MR December 2005 */
+ #define   SHORT_cfF(UN,LN)    SHORT_cfFZ(UN,LN)
+ #define    VOID_cfF(UN,LN)     VOID_cfFZ(UN,LN)
+ #define  STRING_cfF(UN,LN)   STRING_cfFZ(UN,LN),
+@@ -2187,6 +2332,7 @@
+ #define LOGICAL_cfI  return C2FLOGICAL(A0);
+ #endif
+ #define    LONG_cfI  return A0;
++#define LONGLONG_cfI  return A0; /* added by MR December 2005 */
+ #define   SHORT_cfI  return A0;
+ #define  STRING_cfI  return   ;
+ #define    VOID_cfI  return   ;
--- geant321-3.21.14.dfsg.orig/debian/patches/README
+++ geant321-3.21.14.dfsg/debian/patches/README
@@ -0,0 +1,76 @@
+Notes on Debian patches to Cernlib source:
+------------------------------------------
+
+All patches in this directory are, unless otherwise specified in the patch
+header, copyright 2001-2005 Kevin B. McCarty and are licensed under the GNU
+General Public License version 2 or later, at your option.  The GNU GPL may be
+found at http://www.gnu.org/licenses/gpl.html or, on Debian systems, at
+/usr/share/common-licenses/GPL .
+
+Dpatch is used because some of the files in this directory are really
+shell scripts, and no other patch system (quilt, cdbs, etc.) appears to
+support this.  (Am I the only person using this "feature" of dpatch?)
+Dpatch files that are really patches are named NNN-<description>.dpatch
+while dpatch files that are shell scripts are named NNN-<description>.sh.dpatch
+NNN is a three digit number ranging from 000 through 999.
+
+Note that, contrary to the usual practice, the file debian/patches/00list
+(listing the patches to be applied) is auto-generated by "debian/rules clean",
+and may be further modified in the stampdir/configure-stamp target of the
+debian/add-ons/Makefile (called from "debian/rules unpack") depending upon
+settings in $DEB_BUILD_OPTIONS.  See debian/README.source for a list of
+supported $DEB_BUILD_OPTIONS parameters.
+
+A few of the patches (*.dpatch.in) include values that need to be filled in
+at configure time; this is also done in the stampdir/configure-stamp target of
+debian/add-ons/Makefile.
+
+(You do not _really_ need dpatch to work with these patches; they are applied
+for non-Debian systems in a hacky way by the patch target of
+debian/add-ons/Makefile.)
+
+The numbering scheme of patches in this directory is as follows:
+
+000	is a dummy patch used to force dpatch-edit-patch to create diffs
+	relative to already-unpacked source.  It has no effect when "applied"
+	or "de-applied" against an unpacked source tree.
+001-099 are reserved for patches that permit compilation after having
+	removed non-free code from Cernlib source.
+100-199 are for bug fixes that should eventually be submitted upstream
+	and have a reasonable probability of being merged, for instance,
+	security bugs, file-specific compiler optimization settings, etc.
+200-299 are for feature enhancements that should eventually be submitted
+	upstream, for example, including ERTRAK code in libgeant.
+300-399 are for implementation of non-Debian-specific niceties that are
+	probably too intrusive to go upstream, for instance FHS implementation
+	or use of shadow passwords by pawserv.
+400-599 are reserved for future use.
+600-699 are for Debian-specific customizations, for instance setting the
+	default editor as sensible-editor, having Paw send bug reports
+	to the BTS, etc.  Most of these are protected by
+	"#if defined(CERNLIB_DEBIAN)" in the source code so they can be safely
+	applied on non-Debian systems.
+700-799 are for patches that move source code around.  Many of these are
+	actually shell scripts.  Typically this is done to split
+	libraries apart or to move functions from one library into another.
+800-899 are for implementation of shared libraries.  (They must be implemented
+	only after moving files around, or they have many undefined symbol
+	problems.)
+900-999 are for optional patches that may or may not be applied depending
+	upon settings in $DEB_BUILD_OPTIONS.  These patches are stored
+	in the "optional" subdirectory, copied here in the "unpack" target
+	of debian/rules or add-ons/Makefile, and removed in the "clean"
+	target.
+
+Ideally, the source should compile with any complete set of the
+patches numbered 000 through NNN (where NNN is 100 or greater) applied,
+possibly excluding patches in the 9xx series.  (All patches with the same
+number must be applied or not, as a whole.)  Unfortunately this does not
+actually work when linking the Paw and Paw++ programs since some of the
+libraries have circular dependencies on each other before the 700 series
+of patches are applied.
+
+To select the set of patches to be applied, after running debian/rules clean,
+edit debian/patches/00list to include only the desired ones.
+
+-- Kevin B. McCarty <kmccarty@debian.org>, 21 Jul 2005
--- geant321-3.21.14.dfsg.orig/debian/patches/302-scripts-comply-with-FHS.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/302-scripts-comply-with-FHS.dpatch
@@ -0,0 +1,202 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 302-scripts-comply-with-FHS.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Put data files under /usr/share and assume $CERN is /usr by default
+## DP: in scripts.  (These values are filled in from add-ons/Makefile.)
+## DP: Also some other improvements.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/scripts/gxint cernlib-2005.05.09.dfsg/src/scripts/gxint
+--- cernlib-2005.05.09.dfsg~/src/scripts/gxint	2005-04-18 11:41:16.000000000 -0400
++++ cernlib-2005.05.09.dfsg/src/scripts/gxint	2005-12-13 10:07:57.789716862 -0500
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ #*******************************************
+ #
+@@ -17,8 +17,7 @@
+ #*******************************************
+ line="******************************************************"
+  
+- 
+-if [ $# -eq 0 ] ; then
++print_help() {	
+ cat << EoD
+ 
+  GXINT [options] file(s)
+@@ -32,9 +31,13 @@
+         on all systems. X11 is the default.
+   -v version
+         version of the program library to use. Possible values
+-        include pro ( default ), new and old.
++        include pro, new and old. This option only makes sense if you
++	have installed a non-Debian version of Cernlib. In that case
++	you must have defined the environment variable \$CERN.
+   -g geant_version
+-        which version of geant to use. Current default is 315.
++        which version of geant to use. Current default is 321. This
++	also makes sense only if you have installed a non-Debian version
++	of Cernlib.
+   -h host
+         useful with the -d X11 option only. Specify the hostname
+         used for the display. Syntax identical to that of DISPLAY.
+@@ -43,16 +46,20 @@
+         Do not immediately run GEANT, but produce an executable
+         file named outputfile.
+   -L path
+-        additional loader search path. Usefull if additional libraries
+-        are specified with -l option.  This option may be repeated to
++        additional loader search path. Useful if additional libraries
++        are specified with -l option. This option may be repeated to
+         more than one pathname.
+-  -l libary
++  -l library
+         specify additional libraries. This option may be repeated to
+         add several libs.
+   -m    do NOT use main program from cernlib area.
+ 
+ EoD
+-exit
++}
++
++ 
++if [ $# -eq 0 ] ; then 
++	print_help
+ fi
+ 
+ if [ -f /usr/bin/uname ] ; then
+@@ -66,52 +73,47 @@
+ fi
+ 
+  SHOPT="d:v:g:h:o:L:l:m"
+- cmd=$0
+ # Check option set and give default values
+   if [ -f /bin/getopt -o -f /usr/bin/getopt ] ; then
+      set -- `getopt $SHOPT $*` ; cc=$?
+      if [ $cc -ne 0 ] ; then
+ 	echo ""
+ 	echo "Usage:"
+-	exec $cmd
+-	exit
++	print_help ; exit 0
+      fi
+   fi
+- 
+-drv="/X11" ; ver="pro" ; OUT="${HOME}/GEANT$$"
++
++if [ -z "$TMPDIR" ] || [ "$TMPDIR" = "/tmp" ] ; then
++  TMPDIR="$HOME"
++fi
++drv="/X11" ; ver="" ; OUT="$TMPDIR/GEANT$$"
+ gxint=""
+  
+ while [ $# -gt 0 ]
+ do case $1 in
+-     -d) drv="/$2";                     shift ;;
++     -d) drv="/$2";                  shift ;;
+      -v) ver=$2;                     shift ;;
+      -g) gvs=$2;                     shift ;;
+      -h) DISPLAY=$2;export DISPLAY;  shift ;;
+      -o) OUT=$2; norun="1";          shift ;;
+-     -L) userpath="$userpath -L$2"; shift ;;
+-     -l) userlibs="$userlibs -l$2"; shift ;;
++     -L) userpath="$userpath -L$2";  shift ;;
++     -l) userlibs="$userlibs -l$2";  shift ;;
+      -m) _m="1"				   ;;
+      --)                     shift ; break ;;
++     --help|-\?) print_help ; exit 0	   ;;
+       *)                             break ;;
+    esac
+    shift
+ done
+  
+ if [ $# -gt 0 ] ; then
+-   pgm="$*"
++   pgm="$@"
+  else
+    echo "gxint_Warning: no user program specified"
+ fi
+  
+  
+- 
+-if [ -z "$CERN" ] ; then
+-  if [ ! -d /cern ]; then
+-   echo "gxint_Error: shell variable CERN must be set or /cern must exist"
+-   exit 1
+-  fi
+-  CERN="/cern" ; export CERN
+-fi
++[ -z "$CERN" ] && export CERN="/usr"
+  
+ if [ "$drv" = "/GKS" ] ; then
+   if [ -z "$GKSR" ] ; then
+@@ -143,6 +145,7 @@
+ CLIB="geant${gvs} pawlib graflib$drv packlib mathlib"
+  
+ [ -z "$_m" ] && gxint="${CERN}/${ver}/lib/gxint${gvs}.$_o" 
++[ "$CERN" = "/usr" -a -z "$ver" ] && gxint=/usr/share/geant321/gxint.f
+  
+ cat << EoD
+ $line
+@@ -155,8 +158,10 @@
+ *   gxint used        : ${gxint:-user supplied}
+ $line
+ EoD
+- 
+-$LDN -o $OUT $gxint $pgm $userpath $userlibs `cernlib -v $ver $CLIB`; cc=$?
++
++[ -z "$ver" ] && verflag="" || verflag="-v"
++$LDN -o $OUT $gxint $pgm $userpath $userlibs `cernlib $verflag $ver $CLIB` ; \
++cc=$?
+  
+ [ $cc -ne 0 ] && exit $cc
+  
+diff -urNad cernlib-2005.05.09.dfsg~/src/scripts/paw cernlib-2005.05.09.dfsg/src/scripts/paw
+--- cernlib-2005.05.09.dfsg~/src/scripts/paw	1995-02-07 04:54:06.000000000 -0500
++++ cernlib-2005.05.09.dfsg/src/scripts/paw	2005-12-13 10:10:17.850939931 -0500
+@@ -21,9 +21,9 @@
+   SHOPT="d:h:v:"
+ #SEQ,GETOPTD.
+   [ "`uname -s`" = "DomainOS" ] && drv="GKS" || drv="X11"
+-  [ -z "$CERN"       ] && CERN="/cern"
+-  [ -z "$CERN_LEVEL" ] && ver="pro" || ver="$CERN_LEVEL"
+- 
++  [ -z "$CERN"       ] && CERN="/usr"
++  [ -z "$CERN_LEVEL" ] && ver="" || ver="$CERN_LEVEL"
++  [ -e "$CERN/$CERN_LEVEL/bin/pawX11" ] || drv="++" # use paw++ if no pawX11
+   while [ $# -gt 0 ]
+   do case $1 in
+        -d) drv=$2 ; shift      ;;
+@@ -43,15 +43,26 @@
+ #    inlib $GKS_INLIB
+      GDIR=$CERN/$ver/gksbin
+   fi
+-  if [ "$drv" = "X11" -a -n "$hst" ] ; then
++  if [ \( "$drv" = "X11" -o "$drv" = "++" \) -a -n "$hst" ] ; then
+      nw=`echo $hst | awk -F: '{ print NF }'`
+      [ $nw -eq 1 ] && hst="$hst:0"
+      DISPLAY="$hst" ; export DISPLAY
+   fi
+-  if [ "$ver" != "pro" ] ; then
++  if [ -n "$ver" ] ; then
+      echo
+      echo " Calling $ver version of paw-$drv"
+      echo
+   fi
+-  $GDIR/paw$drv $*
+-  [ ! -s paw.metafile ] && rm paw.metafile
++  if [ ! -x "$GDIR/paw$drv" ] ; then
++     echo " Error: PAW executable $GDIR/paw${drv} does not exist!"
++     exit 1
++  fi
++  "$GDIR/paw$drv" "$@"
++  [ ! -s paw.metafile ] && rm -f paw.metafile
++  [ ! -s PAW.METAFILE ] && rm -f PAW.METAFILE
++
++  # clean up comis temporary working directories if empty
++  [ "`(echo /tmp/comis*) 2> /dev/null`" = '/tmp/comis*' ] || \
++    rmdir /tmp/comis* > /dev/null 2>&1 || true
++  [ "`(echo "$TMPDIR"/comis*) 2> /dev/null`" = "$TMPDIR"/'comis*' ] || \
++    rmdir "$TMPDIR"/comis* > /dev/null 2>&1 || true
--- geant321-3.21.14.dfsg.orig/debian/patches/315-fixes-for-MacOSX.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/315-fixes-for-MacOSX.dpatch
@@ -0,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 315-fixes-for-MacOSX.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch set (mostly due to Keisuke Fujii) to allow Cernlib to compile
+## DP: and run on OS X.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/Imakefile cernlib-2005.05.09.dfsg/src/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/Imakefile	1996-12-16 10:08:41.000000000 -0500
++++ cernlib-2005.05.09.dfsg/src/Imakefile	2005-12-07 14:47:34.141148558 -0500
+@@ -7,8 +7,12 @@
+ SUBDIRS= $(LIBDIRS) patchy cfortran
+ 
+ #ifdef CERNLIB_UNIX
++#ifdef CERNLIB_MACOSX
++SUBDIRS:= $(SUBDIRS) scripts
++#else
+ SUBDIRS:= $(SUBDIRS) scripts mgr
+ #endif
++#endif
+ 
+ InstallLibSubdirs($(LIBDIRS))
+ 
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/gxint/Imakefile cernlib-2005.05.09.dfsg/src/geant321/gxint/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/gxint/Imakefile	1997-01-29 11:37:40.000000000 -0500
++++ cernlib-2005.05.09.dfsg/src/geant321/gxint/Imakefile	2005-12-07 14:47:34.140148771 -0500
+@@ -30,7 +30,7 @@
+ 
+ gxint321.f:  gxint.F
+ 	RemoveFile($@)
+-	$(CPP) $(FORTRANALLDEFMDEPEND) < $^ | sed -e '/^$$/d' | CppSedMagic >$@
++	FortranCmd -E $(FORTRANALLDEFMDEPEND) $^ | sed -e '/^$$/d' | CppSedMagic >$@
+ 
+ install.lib:: $(CERN_LIBDIR)/gxint.f
+ 
--- geant321-3.21.14.dfsg.orig/debian/patches/602-debianize-kuip-helper-apps.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/602-debianize-kuip-helper-apps.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 602-debianize-kuip-helper-apps.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use Debian-specific programs for some KUIP helper apps.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/gxint/gpawpp.F cernlib-2005.05.09.dfsg/src/geant321/gxint/gpawpp.F
+--- cernlib-2005.05.09.dfsg~/src/geant321/gxint/gpawpp.F	1995-10-24 06:21:49.000000000 -0400
++++ cernlib-2005.05.09.dfsg/src/geant321/gxint/gpawpp.F	2006-06-23 09:58:20.134158881 -0400
+@@ -53,7 +53,12 @@
+          CALL KUEXEC('HOST_EDITOR ''aixterm -e vi &''')
+ #endif
+ #if (!defined(CERNLIB_IBMRT))&&(!defined(CERNLIB_VAX))
++# ifdef CERNLIB_DEBIAN
++         CALL KUEXEC('HOST_EDITOR ''x-terminal-emulator ' //
++     +    '-e sensible-editor &''')
++# else
+          CALL KUEXEC('HOST_EDITOR ''xterm -e vi &''')
++# endif
+ #endif
+       ENDIF
+ #if defined(CERNLIB_COMIS)
--- geant321-3.21.14.dfsg.orig/debian/patches/117-fix-optimizer-bug-in-gphot.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/117-fix-optimizer-bug-in-gphot.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 117-fix-optimizer-bug-in-gphot.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch by Harald Vogt <hvogt@ifh.de> to work around compiler
+## DP: optimization problems in src/geant321/gphys/gphot.F.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/gphys/gphot.F cernlib-2005.05.09.dfsg/src/geant321/gphys/gphot.F
+--- cernlib-2005.05.09.dfsg~/src/geant321/gphys/gphot.F	1995-10-24 06:21:29.000000000 -0400
++++ cernlib-2005.05.09.dfsg/src/geant321/gphys/gphot.F	2005-12-07 15:01:52.558184613 -0500
+@@ -240,7 +240,7 @@
+                   ELSE
+ C Radiative shell decay
+                      JS = JFN+1+2*NSHELL+ISHELL
+-                     JS = JPHFN+Q(JS)
++                     JS = JPHFN + INT (Q(JS))    ! compiler optimiztion problem H. Vogt 2004/04/29
+                      NPOINT = Q(JS)
+                      DO 40 I = 1,NPOINT
+                         IF(RN05.LT.Q(JS+I)) THEN
+@@ -296,7 +296,7 @@
+                   ELSE
+ c Nonradiative decay
+                      JS = JFN+1+3*NSHELL+ISHELL
+-                     JS = JPHFN+Q(JS)
++                     JS = JPHFN + INT (Q(JS))    ! compiler optimiztion problem H. Vogt 2004/04/29
+                      NPOINT = Q(JS)
+                      DO 60 I = 1,NPOINT
+                         IF(RN05.LT.Q(JS+I)) THEN
--- geant321-3.21.14.dfsg.orig/debian/patches/210-improve-cfortran-header-files.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/210-improve-cfortran-header-files.dpatch
@@ -0,0 +1,58 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 210-improve-cfortran-header-files.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Protect against multiple inclusion and add explicit dependency on
+## DP: cfortran.h to the Cernlib C headers.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09/src/cfortran/geant315.h /tmp/dpep.Al0dBQ/cernlib-2005.05.09/src/cfortran/geant315.h
+--- cernlib-2005.05.09/src/cfortran/geant315.h	1996-05-15 05:24:06.000000000 -0400
++++ /tmp/dpep.Al0dBQ/cernlib-2005.05.09/src/cfortran/geant315.h	2005-06-10 12:51:31.080979393 -0400
+@@ -1,3 +1,11 @@
++#ifndef _GEANT315_H
++#define _GEANT315_H
++#include <cfortran/cfortran.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /*------------------------------------------------------------------
+ fortran filename   : /cern/new/src/cfs/geant315/abbrch.f
+ ------------------------------------------------------------------*/
+@@ -4797,3 +4805,9 @@
+ 
+ #define ZEREGS() CCALLSFSUB0(ZEREGS,zeregs)
+ 
++
++#ifdef __cplusplus
++} /* extern "C" */
++#endif
++
++#endif /* #ifndef _GEANT315_H */
+diff -urNad cernlib-2005.05.09/src/cfortran/geant321.h /tmp/dpep.Al0dBQ/cernlib-2005.05.09/src/cfortran/geant321.h
+--- cernlib-2005.05.09/src/cfortran/geant321.h	1996-05-15 05:24:07.000000000 -0400
++++ /tmp/dpep.Al0dBQ/cernlib-2005.05.09/src/cfortran/geant321.h	2005-06-10 12:51:31.148964883 -0400
+@@ -1,3 +1,11 @@
++#ifndef _GEANT321_H
++#define _GEANT321_H
++#include <cfortran/cfortran.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /*------------------------------------------------------------------
+ fortran filename   : abbrch.f
+ ------------------------------------------------------------------*/
+@@ -6099,3 +6107,9 @@
+  PROTOCCALLSFFUN3(DOUBLE,XSEPRO,xsepro,DOUBLE,DOUBLE,DOUBLE)
+ #define XSEPRO(A2,A3,A4)  CCALLSFFUN3(XSEPRO,xsepro,DOUBLE,DOUBLE,DOUBLE,A2,A3,A4)
+ 
++
++#ifdef __cplusplus
++} /* extern "C" */
++#endif
++
++#endif /* #ifndef _GEANT321_H */
--- geant321-3.21.14.dfsg.orig/debian/patches/302-scripts-comply-with-FHS.dpatch.in
+++ geant321-3.21.14.dfsg/debian/patches/302-scripts-comply-with-FHS.dpatch.in
@@ -0,0 +1,202 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 302-scripts-comply-with-FHS.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Put data files under @DATADIR@ and assume $CERN is @PREFIX@ by default
+## DP: in scripts.  (These values are filled in from add-ons/Makefile.)
+## DP: Also some other improvements.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/scripts/gxint cernlib-2005.05.09.dfsg/src/scripts/gxint
+--- cernlib-2005.05.09.dfsg~/src/scripts/gxint	2005-04-18 11:41:16.000000000 -0400
++++ cernlib-2005.05.09.dfsg/src/scripts/gxint	2005-12-13 10:07:57.789716862 -0500
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ #*******************************************
+ #
+@@ -17,8 +17,7 @@
+ #*******************************************
+ line="******************************************************"
+  
+- 
+-if [ $# -eq 0 ] ; then
++print_help() {	
+ cat << EoD
+ 
+  GXINT [options] file(s)
+@@ -32,9 +31,13 @@
+         on all systems. X11 is the default.
+   -v version
+         version of the program library to use. Possible values
+-        include pro ( default ), new and old.
++        include pro, new and old. This option only makes sense if you
++	have installed a non-Debian version of Cernlib. In that case
++	you must have defined the environment variable \$CERN.
+   -g geant_version
+-        which version of geant to use. Current default is 315.
++        which version of geant to use. Current default is 321. This
++	also makes sense only if you have installed a non-Debian version
++	of Cernlib.
+   -h host
+         useful with the -d X11 option only. Specify the hostname
+         used for the display. Syntax identical to that of DISPLAY.
+@@ -43,16 +46,20 @@
+         Do not immediately run GEANT, but produce an executable
+         file named outputfile.
+   -L path
+-        additional loader search path. Usefull if additional libraries
+-        are specified with -l option.  This option may be repeated to
++        additional loader search path. Useful if additional libraries
++        are specified with -l option. This option may be repeated to
+         more than one pathname.
+-  -l libary
++  -l library
+         specify additional libraries. This option may be repeated to
+         add several libs.
+   -m    do NOT use main program from cernlib area.
+ 
+ EoD
+-exit
++}
++
++ 
++if [ $# -eq 0 ] ; then 
++	print_help
+ fi
+ 
+ if [ -f /usr/bin/uname ] ; then
+@@ -66,52 +73,47 @@
+ fi
+ 
+  SHOPT="d:v:g:h:o:L:l:m"
+- cmd=$0
+ # Check option set and give default values
+   if [ -f /bin/getopt -o -f /usr/bin/getopt ] ; then
+      set -- `getopt $SHOPT $*` ; cc=$?
+      if [ $cc -ne 0 ] ; then
+ 	echo ""
+ 	echo "Usage:"
+-	exec $cmd
+-	exit
++	print_help ; exit 0
+      fi
+   fi
+- 
+-drv="/X11" ; ver="pro" ; OUT="${HOME}/GEANT$$"
++
++if [ -z "$TMPDIR" ] || [ "$TMPDIR" = "/tmp" ] ; then
++  TMPDIR="$HOME"
++fi
++drv="/X11" ; ver="" ; OUT="$TMPDIR/GEANT$$"
+ gxint=""
+  
+ while [ $# -gt 0 ]
+ do case $1 in
+-     -d) drv="/$2";                     shift ;;
++     -d) drv="/$2";                  shift ;;
+      -v) ver=$2;                     shift ;;
+      -g) gvs=$2;                     shift ;;
+      -h) DISPLAY=$2;export DISPLAY;  shift ;;
+      -o) OUT=$2; norun="1";          shift ;;
+-     -L) userpath="$userpath -L$2"; shift ;;
+-     -l) userlibs="$userlibs -l$2"; shift ;;
++     -L) userpath="$userpath -L$2";  shift ;;
++     -l) userlibs="$userlibs -l$2";  shift ;;
+      -m) _m="1"				   ;;
+      --)                     shift ; break ;;
++     --help|-\?) print_help ; exit 0	   ;;
+       *)                             break ;;
+    esac
+    shift
+ done
+  
+ if [ $# -gt 0 ] ; then
+-   pgm="$*"
++   pgm="$@"
+  else
+    echo "gxint_Warning: no user program specified"
+ fi
+  
+  
+- 
+-if [ -z "$CERN" ] ; then
+-  if [ ! -d /cern ]; then
+-   echo "gxint_Error: shell variable CERN must be set or /cern must exist"
+-   exit 1
+-  fi
+-  CERN="/cern" ; export CERN
+-fi
++[ -z "$CERN" ] && export CERN="@PREFIX@"
+  
+ if [ "$drv" = "/GKS" ] ; then
+   if [ -z "$GKSR" ] ; then
+@@ -143,6 +145,7 @@
+ CLIB="geant${gvs} pawlib graflib$drv packlib mathlib"
+  
+ [ -z "$_m" ] && gxint="${CERN}/${ver}/lib/gxint${gvs}.$_o" 
++[ "$CERN" = "@PREFIX@" -a -z "$ver" ] && gxint=@DATADIR@/geant321/gxint.f
+  
+ cat << EoD
+ $line
+@@ -155,8 +158,10 @@
+ *   gxint used        : ${gxint:-user supplied}
+ $line
+ EoD
+- 
+-$LDN -o $OUT $gxint $pgm $userpath $userlibs `cernlib -v $ver $CLIB`; cc=$?
++
++[ -z "$ver" ] && verflag="" || verflag="-v"
++$LDN -o $OUT $gxint $pgm $userpath $userlibs `cernlib $verflag $ver $CLIB` ; \
++cc=$?
+  
+ [ $cc -ne 0 ] && exit $cc
+  
+diff -urNad cernlib-2005.05.09.dfsg~/src/scripts/paw cernlib-2005.05.09.dfsg/src/scripts/paw
+--- cernlib-2005.05.09.dfsg~/src/scripts/paw	1995-02-07 04:54:06.000000000 -0500
++++ cernlib-2005.05.09.dfsg/src/scripts/paw	2005-12-13 10:10:17.850939931 -0500
+@@ -21,9 +21,9 @@
+   SHOPT="d:h:v:"
+ #SEQ,GETOPTD.
+   [ "`uname -s`" = "DomainOS" ] && drv="GKS" || drv="X11"
+-  [ -z "$CERN"       ] && CERN="/cern"
+-  [ -z "$CERN_LEVEL" ] && ver="pro" || ver="$CERN_LEVEL"
+- 
++  [ -z "$CERN"       ] && CERN="@PREFIX@"
++  [ -z "$CERN_LEVEL" ] && ver="" || ver="$CERN_LEVEL"
++  [ -e "$CERN/$CERN_LEVEL/bin/pawX11" ] || drv="++" # use paw++ if no pawX11
+   while [ $# -gt 0 ]
+   do case $1 in
+        -d) drv=$2 ; shift      ;;
+@@ -43,15 +43,26 @@
+ #    inlib $GKS_INLIB
+      GDIR=$CERN/$ver/gksbin
+   fi
+-  if [ "$drv" = "X11" -a -n "$hst" ] ; then
++  if [ \( "$drv" = "X11" -o "$drv" = "++" \) -a -n "$hst" ] ; then
+      nw=`echo $hst | awk -F: '{ print NF }'`
+      [ $nw -eq 1 ] && hst="$hst:0"
+      DISPLAY="$hst" ; export DISPLAY
+   fi
+-  if [ "$ver" != "pro" ] ; then
++  if [ -n "$ver" ] ; then
+      echo
+      echo " Calling $ver version of paw-$drv"
+      echo
+   fi
+-  $GDIR/paw$drv $*
+-  [ ! -s paw.metafile ] && rm paw.metafile
++  if [ ! -x "$GDIR/paw$drv" ] ; then
++     echo " Error: PAW executable $GDIR/paw${drv} does not exist!"
++     exit 1
++  fi
++  "$GDIR/paw$drv" "$@"
++  [ ! -s paw.metafile ] && rm -f paw.metafile
++  [ ! -s PAW.METAFILE ] && rm -f PAW.METAFILE
++
++  # clean up comis temporary working directories if empty
++  [ "`(echo /tmp/comis*) 2> /dev/null`" = '/tmp/comis*' ] || \
++    rmdir /tmp/comis* > /dev/null 2>&1 || true
++  [ "`(echo "$TMPDIR"/comis*) 2> /dev/null`" = "$TMPDIR"/'comis*' ] || \
++    rmdir "$TMPDIR"/comis* > /dev/null 2>&1 || true
--- geant321-3.21.14.dfsg.orig/debian/patches/802-create-shared-libraries.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/802-create-shared-libraries.dpatch
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 802-create-shared-libraries.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Actually implement the rules to create shared libraries.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/Imakefile cernlib-2005.05.09.dfsg/src/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/Imakefile	2005-12-01 15:19:24.191267776 +0000
++++ cernlib-2005.05.09.dfsg/src/Imakefile	2005-12-01 15:20:10.310483251 +0000
+@@ -15,6 +15,7 @@
+ #endif
+ 
+ InstallLibSubdirs($(LIBDIRS))
++InstallSharedLibSubdirs($(LIBDIRS))
+ 
+ INCLUDEDIRS= $(LIBDIRS) cfortran
+ 
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/Imakefile cernlib-2005.05.09.dfsg/src/geant321/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/Imakefile	2005-12-01 15:19:23.018516575 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/Imakefile	2005-12-01 15:19:31.186783665 +0000
+@@ -26,6 +26,7 @@
+ 
+ InstallLibrary(geant321,$(CERN_LIBDIR))
+ InstallLibraryAlias(geant321,geant,$(CERN_LIBDIR))
++InstallSharedLibrary(geant321,$(LIB_SONAME).$(CERN_LEVEL),$(CERN_SHLIBDIR))
+ 
+ /* Fluka removed from Debian source package for copyright reasons. */
+ /*
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/gparal/Imakefile cernlib-2005.05.09.dfsg/src/geant321/gparal/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/gparal/Imakefile	1996-12-19 14:19:18.000000000 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/gparal/Imakefile	2005-12-01 15:19:31.186783665 +0000
+@@ -10,6 +10,7 @@
+ SubdirLibraryTarget(geant321_parallel,NullParameter)
+ 
+ InstallLibrary(geant321_parallel,$(CERN_LIBDIR))
++InstallSharedLibrary(geant321_parallel,$(LIB_SONAME).$(CERN_LEVEL),$(CERN_SHLIBDIR))
+ 
+ CopyFile(../gbase/grun.F,grun.F)
+ 
--- geant321-3.21.14.dfsg.orig/debian/patches/806-bump-mathlib-and-dependents-sonames.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/806-bump-mathlib-and-dependents-sonames.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 806-bump-mathlib-and-dependents-sonames.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Bump so versions of mathlib and dependents since it is now compiled
+## DP: against liblapack3 instead of liblapack2.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/Imakefile cernlib-2005.05.09.dfsg/src/geant321/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/Imakefile	2005-11-23 15:49:19.722162373 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/Imakefile	2005-11-23 15:49:27.431512287 +0000
+@@ -2,6 +2,8 @@
+ #define IHaveSubdirs
+ #define PassCDebugFlags
+ 
++export LIB_SONAME := 2
++
+ AllTarget(geant321)
+ 
+ /* Fluka removed from Debian source package for copyright reasons. */
--- geant321-3.21.14.dfsg.orig/debian/patches/001-fix-missing-fluka.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/001-fix-missing-fluka.dpatch
@@ -0,0 +1,47 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 001-fix-missing-fluka.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Deal with FLUKA code having been purged from Debian's Cernlib source.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/Imakefile cernlib-2005.05.09.dfsg/src/geant321/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/Imakefile	1998-03-05 11:20:07.000000000 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/Imakefile	2005-11-23 17:41:29.886310858 +0000
+@@ -4,10 +4,11 @@
+ 
+ AllTarget(geant321)
+ 
+-LIBDIRS= block cdf cgpack fiface fluka gbase gcons gdraw \ @@\
++/* Fluka removed from Debian source package for copyright reasons. */
++LIBDIRS=       cdf cgpack              gbase gcons gdraw \ @@\
+          geocad ggeom gheisha ghits ghrout ghutils giface \ @@\
+ 	 giopa gkine gphys gscan gstrag gtrak guser gxint \ @@\
+-	 miface miguti neutron peanut
++	 miface miguti neutron
+ 
+ 
+ SUBDIRS= $(LIBDIRS) data examples gxuser geant321
+@@ -25,9 +26,12 @@
+ InstallLibrary(geant321,$(CERN_LIBDIR))
+ InstallLibraryAlias(geant321,geant,$(CERN_LIBDIR))
+ 
++/* Fluka removed from Debian source package for copyright reasons. */
++/*
+ SubdirDataFile($(LIBRARY),flukaaf.dat,data)
+ 
+ InstallNonExecFileTarget(install.lib,flukaaf.dat,$(CERN_LIBDIR))
++*/
+ 
+ /* This will install the correct link for xsneut95.dat at CERN;
+  * If you want a local copy of the file, just copy it there
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/miface/Imakefile cernlib-2005.05.09.dfsg/src/geant321/miface/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/miface/Imakefile	1995-10-24 10:21:53.000000000 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/miface/Imakefile	2005-11-23 17:41:52.230563421 +0000
+@@ -1,5 +1,5 @@
+ SRCS_F= \ @@\
+-	 gfmdis.F gfmfin.F gmicap.F gmiset.F gmorin.F gmplxs.F gmxsec.F
++	                   gmicap.F gmiset.F gmorin.F gmplxs.F gmxsec.F
+ 
+ #ifdef CERNLIB_QMVAOS
+  FORTRANSAVEOPTION=FortranSaveFlags
--- geant321-3.21.14.dfsg.orig/debian/patches/003-geant-dummy-functions.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/003-geant-dummy-functions.dpatch
@@ -0,0 +1,229 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 003-geant-dummy-functions.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add stub Geant functions to avoid missing symbols due to Fluka removal.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/gkine/Imakefile cernlib-2005.05.09.dfsg/src/geant321/gkine/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/gkine/Imakefile	1996-03-28 16:21:20.000000000 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/gkine/Imakefile	2005-11-29 15:59:27.035065621 +0000
+@@ -1,6 +1,9 @@
+ SRCS_F= gfkine.F gfvert.F gludky.F glund.F glundi.F gpkine.F \ @@\
+ 	gpkinx.F gpvert.F gskine.F gskinu.F gsvert.F gsveru.F gtau.F
+ 
++/* Dummy file containing stubs for deleted Fluka and mclibs functions: */
++SRCS_C= dummy.c
++
+ #ifdef CERNLIB_QMVAOS
+  FORTRANSAVEOPTION=FortranSaveFlags
+  FORTRANOPTIONS = -math_library accurate $(FORTRANSAVEOPTION)
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/gkine/dummy.c cernlib-2005.05.09.dfsg/src/geant321/gkine/dummy.c
+--- cernlib-2005.05.09.dfsg~/src/geant321/gkine/dummy.c	1970-01-01 00:00:00.000000000 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/gkine/dummy.c	2005-11-29 16:55:14.274440352 +0000
+@@ -0,0 +1,205 @@
++/* Dummy file to avoid undefined symbols in the library */
++/* Kevin McCarty, 14 Jan 2003 */
++/* Last revised 22 November 2005 */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++/* Want the dummy functions to be weakly defined so they may be overridden
++ * without error. */
++
++#define kludge(x)    #x
++#define stringify(x) kludge(x)
++#define underline(x) __ ## x
++
++#define DUMMY(domain, UPPERNAME, fortranname_, returntype) \
++returntype fortranname_() {print_dummy(#domain,#UPPERNAME);}
++
++#define WEAKDUMMY(domain, UPPERNAME, fortranname_, returntype) \
++static returntype underline(fortranname_)() {print_dummy(#domain,#UPPERNAME);} \
++void fortranname_() \
++	__attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
++
++static void print_dummy(const char *domain, const char *function)
++{
++  fprintf(stderr, "Geant321: Now in dummy %s routine.\n", function);
++  fprintf(stderr,
++"If you see this message, you are presumably trying to call (possibly\n"
++"indirectly) the %s routine");
++
++  if (strcmp(domain, "Jetset") == 0)
++    fprintf(stderr,
++" in the Jetset library.\n"
++#if defined (CERNLIB_DEBIAN)
++"To obtain the Jetset library, please see the file\n"
++"/usr/share/doc/geant321/README.Debian\n"
++#endif
++    );
++
++  else if (strcmp(domain, "Fluka") == 0)
++    fprintf(stderr,
++" in the FLUKA library.\n"
++"FLUKA is unfortunately not available in this distribution of Cernlib for\n"
++"licensing reasons"
++#if defined (CERNLIB_DEBIAN)
++"; please see the file /usr/share/doc/geant321/README.Debian\n"
++"for details.\n"
++#else
++".\n"
++#endif
++    );
++  
++  else if (strcmp(domain, "User") == 0)
++    fprintf(stderr, ".  This routine is not built into Geant;\n"
++"you must write code for it yourself.  Please see the documentation"
++#if defined (CERNLIB_DEBIAN)
++"\n(for instance in the geant321-doc package)"
++#endif
++".\n");
++  
++  exit(EXIT_FAILURE);
++}
++
++/* Functions that the user is supposed to set up */
++WEAKDUMMY(User, UGINIT, uginit_, void);
++WEAKDUMMY(User, UGLAST, uglast_, void);
++
++/* Functions in the non-free Jetset library, which can be used
++ * if it's installed */
++WEAKDUMMY(Jetset, LU1ENT, lu1ent_, void);
++WEAKDUMMY(Jetset, LUCOMP, lucomp_, int);
++WEAKDUMMY(Jetset, LUEEVT, lueevt_, void);
++WEAKDUMMY(Jetset, LUEXEC, luexec_, void);
++
++/* N.B.  When the libgeant321 dynamic soversion is bumped, at the same time
++ * everything below this point except the dummy FLDIST and FLINIT subroutines
++ * may be deleted; those should be turned into weak aliases in case anyone
++ * wants to create a separate GEANT-FLUKA library. */
++
++/* From src/geant321/fluka (not the complete set of functions, just
++ * those referenced from external files) */
++WEAKDUMMY(Fluka, DOST,   dost_,   double);
++WEAKDUMMY(Fluka, EEXLVL, eexlvl_, void);
++WEAKDUMMY(Fluka, EVENTV, eventv_, void);
++WEAKDUMMY(Fluka, EVEVAP, evevap_, void);
++WEAKDUMMY(Fluka, EVVINI, evvini_, void);
++WEAKDUMMY(Fluka, FKENER, fkener_, double);
++WEAKDUMMY(Fluka, FKZERO, fkzero_, void);
++WEAKDUMMY(Fluka, NIZLNW, nizlnw_, void);
++WEAKDUMMY(Fluka, NUCREL, nucrel_, void);
++WEAKDUMMY(Fluka, RACO,   raco_,   void);
++WEAKDUMMY(Fluka, SAMCST, samcst_, void);
++WEAKDUMMY(Fluka, SIGEL,  sigel_,  void);
++WEAKDUMMY(Fluka, SITSAO, sitsao_, double);
++
++/* The following dummy functions are added due to the removal
++ * of the corresponding code from Geant (it is also part of FLUKA).
++ * We are constrained to keep the ABI for the dynamic library, so
++ * these dummy functions must be kept until next time the libgeant321
++ * soversion is changed. */
++
++/* From src/geant321/fiface */
++DUMMY(Fluka, FLDIST, fldist_, void);
++DUMMY(Fluka, FLINIT, flinit_, void);
++DUMMY(Fluka, FLUFIN, flufin_, void);
++
++/* From src/geant321/miface */
++DUMMY(Fluka, GFMFIN, gfmfin_, void);
++DUMMY(Fluka, GFMDIS, gfmdis_, void);
++
++/* From src/geant321/block */
++DUMMY(Fluka, FDEVAP, fdevap_, void);
++DUMMY(Fluka, FDNOPT, fdnopt_, void);
++DUMMY(Fluka, FDPREE, fdpree_, void);
++DUMMY(Fluka, FLKDT1, flkdt1_, void);
++DUMMY(Fluka, FLKDT2, flkdt2_, void);
++DUMMY(Fluka, FLKDT3, flkdt3_, void);
++DUMMY(Fluka, FLKDT4, flkdt4_, void);
++DUMMY(Fluka, FLKDT5, flkdt5_, void);
++DUMMY(Fluka, FLKDT6, flkdt6_, void);
++DUMMY(Fluka, FLKDT7, flkdt7_, void);
++
++/* From src/geant321/peanut */
++DUMMY(Fluka, BIMNXT, bimnxt_, void);   /* alternate entry to BIMSEL */
++DUMMY(Fluka, BIMSEL, bimsel_, void);
++DUMMY(Fluka, COSLEG, cosleg_, double);
++DUMMY(Fluka, FEKFNC, fekfnc_, double);
++DUMMY(Fluka, FPFRNC, fpfrnc_, double);
++DUMMY(Fluka, FRADNC, fradnc_, double);
++DUMMY(Fluka, FRHINC, frhinc_, double);
++DUMMY(Fluka, FRHONC, frhonc_, double);
++DUMMY(Fluka, NCLVFX, nclvfx_, double); /* alternate entry to PFNCLV */
++DUMMY(Fluka, NCLVIN, nclvin_, void);
++DUMMY(Fluka, NCLVST, nclvst_, void);
++DUMMY(Fluka, NUCNUC, nucnuc_, void);
++DUMMY(Fluka, NWINXT, nwinxt_, void);   /* alternate entry to NWISEL */
++DUMMY(Fluka, NWISEL, nwisel_, void);
++DUMMY(Fluka, PEANUT, peanut_, void);
++DUMMY(Fluka, PFNCLV, pfnclv_, double);
++DUMMY(Fluka, PHDSET, phdset_, void);
++DUMMY(Fluka, PHDWLL, phdwll_, void);
++DUMMY(Fluka, PIOABS, pioabs_, void);
++DUMMY(Fluka, PREPRE, prepre_, void);
++DUMMY(Fluka, RSCOMP, rscomp_, void);   /* alternate entry to SBCOMP */
++DUMMY(Fluka, RSTNXT, rstnxt_, void);   /* alternate entry to RSTSEL */
++DUMMY(Fluka, RSTSEL, rstsel_, void);
++DUMMY(Fluka, SBCOMP, sbcomp_, void);
++DUMMY(Fluka, SIGFER, sigfer_, void);
++DUMMY(Fluka, UMOFIN, umofin_, void);
++DUMMY(Fluka, XINNEU, xinneu_, double);
++DUMMY(Fluka, XINPRO, xinpro_, double);
++
++/* The following dummy common blocks are added for the same reason.
++ * The number of bytes required was determined by inspecting the existing
++ * shared libraries in the 12 official Debian architectures and determining
++ * the maximum size of each common block there. */
++
++#define COMMON(fortranname_, size) \
++        struct { char c[size]; } fortranname_ = { { 0, } }
++
++COMMON(fkadhn_, 1376);
++COMMON(fkadhp_, 3712);
++COMMON(fkbala_,  288);
++COMMON(fkcd97_, 1152);
++COMMON(fkchpa_, 1472);
++COMMON(fkchpr_,  576);
++COMMON(fkcmcy_,  176);
++COMMON(fkcomc_, 7424);
++COMMON(fkcosp_,   64);
++COMMON(fkdecc_,10816);
++COMMON(fkdech_, 4328);
++COMMON(fkenco_,   16);
++COMMON(fkeva0_,60960);
++COMMON(fkfinu_,52000);
++COMMON(fkhadf_,  352);
++COMMON(fkheac_,   96);
++COMMON(fkheav_, 5408);
++COMMON(fkhet7_,   64);
++COMMON(fkhetp_,   32);
++COMMON(fkhigf_, 1632);
++COMMON(fkidgb_,   16);
++COMMON(fkinpf_,   32);
++COMMON(fkisot_,10208);
++COMMON(fkmapa_, 5824);
++COMMON(fknegx_,  128);
++COMMON(fknuct_,   16);
++COMMON(fknuda_, 1248);
++COMMON(fknuge_, 1120);
++COMMON(fknugi_,26944);
++COMMON(fknuii_, 1888);
++COMMON(fknule_,18048);
++COMMON(fknupw_,   32);
++COMMON(fkpapr_, 2400);
++COMMON(fkpare_,  256);
++COMMON(fkparn_, 7296);
++COMMON(fkpart_, 9696);
++COMMON(fkploc_, 2864);
++COMMON(fkquar_,  832);
++COMMON(fkreac_,50976);
++COMMON(fkredv_, 2368);
++COMMON(fkresn_,  256);
++COMMON(fkrun_,    32);
++COMMON(fkslop_,  608);
++COMMON(fkxsep_,13600);
++
--- geant321-3.21.14.dfsg.orig/debian/patches/301-datafiles-comply-with-FHS.dpatch.in
+++ geant321-3.21.14.dfsg/debian/patches/301-datafiles-comply-with-FHS.dpatch.in
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 301-datafiles-comply-with-FHS.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Put data files under @DATADIR@ (defined in add-ons/Makefile).
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09/src/geant321/miface/gmorin.F /tmp/dpep.5a0xP1/cernlib-2005.05.09/src/geant321/miface/gmorin.F
+--- cernlib-2005.05.09/src/geant321/miface/gmorin.F	1996-09-30 10:26:05.000000000 -0400
++++ /tmp/dpep.5a0xP1/cernlib-2005.05.09/src/geant321/miface/gmorin.F	2005-06-08 16:39:21.850830809 -0400
+@@ -112,7 +112,8 @@
+          OPEN(UNIT=MICROS,FILE=XSFILE, STATUS='OLD',READONLY)
+ #endif
+ #if defined(CERNLIB_UNIX)||defined(CERNLIB_CRAY)
+-         XSFILE = 'xsneut95.dat'
++         XSFILE = '@DATADIR@'
++     +   // '/geant321-data/xsneut95.dat'
+          INQUIRE(FILE=XSFILE,EXIST=EXISTS)
+          IF(.NOT.EXISTS) THEN
+             CHROOT=' '
--- geant321-3.21.14.dfsg.orig/debian/patches/109-fix-broken-xsneut95.dat-link.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/109-fix-broken-xsneut95.dat-link.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 109-fix-broken-xsneut95.dat-link.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Link to xsneut95.dat in the correct place.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/Imakefile cernlib-2005.05.09.dfsg/src/geant321/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/Imakefile	2005-11-23 15:38:52.663383751 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/Imakefile	2005-11-23 15:39:00.618680825 +0000
+@@ -41,7 +41,7 @@
+ install.lib:: $(CERN_LIBDIR)/xsneut95.dat
+ 
+ $(CERN_LIBDIR)/xsneut95.dat:
+-	cd $(@D);$(LN) ../share/lib/$(@F) $(@F)
++	cd $(@D) && $(LN) ../src/geant321/data/$(@F) $(@F)
+ 
+ #endif
+ #if defined(CERNLIB_VAXVMS)
--- geant321-3.21.14.dfsg.orig/debian/patches/306-patch-assert.h-for-makedepend.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/306-patch-assert.h-for-makedepend.dpatch
@@ -0,0 +1,165 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 306-patch-assert.h-for-makedepend.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Include local copy of assert.h with a workaround for a bug of
+## DP: makedepend (cf. Debian bug # 171908).
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09/src/include/assert.h /tmp/dpep.9sKNsJ/cernlib-2005.05.09/src/include/assert.h
+--- cernlib-2005.05.09/src/include/assert.h	1969-12-31 19:00:00.000000000 -0500
++++ /tmp/dpep.9sKNsJ/cernlib-2005.05.09/src/include/assert.h	2005-06-09 12:50:41.751880968 -0400
+@@ -0,0 +1,153 @@
++#ifndef CERNLIB_LINUX
++# include "/usr/include/assert.h"
++#else
++
++/* Copyright (C) 1991,1992,1994-2001,2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library 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
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++ *	ISO C99 Standard: 7.2 Diagnostics	<assert.h>
++ */
++
++#ifdef	_ASSERT_H
++
++# undef	_ASSERT_H
++# undef	assert
++# undef __ASSERT_VOID_CAST
++
++# ifdef	__USE_GNU
++#  undef assert_perror
++# endif
++
++#endif /* assert.h	*/
++
++#define	_ASSERT_H	1
++#include <features.h>
++
++#if defined __cplusplus && __GNUC_PREREQ (2,95)
++# define __ASSERT_VOID_CAST static_cast<void>
++#else
++# define __ASSERT_VOID_CAST (void)
++#endif
++
++/* void assert (int expression);
++
++   If NDEBUG is defined, do nothing.
++   If not, and EXPRESSION is zero, print an error message and abort.  */
++
++#ifdef	NDEBUG
++
++# define assert(expr)		(__ASSERT_VOID_CAST (0))
++
++/* void assert_perror (int errnum);
++
++   If NDEBUG is defined, do nothing.  If not, and ERRNUM is not zero, print an
++   error message with the error text for ERRNUM and abort.
++   (This is a GNU extension.) */
++
++# ifdef	__USE_GNU
++#  define assert_perror(errnum)	(__ASSERT_VOID_CAST (0))
++# endif
++
++#else /* Not NDEBUG.  */
++
++#ifndef _ASSERT_H_DECLS
++#define _ASSERT_H_DECLS
++__BEGIN_DECLS
++
++/* This prints an "Assertion failed" message and aborts.  */
++extern void __assert_fail (__const char *__assertion, __const char *__file,
++			   unsigned int __line, __const char *__function)
++     __THROW __attribute__ ((__noreturn__));
++
++/* Likewise, but prints the error text for ERRNUM.  */
++extern void __assert_perror_fail (int __errnum, __const char *__file,
++				  unsigned int __line,
++				  __const char *__function)
++     __THROW __attribute__ ((__noreturn__));
++
++
++/* The following is not at all used here but needed for standard
++   compliance.  */
++extern void __assert (const char *__assertion, const char *__file, int __line)
++     __THROW __attribute__ ((__noreturn__));
++
++
++__END_DECLS
++#endif /* Not _ASSERT_H_DECLS */
++
++/* For the macro definition we use gcc's __builtin_expect if possible
++   to generate good code for the non-error case.  gcc 3.0 is a good
++   enough estimate for when the feature became available.  */
++# if __GNUC_PREREQ (3, 0)
++#  define assert(expr) \
++  (__ASSERT_VOID_CAST (__builtin_expect (!!(expr), 1) ? 0 :		      \
++		       (__assert_fail (__STRING(expr), __FILE__, __LINE__,    \
++				       __ASSERT_FUNCTION), 0)))
++# else
++#  define assert(expr) \
++  (__ASSERT_VOID_CAST ((expr) ? 0 :					      \
++		       (__assert_fail (__STRING(expr), __FILE__, __LINE__,    \
++				       __ASSERT_FUNCTION), 0)))
++# endif
++
++# ifdef	__USE_GNU
++#  if __GNUC_PREREQ (3, 0)
++#   define assert_perror(errnum) \
++  (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 :		      \
++		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
++					      __ASSERT_FUNCTION), 0)))
++#  else
++#   define assert_perror(errnum) \
++  (__ASSERT_VOID_CAST (!(errnum) ? 0 :					      \
++		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
++					      __ASSERT_FUNCTION), 0)))
++#  endif
++# endif
++
++/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
++   which contains the name of the function currently being defined.
++   This is broken in G++ before version 2.6.
++   C9x has a similar variable called __func__, but prefer the GCC one since
++   it demangles C++ function names.  */
++
++/* The following commented-out line breaks makedepend (bug # 171908); a local
++ * patched version of assert.h is therefore included.
++ *   --Kevin McCarty, for Debian */
++/* # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) */
++
++/* begin fix to work around Debian Bug # 171908 */
++# if defined __cplusplus
++#  if __GNUC_PREREQ (2, 6)
++#   define __ASSERT_FUNCTION	__PRETTY_FUNCTION__
++#  endif
++# elif __GNUC_PREREQ (2, 4)
++/* end fix */
++
++#   define __ASSERT_FUNCTION	__PRETTY_FUNCTION__
++# else
++#  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
++#   define __ASSERT_FUNCTION	__func__
++#  else
++#   define __ASSERT_FUNCTION	((__const char *) 0)
++#  endif
++# endif
++
++#endif /* NDEBUG.  */
++
++#endif /* CERNLIB_LINUX */
--- geant321-3.21.14.dfsg.orig/debian/patches/203-compile-geant-with-ertrak.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/203-compile-geant-with-ertrak.dpatch
@@ -0,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 203-compile-geant-with-ertrak.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Ertrak code added to library in Debian since I saw no reason to exclude.
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/Imakefile cernlib-2005.05.09.dfsg/src/geant321/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/geant321/Imakefile	2005-11-23 15:41:44.798536817 +0000
++++ cernlib-2005.05.09.dfsg/src/geant321/Imakefile	2005-11-23 15:43:39.618959247 +0000
+@@ -5,11 +5,12 @@
+ AllTarget(geant321)
+ 
+ /* Fluka removed from Debian source package for copyright reasons. */
++/* Ertrak added to Debian since I saw no reason to leave it out. */
+ LIBDIRS=       cdf cgpack              gbase gcons gdraw \ @@\
+          geocad ggeom gheisha ghits ghrout ghutils giface \ @@\
+ 	 giopa gkine gphys gscan gstrag gtrak guser gxint \ @@\
+-	 miface miguti neutron
+-
++	 miface miguti neutron        \ @@\
++	 erdecks erpremc matx55
+ 
+ SUBDIRS= $(LIBDIRS) data examples gxuser geant321
+ 
--- geant321-3.21.14.dfsg.orig/debian/patches/114-install-scripts-properly.dpatch
+++ geant321-3.21.14.dfsg/debian/patches/114-install-scripts-properly.dpatch
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 114-install-scripts-properly.dpatch by  <kmccarty@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Install scripts properly (i.e. don't try to strip them).
+
+@DPATCH@
+diff -urNad cernlib-2005.05.09.dfsg~/src/scripts/Imakefile cernlib-2005.05.09.dfsg/src/scripts/Imakefile
+--- cernlib-2005.05.09.dfsg~/src/scripts/Imakefile	2004-07-29 10:17:08.000000000 -0400
++++ cernlib-2005.05.09.dfsg/src/scripts/Imakefile	2005-12-02 10:45:23.091782817 -0500
+@@ -1,10 +1,10 @@
+ 
+-InstallProgram(paw,$(CERN_BINDIR))
++InstallNamedProg(paw,paw,$(CERN_BINDIR))
+ 
+ #if defined(CERNLIB_SHIFT)
+ InstallNamedProg(cernlib_shift,cernlib,$(CERN_BINDIR))
+ #else
+-InstallProgram(cernlib,$(CERN_BINDIR))
++InstallNamedProg(cernlib,cernlib,$(CERN_BINDIR))
+ #endif
+ 
+-InstallProgram(gxint,$(CERN_BINDIR))
++InstallNamedProg(gxint,gxint,$(CERN_BINDIR))
--- geant321-3.21.14.dfsg.orig/debian/add-ons/Makefile
+++ geant321-3.21.14.dfsg/debian/add-ons/Makefile
@@ -0,0 +1,141 @@
+NEEDS_MAKEFILE	= cfortran geant321 scripts
+LIB_PACKAGES	= geant321
+
+prefix          = /usr/local
+datadir         = $(prefix)/share
+include $(datadir)/cernlib/cernlib.mk
+
+GEANTDOC	= $(DESTDIR)$(datadir)/doc/geant321-doc
+
+cernlib-indep-local: cernlib-geant-data cernlib-geant-docs cernlib-scripts
+
+# we need to do this rather than using the scripts Makefile,
+# which (stupidly) calls install -s [strip] on shell scripts
+cernlib-scripts: patch
+	set -e ; \
+	mkdir -p $(CERN_BINDIR) ; \
+	install -p -m 0755 $(CVSCOSRC)/scripts/gxint $(CERN_BINDIR)
+
+# these targets build only the arch-independent data files
+cernlib-geant-data: patch buildtree
+	$(MAKE) -C $(CERN_BUILDDIR) MAKEOVERRIDES= geant321/Makefile
+	$(MAKE) -C $(CERN_BUILDDIR)/geant321 MAKEOVERRIDES= gxint/Makefile
+	$(MAKE) -C $(CERN_BUILDDIR)/geant321/gxint \
+		MAKEOVERRIDES= $(CERN_LIBDIR)/gxint321.f
+
+# now build some documentation that isn't created automatically.
+cernlib-geant-docs: patch
+	set -e ; \
+	mkdir -p $(CERN_DOCDIR) ; \
+	rm -f $(CERN_DOCDIR)/geant321.txt; \
+	cd $(CVSCOSRC)/geant321 ; \
+	for x in gbase gcons gdraw ggeom ghits giopa gkine gphys gtrak ; do \
+		( echo && echo -n "                                 [" && \
+		  echo -n $$x | cut -b 2-5 | tr '[a-z]' '[A-Z]' |xargs echo -n\
+		  && echo "]"&& echo && \
+		  sed -e '/^\#.*$$/d' -e '1,/^\*-- Author/d' \
+			-e '/^\*$$/d' $$x/$$x.doc ) >> \
+			$(CERN_DOCDIR)/geant321.txt ; \
+	done ; \
+	cd doc ; \
+	( echo "                              ERTRAK Documentation" && \
+	  echo "                              ====================" && \
+	  sed -e '/^\*/d' gedoc ) > $(CERN_DOCDIR)/ertrak.txt ; \
+	mkdir -p $(CERN_DOCDIR)/gheisha ; \
+	cd ghdoc ; \
+	for x in `ls *.doc | sed 's/.doc$$//g'` ; do \
+		sed -e '/^\*/d' -e 's/^C\*\*//g' $$x.doc > \
+		$(CERN_DOCDIR)/gheisha/$$x.txt;\
+	done
+
+# target to install include files for development packages
+install-includes:
+	install -d -m 0755 $(DESTDIR)$(includedir) \
+		$(DESTDIR)$(includedir)/geant
+
+	# install them all (patching includes, e.g. #include "ksys.h"
+	# -> #include <kuip/ksys.h> )
+	for dir in `cat $(ADDONDIR)/includelist.txt` ; do \
+		basedir=`basename $$dir` ; \
+		rm -rf $(DESTDIR)$(includedir)/$$basedir ; \
+		cp -Rp $(CVSCOSRC)/$$dir $(DESTDIR)$(includedir) ; \
+		ls -1 $(DESTDIR)$(includedir)/$$basedir/* | \
+			egrep -v '\.(h|inc)$$' | xargs rm -rf ; \
+		for file in `ls -1 $(DESTDIR)$(includedir)/$$basedir/*` ; do \
+		if [ -f $$file ] ; then \
+	sed -e 's,^\([ ]*#[ ]*include\)[ 	]*"\([^"/]*\)",\1 <'$$basedir/'\2>,g' \
+		-e 's,^\([ ]*#[ ]*include\)[ 	]*"\([^"]*\)",\1 <\2>,g' \
+		-e 's,cfortran/,,g' \
+		$$file > $$file.tmp ; \
+	mv -f $$file.tmp $$file ; \
+	fi ; \
+	done ; \
+	done
+
+	# install still more include files
+	install -p -m 0644 $(CVSCOSRC)/cfortran/geant321.h \
+		$(DESTDIR)$(includedir)/
+	install -p -m 0644 $(CVSCOSRC)/car/gean*.car $(DESTDIR)$(includedir)/
+	rm -f $(DESTDIR)$(includedir)/geanh.car && \
+		ln -sf geanh321.car $(DESTDIR)$(includedir)/geanh.car
+	rm -f $(DESTDIR)$(includedir)/geant.car && \
+		ln -sf geant321.car $(DESTDIR)$(includedir)/geant.car
+	( cd $(DESTDIR)$(includedir)/geant/ && ln -sf ../geant321 gcdes )
+
+# target to install files in arch-dependent packages
+install-arch: install-includes
+	# install libraries
+	install -d -m 0755 $(DESTDIR)$(libdir)
+	install -p -m 0644 $(CERN_LIBDIR)/*.a $(DESTDIR)$(libdir)/
+	# we go through the following rigmarole because "install" dereferences
+	# symlinks and older GNU versions of "cp" have inconsistent
+	# syntax for the short form of the --no-dereference flag
+	set -e ; \
+	if [ -d $(CERN_SHLIBDIR) ] ; then \
+	( abslibdir="`cd $(DESTDIR)$(libdir)/ && pwd`" ; \
+	  cd $(CERN_SHLIBDIR)/ ; \
+	  for file in `ls | grep 'lib.*\..*\..*\.'` ; do \
+		basename=`echo $$file | cut -f 1 -d .` ; \
+		install -p -m 0644 $$file "$$abslibdir/" ; \
+		for link in `ls $${basename}.* |grep -v 'lib.*\..*\..*\.'`; do \
+			ln -sf $$file "$$abslibdir"/$$link ; \
+		done ; \
+	  done ) ; \
+	fi
+
+# target to install files in arch-independent packages
+install-indep:
+	install -d -m 0755 $(DESTDIR)$(bindir) \
+		$(DESTDIR)$(sysconfdir)/X11/app-defaults \
+		$(DESTDIR)$(datadir)/geant321 \
+		$(DESTDIR)$(datadir)/doc/geant321-doc $(DESTDIR)$(includedir) \
+		$(DESTDIR)$(datadir)/geant321-data $(DESTDIR)$(man1dir)
+	
+	# install Geant data file into /usr/share directories
+	install -p -m 0644 $(CVSCOSRC)/geant321/data/xsneut95.dat \
+		$(DESTDIR)$(datadir)/geant321-data/
+	rm -f $(CERN_LIBDIR)/xsneut95.dat
+
+	# ... and likewise the gxint.f file used by geant
+	# (forcing it to call the Lesstif version of Paw)
+	sed 's/CALL GPAW/CALL GPAWPP/g' $(CERN_LIBDIR)/gxint321.f \
+		> $(DESTDIR)$(datadir)/geant321/gxint321.f
+	ln -sf gxint321.f $(DESTDIR)$(datadir)/geant321/gxint.f
+	
+	# ... and Geant documentation
+	install -p -m 0644 $(CERN_DOCDIR)/geant321.txt \
+		$(CERN_DOCDIR)/ertrak.txt $(GEANTDOC)/
+	install -d -m 0755 $(GEANTDOC)/gheisha
+	install -p -m 0644 $(CERN_DOCDIR)/gheisha/* $(GEANTDOC)/gheisha/
+	
+	# ... and X11 app-defaults
+	install -p -m 0644 $(ADDONDIR)/app-defaults/*Geant++ \
+		$(DESTDIR)$(sysconfdir)/X11/app-defaults/
+	
+	# ... and scripts + man pages
+	install -p -m 0755 $(CERN_BINDIR)/gxint $(DESTDIR)$(bindir)/
+	install -p -m 0644 $(ADDONDIR)/manpages/gxint.1 $(DESTDIR)$(man1dir)/
+
+.PHONY: cernlib-indep-local cernlib-scripts cernlib-geant-data \
+	cernlib-geant-docs install install-arch install-includes install-indep
+
--- geant321-3.21.14.dfsg.orig/debian/add-ons/bin/gmake
+++ geant321-3.21.14.dfsg/debian/add-ons/bin/gmake
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# gmake wrapper script
+
+# This is needed because the name of the make command in the cernlib source
+# is assumed to be "gmake", but GNU Make is simply called "make" in most
+# Linux distributions.
+
+# Do not install this script; it should be used only for the cernlib build
+# process.
+
+if [ "x$ADDONDIR" = x ] ; then
+	echo "gmake: this script is not intended to be used outside the"
+	echo "       cernlib build process!"
+	exit 1
+fi
+
+MAKE=""
+
+# see if there is a "gmake" other than this script
+OLDPATH="$PATH"
+export PATH="`echo "$OLDPATH" | sed \
+	-e 's,:'"${ADDONDIR}"'/bin:,:,g' \
+	-e 's,^'"${ADDONDIR}"'/bin:,,g' \
+	-e 's,:'"${ADDONDIR}"'/bin$,,g'`"
+which gmake > /dev/null 2>&1 && MAKE="`which gmake`"
+export PATH="$OLDPATH"
+
+# if not, try to use "make"
+[ "x$MAKE" = x ] && which make > /dev/null 2>&1 && MAKE=make
+
+if [ "x$MAKE" = x ] ; then
+	echo "gmake: wrapper script can find neither gmake nor make in \$PATH!"
+	exit 1
+fi
+
+exec "$MAKE" "$@"
+
--- geant321-3.21.14.dfsg.orig/debian/add-ons/bin/remove-deadpool
+++ geant321-3.21.14.dfsg/debian/add-ons/bin/remove-deadpool
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -e
+cd upstream
+
+for dir in `tr '/' ' ' < ../debian/deadpool.txt | awk '{print $1}' \
+	| sed -e 's/#.*//g' -e '/$^/d' | sort | uniq` ; do
+	file=src_${dir}.tar.gz
+	echo Unpacking compressed source from $file...
+	tar xzf $file
+	version=`ls -1 | head -n 1`
+	echo Removing files with bad copyright...
+	for badfile in `grep '^'$dir ../debian/deadpool.txt \
+			| sed 's/\#.*$//g'` ; do
+		path=$version/src/$badfile
+		[ -e "$path" ] || echo "Skipping non-existent $path ..."
+		rm -rf $version/src/$badfile
+	done
+	echo Repacking $file.
+	tar czf $file $version
+	rm -rf $version
+done
+echo Done.
+
+exit 0
+
--- geant321-3.21.14.dfsg.orig/debian/add-ons/app-defaults/Geant++
+++ geant321-3.21.14.dfsg/debian/add-ons/app-defaults/Geant++
@@ -0,0 +1,16 @@
+! Use light gray widgets instead of the hideous default blue
+
+Geant++*background:		gray
+Geant++*dirlist*background:	white
+Geant++*foreground:		black
+
+! use decent fonts
+Geant++*XmText*fontList:	*-courier-medium-r-normal-*-120-*
+Geant++*XmTextField*fontList:	*-courier-medium-r-normal-*-120-*
+Geant++*kxtermFont:		*-helvetica-medium-r-normal-*-120-*
+Geant++*kxtermTextFont:		*-courier-medium-r-normal-*-120-*
+Geant++*dirlist*fontList:	*-helvetica-medium-r-normal-*-120-*
+Geant++*matrix.fontList:	*-helvetica-medium-r-normal-*-120-*
+Geant++*helpFont:		*-courier-medium-r-normal-*-120-*
+Geant++*fontList:		*-helvetica-medium-r-normal-*-120-*
+
--- geant321-3.21.14.dfsg.orig/debian/add-ons/app-defaults/KxGeant++
+++ geant321-3.21.14.dfsg/debian/add-ons/app-defaults/KxGeant++
@@ -0,0 +1,13 @@
+! This file gives X defaults for KXterm when run by Geant.
+! Use light gray widgets instead of the hideous default blue
+
+KxGeant++*background:		gray
+KxGeant++*dirlist*background:	gray90
+KxGeant++*foreground:		black
+
+! and decent fonts instead of "fixed"
+KxGeant++*fontList:		*-helvetica-medium-r-normal*-120-*
+KxGeant++*XmText*fontList:	*-courier-medium-r-normal*-120-*
+
+! and make the transcript pad a reasonable size
+KxGeant++*outputForm.height:	200
--- geant321-3.21.14.dfsg.orig/debian/add-ons/manpages/gxint.1
+++ geant321-3.21.14.dfsg/debian/add-ons/manpages/gxint.1
@@ -0,0 +1,71 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.TH GXINT 1 "January 24, 2003"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.SH NAME
+gxint \- load and run an interactive Geant application
+.SH SYNOPSIS
+.B gxint
+.RI [ options ] " file(s)"
+.SH DESCRIPTION
+.PP
+\fBgxint\fP is a script to load and run a Geant application, which is usually
+in the form of Fortran source code.  The desired routines are given in
+.IR file(s) .
+.SH OPTIONS
+.TP
+.BI "\-d " driver
+Specify a graphics driver.  The available options on Linux are X11 and Motif
+(which should also work with lesstif). X11 is the default.
+.TP
+.BI "\-g " geant_version
+Specify the version of Geant to use.  Current default is 3.21.  This option
+only makes sense if you have installed a Geant version other than 3.21
+(i.e. one not packaged by Debian).
+.TP
+.BI "\-h " host
+Useful with the \-d X11 option only.  Specifies the hostname used for the
+display; syntax is identical with that of $DISPLAY.  If no hostname is
+specified, the value of $DISPLAY is used.
+.TP
+.BI "\-l " library
+Specify additional libraries.  This option may be repeated to add several libs.
+.TP
+.BI "\-L " path
+Additional loader search path.  Useful if additional libraries are specified
+with \-l option.  This option may be repeated with more than one pathname.
+.TP
+.B \-m
+Do NOT use main program from cernlib area.
+.TP
+.BI "\-o " outputfile
+Do not immediately run Geant, but instead produce an executable file named
+.IR outputfile .
+If "\-o" is not given, the executable file will be created in $HOME,
+named GEANT\fIpid\fP (\fIpid\fP being the process ID of \fBgxint\fP),
+and run automatically.
+.TP
+.BI "\-v " version
+Specify version of $CERN_LEVEL.  This is meaningless unless you have installed
+an upstream version of Cernlib (i.e. not packaged by Debian); see the file
+.IR /usr/share/doc/cernlib\-base/README.Debian .
+.TP
+.B \-?, \-\-help
+Show a summary of options.
+.SH SEE ALSO
+.PP
+.BR cernlib (1)
+\- script to list required \-l and \-L options given a list of CERN libraries
+.PP
+.I /usr/share/doc/cernlib\-base/README.Debian
+describes how one might use the \-v flag with Debian's versions of the
+cernlib and gxint scripts if one has an upstream version of Cernlib installed.
+.PP
+Cernlib documentation for all related libraries and programs is available
+at the following URL:
+.I http://cern.ch/cernlib/
+.SH AUTHOR
+This manual page was written by Kevin McCarty <kmccarty@debian.org>
+for the Debian GNU/Linux system (but may be used by others).
+.SH COPYRIGHT
+This manual page is (C) Copyright Kevin McCarty, 2002, 2003, 2004, 2005.
--- geant321-3.21.14.dfsg.orig/debian/add-ons/README
+++ geant321-3.21.14.dfsg/debian/add-ons/README
@@ -0,0 +1,40 @@
+Contents of this directory are copyright (C) Kevin B. McCarty, 2001-2006,
+except where noted otherwise.  They are licensed under the GNU General
+Public License, version 2 or later, at your choice.
+
+A copy of the GNU GPL may be found on Debian systems at:
+/usr/share/common-licenses/GPL
+or on the Web at: http://www.gnu.org/copyleft/gpl.html
+
+This directory contains numerous patches and additions to the canonical version
+of the GEANT 3.21 libraries supplied by CERN.  To compile them accordingly,
+copy the Makefile in this directory to the top-level geant321 source directory
+and run make with whatever variables you like.  (You will first need to have
+installed the main Cernlib and PAW libraries from my packaging of those.)
+
+This packaging of the Cernlib GEANT 3.21 libs adds support for:
+
+- shared libraries (Linux only)
+- Mac OS X compilation
+- Filesystem Hierarchy Standard: run make with these variables set:
+	"make prefix=/usr sysconfdir=/etc mandir=/usr/share/man"
+- recursive dependency checking with a rewritten "cernlib" script
+- common GNU Makefile directories, e.g. $prefix, $datadir
+- automatic generation of Cernlib documents included with the source
+- various other bug fixes
+
+Note that unlike the upstream version of Cernlib, which installs to
+$CERN/$CERN_LEVEL (e.g. /opt/cern/2003), this packaging of Cernlib GEANT 3.21
+libraries will install them to /usr/local/lib.  Or change this by specifying
+$prefix with the "make" command.
+
+Things NOT included in this packaging of Cernlib Monte Carlo libs:
+
+- GEANT-FLUKA code; see http://www.fluka.org/Faq.html
+
+These are omitted for licensing reasons (i.e. I am not convinced that it
+is permissible for me to distribute them under the terms of the GPL).
+See http://people.debian.org/~kmccarty/cernlib/ for more information.
+
+--Kevin McCarty, 29 June 2006
+
--- geant321-3.21.14.dfsg.orig/debian/add-ons/INSTALL
+++ geant321-3.21.14.dfsg/debian/add-ons/INSTALL
@@ -0,0 +1,36 @@
+GEANT 3.21 INSTALLATION
+
+To install:
+
+1) Install the main Cern libraries (packlib, mathlib, etc.) and PAW libraries.
+
+2) from the top-level GEANT 3.21 source directory:
+   cp debian/add-ons/Makefile .
+
+3) Then:
+
+Debian GNU/Linux
+----------------
+To produce Debian packages:
+
+$ fakeroot debian/rules binary
+[wait a couple hours]
+$ sudo dpkg -i ../*.deb
+
+Other Linux, Unix or Mac OS X
+-----------------------------
+
+$ make prefix=/usr/local sysconfdir=/etc
+[wait a couple hours]
+sudo make prefix=/usr/local sysconfdir=/etc install
+
+PREREQUISITES
+
+- On Debian GNU/Linux, have the following packages and their dependencies
+  installed:
+
+  dpatch, patch, mawk (or gawk), xutils (for imake), debhelper, g77, cfortran,
+  cernlib-base, libmathlib2-dev, kuipc, libpawlib2-lesstif-dev,
+  fakeroot, build-essential
+
+- On other distributions, translate package names to suit.
--- geant321-3.21.14.dfsg.orig/debian/add-ons/includelist.txt
+++ geant321-3.21.14.dfsg/debian/add-ons/includelist.txt
@@ -0,0 +1 @@
+geant321/geant321
--- geant321-3.21.14.dfsg.orig/debian/changelog
+++ geant321-3.21.14.dfsg/debian/changelog
@@ -0,0 +1,10 @@
+geant321 (1:3.21.14.dfsg-1) unstable; urgency=low
+
+  * Split off GEANT 3.21 into a separate source package.  Use the version
+    numbering embedded in source instead of the date of release.
+
+  * For previous changelog entries (versions 2005.05.09.dfsg-9 and earlier),
+    please see the changelog.Debian in the cernlib-base binary package or
+    the cernlib source package.
+
+ -- Kevin B. McCarty <kmccarty@debian.org>  Thu,  6 Jul 2006 09:43:53 -0400
--- geant321-3.21.14.dfsg.orig/debian/compat
+++ geant321-3.21.14.dfsg/debian/compat
@@ -0,0 +1 @@
+5
--- geant321-3.21.14.dfsg.orig/debian/NEWS
+++ geant321-3.21.14.dfsg/debian/NEWS
@@ -0,0 +1,29 @@
+geant321 (2005.05.09.dfsg-1) unstable; urgency=low
+
+    You should be aware that some functions have been removed from the GEANT
+    3.21 libraries with this release.
+
+    The functions in question were discovered to contain non-free GEANT-FLUKA
+    code (part of which had already been removed long ago).  This code is
+    licensed in a manner incompatible with the main Cernlib license (the GNU
+    General Public License) and therefore cannot be distributed by the Debian
+    Project.  See also http://www.fluka.org/Faq.html for more information.
+    
+    Care has been taken to keep the library technically ABI-compatible by
+    adding dummy functions to replace the removed code.  However, if you run
+    code that calls one of these functions, it will now immediately abort with
+    an error.  Additionally, a number of FORTRAN include (*.inc) files
+    defining GEANT-FLUKA COMMON blocks have been removed.  Dummy COMMON blocks
+    have been added to replace those defined in GEANT-FLUKA code.  It is very
+    unlikely that you would be using such a COMMON block without using
+    GEANT-FLUKA functions.  But in such a case things should still work, as
+    long as you neither depend on any initial values in the COMMON blocks
+    (they are all now initialized to zero) nor require the deleted include
+    files in order to define them.
+
+    A complete up-to-date list of removed include files can be found in
+    /usr/share/doc/geant321/deadpool.txt , and the list of removed
+    functions is in /usr/share/doc/libgeant321-2/README.Debian .  We
+    apologize for any inconvenience.
+
+ -- Kevin B. McCarty <kmccarty@debian.org>  Fri,  2 Dec 2005 14:24:12 +0000
--- geant321-3.21.14.dfsg.orig/debian/deadpool.txt
+++ geant321-3.21.14.dfsg/debian/deadpool.txt
@@ -0,0 +1,72 @@
+# This file lists all the files that were removed from the Cernlib source
+# for copyright reasons.  Given is the file or directory to delete
+# relative to $CERN_ROOT/src/.
+
+# --Kevin McCarty, 23 Nov 2005
+
+# Authors of Pythia/Jetset did NOT give permission to release
+# their code under GPL.  CERN should have checked this more carefully!!!
+car/jetset74.car
+
+# The same applies to GEANT-FLUKA; see for instance the comments at
+# the web site http://www.fluka.org/Faq.html
+car/geanf.car
+car/geanf321.car
+geant321/data/flukaaf.dat
+geant321/block/
+geant321/fiface/
+geant321/fluka/
+geant321/miface/gfmfin.F
+geant321/miface/gfmdis.F
+geant321/peanut/
+geant321/geant321/aadat.inc
+geant321/geant321/auxpar.inc
+geant321/geant321/balanc.inc
+geant321/geant321/bamjcm.inc
+geant321/geant321/cmsres.inc
+geant321/geant321/comcon.inc
+geant321/geant321/corinc.inc
+geant321/geant321/dblprc.inc
+geant321/geant321/decayc.inc
+geant321/geant321/decayc2.inc
+geant321/geant321/depnuc.inc
+geant321/geant321/dimpar.inc
+geant321/geant321/eva0.inc
+geant321/geant321/eva1.inc
+geant321/geant321/fheavy.inc
+geant321/geant321/finlsp.inc
+geant321/geant321/finlsp2.inc
+geant321/geant321/finlsp3.inc
+geant321/geant321/finpar.inc
+geant321/geant321/finpar2.inc
+geant321/geant321/finuc.inc
+geant321/geant321/finuc2.inc
+geant321/geant321/finuct.inc
+geant321/geant321/hadflg.inc
+geant321/geant321/hadpar.inc
+geant321/geant321/higfis.inc
+geant321/geant321/inpdat.inc
+geant321/geant321/inpdat2.inc
+geant321/geant321/inpflg.inc
+geant321/geant321/iounit.inc
+geant321/geant321/isotop.inc
+geant321/geant321/labcos.inc
+geant321/geant321/mapa.inc
+geant321/geant321/metlsp.inc
+geant321/geant321/nucdat.inc
+geant321/geant321/nucgeo.inc
+geant321/geant321/nuclev.inc
+geant321/geant321/nucpar.inc
+geant321/geant321/nucstf.inc
+geant321/geant321/paprop.inc
+geant321/geant321/parevt.inc
+geant321/geant321/parnuc.inc
+geant321/geant321/part.inc
+geant321/geant321/part2.inc
+geant321/geant321/part3.inc
+geant321/geant321/qquark.inc
+geant321/geant321/reac.inc
+geant321/geant321/redver.inc
+geant321/geant321/resnuc.inc
+geant321/geant321/split.inc
+geant321/geant321/xsepar.inc
--- geant321-3.21.14.dfsg.orig/debian/control.d/0base.control
+++ geant321-3.21.14.dfsg/debian/control.d/0base.control
@@ -0,0 +1,7 @@
+Source: geant321
+Maintainer: Kevin B. McCarty <kmccarty@debian.org>
+Standards-Version: 3.7.2
+Priority: optional
+Section: science
+Build-Depends: dpatch (>= 2.0.9), patch, mawk | gawk, xutils-dev, debhelper (>= 5.0.0), g77, cernlib-base (>= 2005.05.09.dfsg-9), libgrafx11-1-dev, libgraflib1-dev, libkernlib1-dev, libpacklib1-dev, libpacklib1-lesstif-dev, libpawlib2-dev, libpawlib2-lesstif-dev, kuipc
+
--- geant321-3.21.14.dfsg.orig/debian/control.d/libgeant321-2-dev.control
+++ geant321-3.21.14.dfsg/debian/control.d/libgeant321-2-dev.control
@@ -0,0 +1,16 @@
+Package: libgeant321-2-dev
+Architecture: any
+Section: libdevel
+Depends: libgeant321-2 (= ${Source-Version}), libpawlib2-lesstif-dev
+Recommends: geant321
+Conflicts: libgeant1-dev
+Replaces: libgeant1-dev
+Description: [Physics] Library for Geant 3.21 (development files)
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes a static version of the libgeant321 library required
+ by Geant.  C and FORTRAN header files are also included.
+
--- geant321-3.21.14.dfsg.orig/debian/control.d/libgeant321-2.control
+++ geant321-3.21.14.dfsg/debian/control.d/libgeant321-2.control
@@ -0,0 +1,15 @@
+Package: libgeant321-2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, geant321-data
+Recommends: geant321, kxterm
+Description: [Physics] Library for Geant 3.21
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes the libgeant321 library required by Geant 3.21.  Note
+ that in order to compile and link programs against this library, you must
+ also install the libgeant321-2-dev package.
+
--- geant321-3.21.14.dfsg.orig/debian/control.d/geant321-data.control
+++ geant321-3.21.14.dfsg/debian/control.d/geant321-data.control
@@ -0,0 +1,12 @@
+Package: geant321-data
+Architecture: all
+Section: science
+Depends: cernlib-base
+Description: [Physics] Data for Geant 3.21 detector simulator
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes data files for use by Geant.
+
--- geant321-3.21.14.dfsg.orig/debian/control.d/geant321-doc.control
+++ geant321-3.21.14.dfsg/debian/control.d/geant321-doc.control
@@ -0,0 +1,12 @@
+Package: geant321-doc
+Architecture: all
+Section: doc
+Depends: cernlib-base
+Description: [Physics] Documentation for Geant 3.21
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes some documentation about Geant.
+
--- geant321-3.21.14.dfsg.orig/debian/control.d/geant321.control
+++ geant321-3.21.14.dfsg/debian/control.d/geant321.control
@@ -0,0 +1,13 @@
+Package: geant321
+Architecture: all
+Section: science
+Depends: libgeant321-2-dev, geant321-data, cernlib-base, g77
+Suggests: kxterm, geant321-doc
+Description: [Physics] Particle detector description and simulation tool
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors.  For maximum flexibility, Geant simulations
+ are performed by linking Fortran code supplied by the user with the Geant
+ libraries, then running the resulting executable.
+ .
+ This package includes gxint, the script used to perform this linking step.
+
--- geant321-3.21.14.dfsg.orig/debian/README.source
+++ geant321-3.21.14.dfsg/debian/README.source
@@ -0,0 +1,50 @@
+Options supported by Geant321's debian/rules in $DEB_BUILD_OPTIONS:
+
+ noopt:     Compile everything with no optimization, i.e. -O0.  The default
+            is to compile at -O2 or -O3 for almost all files.
+ nostrip:   Do not strip debugging information from the binaries and libraries.
+ keepbuild: Save the build tree after it's no longer useful, e.g. for debugging
+            reasons.  By default it is deleted in order to save disk space.
+ ifort:     Compile with Intel's icc and ifort (formerly ifc) compilers, not
+            gcc and g77.  You must first set and export $LD_LIBRARY_PATH, or
+	    edit /etc/ld.so.conf and run ldconfig, such that the Intel library
+	    libimf.so is in the library runtime search path.  This option has
+	    not been fully tested.
+
+Targets supported by Geant321's debian/rules:
+
+ help:              Output this text (found in debian/README.source).
+ get-orig-source:   Download upstream sourcecode in tar.gz form to a subdir
+                    "upstream" of the current dir.  Requires wget.
+ remove-deadpool:   Delete files with licensing issues from upstream tarballs.
+ orig.tar.gz:       Build a new orig.tar.gz file in the dir ".."  Don't do this
+                    if you already have one; the tarball md5sum will change!
+		    This target automatically executes the previous one first.
+ unpack:            Expand the upstream tarballs into a subdir "src" of the
+                    current dir.
+ patched, patch:    (These are synonyms.) Apply Debian patches to the unpacked
+                    source code.  After this target has been called, any
+		    additional edits to the source code will be preserved when
+		    running "fakeroot debian/rules binary".
+ unpatch:           De-apply Debian patches without deleting unpacked source.
+ build, clean, etc: Standard Policy-required targets.
+
+It may be of interest to describe some of the contents of the debian directory:
+
+ add-ons:	Non Debian-specific additions to Geant321, including such
+		things as man pages, X11 application defaults, and
+		a master Makefile.
+
+ control.d:	Fragments of the debian/control file.  It is regenerated from
+ 		these snippets by "debian/rules clean".
+
+ debhelper:	Files for debhelper tools, kept here so things are tidier.
+ 		These are symlinked from the main debian directory at build
+		time by "debian/rules install-common", and the symlinks are
+		removed by "debian/rules clean".
+
+ lintian:	Lintian overrides.
+
+ patches:	Debian patches to Geant321 source in dpatch format.  (See
+ 		debian/patches/README as there are some weird things here.)
+
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321-data.dirs
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321-data.dirs
@@ -0,0 +1 @@
+usr/share/geant321-data
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321-data.install
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321-data.install
@@ -0,0 +1 @@
+debian/tmp/usr/share/geant321-data/xsneut95.dat
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321-doc.README.debian
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321-doc.README.debian
@@ -0,0 +1,173 @@
+geant321-doc package - README.Debian
+--------------------
+
+The documentation available here is as follows.  In parentheses ( ) are the
+names that these files originally had in the Cernlib source tree.  The section
+of the GEANT3 code described by each document is given in square brackets [ ].
+
+In addition to this documentation, you should look at the README.Debian
+for the geant321 or libgeant321-2-dev package - it describes some functions and
+subroutines that had to be removed in order for GEANT to be DFSG-free.
+
+-- Kevin McCarty <kmccarty@debian.org> Thu, 10 Mar 2005
+
+GEANT 3 CORE DOCUMENTATION
+--------------------------
+
+These files have all been merged into the file
+/usr/share/doc/geant321-doc/geant321.txt
+
+If you have Internet access, a graphical version of this document is
+available in PDF format at this URL:
+http://wwwasdoc.web.cern.ch/wwwasdoc/pdfdir/geant.pdf
+
+* The section [BASE] (gbase.doc) gives an outline of GEANT3, including
+  flow charts of program operation, input/output, and program examples.
+
+  Contents:
+  + Introduction to GEANT3
+    - GEANT3 Applications
+    - Event Simulation Framework
+    - Initialization
+    - Event Processing
+    - Termination
+  + Simplified Program Flow Chart
+  + Overview of COMMON Blocks
+    - Introduction
+    - Dynamic Core
+    - Other Labelled Common Blocks
+  + Summary of Data Cards
+    - Introduction
+    - User Defined Data Cards
+    - Summary of the Most Important GEANT3 Data Cards
+  + The Reference System and Dimensional Units
+    - The Master Reference System (MARS)
+    - The Local Reference Systems (MRS and DRS)
+    - The Dimensional Units
+  + Examples of MAIN Program and User Initialization
+  + The System Initialization Routines
+  + Steering Routines for Event Processing
+  + Examples of User Termination and Related Routines
+
+* The section [CONS] (gcons.doc) describes routines related to storage
+  and retrieval of information for materials, tracking media and particles in
+  a detector.
+
+  Contents:
+  + Introduction to the section CONS
+    - The Section CONS
+    - Materials
+    - Tracking Medium Parameters
+    - Particles
+
+* The section [DRAW] (gdraw.doc) describes the routines for drawing the
+  detector, the detector geometrical tree, particle trajectories, and hits.
+
+  Contents:
+  + Introduction to the Drawing Package
+    - The Drawing Package
+    - Drawing the Detector
+    - Drawing the Geometrical Tree
+    - Drawing the Geometrical Specifications
+    - Drawing Particle Trajectories
+    - Drawing Hits
+    - The View Banks
+    - Other Features
+    - Basic and Advanced Graphics
+    - Running Instructions
+    - Summary
+  + Labelled COMMON Blocks Related to Section DRAW
+  + The View Data Structure JDRAW
+
+* The section [GEOM] (ggeom.doc) describes the routines for providing
+  geometric information to Geant.
+
+  Contents:
+  + Introduction to the Geometry Package
+    - The Geometry Package
+    - The Volume Definition
+    - Volumes with Contents
+    - Overlapping Volumes
+    - The Physical Tree
+    - The Data Structure JVOLUM and the COMMON Block /GCVOLU/
+    - The Basic User Tools
+    - The Optimisation Tools
+  + Labelled COMMON Blocks Related to Section GEOM
+  + The System Shapes
+  + The Volume Data Structure JVOLUM
+
+* The section [HITS] (ghits.doc) describes the routines to store,
+  retrieve and print information about events (hits) in a detector.
+
+  Contents:
+  + Introduction to the Detector Response Package
+    - The Detector Response Package
+    - Sets and Detectors
+    - The Basic User Tools
+    - Retrieval of Geometrical Information
+
+* The section [IOPA] (giopa.doc) describes routines for reading and writing
+  the GEANT3 data structures.
+
+  Contents:
+  + The I/O Service Routines
+  + Routines to Perform I/O
+
+* The section [KINE] (gkine.doc) defines the kinematics data
+  structures, JVERTX and JKINE.
+
+* The section [PHYS] (gphys.doc) describes the routines available for
+  simulation of particle physics, such as decays in flight, multiple
+  scattering, and hadronic interactions.
+
+  Contents:
+  + Introduction to the Section PHYS
+    - The Physics Processes
+    - Continuous Electromagnetic Processes
+    - Discrete Electromagnetic Processes
+    - Hadronic Processes
+      ** Note that FLUKA is not available in the Debian packages of GEANT3.
+    - Muon Interaction
+
+* The section [TRAK] (gtrak.doc) describes routines for tracking
+  particles through the matter of a detector.
+
+  Contents:
+  + Introduction to the Tracking Package
+    - The Tracking Package
+    - The Step Size
+    - The Subroutines GTREVE and GTRACK
+    - Magnetic Field Routines
+    - Information Available at Tracking Time, and the Subroutine GUSTEP
+    - Connection with the Detector Response Package
+    - Connection with the Drawing Package
+  
+
+OTHER DOCUMENTS
+---------------
+
+* The gheisha/ (ghdoc/) directory contains lists of COMMON parameters and ID
+  numbers used by GHEISHA, a set of hadronic interaction routines for GEANT3.
+
+* ertrak.txt (gedoc) describes the ERTRAK routines worked out by the
+  European Muon Collaboration for calculating particle trajectories,
+  the transport matrix, and the propagated error covariance matrix.
+
+  Contents:
+  1. Introduction
+  2. Definitions
+     2.1. Track Variables, Representations
+     2.2. Error Propagation
+  3. Description of the User Routines and COMMONs
+     3.1. User Routines
+     3.2. User Commons
+  4. Examples of Application
+     4.1. The Simplest Case: Representing the Trajectory at Another Point
+     4.2. Joining Track Elements in Different Parts of the Detector
+     4.3. Prediction of the Trajectory
+     4.4. Fitting Trajectory Parameters
+  5. Interface with GEANT
+     - Flow Chart for Subroutine ERTRAK
+  6. Acknowledgements
+  +  References
+
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321-doc.doc-base
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321-doc.doc-base
@@ -0,0 +1,11 @@
+Document: geant321-manual
+Title: Introduction to GEANT3
+Author: Unknown
+Abstract: Summary of the various components of the GEANT particle detector
+  simulator: routines to simulate the detector geometry, constants of the 
+  detector, particle physics and kinematics, particle tracking, detector
+  events, a graphical display, and input-output routines.
+Section: Apps/Science
+
+Format: text
+Files: /usr/share/doc/geant321-doc/geant321.txt.gz
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321-doc.docs
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321-doc.docs
@@ -0,0 +1,2 @@
+debian/tmp/usr/share/doc/geant321-doc/gheisha/
+debian/tmp/usr/share/doc/geant321-doc/*.txt
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321.README.debian
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321.README.debian
@@ -0,0 +1,71 @@
+Notes on geant321:
+------------------
+
+1) If you use the "gxint" script to run GEANT, it will create an executable
+in your home directory (or in $TMPDIR, if $TMPDIR is set; to prevent symlink
+attacks, ensure that your $TMPDIR is writable only by you) named GEANT<pid>
+where <pid> is the process ID of gxint.  Please make sure you do not have any
+files with this name format that shouldn't be overwritten, or else always call
+gxint with its -o <outputfile> option.
+
+
+2) The FLUKA routines have been removed from the Debian packages of GEANT 3.21
+at the request of the upstream authors of FLUKA, who never gave CERN permission
+to release it under the GPL.  In addition, the version of the FLUKA code in
+CERNLIB was obsolete by several years.  If you would like to use a current
+version of the FLUKA code, it may be obtained at the URL http://www.fluka.org/
+However, it may not define all symbols required by some GEANT functions that
+were used to interface with the old FLUKA code.  Additionally, please be aware
+that it is _far_ from being DFSG-Free software.
+
+The FLUKA functions and subroutines that were removed are as follows.
+Attempting to call any of them in your code will result in a linking failure
+or abnormal program exit:
+
+ABBRCH AINEL AKEKA ALTRA ALTRAF AMGA ANKEKA BAMJEV BEEXI BEKEKA BERTTP BETA
+BETARN BETRST BIMSEL BKEKA BKLASS BNKEKA CALUMO CALUMV CHANWT COREVT CORRIN
+COSLEG DATAR3 DECAUX DECAY DIFEVV DOST DRELAB DRES EEXI EEXLVL EKEKA ENERGI
+ENERGY ENRG ERUP EVDEEX EVENTV EVEVAP EVVINI FDEVAP FDNOPT FDPREE FEKFNC FEREVV
+FERHAV FISFRA FKDECA FKDRES FKENER FKERUP FKFLAV FKIMPU FKSIGI FKVERT FKZERO
+FLAVOR FLDIST FLINIT FLKDT1 FLKDT2 FLKDT3 FLKDT4 FLKDT5 FLKDT6 FLKDT7 FLUFIN
+FPFRNC FPOWER FPROB FRADNC FRHINC FRHONC GAMRN GETA GFMDIS GFMFIN HADDEN HADEVV
+HADRIN HADRIV HEVHIN HINHEV HKLASS HYPERO IEFUN IMPULS INCINI INDEX2 KINPAR
+KPOIS LORTRA NCLVIN NCLVST NIZL NIZLNW NUCEVV NUCNUC NUCREL NUCRIV NUDISV
+NUPREL NWISEL PARJET PEANUT PFNCLV PHDSET PHDWLL PIOABS PMPRAB POLI PREPRE QNRG
+RACO RAKEKV RBKEKV RCHANV ROTAT RSTSEL SAMCST SBCOMP SFECFE SHPTOT SIGEL SIGFER
+SIGINT SIHAEL SITSAO STALIN TCHOIC THREPD TRAFO TRAHAD TRANS TTRANS TWOPAD
+TWOPAR UMOFIN VEREIN VERTEX XINNEU XINPRO XLAMB XSENEU XSEPRO ZEROIN 
+
+Additionally, the GFTMAT subroutine may attempt to call FLDIST and/or FLINIT,
+resulting in an abnormal program exit, depending on how it is set up.
+
+
+3) The Jetset library, required by a few Geant functions, is not available
+within Debian because the upstream author never gave permission for it to be
+GPLed and included in Cernlib.
+
+This will affect you if you want to use any of these GEANT functions or
+subroutines.  Attempting to call them in your code without Jetset installed
+will cause an abnormal program exit:
+
+GLUDKY GLUND GLUNDI
+
+Jetset can be obtained either from this web page:
+http://www.thep.lu.se/~torbjorn/Pythia.html ; or by installing the ancis and
+montecarlo-installer-data packages, then running the command
+"ancis installdebs jetset".  The montecarlo-installer-data and ancis packages
+are not official parts of Debian; they may be obtained by adding the following
+to your /etc/apt/sources.list :
+
+deb http://people.debian.org/~kmccarty/ancis/ unstable main contrib
+deb-src http://people.debian.org/~kmccarty/ancis/ unstable main contrib
+
+(Substitute "unstable" with "stable" or "testing" if appropriate.)
+Please note that I cannot guarantee the above URLs will continue to be valid
+forever.
+
+
+4) Note that this package is not yet fully functional on 64-bit machines, as
+the COMIS portion of Pawlib does not yet work correctly on those architectures.
+
+--Kevin McCarty <kmccarty@debian.org>, Wed, 23 Nov 2005
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321.dirs
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321.dirs
@@ -0,0 +1,2 @@
+usr/bin
+etc/X11/app-defaults
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321.docs
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321.docs
@@ -0,0 +1,2 @@
+src/geant321/doc/history/
+debian/deadpool.txt
--- geant321-3.21.14.dfsg.orig/debian/debhelper/geant321.install
+++ geant321-3.21.14.dfsg/debian/debhelper/geant321.install
@@ -0,0 +1,6 @@
+debian/tmp/usr/bin/gxint
+debian/tmp/usr/share/geant321/gxint321.f
+debian/tmp/usr/share/geant321/gxint.f
+debian/tmp/etc/X11/app-defaults/Geant++
+debian/tmp/etc/X11/app-defaults/KxGeant++
+debian/tmp/usr/share/man/man1/gxint.1
--- geant321-3.21.14.dfsg.orig/debian/debhelper/libgeant321-2-dev.README.debian
+++ geant321-3.21.14.dfsg/debian/debhelper/libgeant321-2-dev.README.debian
@@ -0,0 +1,63 @@
+Notes on libgeant321-2-dev:
+---------------------------
+
+1) The FLUKA routines have been removed from the Debian packages of GEANT 3.21
+at the request of the upstream authors of FLUKA, who never gave CERN permission
+to release it under the GPL.  In addition, the version of the FLUKA code in
+CERNLIB was obsolete by several years.  If you would like to use a current
+version of the FLUKA code, it may be obtained at the URL http://www.fluka.org/
+However, it may not define all symbols required by some GEANT functions that
+were used to interface with the old FLUKA code.  Additionally, please be aware
+that it is _far_ from being DFSG-Free software.
+
+The FLUKA functions and subroutines that were removed are as follows.
+Attempting to call any of them in your code will result in a linking failure
+or abnormal program exit:
+
+ABBRCH AINEL AKEKA ALTRA ALTRAF AMGA ANKEKA BAMJEV BEEXI BEKEKA BERTTP BETA
+BETARN BETRST BIMSEL BKEKA BKLASS BNKEKA CALUMO CALUMV CHANWT COREVT CORRIN
+COSLEG DATAR3 DECAUX DECAY DIFEVV DOST DRELAB DRES EEXI EEXLVL EKEKA ENERGI
+ENERGY ENRG ERUP EVDEEX EVENTV EVEVAP EVVINI FDEVAP FDNOPT FDPREE FEKFNC FEREVV
+FERHAV FISFRA FKDECA FKDRES FKENER FKERUP FKFLAV FKIMPU FKSIGI FKVERT FKZERO
+FLAVOR FLDIST FLINIT FLKDT1 FLKDT2 FLKDT3 FLKDT4 FLKDT5 FLKDT6 FLKDT7 FLUFIN
+FPFRNC FPOWER FPROB FRADNC FRHINC FRHONC GAMRN GETA GFMDIS GFMFIN HADDEN HADEVV
+HADRIN HADRIV HEVHIN HINHEV HKLASS HYPERO IEFUN IMPULS INCINI INDEX2 KINPAR
+KPOIS LORTRA NCLVIN NCLVST NIZL NIZLNW NUCEVV NUCNUC NUCREL NUCRIV NUDISV
+NUPREL NWISEL PARJET PEANUT PFNCLV PHDSET PHDWLL PIOABS PMPRAB POLI PREPRE QNRG
+RACO RAKEKV RBKEKV RCHANV ROTAT RSTSEL SAMCST SBCOMP SFECFE SHPTOT SIGEL SIGFER
+SIGINT SIHAEL SITSAO STALIN TCHOIC THREPD TRAFO TRAHAD TRANS TTRANS TWOPAD
+TWOPAR UMOFIN VEREIN VERTEX XINNEU XINPRO XLAMB XSENEU XSEPRO ZEROIN 
+
+Additionally, the GFTMAT subroutine may attempt to call FLDIST and/or FLINIT,
+resulting in an abnormal program exit, depending on how it is set up.
+
+
+2) The Jetset library, required by a few Geant functions, is not available
+within Debian because the upstream author never gave permission for it to be
+GPLed and included in Cernlib.
+
+This will affect you if you want to use any of these GEANT functions or
+subroutines.  Attempting to call them in your code without Jetset installed
+will cause an abnormal program exit:
+
+GLUDKY GLUND GLUNDI
+
+Jetset can be obtained either from this web page:
+http://www.thep.lu.se/~torbjorn/Pythia.html ; or by installing the ancis and
+montecarlo-installer-data packages, then running the command
+"ancis installdebs jetset".  The montecarlo-installer-data and ancis packages
+are not official parts of Debian; they may be obtained by adding the following
+to your /etc/apt/sources.list :
+
+deb http://people.debian.org/~kmccarty/ancis/ unstable main contrib
+deb-src http://people.debian.org/~kmccarty/ancis/ unstable main contrib
+
+(Substitute "unstable" with "stable" or "testing" if appropriate.)
+Please note that I cannot guarantee the above URLs will continue to be valid
+forever.
+
+
+3) Note that this package is not yet fully functional on 64-bit machines, as
+the COMIS portion of Pawlib does not yet work correctly on those architectures.
+
+--Kevin McCarty <kmccarty@debian.org>, Wed, 23 Nov 2005
--- geant321-3.21.14.dfsg.orig/debian/debhelper/libgeant321-2-dev.dirs
+++ geant321-3.21.14.dfsg/debian/debhelper/libgeant321-2-dev.dirs
@@ -0,0 +1,3 @@
+usr/lib
+usr/include
+usr/include/cfortran
--- geant321-3.21.14.dfsg.orig/debian/debhelper/libgeant321-2-dev.install
+++ geant321-3.21.14.dfsg/debian/debhelper/libgeant321-2-dev.install
@@ -0,0 +1,9 @@
+debian/tmp/usr/lib/libgeant321.a
+debian/tmp/usr/lib/libgeant321.so
+debian/tmp/usr/include/geant321.h
+debian/tmp/usr/include/geanh.car
+debian/tmp/usr/include/geanh321.car
+debian/tmp/usr/include/geant.car
+debian/tmp/usr/include/geant321.car
+debian/tmp/usr/include/geant321/
+debian/tmp/usr/include/geant/
--- geant321-3.21.14.dfsg.orig/debian/debhelper/libgeant321-2-dev.links
+++ geant321-3.21.14.dfsg/debian/debhelper/libgeant321-2-dev.links
@@ -0,0 +1 @@
+usr/include/geant321.h usr/include/cfortran/geant321.h
--- geant321-3.21.14.dfsg.orig/debian/debhelper/libgeant321-2.README.debian
+++ geant321-3.21.14.dfsg/debian/debhelper/libgeant321-2.README.debian
@@ -0,0 +1,63 @@
+Notes on libgeant321-2:
+-----------------------
+
+1) The FLUKA routines have been removed from the Debian packages of GEANT 3.21
+at the request of the upstream authors of FLUKA, who never gave CERN permission
+to release it under the GPL.  In addition, the version of the FLUKA code in
+CERNLIB was obsolete by several years.  If you would like to use a current
+version of the FLUKA code, it may be obtained at the URL http://www.fluka.org/
+However, it may not define all symbols required by some GEANT functions that
+were used to interface with the old FLUKA code.  Additionally, please be aware
+that it is _far_ from being DFSG-Free software.
+
+The FLUKA functions and subroutines that were removed are as follows.
+Attempting to call any of them in your code will result in a linking failure
+or abnormal program exit:
+
+ABBRCH AINEL AKEKA ALTRA ALTRAF AMGA ANKEKA BAMJEV BEEXI BEKEKA BERTTP BETA
+BETARN BETRST BIMSEL BKEKA BKLASS BNKEKA CALUMO CALUMV CHANWT COREVT CORRIN
+COSLEG DATAR3 DECAUX DECAY DIFEVV DOST DRELAB DRES EEXI EEXLVL EKEKA ENERGI
+ENERGY ENRG ERUP EVDEEX EVENTV EVEVAP EVVINI FDEVAP FDNOPT FDPREE FEKFNC FEREVV
+FERHAV FISFRA FKDECA FKDRES FKENER FKERUP FKFLAV FKIMPU FKSIGI FKVERT FKZERO
+FLAVOR FLDIST FLINIT FLKDT1 FLKDT2 FLKDT3 FLKDT4 FLKDT5 FLKDT6 FLKDT7 FLUFIN
+FPFRNC FPOWER FPROB FRADNC FRHINC FRHONC GAMRN GETA GFMDIS GFMFIN HADDEN HADEVV
+HADRIN HADRIV HEVHIN HINHEV HKLASS HYPERO IEFUN IMPULS INCINI INDEX2 KINPAR
+KPOIS LORTRA NCLVIN NCLVST NIZL NIZLNW NUCEVV NUCNUC NUCREL NUCRIV NUDISV
+NUPREL NWISEL PARJET PEANUT PFNCLV PHDSET PHDWLL PIOABS PMPRAB POLI PREPRE QNRG
+RACO RAKEKV RBKEKV RCHANV ROTAT RSTSEL SAMCST SBCOMP SFECFE SHPTOT SIGEL SIGFER
+SIGINT SIHAEL SITSAO STALIN TCHOIC THREPD TRAFO TRAHAD TRANS TTRANS TWOPAD
+TWOPAR UMOFIN VEREIN VERTEX XINNEU XINPRO XLAMB XSENEU XSEPRO ZEROIN 
+
+Additionally, the GFTMAT subroutine may attempt to call FLDIST and/or FLINIT,
+resulting in an abnormal program exit, depending on how it is set up.
+
+
+2) The Jetset library, required by a few Geant functions, is not available
+within Debian because the upstream author never gave permission for it to be
+GPLed and included in Cernlib.
+
+This will affect you if you want to use any of these GEANT functions or
+subroutines.  Attempting to call them in your code without Jetset installed
+will cause an abnormal program exit:
+
+GLUDKY GLUND GLUNDI
+
+Jetset can be obtained either from this web page:
+http://www.thep.lu.se/~torbjorn/Pythia.html ; or by installing the ancis and
+montecarlo-installer-data packages, then running the command
+"ancis installdebs jetset".  The montecarlo-installer-data and ancis packages
+are not official parts of Debian; they may be obtained by adding the following
+to your /etc/apt/sources.list :
+
+deb http://people.debian.org/~kmccarty/ancis/ unstable main contrib
+deb-src http://people.debian.org/~kmccarty/ancis/ unstable main contrib
+
+(Substitute "unstable" with "stable" or "testing" if appropriate.)
+Please note that I cannot guarantee the above URLs will continue to be valid
+forever.
+
+
+3) Note that this package is not yet fully functional on 64-bit machines, as
+the COMIS portion of Pawlib does not yet work correctly on those architectures.
+
+--Kevin McCarty <kmccarty@debian.org>, Wed, 23 Nov 2005
--- geant321-3.21.14.dfsg.orig/debian/debhelper/libgeant321-2.dirs
+++ geant321-3.21.14.dfsg/debian/debhelper/libgeant321-2.dirs
@@ -0,0 +1 @@
+usr/lib
--- geant321-3.21.14.dfsg.orig/debian/debhelper/libgeant321-2.install
+++ geant321-3.21.14.dfsg/debian/debhelper/libgeant321-2.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libgeant321.so.2.2005
+debian/tmp/usr/lib/libgeant321.so.2