rpms/cernlib/devel cernlib-102-dont-optimize-some-code.dpatch, NONE, 1.1 cernlib-103-ignore-overly-long-macro-in-gen.h.dpatch, NONE, 1.1 cernlib-104-fix-undefined-insertchar-warning.dpatch, NONE, 1.1 cernlib-105-fix-obsolete-xmfontlistcreate-warning.dpatch, NONE, 1.1 cernlib-106-fix-paw++-menus-in-lesstif.dpatch, NONE, 1.1 cernlib-107-define-strdup-macro-safely.dpatch, NONE, 1.1 cernlib-110-ignore-included-lapack-rule.dpatch, NONE, 1.1 cernlib-111-fix-kuesvr-install-location.dpatch, NONE, 1.1 cernlib-112-remove-nonexistent-prototypes-from-gen.h.dpatch, NONE, 1.1 cernlib-113-cups-postscript-fix.dpatch, NONE, 1.1 cernlib-115-rsrtnt64-goto-outer-block.dpatch, NONE, 1.1 cernlib-118-rename-mathlib-common-blocks.dpatch, NONE, 1.1 cernlib-201-update-kuip-helper-apps.dpatch, NONE, 1.1 cernlib-202-fix-includes-in-minuit-example.dpatch, NONE, 1.1 cernlib-205-max-path-length-to-256.dpatch, NONE, 1.1 cernlib-208-fix-redundant-packlib-dependencies.dpatch, NONE, 1.1 cernlib-209-ignore-unneeded-headers-in-kmutil.c.dpatch, NONE, 1.1 cernlib-300-skip-duplicate-lenocc.dpatch, NONE, 1.1 cernlib-303-shadow-passwords-supported.dpatch, NONE, 1.1 cernlib-304-update-Imake-config-files.dpatch, NONE, 1.1 cernlib-308-use-canonical-cfortran-location.dpatch, NONE, 1.1 cernlib-311-skip-duplicate-qnext.dpatch, NONE, 1.1 cernlib-313-comis-preserves-filename-case.dpatch, NONE, 1.1 cernlib-314-permit-using-regcomp-for-re_comp.dpatch, NONE, 1.1 cernlib-318-additional-gcc-3.4-fixes.dpatch, NONE, 1.1 cernlib-319-work-around-imake-segfaults.dpatch, NONE, 1.1 cernlib-320-support-ifort.dpatch, NONE, 1.1 cernlib-701-patch-hbook-comis-Imakefiles.dpatch, NONE, 1.1 cernlib-704-patch-code_kuip-higzcc-Imakefiles.dpatch, NONE, 1.1 cernlib-800-implement-shared-library-rules-in-Imake.dpatch, NONE, 1.1 cernlib-801-non-optimized-rule-uses-fPIC-g.dpatch, NONE, 1.1 cernlib-803-link-binaries-dynamically.dpatch, NONE, 1.1 cernlib-805-expunge-missing-mathlib-kernlib-symbols.dpatch, NONE, 1.1

Patrice Dumas (pertusus) fedora-extras-commits at redhat.com
Fri Sep 1 13:15:23 UTC 2006


Author: pertusus

Update of /cvs/extras/rpms/cernlib/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5969

Modified Files:
	307-use-canonical-cfortran.dpatch cernlib.spec 
Added Files:
	cernlib-102-dont-optimize-some-code.dpatch 
	cernlib-103-ignore-overly-long-macro-in-gen.h.dpatch 
	cernlib-104-fix-undefined-insertchar-warning.dpatch 
	cernlib-105-fix-obsolete-xmfontlistcreate-warning.dpatch 
	cernlib-106-fix-paw++-menus-in-lesstif.dpatch 
	cernlib-107-define-strdup-macro-safely.dpatch 
	cernlib-110-ignore-included-lapack-rule.dpatch 
	cernlib-111-fix-kuesvr-install-location.dpatch 
	cernlib-112-remove-nonexistent-prototypes-from-gen.h.dpatch 
	cernlib-113-cups-postscript-fix.dpatch 
	cernlib-115-rsrtnt64-goto-outer-block.dpatch 
	cernlib-118-rename-mathlib-common-blocks.dpatch 
	cernlib-201-update-kuip-helper-apps.dpatch 
	cernlib-202-fix-includes-in-minuit-example.dpatch 
	cernlib-205-max-path-length-to-256.dpatch 
	cernlib-208-fix-redundant-packlib-dependencies.dpatch 
	cernlib-209-ignore-unneeded-headers-in-kmutil.c.dpatch 
	cernlib-300-skip-duplicate-lenocc.dpatch 
	cernlib-303-shadow-passwords-supported.dpatch 
	cernlib-304-update-Imake-config-files.dpatch 
	cernlib-308-use-canonical-cfortran-location.dpatch 
	cernlib-311-skip-duplicate-qnext.dpatch 
	cernlib-313-comis-preserves-filename-case.dpatch 
	cernlib-314-permit-using-regcomp-for-re_comp.dpatch 
	cernlib-318-additional-gcc-3.4-fixes.dpatch 
	cernlib-319-work-around-imake-segfaults.dpatch 
	cernlib-320-support-ifort.dpatch 
	cernlib-701-patch-hbook-comis-Imakefiles.dpatch 
	cernlib-704-patch-code_kuip-higzcc-Imakefiles.dpatch 
	cernlib-800-implement-shared-library-rules-in-Imake.dpatch 
	cernlib-801-non-optimized-rule-uses-fPIC-g.dpatch 
	cernlib-803-link-binaries-dynamically.dpatch 
	cernlib-805-expunge-missing-mathlib-kernlib-symbols.dpatch 
	cernlib-806-bump-mathlib-and-dependents-sonames.dpatch 
	cernlib-debian-copyright.in cernlib_2005.dfsg-1.diff 
	geant321-001-fix-missing-fluka.dpatch 
	geant321-003-geant-dummy-functions.dpatch 
	geant321-117-fix-optimizer-bug-in-gphot.dpatch 
	geant321-203-compile-geant-with-ertrak.dpatch 
	geant321-806-bump-mathlib-and-dependents-sonames.dpatch 
	geant321_3.21.14.dfsg-1.diff 
	mclibs-100-fix-isajet-manual-corruption.dpatch 
	mclibs-101-undefine-PPC.dpatch 
	mclibs-102-dont-optimize-some-code.dpatch 
	mclibs-204-compile-isajet-with-isasrt.dpatch 
	mclibs-206-herwig-uses-DBLE-not-REAL.dpatch 
	mclibs-305-use-POWERPC-not-PPC-as-test.dpatch 
	mclibs-309-define-dummy-herwig-routines.dpatch 
	mclibs-310-define-dummy-fowl-routines.dpatch 
	mclibs-312-skip-duplicate-gamma.dpatch 
	mclibs-806-bump-mathlib-and-dependents-sonames.dpatch 
	mclibs_2005.dfsg-1.diff paw-102-dont-optimize-some-code.dpatch 
	paw-105-fix-obsolete-xmfontlistcreate-warning.dpatch 
	paw-108-quote-protect-comis-script.dpatch 
	paw-200-comis-allow-special-chars-in-path.dpatch 
	paw-207-compile-temp-libs-with-fPIC.dpatch 
	paw-211-fix-comis-on-ia64-alpha.dpatch 
	paw-305-use-POWERPC-not-PPC-as-test.dpatch 
	paw-308-use-canonical-cfortran-location.dpatch 
	paw-313-comis-preserves-filename-case.dpatch 
	paw-701-patch-hbook-comis-Imakefiles.dpatch 
	paw-801-non-optimized-rule-uses-fPIC-g.dpatch 
	paw-803-link-binaries-dynamically.dpatch 
	paw-804-workaround-for-comis-mdpool-struct-location.dpatch 
	paw-806-bump-mathlib-and-dependents-sonames.dpatch 
	paw_2.14.04-2.diff 
Removed Files:
	001-fix-missing-fluka.dpatch 003-geant-dummy-functions.dpatch 
	100-fix-isajet-manual-corruption.dpatch 
	101-undefine-PPC.dpatch 102-dont-optimize-some-code.dpatch 
	103-ignore-overly-long-macro-in-gen.h.dpatch 
	104-fix-undefined-insertchar-warning.dpatch 
	105-fix-obsolete-xmfontlistcreate-warning.dpatch 
	106-fix-paw++-menus-in-lesstif.dpatch 
	107-define-strdup-macro-safely.dpatch 
	108-quote-protect-comis-script.dpatch 
	110-ignore-included-lapack-rule.dpatch 
	111-fix-kuesvr-install-location.dpatch 
	112-remove-nonexistent-prototypes-from-gen.h.dpatch 
	113-cups-postscript-fix.dpatch 
	115-rsrtnt64-goto-outer-block.dpatch 
	116-fix-fconc64-spaghetti-code.dpatch 
	117-fix-optimizer-bug-in-gphot.dpatch 
	200-comis-allow-special-chars-in-path.dpatch 
	201-update-kuip-helper-apps.dpatch 
	202-fix-includes-in-minuit-example.dpatch 
	203-compile-geant-with-ertrak.dpatch 
	204-compile-isajet-with-isasrt.dpatch 
	205-max-path-length-to-256.dpatch 
	206-herwig-uses-DBLE-not-REAL.dpatch 
	207-compile-temp-libs-with-fPIC.dpatch 
	208-fix-redundant-packlib-dependencies.dpatch 
	209-ignore-unneeded-headers-in-kmutil.c.dpatch 
	211-fix-comis-on-ia64-alpha.dpatch 
	300-skip-duplicate-lenocc.dpatch 
	303-shadow-passwords-supported.dpatch 
	304-update-Imake-config-files.dpatch 
	305-use-POWERPC-not-PPC-as-test.dpatch 
	308-use-canonical-cfortran-location.dpatch 
	309-define-dummy-herwig-routines.dpatch 
	310-define-dummy-fowl-routines.dpatch 
	311-skip-duplicate-qnext.dpatch 
	312-skip-duplicate-gamma.dpatch 
	313-comis-preserves-filename-case.dpatch 
	314-permit-using-regcomp-for-re_comp.dpatch 
	318-additional-gcc-3.4-fixes.dpatch 
	319-work-around-imake-segfaults.dpatch 
	701-patch-hbook-comis-Imakefiles.dpatch 
	704-patch-code_kuip-higzcc-Imakefiles.dpatch 
	800-implement-shared-library-rules-in-Imake.dpatch 
	801-non-optimized-rule-uses-fPIC-g.dpatch 
	803-link-binaries-dynamically.dpatch 
	804-workaround-for-comis-mdpool-struct-location.dpatch 
	805-expunge-missing-mathlib-kernlib-symbols.dpatch 
	806-bump-mathlib-and-dependents-sonames.dpatch 
	cernlib_2005.05.09.dfsg-6.diff 
Log Message:
* Fri Sep  1 2006 Patrice Dumas <pertusus at free.fr> 2005-23
- update to newer source split debian patchsets
- don't set the exec bits on file installed in /etc/profile.d/



--- NEW FILE cernlib-102-dont-optimize-some-code.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 102-dont-optimize-some-code.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Don't allow the compiler to optimize several files that cause trouble
## DP: (either compiler crash or broken code generation).

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mathlib/gen/d/Imakefile /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mathlib/gen/d/Imakefile
--- cernlib-2005.05.09/src/mathlib/gen/d/Imakefile	1996-06-12 11:25:38.000000000 -0400
+++ /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mathlib/gen/d/Imakefile	2005-06-09 11:14:52.470486750 -0400
@@ -19,6 +19,11 @@
 SRCS_F:= $(SRCS_F) cgauss64.F dgquad.F dgset.F gauss64.F minfc64.F \ @@\
 	rcauch.F rdeqbs.F rdeqmr.F rderiv.F rfrdh1.F rgmlt.F rkstp64.F \ @@\
 	simps64.F triint64.F 
+#if defined(CERNLIB_LINUX)
+/* -O3 optimization breaks in g77 3.2 */
+SpecialFortranLibObjectRule(rderiv,rderiv,-O0,NullParameter)
+SpecialFortranLibObjectRule(rfrdh1,rfrdh1,-O0,NullParameter)
+#endif
 #else
 SRCS_F:= $(SRCS_F) cgauss128.F cauchy.F cauchy128.F deqbs128.F deqmr128.F \ @@\
 	deriv128.F minfc128.F rfrdh128.F rgmlt128.F rkstp128.F simps128.F \ @@\
@@ -37,6 +42,16 @@
 IMAKE_DEFINES=-DFortranDoesCpp=NO
 #endif
 
+#if defined(CERNLIB_LINUX)
+/* -O3 optimization breaks in g77 3.2 */
+SpecialFortranLibObjectRule(rknysd,rknysd,-O0,NullParameter)
+SpecialFortranLibObjectRule(old506,old506,-O0,NullParameter)
+
+/* -O1 -fno-automatic optimization creates wrong code in g77 2.95, 3.3, 3.4
+   due to x86 chip extended precision, cf. http://bugs.debian.org/290438 */
+SpecialFortranLibObjectRule(radmul,radmul,-O0,NullParameter)
+#endif
+
 FORTRANSAVEOPTION = FortranSaveFlags
 
 SubdirLibraryTarget(NullParameter,NullParameter)
diff -urNad cernlib-2005.05.09/src/mathlib/gen/e/Imakefile /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mathlib/gen/e/Imakefile
--- cernlib-2005.05.09/src/mathlib/gen/e/Imakefile	1996-05-01 09:21:54.000000000 -0400
+++ /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mathlib/gen/e/Imakefile	2005-06-09 11:16:07.058731880 -0400
@@ -12,6 +12,11 @@
 
 #if defined(CERNLIB_DOUBLE)
 SRCS_F:= $(SRCS_F) chsum.F dchebn.F rchecf.F rcspln.F
+#if defined(CERNLIB_LINUX)
+/* -O3 optimization breaks in g77 3.2 */
+SpecialFortranLibObjectRule(rchecf,rchecf,-O0,NullParameter)
+SpecialFortranLibObjectRule(rcspln,rcspln,-O0,NullParameter)
+#endif
 #else
 SRCS_F:= $(SRCS_F) chsum128.F rchebn.F rcspln128.F
 #endif
diff -urNad cernlib-2005.05.09/src/packlib/kernlib/kernnum/c204fort/Imakefile /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/packlib/kernlib/kernnum/c204fort/Imakefile
--- cernlib-2005.05.09/src/packlib/kernlib/kernnum/c204fort/Imakefile	1996-06-10 06:20:57.000000000 -0400
+++ /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/packlib/kernlib/kernnum/c204fort/Imakefile	2005-06-09 11:09:34.621022534 -0400
@@ -14,6 +14,11 @@
 FDEBUGFLAGS=+O1
 #endif
 
+#if defined(CERNLIB_LINUX)
+/* -O3 optimization breaks in g77 3.2 */
+SpecialFortranLibObjectRule(muller,muller,-O0,NullParameter)
+#endif
+
 FORTRANSAVEOPTION = FortranSaveFlags
 
 SubdirLibraryTarget(NullParameter,NullParameter)
diff -urNad cernlib-2005.05.09/src/packlib/kernlib/kernnum/g900fort/Imakefile /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/packlib/kernlib/kernnum/g900fort/Imakefile
--- cernlib-2005.05.09/src/packlib/kernlib/kernnum/g900fort/Imakefile	1996-06-12 06:04:36.000000000 -0400
+++ /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/packlib/kernlib/kernnum/g900fort/Imakefile	2005-06-09 11:10:40.068274255 -0400
@@ -4,6 +4,11 @@
 FDEBUGFLAGS=NoOpFortranDebugFlags
 #endif
 
+#if defined(CERNLIB_LINUX)
+/* -O3 optimization breaks in g77 3.2 */
+SpecialFortranLibObjectRule(ranget,ranget,-O0,NullParameter)
+#endif
+
 FORTRANSAVEOPTION=FortranSaveFlags
 
 SubdirLibraryTarget(NullParameter,NullParameter)


--- NEW FILE cernlib-103-ignore-overly-long-macro-in-gen.h.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 103-ignore-overly-long-macro-in-gen.h.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Comment out macro in cfortran/gen.h with too many arguments for cfortran
## DP: to accept.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/cfortran/gen.h /tmp/dpep.weQ8Dc/cernlib-2005.05.09/src/cfortran/gen.h
--- cernlib-2005.05.09/src/cfortran/gen.h	2000-06-23 06:13:58.000000000 -0400
+++ /tmp/dpep.weQ8Dc/cernlib-2005.05.09/src/cfortran/gen.h	2005-06-09 11:43:16.729842789 -0400
@@ -1123,10 +1123,10 @@
 
 PROTOCCALLSFSUB3(NAMEZB,namezb,FLOAT,INT,INT)
 #define NAMEZB(A1,A2,A3)  CCALLSFSUB3(NAMEZB,namezb,FLOAT,INT,INT,A1,A2,A3)
-
+/*
 PROTOCCALLSFSUB29(NEWPTQ,newptq,DOUBLE,DOUBLE,DOUBLE,DOUBLE,DOUBLE,PDOUBLE,PDOUBLE,DOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PINT,PINT)
 #define NEWPTQ(A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29)  CCALLSFSUB29(NEWPTQ,newptq,DOUBLE,DOUBLE,DOUBLE,DOUBLE,DOUBLE,PDOUBLE,PDOUBLE,DOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PDOUBLE,PINT,PINT,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16,A17,A18,A19,A20,A21,A22,A23,A24,A25,A26,A27,A28,A29)
-
+*/
 PROTOCCALLSFSUB9(NEWRO,newro,INT,INT,INT,FLOAT,PFLOAT,FLOATV,FLOATV,FLOATV,FLOATV)
 #define NEWRO(A1,A2,A3,A4,A5,A6,A7,A8,A9)  CCALLSFSUB9(NEWRO,newro,INT,INT,INT,FLOAT,PFLOAT,FLOATV,FLOATV,FLOATV,FLOATV,A1,A2,A3,A4,A5,A6,A7,A8,A9)
 


--- NEW FILE cernlib-104-fix-undefined-insertchar-warning.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 104-fix-undefined-insertchar-warning.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Correct Lesstif warning about undefined InsertChar.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/kuipio.c /tmp/dpep.XJ5w0K/cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/kuipio.c
--- cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/kuipio.c	1996-03-08 10:33:04.000000000 -0500
+++ /tmp/dpep.XJ5w0K/cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/kuipio.c	2005-06-09 14:36:52.509109480 -0400
@@ -573,7 +573,7 @@
                         EditMenu,
                         RES_CONVERT( XmNlabelString, "Copy" ),
                         RES_CONVERT( XmNmnemonic, "C" ),
-                        XmNaccelerator, "Ctrl<Key>InsertChar",
+                        XmNaccelerator, "Ctrl<Key>Insert",
                         RES_CONVERT( XmNacceleratorText, "Ctrl+Ins" ),
                         NULL );
         UxPutContext( copyButton, (char *) UxKuipIoContext );
@@ -585,7 +585,7 @@
                         EditMenu,
                         RES_CONVERT( XmNlabelString, "Paste" ),
                         RES_CONVERT( XmNmnemonic, "P" ),
-                        XmNaccelerator, "Shift<Key>InsertChar",
+                        XmNaccelerator, "Shift<Key>Insert",
                         RES_CONVERT( XmNacceleratorText, "Shift+Ins" ),
                         NULL );
         UxPutContext( pasteButton, (char *) UxKuipIoContext );


--- NEW FILE cernlib-105-fix-obsolete-xmfontlistcreate-warning.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 105-fix-obsolete-xmfontlistcreate-warning.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix Lesstif warning about use of obsolete XmFontListCreate() function

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c /tmp/dpep.kv7bf1/cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c
--- cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c	1996-10-24 08:13:41.000000000 -0400
+++ /tmp/dpep.kv7bf1/cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c	2005-06-09 14:39:00.831812710 -0400
@@ -776,6 +776,7 @@
  ***********************************************************************/
 static void init_data ()
 {
+  /* This function edited not to use obsolete function XmFontListCreate() */
     int k;
 
     km_charset = XmSTRING_DEFAULT_CHARSET;
@@ -792,8 +793,11 @@
        if (help_font_struct == NULL)
            printf ("%s Warning: Font loaded for HELP (%s) is NULL \n",
                    main_prompt, srec.Help_font);
-       else
-           help_font = XmFontListCreate (help_font_struct,km_charset);
+       else {
+	   XmFontListEntry entry = XmFontListEntryCreate(
+	       km_charset, XmFONT_IS_FONT, (XtPointer)help_font_struct );
+           help_font = XmFontListAppendEntry( NULL, entry );
+       }
    }
 
    /*


--- NEW FILE cernlib-106-fix-paw++-menus-in-lesstif.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 106-fix-paw++-menus-in-lesstif.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix odd behavior of Paw++ menus when compiled against Lesstif.  The
## DP: problem is that Paw++ Motif code does some awfully weird things that
## DP: Lesstif doesn't support; cf. http://bugs.debian.org/270862 .

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c /tmp/dpep.KorIaA/cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c
--- cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c	2005-06-09 14:41:14.451377612 -0400
+++ /tmp/dpep.KorIaA/cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c	2005-06-09 14:41:22.929573007 -0400
@@ -1066,7 +1066,7 @@
 {
     int narg;
     Arg arglist[2];
-    Widget id_pdm;
+    Widget id_pdm, id_pdm_shell;
     Widget PdMenu[15];
 
     /*
@@ -1076,8 +1076,19 @@
     UxKuipBrowserContext = (_UxCkuipBrowser *)UxGetContext(parent);
 
     /*  create pulldown_menu */
-    id_pdm = XmCreatePulldownMenu (browserMenu,"OptionsPdMenu",arglist,0);
-
+    id_pdm_shell = XtVaCreatePopupShell ("OptionsPdMenu_shell",
+	xmMenuShellWidgetClass, browserMenu,
+	XmNwidth, 1,
+	XmNheight, 1,
+	XmNallowShellResize, TRUE,
+	XmNoverrideRedirect, TRUE,
+	NULL );
+    id_pdm = XtVaCreateWidget( "OptionsPdMenu",
+	xmRowColumnWidgetClass,
+	id_pdm_shell,
+	XmNrowColumnType, XmMENU_PULLDOWN,
+	NULL );
+/*  id_pdm = XmCreatePulldownMenu (browserMenu,"OptionsPdMenu",arglist,0); */
 
     /* create pulldown_menu_entry "Options" */
     XtVaCreateManagedWidget( "optionsMenu",
@@ -1091,7 +1102,7 @@
 /*  create list of push_buttons and separators for menu "Option"             */
 /*  create pulldown_menu for "Raise Window" (with list of appl. shells)       */
     narg = 0;
-#if XmREVISION == 99 /* problem with REVISION 2 ! */
+#if XmVERSION > 1 || XmREVISION >= 2
     XtSetArg(arglist[narg], XmNtearOffModel, XmTEAR_OFF_ENABLED); narg++;
 #endif
     kuipControlShellM = XmCreatePulldownMenu
@@ -1312,9 +1323,7 @@
 static void create_command_menu(parent)
    Widget parent;
 {
-    Widget id_pdme, id_pdm;
-    Arg    arglist[2];
-    int    narg;
+    Widget id_pdme, id_pdm, id_pdm_shell;
 
     /*
      *   find and restore the context for Browser
@@ -1323,12 +1332,26 @@
     UxKuipBrowserContext = (_UxCkuipBrowser *)UxGetContext(parent);
 
     /* create pulldown_menu_entry "Commands" for all commands */
-    narg = 0;
+
+    id_pdm_shell = XtVaCreatePopupShell ("CommandsPdMenu_shell",
+	xmMenuShellWidgetClass, browserMenu,
+	XmNwidth, 1,
+	XmNheight, 1,
+	XmNallowShellResize, TRUE,
+	XmNoverrideRedirect, TRUE,
+	NULL );
+    
+    id_pdm = XtVaCreateWidget( "CommandsPdMenu",
+	xmRowColumnWidgetClass,
+	id_pdm_shell,
+	XmNrowColumnType, XmMENU_PULLDOWN,
 #if XmVERSION > 1 || XmREVISION >= 2
-    XtSetArg(arglist[narg], XmNtearOffModel, XmTEAR_OFF_ENABLED); narg++;
+	XmNtearOffModel, XmTEAR_OFF_ENABLED,
 #endif
-    id_pdm = XmCreatePulldownMenu
-                     (browserMenu, "CommandsPdMenu", arglist, narg);
+	NULL );
+      
+/*      XmCreatePulldownMenu
+                     (browserMenu, "CommandsPdMenu", arglist, narg); */
 
     id_pdme = XtVaCreateManagedWidget( "id_pdme",
                         xmCascadeButtonGadgetClass, browserMenu,
@@ -1927,7 +1950,7 @@
    if (kuipControlShellM != NULL) XtDestroyWidget (kuipControlShellM);
 
    narg = 0;
-#if XmREVISION == 99 /* problem with REVISION 2 ! */
+#if XmVERSION > 1 || XmREVISION >= 2
    XtSetArg(arglist[narg], XmNtearOffModel, XmTEAR_OFF_ENABLED); narg++;
 #endif
    kuipControlShellM = XmCreatePulldownMenu


--- NEW FILE cernlib-107-define-strdup-macro-safely.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 107-define-strdup-macro-safely.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: In some cases strdup() and strndup() are macros, causing a build
## DP: failure.  Ensure any such macros are undefined before redeclaring them.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/kuip/kstring.h /tmp/dpep.ieQnkg/cernlib-2005.05.09/src/packlib/kuip/kuip/kstring.h
--- cernlib-2005.05.09/src/packlib/kuip/kuip/kstring.h	1997-03-14 12:16:39.000000000 -0500
+++ /tmp/dpep.ieQnkg/cernlib-2005.05.09/src/packlib/kuip/kuip/kstring.h	2005-06-09 14:58:22.446739916 -0400
@@ -32,6 +32,9 @@
 
 extern char* strrstr( const char* str1, const char* str2 );
 
+#ifdef strdup
+# undef strdup /* otherwise the next function declaration may bomb */
+#endif
 #define strdup Strdup           /* prototype without const */
 extern char* strdup( const char* str );
 
@@ -46,6 +49,10 @@
                      const char* str4 );
 extern char* str5dup( const char* str1, const char* str2, const char* str3,
                      const char* str4, const char* str5 );
+
+#ifdef strndup
+# undef strndup /* otherwise the next function declaration may bomb */
+#endif
 extern char* strndup( const char* buf, size_t n );
 extern char* stridup( int i );
 


--- NEW FILE cernlib-110-ignore-included-lapack-rule.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 110-ignore-included-lapack-rule.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Comment out rule requiring liblapack in a subdirectory of mathlib code.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mathlib/Imakefile /tmp/dpep.Ib8j9x/cernlib-2005.05.09/src/mathlib/Imakefile
--- cernlib-2005.05.09/src/mathlib/Imakefile	1999-11-09 12:07:49.000000000 -0500
+++ /tmp/dpep.Ib8j9x/cernlib-2005.05.09/src/mathlib/Imakefile	2005-06-10 11:24:47.771309475 -0400
@@ -5,9 +5,12 @@
 
 LIBDIRS= gen bvsl
 
+/* Lapack is independent of Cernlib and should be installed as one of
+   the build dependencies.
 #ifndef WIN32
  LIBDIRS := $(LIBDIRS) lapack
 #endif
+*/
 
 SUBDIRS= $(LIBDIRS)
 


--- NEW FILE cernlib-111-fix-kuesvr-install-location.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 111-fix-kuesvr-install-location.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix install location of kuesvr binary.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/programs/kuesvr/Imakefile /tmp/dpep.ZmakmH/cernlib-2005.05.09/src/packlib/kuip/programs/kuesvr/Imakefile
--- cernlib-2005.05.09/src/packlib/kuip/programs/kuesvr/Imakefile	1996-03-11 10:43:22.000000000 -0500
+++ /tmp/dpep.ZmakmH/cernlib-2005.05.09/src/packlib/kuip/programs/kuesvr/Imakefile	2005-06-10 12:03:32.706178628 -0400
@@ -1,4 +1,4 @@
 
 NormalProgramTarget(kuesvr,kuesvr.o,NullParameter,NullParameter,NullParameter)
 
-InstallProgram(kuesvr,$(CERN)/$(CERN_LEVEL)/bin)
+InstallProgram(kuesvr,$(CERN_BINDIR))


--- NEW FILE cernlib-112-remove-nonexistent-prototypes-from-gen.h.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 112-remove-nonexistent-prototypes-from-gen.h.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remove prototypes from gen.h of functions that don't exist in mathlib.
## DP: Because of the way cfortran works, their existence otherwise causes
## DP: linking failures in third-party code.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/cfortran/gen.h cernlib-2005.05.09.dfsg/src/cfortran/gen.h
--- cernlib-2005.05.09.dfsg~/src/cfortran/gen.h	2006-05-16 10:35:41.400252625 -0400
+++ cernlib-2005.05.09.dfsg/src/cfortran/gen.h	2006-05-16 10:37:14.159452693 -0400
@@ -84,10 +84,10 @@
 
 PROTOCCALLSFFUN1(FLOAT,ALGAMA,algama,FLOAT)
 #define ALGAMA(A2)  CCALLSFFUN1(ALGAMA,algama,FLOAT,A2)
-
+/*
 PROTOCCALLSFFUN1(FLOAT,QLGAMA,qlgama,FLOAT)
 #define QLGAMA(A2)  CCALLSFFUN1(QLGAMA,qlgama,FLOAT,A2)
-
+*/
 PROTOCCALLSFFUN1(DOUBLE,DLGAMA,dlgama,DOUBLE)
 #define DLGAMA(A2)  CCALLSFFUN1(DLGAMA,dlgama,DOUBLE,A2)
 
@@ -141,10 +141,10 @@
 
 PROTOCCALLSFFUN5(DOUBLE,DCAUCH,dcauch,DOUBLE,DOUBLE,DOUBLE,DOUBLE,DOUBLE)
 #define DCAUCH(A2,A3,A4,A5,A6)  CCALLSFFUN5(DCAUCH,dcauch,DOUBLE,DOUBLE,DOUBLE,DOUBLE,DOUBLE,A2,A3,A4,A5,A6)
-
+/*
 PROTOCCALLSFFUN6(DOUBLE,CHEBQU,chebqu,DOUBLE,DOUBLE,DOUBLE,PDOUBLE,INT,DOUBLE)
 #define CHEBQU(A2,A3,A4,A5,A6,A7)  CCALLSFFUN6(CHEBQU,chebqu,DOUBLE,DOUBLE,DOUBLE,PDOUBLE,INT,DOUBLE,A2,A3,A4,A5,A6,A7)
-
+*/
 PROTOCCALLSFFUN2(FLOAT,CHISIN,chisin,FLOAT,INT)
 #define CHISIN(A2,A3)  CCALLSFFUN2(CHISIN,chisin,FLOAT,INT,A2,A3)
 
@@ -204,13 +204,13 @@
 
 PROTOCCALLSFFUN3(DOUBLE,DVDOT,dvdot,INT,DOUBLEV,DOUBLEV)
 #define DVDOT(A2,A3,A4)  CCALLSFFUN3(DVDOT,dvdot,INT,DOUBLEV,DOUBLEV,A2,A3,A4)
-
+/*
 PROTOCCALLSFFUN2(DOUBLE,E401BD,e401bd,DOUBLE,DOUBLE)
 #define E401BD(A2,A3)  CCALLSFFUN2(E401BD,e401bd,DOUBLE,DOUBLE,A2,A3)
 
 PROTOCCALLSFFUN2(FLOAT,ELIN1,elin1,FLOAT,FLOAT)
 #define ELIN1(A2,A3)  CCALLSFFUN2(ELIN1,elin1,FLOAT,FLOAT,A2,A3)
-
+*/
 PROTOCCALLSFFUN1(FLOAT,ERF,erf,FLOAT)
 #define ERF(A2)  CCALLSFFUN1(ERF,erf,FLOAT,A2)
 
@@ -237,13 +237,13 @@
 
 PROTOCCALLSFFUN2(FLOAT,FREARG,frearg,FLOAT,FLOAT)
 #define FREARG(A2,A3)  CCALLSFFUN2(FREARG,frearg,FLOAT,FLOAT,A2,A3)
-
+/*
 PROTOCCALLSFFUN3(FLOAT,FRED2,fred2,FLOAT,FLOAT,FLOAT)
 #define FRED2(A2,A3,A4)  CCALLSFFUN3(FRED2,fred2,FLOAT,FLOAT,FLOAT,A2,A3,A4)
 
 PROTOCCALLSFFUN1(FLOAT,FRED3,fred3,FLOAT)
 #define FRED3(A2)  CCALLSFFUN1(FRED3,fred3,FLOAT,A2)
-
+*/
 PROTOCCALLSFFUN1(FLOAT,FREQ,freq,FLOAT)
 #define FREQ(A2)  CCALLSFFUN1(FREQ,freq,FLOAT,A2)
 
@@ -270,10 +270,10 @@
 
 PROTOCCALLSFFUN1(FLOAT,GAMMA,gamma,FLOAT)
 #define GAMMA(A2)  CCALLSFFUN1(GAMMA,gamma,FLOAT,A2)
-
+/*
 PROTOCCALLSFFUN1(FLOAT,QGAMMA,qgamma,FLOAT)
 #define QGAMMA(A2)  CCALLSFFUN1(QGAMMA,qgamma,FLOAT,A2)
-
+*/
 PROTOCCALLSFFUN1(DOUBLE,DGAMMA,dgamma,DOUBLE)
 #define DGAMMA(A2)  CCALLSFFUN1(DGAMMA,dgamma,DOUBLE,A2)
 
@@ -297,16 +297,16 @@
 
 PROTOCCALLSFFUN4(FLOAT,GAUSS,gauss,ROUTINE,FLOAT,FLOAT,FLOAT)
 #define GAUSS(A2,A3,A4,A5)  CCALLSFFUN4(GAUSS,gauss,ROUTINE,FLOAT,FLOAT,FLOAT,A2,A3,A4,A5)
-
+/*
 PROTOCCALLSFFUN4(FLOAT,QGAUSS,qgauss,ROUTINE,FLOAT,FLOAT,FLOAT)
 #define QGAUSS(A2,A3,A4,A5)  CCALLSFFUN4(QGAUSS,qgauss,ROUTINE,FLOAT,FLOAT,FLOAT,A2,A3,A4,A5)
-
+*/
 PROTOCCALLSFFUN4(DOUBLE,DGAUSS,dgauss,ROUTINE,DOUBLE,DOUBLE,DOUBLE)
 #define DGAUSS(A2,A3,A4,A5)  CCALLSFFUN4(DGAUSS,dgauss,ROUTINE,DOUBLE,DOUBLE,DOUBLE,A2,A3,A4,A5)
-
+/*
 PROTOCCALLSFFUN6(DOUBLE,GPINDP,gpindp,DOUBLE,DOUBLE,DOUBLE,PDOUBLE,DOUBLE,INT)
 #define GPINDP(A2,A3,A4,A5,A6,A7)  CCALLSFFUN6(GPINDP,gpindp,DOUBLE,DOUBLE,DOUBLE,PDOUBLE,DOUBLE,INT,A2,A3,A4,A5,A6,A7)
-
+*/
 PROTOCCALLSFFUN2(INT,IGET,iget,INTV,INT)
 #define IGET(A2,A3)  CCALLSFFUN2(IGET,iget,INTV,INT,A2,A3)
 
@@ -321,10 +321,10 @@
 
 PROTOCCALLSFFUN3(INT,LKKSPL,lkkspl,DOUBLE,DOUBLEV,INT)
 #define LKKSPL(A2,A3,A4)  CCALLSFFUN3(LKKSPL,lkkspl,DOUBLE,DOUBLEV,INT,A2,A3,A4)
-
+/*
 PROTOCCALLSFFUN4(INT,LOCHAR,lochar,INTV,INT,INTV,INT)
 #define LOCHAR(A2,A3,A4,A5)  CCALLSFFUN4(LOCHAR,lochar,INTV,INT,INTV,INT,A2,A3,A4,A5)
-
+*/
 PROTOCCALLSFFUN2(INT,MAXFZE,maxfze,FLOATV,INT)
 #define MAXFZE(A2,A3)  CCALLSFFUN2(MAXFZE,maxfze,FLOATV,INT,A2,A3)
 
@@ -339,10 +339,10 @@
 
 PROTOCCALLSFFUN2(INT,NDIGIT,ndigit,DOUBLE,DOUBLE)
 #define NDIGIT(A2,A3)  CCALLSFFUN2(NDIGIT,ndigit,DOUBLE,DOUBLE,A2,A3)
-
+/*
 PROTOCCALLSFFUN1(INT,NEAR1,near1,FLOAT)
 #define NEAR1(A2)  CCALLSFFUN1(NEAR1,near1,FLOAT,A2)
-
+*/
 PROTOCCALLSFFUN1(INT,NIC311,nic311,FLOAT)
 #define NIC311(A2)  CCALLSFFUN1(NIC311,nic311,FLOAT,A2)
 


--- NEW FILE cernlib-113-cups-postscript-fix.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 113-cups-postscript-fix.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Re-order PostScript output to work around CUPS printing issue.

@DPATCH@
diff -urNad cernlib-2005.05.09~/src/graflib/higz/ipost/ipdef.F cernlib-2005.05.09/src/graflib/higz/ipost/ipdef.F
--- cernlib-2005.05.09~/src/graflib/higz/ipost/ipdef.F	2003-03-20 09:14:10.000000000 +0000
+++ cernlib-2005.05.09/src/graflib/higz/ipost/ipdef.F	2005-09-20 18:59:21.992348547 +0000
@@ -316,6 +316,7 @@
       CALL IPPSTR('%%EndProlog@')
 *
       CALL IPPSTR('%%BeginSetup@')
+      CALL IPPSTR('%%EndSetup@')
       CALL IPPSTF(8,'newpath ')
       CALL IPSVRT(1)
       IF (MODE.EQ.1.OR.MODE.EQ.4) THEN
@@ -333,7 +334,6 @@
       ENDIF
       CALL IPPSTF(15,' .25 .25 scale ')
       IF (MODE.NE.3) CALL IPSVRT(1)
-      CALL IPPSTR('%%EndSetup@')
 *
       NBSAV0 = NBSAVE
       IF (MODE.NE.3) CALL IPPSTR('%%Page: number 1@')


--- NEW FILE cernlib-115-rsrtnt64-goto-outer-block.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 115-rsrtnt64-goto-outer-block.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch from Patrice Dumas <pertusus at free.fr> to fix spaghetti code in
## DP: rsrtnt64.F that breaks linking step on Itanium.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/mathlib/gen/b/rsrtnt64.F cernlib-2005.05.09.dfsg/src/mathlib/gen/b/rsrtnt64.F
--- cernlib-2005.05.09.dfsg~/src/mathlib/gen/b/rsrtnt64.F	1996-04-01 10:01:51.000000000 -0500
+++ cernlib-2005.05.09.dfsg/src/mathlib/gen/b/rsrtnt64.F	2005-12-06 11:22:08.500724891 -0500
@@ -117,8 +117,15 @@
         ENDIF
        ELSE
         IF(N .EQ. 1) THEN
-         ASSIGN 11 TO JMP1
-         GO TO 10
+      C2=2*C
+      IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. C .GT. 0) THEN
+       H=LOG(ABS((2*SQRT(C*P(V))+C2*V+B)/
+     1           (2*SQRT(C*P(U))+C2*U+B)))/SQRT(C)
+      ELSEIF(DELTA .EQ. 0) THEN
+       H=ABS(LOG(ABS((C2*V+B)/(C2*U+B))))/SQRT(C)
+      ELSE
+       H=(ASIN((C2*U+B)/RTD)-ASIN((C2*V+B)/RTD))/SQRT(-C)
+      ENDIF
    11    IF(K .EQ. 0) THEN
           H=H
          ELSEIF(K .EQ. 1) THEN
@@ -174,14 +181,28 @@
            H=2*((H1+B*U)/RT(U)-(H1+B*V)/RT(V))/DELTA
            LB1=11
           ELSEIF(K .EQ. 2) THEN
-           ASSIGN 12 TO JMP1
-           GO TO 10
+      C2=2*C
+      IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. C .GT. 0) THEN
+       H=LOG(ABS((2*SQRT(C*P(V))+C2*V+B)/
+     1           (2*SQRT(C*P(U))+C2*U+B)))/SQRT(C)
+      ELSEIF(DELTA .EQ. 0) THEN
+       H=ABS(LOG(ABS((C2*V+B)/(C2*U+B))))/SQRT(C)
+      ELSE
+       H=(ASIN((C2*U+B)/RTD)-ASIN((C2*V+B)/RTD))/SQRT(-C)
+      ENDIF
    12      H1=DELTA-B**2
            H2=2*A*B
            H=(((H1*U-H2)/RT(U)-(H1*V-H2)/RT(V))/DELTA+H)/C
           ELSEIF(K .EQ. 3) THEN
-           ASSIGN 13 TO JMP1
-           GO TO 10
+      C2=2*C
+      IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. C .GT. 0) THEN
+       H=LOG(ABS((2*SQRT(C*P(V))+C2*V+B)/
+     1           (2*SQRT(C*P(U))+C2*U+B)))/SQRT(C)
+      ELSEIF(DELTA .EQ. 0) THEN
+       H=ABS(LOG(ABS((C2*V+B)/(C2*U+B))))/SQRT(C)
+      ELSE
+       H=(ASIN((C2*U+B)/RTD)-ASIN((C2*V+B)/RTD))/SQRT(-C)
+      ENDIF
    13      H1=C*DELTA
            G1=A*C
            G2=3*B**2
@@ -217,8 +238,32 @@
         ENDIF
        ELSE
         IF(N .EQ. 1) THEN
-         ASSIGN 21 TO JMP2
-         GO TO 20
+      IF(C .EQ. 0) THEN
+       IF(B .EQ. 0) THEN
+        H=LOG(ABS(V/U))/SQRT(A)
+       ELSE
+        IF(A .LT. 0) THEN
+         H=2*(ATAN(SQRT(-(A+B*V)/A))-ATAN(SQRT(-(A+B*U)/A)))/SQRT(-A)
+        ELSE
+         WA=SQRT(A)
+         WU=SQRT(A+B*U)
+         WV=SQRT(A+B*V)
+         H=LOG(ABS((WV-WA)*(WU+WA)/((WV+WA)*(WU-WA))))/WA
+        ENDIF
+       ENDIF
+      ELSE
+       A2=2*A
+       IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. A .GT. 0) THEN
+        H=LOG(ABS((-2*SQRT(A*P(V))+B*V+A2)*U/
+     1           ((-2*SQRT(A*P(U))+B*U+A2)*V)))/SQRT(A)
+       ELSEIF(DELTA .EQ. 0) THEN
+        H=LOG(ABS((B*U+A2)*V/((B*V+A2)*U)))/SQRT(A)
+        IF(U*V .GT. 0) H=SIGN(H,U)
+       ELSE
+        H=(ASIN((B*V+A2)/(V*RTD))-ASIN((B*U+A2)/(U*RTD)))/SQRT(-A)
+        IF(U .LT. 0 .AND. V .LT. 0) H=-H
+       ENDIF
+      ENDIF
    21    IF(K .EQ. -1) THEN
           H=H
          ELSEIF(K .EQ. -2) THEN
@@ -257,8 +302,32 @@
            IF(U. LT. -X0) H=-H
           ENDIF
          ELSE
-          ASSIGN 22 TO JMP2
-          GO TO 20
+      IF(C .EQ. 0) THEN
+       IF(B .EQ. 0) THEN
+        H=LOG(ABS(V/U))/SQRT(A)
+       ELSE
+        IF(A .LT. 0) THEN
+         H=2*(ATAN(SQRT(-(A+B*V)/A))-ATAN(SQRT(-(A+B*U)/A)))/SQRT(-A)
+        ELSE
+         WA=SQRT(A)
+         WU=SQRT(A+B*U)
+         WV=SQRT(A+B*V)
+         H=LOG(ABS((WV-WA)*(WU+WA)/((WV+WA)*(WU-WA))))/WA
+        ENDIF
+       ENDIF
+      ELSE
+       A2=2*A
+       IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. A .GT. 0) THEN
+        H=LOG(ABS((-2*SQRT(A*P(V))+B*V+A2)*U/
+     1           ((-2*SQRT(A*P(U))+B*U+A2)*V)))/SQRT(A)
+       ELSEIF(DELTA .EQ. 0) THEN
+        H=LOG(ABS((B*U+A2)*V/((B*V+A2)*U)))/SQRT(A)
+        IF(U*V .GT. 0) H=SIGN(H,U)
+       ELSE
+        H=(ASIN((B*V+A2)/(V*RTD))-ASIN((B*U+A2)/(U*RTD)))/SQRT(-A)
+        IF(U .LT. 0 .AND. V .LT. 0) H=-H
+       ENDIF
+      ENDIF
    22     IF(K .EQ. -1) THEN
            H1=B*C
            H2=B**2-2*A*C
@@ -287,46 +356,7 @@
         ENDIF
        ENDIF
       ENDIF
-      GO TO 9
-
-   10 C2=2*C
-      IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. C .GT. 0) THEN
-       H=LOG(ABS((2*SQRT(C*P(V))+C2*V+B)/
-     1           (2*SQRT(C*P(U))+C2*U+B)))/SQRT(C)
-      ELSEIF(DELTA .EQ. 0) THEN
-       H=ABS(LOG(ABS((C2*V+B)/(C2*U+B))))/SQRT(C)
-      ELSE
-       H=(ASIN((C2*U+B)/RTD)-ASIN((C2*V+B)/RTD))/SQRT(-C)
-      ENDIF
-      GO TO JMP1, (11,12,13)
 
-   20 IF(C .EQ. 0) THEN
-       IF(B .EQ. 0) THEN
-        H=LOG(ABS(V/U))/SQRT(A)
-       ELSE
-        IF(A .LT. 0) THEN
-         H=2*(ATAN(SQRT(-(A+B*V)/A))-ATAN(SQRT(-(A+B*U)/A)))/SQRT(-A)
-        ELSE
-         WA=SQRT(A)
-         WU=SQRT(A+B*U)
-         WV=SQRT(A+B*V)
-         H=LOG(ABS((WV-WA)*(WU+WA)/((WV+WA)*(WU-WA))))/WA
-        ENDIF
-       ENDIF
-      ELSE
-       A2=2*A
-       IF(DELTA .GT. 0 .OR. DELTA .LT. 0 .AND. A .GT. 0) THEN
-        H=LOG(ABS((-2*SQRT(A*P(V))+B*V+A2)*U/
-     1           ((-2*SQRT(A*P(U))+B*U+A2)*V)))/SQRT(A)
-       ELSEIF(DELTA .EQ. 0) THEN
-        H=LOG(ABS((B*U+A2)*V/((B*V+A2)*U)))/SQRT(A)
-        IF(U*V .GT. 0) H=SIGN(H,U)
-       ELSE
-        H=(ASIN((B*V+A2)/(V*RTD))-ASIN((B*U+A2)/(U*RTD)))/SQRT(-A)
-        IF(U .LT. 0 .AND. V .LT. 0) H=-H
-       ENDIF
-      ENDIF
-      GO TO JMP2, (21,22)
 
     9 RES=SIGN(R1,V1-U1)*H
       LRL=LLL


--- NEW FILE cernlib-118-rename-mathlib-common-blocks.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 118-rename-mathlib-common-blocks.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Rename badly named common blocks to work around #374978.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/mathlib/gen/d/d510si.inc cernlib-2005.05.09.dfsg/src/mathlib/gen/d/d510si.inc
--- cernlib-2005.05.09.dfsg~/src/mathlib/gen/d/d510si.inc	1996-04-01 10:02:21.000000000 -0500
+++ cernlib-2005.05.09.dfsg/src/mathlib/gen/d/d510si.inc	2006-06-28 10:15:11.526165542 -0400
@@ -10,4 +10,4 @@
 * d510si.inc
 *
       COMMON/D510SI/Z(2485),G(100),DA(100),ENDFLG,NA,INDFLG(5)
-      COMMON/DF/DF(100),/X/X(10)
+      COMMON/D510DF/DF(100),/D510X/X(10)


--- NEW FILE cernlib-201-update-kuip-helper-apps.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 201-update-kuip-helper-apps.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Instead of "ghostview" and "lp", call the more modern helper apps
## DP: "gv" and "lpr" from KUIP.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c /tmp/dpep.WCaWVF/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c
--- cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c	2003-02-13 09:25:23.000000000 -0500
+++ /tmp/dpep.WCaWVF/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c	2005-06-09 12:34:49.057760462 -0400
@@ -249,7 +249,7 @@
     host_psviewer = getenv( "PSVIEWER" );
   if( host_psviewer == NULL ) {
 #ifdef UNIX
-    host_psviewer = "ghostview";
+    host_psviewer = "gv";
 #endif
 #ifdef vms
     host_psviewer = "VIEW/FORM=PS/INTERFACE=DECWINDOWS";
@@ -277,7 +277,7 @@
 # if defined(MSDOS) || defined(CERNLIB_WINNT)
   ku_exel( "/KUIP/SET_SHOW/HOST_PRINTER 'print $*'" );
 # else
-  ku_exel( "/KUIP/SET_SHOW/HOST_PRINTER 'lp $*'" );
+  ku_exel( "/KUIP/SET_SHOW/HOST_PRINTER 'lpr $*'" );
 # endif
 #else
   ku_exel( "/KUIP/SET_SHOW/HOST_PRINTER 'XPRINT $*'" );
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf /tmp/dpep.WCaWVF/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf
--- cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf	1997-09-25 10:02:25.000000000 -0400
+++ /tmp/dpep.WCaWVF/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf	2005-06-09 12:35:59.499480148 -0400
@@ -925,7 +925,7 @@
 The startup value can be defined by the environment variables
 'KUIPPSVIEWER' or 'PSVIEWER'.
 .
-On Unix workstations it is by default set to 'ghostview'.
+On Unix workstations it is by default set to 'gv'.
 On VAX/VMS the default commands is 'VIEW/FORM=PS/INTERFACE=DECWINDOWS'.
 
 >Action kxhostpsviewer%C


--- NEW FILE cernlib-202-fix-includes-in-minuit-example.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 202-fix-includes-in-minuit-example.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: minuit-main example should have <> instead of "" around include files.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/cfortran/Examples/minuit-main.c /tmp/dpep.SuauEf/cernlib-2005.05.09/src/cfortran/Examples/minuit-main.c
--- cernlib-2005.05.09/src/cfortran/Examples/minuit-main.c	2001-04-18 04:56:22.000000000 -0400
+++ /tmp/dpep.SuauEf/cernlib-2005.05.09/src/cfortran/Examples/minuit-main.c	2005-06-09 13:22:59.567224997 -0400
@@ -15,8 +15,8 @@
 #define FCN fcn
 #endif
 
-#include "cfortran.h"
-#include "minuit.h"
+#include <cfortran.h>
+#include <minuit.h>
 #define Ncont 20
 int main()
 {


--- NEW FILE cernlib-205-max-path-length-to-256.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 205-max-path-length-to-256.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Set max path length to 256 in Hbook.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/hbook/hbook/hcdire.inc /tmp/dpep.ceXWNa/cernlib-2005.05.09/src/packlib/hbook/hbook/hcdire.inc
--- cernlib-2005.05.09/src/packlib/hbook/hbook/hcdire.inc	2003-02-07 07:13:37.000000000 -0500
+++ /tmp/dpep.ceXWNa/cernlib-2005.05.09/src/packlib/hbook/hbook/hcdire.inc	2005-06-09 15:20:49.541661646 -0400
@@ -20,7 +20,7 @@
 *
 *CMZ :  4.20/03 28/07/93  09.33.32  by  Rene Brun
 *-- Author :
-      PARAMETER (NLPATM=100, MXFILES=50, LENHFN=128)
+      PARAMETER (NLPATM=100, MXFILES=50, LENHFN=256)
       COMMON /HCDIRN/NLCDIR,NLNDIR,NLPAT,ICDIR,NCHTOP,ICHTOP(MXFILES)
      +              ,ICHTYP(MXFILES),ICHLUN(MXFILES)
       CHARACTER*16   CHNDIR,    CHCDIR,    CHPAT    ,CHTOP


--- NEW FILE cernlib-208-fix-redundant-packlib-dependencies.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 208-fix-redundant-packlib-dependencies.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remove some redundancy in the libraries listed to be linked against.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/graflib/dzdoc/dzedit/Imakefile /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/graflib/dzdoc/dzedit/Imakefile
--- cernlib-2005.05.09/src/graflib/dzdoc/dzedit/Imakefile	1996-05-09 10:32:43.000000000 -0400
+++ /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/graflib/dzdoc/dzedit/Imakefile	2005-06-10 11:54:49.270360036 -0400
@@ -20,7 +20,7 @@
 NeedTcpipLib
 #endif
 
-CernlibFortranProgramTarget(dzeX11,dzedit.o,$(PACKAGE_LIB),$(PACKAGE_LIB),graflib/X11 packlib)
+CernlibFortranProgramTarget(dzeX11,dzedit.o,libdzdoc.a,libdzdoc.a,graflib/X11 packlib)
 
 InstallProgram(dzeX11,$(CERN_BINDIR))
 InstallScript(dzedit,$(CERN_BINDIR))
diff -urNad cernlib-2005.05.09/src/packlib/cspack/programs/zftp/Imakefile /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/cspack/programs/zftp/Imakefile
--- cernlib-2005.05.09/src/packlib/cspack/programs/zftp/Imakefile	1996-04-16 04:09:49.000000000 -0400
+++ /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/cspack/programs/zftp/Imakefile	2005-06-10 11:55:33.872780414 -0400
@@ -14,6 +14,6 @@
 
 NeedTcpipLib
 
-CernlibFortranProgramTarget(zftp,zftp.o,$(PACKAGE_LIB),$(PACKAGE_LIB),packlib)
+CernlibFortranProgramTarget(zftp,zftp.o,libzftplib.a,libzftplib.a,packlib)
 
 InstallProgram(zftp,$(CERN_BINDIR))
diff -urNad cernlib-2005.05.09/src/packlib/cspack/programs/zs/Imakefile /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/cspack/programs/zs/Imakefile
--- cernlib-2005.05.09/src/packlib/cspack/programs/zs/Imakefile	1996-05-05 05:40:20.000000000 -0400
+++ /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/cspack/programs/zs/Imakefile	2005-06-10 11:56:23.109221943 -0400
@@ -31,10 +31,10 @@
 
 DefinePackageLibrary(zservlib)
 
-CernlibFortranProgramTarget(zserv,zs.o,$(PACKAGE_LIB),$(PACKAGE_LIB),packlib)
+CernlibFortranProgramTarget(zserv,zs.o,libzservlib.a,libzservlib.a,packlib)
 
 InstallProgram(zserv,$(CERN_BINDIR))
 
-CernlibFortranProgramTarget(pawserv,zs.o,$(PACKAGE_LIB),$(PACKAGE_LIB),packlib)
+CernlibFortranProgramTarget(pawserv,zs.o,libzservlib.a,libzservlib.a,packlib)
 
 InstallProgram(pawserv,$(CERN_BINDIR))
diff -urNad cernlib-2005.05.09/src/packlib/fatmen/programs/fmkuip/Imakefile /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/fatmen/programs/fmkuip/Imakefile
--- cernlib-2005.05.09/src/packlib/fatmen/programs/fmkuip/Imakefile	1996-11-05 04:32:29.000000000 -0500
+++ /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/fatmen/programs/fmkuip/Imakefile	2005-06-10 11:56:54.779438847 -0400
@@ -28,6 +28,6 @@
 NeedSysexe
 #endif
 
-CernlibFortranProgramTarget(fatmen,fatmen.o,$(PACKAGE_LIB),$(PACKAGE_LIB),packlib)
+CernlibFortranProgramTarget(fatmen,fatmen.o,libfmkuip.a,libfmkuip.a,packlib)
 
 InstallProgram(fatmen,$(CERN_BINDIR))
diff -urNad cernlib-2005.05.09/src/packlib/hepdb/programs/hepdb/Imakefile /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/hepdb/programs/hepdb/Imakefile
--- cernlib-2005.05.09/src/packlib/hepdb/programs/hepdb/Imakefile	1996-04-02 05:03:43.000000000 -0500
+++ /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/hepdb/programs/hepdb/Imakefile	2005-06-10 11:57:39.794807919 -0400
@@ -17,6 +17,6 @@
 SpecialFortranObjectRule(hepdb,hepdb,'-WF,-P',NullParameter)
 #endif
 
-CernlibFortranProgramTarget(hepdb,hepdb.o,$(PACKAGE_LIB),$(PACKAGE_LIB),packlib)
+CernlibFortranProgramTarget(hepdb,hepdb.o,libdbmodule.a,libdbmodule.a,packlib)
 
 InstallProgram(hepdb,$(CERN_BINDIR))
diff -urNad cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile
--- cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile	1996-04-18 12:33:08.000000000 -0400
+++ /tmp/dpep.ZL6s2h/cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile	2005-06-10 12:00:35.355791756 -0400
@@ -21,6 +21,6 @@
 #endif
 
 
-CernlibCcProgramTarget(kxterm,kxterm.o,$(PACKAGE_LIB),$(PACKAGE_LIB),$(CLIBS))
+CernlibCcProgramTarget(kxterm,kxterm.o,libkxtlib.a,libkxtlib.a,$(CLIBS))
 
 InstallProgram(kxterm,$(CERN_BINDIR))


--- NEW FILE cernlib-209-ignore-unneeded-headers-in-kmutil.c.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 209-ignore-unneeded-headers-in-kmutil.c.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Comment out header files not actually needed in kmutil.c.
## DP: (This will be helpful when we move this file elsewhere to be part of
## DP: the Lesstif-dependent library split out from packlib.)

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_motif/kmutil.c /tmp/dpep.BncUU7/cernlib-2005.05.09/src/packlib/kuip/code_motif/kmutil.c
--- cernlib-2005.05.09/src/packlib/kuip/code_motif/kmutil.c	1996-03-08 10:33:09.000000000 -0500
+++ /tmp/dpep.BncUU7/cernlib-2005.05.09/src/packlib/kuip/code_motif/kmutil.c	2005-06-10 12:06:07.198547576 -0400
@@ -20,12 +20,13 @@
 /******************************************************************************/
 
 #include "kuip/kuip.h"
+/* commented out, since this file doesn't need these includes. --Kevin McCarty
 #include "kuip/kfor.h"
 #include "kuip/kmenu.h"
 
 #include "mkutda.h"
 #include "kuip/mkutfu.h"
-
+*/
 
 /***********************************************************************
  *                                                                     *


--- NEW FILE cernlib-300-skip-duplicate-lenocc.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 300-skip-duplicate-lenocc.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Only compile one of the two "lenocc()" functions.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/packlib/kernlib/kerngen/ccgen/Imakefile cernlib-2005.05.09.dfsg/src/packlib/kernlib/kerngen/ccgen/Imakefile
--- cernlib-2005.05.09.dfsg~/src/packlib/kernlib/kerngen/ccgen/Imakefile	2002-09-19 16:44:52.000000000 +0000
+++ cernlib-2005.05.09.dfsg/src/packlib/kernlib/kerngen/ccgen/Imakefile	2005-11-28 19:59:28.690293288 +0000
@@ -19,7 +19,9 @@
 SRCS_C += apofsz.c
 #endif
 
-#if defined(CERNLIB_WINNT)
+#if defined(CERNLIB_WINNT) || defined(CERNLIB_LINUX)
+/* Do not use lenocc.c in Linux; favor packlib/kernlib/kerngen/tcgen/lenocc.F
+ * instead.  --Kevin McCarty, for Debian */
 SRCS_C += lnblnk.c
 #endif
 
@@ -29,7 +31,7 @@
 
 #if defined(CERNLIB_DECS) || defined(CERNLIB_QMVAOS) \
  || defined(CERNLIB_HPUX) || defined(CERNLIB_IBMRT) || defined(CERNLIB_IBMRTD) \
- || defined(CERNLIB_OS9)  || defined(CERNLIB_LINUX)
+ || defined(CERNLIB_OS9)
 SRCS_C += lenocc.c lnblnk.c
 #endif
 


--- NEW FILE cernlib-303-shadow-passwords-supported.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 303-shadow-passwords-supported.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Allow Cern's server code to read from /etc/shadow.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c /tmp/dpep.KyLyTI/cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c
--- cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c	2005-04-18 11:39:28.000000000 -0400
+++ /tmp/dpep.KyLyTI/cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c	2005-06-08 16:55:00.088372396 -0400
@@ -28,6 +28,9 @@
  *
  */
 #include "cspack/pilot.h"
+#if defined(CERNLIB_LINUX) && ! defined(CERNLIB_MACOSX)
+#define SHADOW_SUPPORT /* for Debian */
+#endif
 #if !defined(CERNLIB_IBM)||defined(CERNLIB_TCPSOCK)
 /*N.B. Must define sequence TCPLOG if a log file is required, e.g.*/
 /*#define LOGFILE "disk$dd:-ben.socks-serv.log"*/ /* VMS    */
@@ -231,7 +234,7 @@
 #endif /* OSK */
 #endif /* AUTHENT */
  
-#ifdef linux_softland
+#if defined(linux_softland) || defined(SHADOW_SUPPORT)
 #include <shadow.h>
 #endif /* linux_softland */
  
@@ -1780,10 +1783,10 @@
         union wait ret;
 #endif /* APOPWD1 */
  
-        char   *xpasswd, *crypt();
+        char   *xpasswd, *encrypted, *crypt();
         struct passwd *pw;
  
-#ifdef linux_softland
+#if defined(linux_softland) || defined(SHADOW_SUPPORT)
         struct spwd *spwd;
 #endif /* linux_softland */
  
@@ -1798,6 +1801,7 @@
                 reply("Unknown user %s.\n", user);
                 return(-2);
         }
+	encrypted = pw->pw_passwd;
  
 #ifdef linux_softland
         spwd = getspnam(user);
@@ -1805,6 +1809,29 @@
                 reply("User %s has illegal shadow password\n",user);
                 return(-2);
         }
+	encrypted = spwd->sp_pwdp;
+
+#elif defined(SHADOW_SUPPORT)
+	/* shadow passwords may not be enabled in Debian, so must check */
+	{
+		FILE *test = fopen("/etc/shadow", "r");
+		if (test) {
+			fclose(test);
+			spwd = getspnam(user);
+			if (spwd == NULL) {
+				reply("User %s has illegal shadow password\n",
+				      user);
+				return(-2);
+			}
+			encrypted = spwd->sp_pwdp;
+		}
+		else if (errno == EACCES) {
+			reply("Server has insufficient permissions to "
+			      "read /etc/shadow file\n");
+			return(-2);
+		}
+	}
+
 #endif /* linux_softland */
  
 #ifdef APOPWD1
@@ -1850,15 +1877,16 @@
 #else
  
 #ifdef linux_softland
-            xpasswd = pw_encrypt(pass,spwd->sp_pwdp);
+            xpasswd = pw_encrypt(pass, encrypted);
 #else
-            xpasswd = crypt(pass, pw->pw_passwd);
+            xpasswd = crypt(pass, encrypted);
 #endif /* linux_softland */
+
             /* The strcmp does not catch null passwords! */
-#ifdef linux_softland
-            if (spwd->sp_pwdp == '\0' || strcmp(xpasswd,spwd->sp_pwdp)) {
+#if defined(linux_softland) || defined(SHADOW_SUPPORT)
+            if (*encrypted == '\0' || strcmp(xpasswd,spwd->sp_pwdp)) {
 #else
-            if (*pw->pw_passwd == '\0' || strcmp(xpasswd,pw->pw_passwd)) {
+            if (*encrypted == '\0' || strcmp(xpasswd,pw->pw_passwd)) {
 #endif /* linux_softland */
  
 #endif /* AFS */


***** Error reading new file: [Errno 2] No such file or directory: 'cernlib-304-update-Imake-config-files.dpatch'

--- NEW FILE cernlib-308-use-canonical-cfortran-location.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 308-use-canonical-cfortran-location.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: All code compiled at Cernlib build-time should look for cfortran.h
## DP: at <cfortran/cfortran.h>.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/graflib/higz/higzcc/tkhigz.c /tmp/dpep.d3syqe/cernlib-2005.05.09/src/graflib/higz/higzcc/tkhigz.c
--- cernlib-2005.05.09/src/graflib/higz/higzcc/tkhigz.c	1996-02-14 08:10:26.000000000 -0500
+++ /tmp/dpep.d3syqe/cernlib-2005.05.09/src/graflib/higz/higzcc/tkhigz.c	2005-06-09 13:13:22.079711057 -0400
@@ -39,7 +39,7 @@
  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  */
 
-#include "higz/cfortran.h"
+#include <cfortran/cfortran.h>
 #if !defined(VMS) && !defined(_WINDOWS)
 #include "higz/tkConfig.h"
 #endif


--- NEW FILE cernlib-311-skip-duplicate-qnext.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 311-skip-duplicate-qnext.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Don't compile in redundant versions of qnext.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kernlib/kerngen/tcgenc/Imakefile /tmp/dpep.5v33rR/cernlib-2005.05.09/src/packlib/kernlib/kerngen/tcgenc/Imakefile
--- cernlib-2005.05.09/src/packlib/kernlib/kerngen/tcgenc/Imakefile	1998-03-05 08:17:18.000000000 -0500
+++ /tmp/dpep.5v33rR/cernlib-2005.05.09/src/packlib/kernlib/kerngen/tcgenc/Imakefile	2005-06-09 14:28:05.755053006 -0400
@@ -1,5 +1,6 @@
+/* don't compile qnexte.F --Kevin*/
 SRCS_F= abend.F accessf.F exitf.F \ @@\
-	intrac.F jumpxn.F lnblnk.F locb.F locf.F qnexte.F unlinkf.F
+	intrac.F jumpxn.F lnblnk.F locb.F locf.F unlinkf.F
 
 #ifndef CERNLIB_OS9
 SRCS_F := $(SRCS_F) timed.F timel.F timex.F 
diff -urNad cernlib-2005.05.09/src/packlib/zebra/qutil/Imakefile /tmp/dpep.5v33rR/cernlib-2005.05.09/src/packlib/zebra/qutil/Imakefile
--- cernlib-2005.05.09/src/packlib/zebra/qutil/Imakefile	1996-03-06 05:47:15.000000000 -0500
+++ /tmp/dpep.5v33rR/cernlib-2005.05.09/src/packlib/zebra/qutil/Imakefile	2005-06-09 14:28:05.755053006 -0400
@@ -1,6 +1,7 @@
+/* don't compile qnext.F --Kevin*/
 SRCS_F=	 izbcd.F izbcdt.F izbcdv.F izchav.F izhnum.F lzbyt.F \ @@\
 	lzfind.F lzfval.F lzlast.F lzlong.F nzbank.F nzfind.F nzlong.F \ @@\
-	qnext.F zhtoi.F zitoh.F zkrak.F zkrakn.F znumid.F zpress.F \ @@\
+	zhtoi.F zitoh.F zkrak.F zkrakn.F znumid.F zpress.F \ @@\
 	zshunt.F zsort.F zsorth.F zsorti.F zsorv.F zsorvh.F zsorvi.F \ @@\
 	ztopsy.F
 


--- NEW FILE cernlib-313-comis-preserves-filename-case.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 313-comis-preserves-filename-case.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Have COMIS preserve filename case when interpreting FORTRAN code.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c /tmp/dpep.GROFhd/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c
--- cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c	2003-02-13 09:25:23.000000000 -0500
+++ /tmp/dpep.GROFhd/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuinit.c	2005-06-09 15:24:32.751560586 -0400
@@ -200,6 +200,14 @@
   ku_exel( "/KUIP/SET_SHOW/COLUMNS -1" );
   ku_exel( "/KUIP/SET_SHOW/DOLLAR 'ON'" );
 
+#if defined(UNIX) && (defined(WINNT) || !defined(MSDOS))
+/* Correct the default behavior of converting filenames to lower-case
+ * on a case-sensitive operating system... Not that I'm bitter or anything.
+ * --Kevin McCarty, for Debian
+ */
+  ku_exel( "/KUIP/SET_SHOW/FILECASE 'KEEP'" );
+#endif
+
   host_editor = getenv( "KUIPEDITOR" );
   if( host_editor == NULL )
     host_editor = getenv( "EDITOR" );
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf /tmp/dpep.GROFhd/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf
--- cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf	1997-09-25 10:02:25.000000000 -0400
+++ /tmp/dpep.GROFhd/cernlib-2005.05.09/src/packlib/kuip/code_kuip/kuipcdf.cdf	2005-06-09 15:23:49.276738602 -0400
@@ -1064,11 +1064,12 @@
 .
 This command has only an effect on Unix systems to select whether filenames
 are kept as entered on the command line.
-The startup value is 'CONVERT', i.e. filenames are converted to lowercase.
+The startup value is 'KEEP', i.e. filename cases are preserved.  With
+the 'CONVERT' setting, filenames are converted to lowercase.
 .
 On other systems filenames are always converted to uppercase.
 .
-The 'RESTORE' option set the conversion mode to the value effective
+The 'RESTORE' option sets the conversion mode to the value effective
 before the last FILECASE KEEP/CONVERT command.
 E.g. the sequence
      FILECASE KEEP; EDIT Read.Me; FILECASE RESTORE


--- NEW FILE cernlib-314-permit-using-regcomp-for-re_comp.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 314-permit-using-regcomp-for-re_comp.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Add a possibility to use regcomp() instead of re_comp() (selected at
## DP: compile time)

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_motif/kmfile.c /tmp/dpep.OUDE1M/cernlib-2005.05.09/src/packlib/kuip/code_motif/kmfile.c
--- cernlib-2005.05.09/src/packlib/kuip/code_motif/kmfile.c	1996-03-08 10:33:08.000000000 -0500
+++ /tmp/dpep.OUDE1M/cernlib-2005.05.09/src/packlib/kuip/code_motif/kmfile.c	2005-06-09 15:49:30.689188356 -0400
@@ -18,6 +18,11 @@
 #include "kuip/mkutfu.h"
 #include "mkutda.h"
 
+#ifdef MATCH_REGCOMP
+#include <sys/types.h>
+#include <regex.h>     /* for regex_t */
+#endif
+
 static char **ftype_list = NULL;
 static char **class_list = NULL;
 static char **stext_list = NULL;
@@ -92,8 +97,12 @@
     DIR            *dirp;
     struct dirent  *dp;
     char           *pattern;
+#ifdef MATCH_REGCOMP
+    regex_t        *re = (regex_t *)malloc( sizeof(regex_t) );
+#else
     char           *re;
 #endif
+#endif
     struct stat     filestatus;
 
     ndlist     = 0;
@@ -221,11 +230,15 @@
       }
     }
     pattern = mstrcat( pattern, "$" );
+#ifdef MATCH_REGCOMP
+    regcomp( re, pattern, REG_NEWLINE );
+#else
 #ifdef MATCH_RE_COMP
     re = re_comp( pattern );
 #else
     re = regcmp( pattern, NULL );
 #endif
+#endif
     free( pattern );
 
     /*
@@ -260,12 +273,16 @@
         }
         else if( (filestatus.st_mode & S_IFMT) == S_IFREG ) {
           /* regular file: match name against regexp */
+#ifdef MATCH_REGCOMP
+          int match = (regexec( re, dp->d_name, 0, NULL, 0 ) == 0);
+#else
 #ifdef MATCH_RE_COMP
           int match = re_exec( dp->d_name );
 #else
           int match = (regex( re, dp->d_name ) != NULL);
 #endif
-          if( match == 1 ) {
+#endif
+          if( match ) {
             filelist = (char**)realloc( (char*)filelist,
                                        (nflist+1) * sizeof(char*) );
             filelist[nflist] = strdup( dp->d_name );
@@ -276,6 +293,9 @@
       closedir( dirp );
     }
 
+#ifdef MATCH_REGCOMP
+    regfree( re );
+#endif
 #ifndef MATCH_RE_COMP
     free( re );
 #endif


--- NEW FILE cernlib-318-additional-gcc-3.4-fixes.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 318-additional-gcc-3.4-fixes.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Additional fixes for gcc 3.4, courtesy of Andreas Jochens.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c /tmp/dpep.f5SU0N/cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c
--- cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c	2005-06-14 12:31:12.078969103 -0400
+++ /tmp/dpep.f5SU0N/cernlib-2005.05.09/src/packlib/cspack/tcpaw/tcpaw.c	2005-06-14 12:33:16.618251997 -0400
@@ -2405,6 +2405,7 @@
  */
 
 static  FILE *cfile;
+static  rnetrc(), token();
  
 ruserpass(host, aname, apass)
         char *host, **aname, **apass;
@@ -2592,6 +2593,8 @@
 /*** NOTE MAXPASSWD IS DEFINED AS 8 IN ALL STANDARD UNIX SYSTEMS, BUT THIS
  *** GIVES US PROBLEMS INTERWORKING WITH VMS AND CRAY-SECURID SYSTEMS. ***/
 #define MAXPASSWD     20       /* max significant characters in password */
+
+static void (*sig)(), catch();
  
 char *
 getpass(prompt)
@@ -2608,7 +2611,6 @@
         register int c;
         FILE    *fi;
         static char pbuf[ MAXPASSWD + 1 ];
-        void    (*sig)(), catch();
  
         if((fi = fopen("/dev/tty", "r")) == NULL)
                 return((char*)NULL);
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_motif/iconwidget.c /tmp/dpep.f5SU0N/cernlib-2005.05.09/src/packlib/kuip/code_motif/iconwidget.c
--- cernlib-2005.05.09/src/packlib/kuip/code_motif/iconwidget.c	1996-03-08 10:33:10.000000000 -0500
+++ /tmp/dpep.f5SU0N/cernlib-2005.05.09/src/packlib/kuip/code_motif/iconwidget.c	2005-06-14 12:33:43.511482468 -0400
@@ -31,7 +31,7 @@
 /* _Xm routine definitions  */
 void    _XmHighlightBorder ();
 void   _XmUnhighlightBorder ();
-void   _XmDrawShadow ();
+/* void   _XmDrawShadow (); */
 
 /* Motif1.1 ( except apollo, hpux has _XmPrimitive... with two args only
  * Gunter 30-jan-95


--- NEW FILE cernlib-319-work-around-imake-segfaults.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 319-work-around-imake-segfaults.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: If at first Imake doesn't succeed, try, try again.
## DP: (Hideous workaround for non-deterministic imake segfaults on hppa.)

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/config/Imake.rules cernlib-2005.05.09.dfsg/src/config/Imake.rules
--- cernlib-2005.05.09.dfsg~/src/config/Imake.rules	2006-01-02 10:35:09.050384887 -0500
+++ cernlib-2005.05.09.dfsg/src/config/Imake.rules	2006-01-02 10:38:18.693611381 -0500
@@ -1296,7 +1296,11 @@
 	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) \		@@\
 	             -DPackageTop=$(PACKAGETOP)	\			@@\
 		     -DPackageName=$(PACKAGE_NAME) \			@@\
-		     imakeflags -f $<
+		     imakeflags -f $< || \				@@\
+		$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) \	@@\
+	             -DPackageTop=$(PACKAGETOP)	\			@@\
+		     -DPackageName=$(PACKAGE_NAME) \			@@\
+		     imakeflags -f $< || exit 1
 
 #endif /* BuildMakefileTarget */
 
@@ -2127,7 +2131,11 @@
 			ImakeSubCmdHelper -DTOPDIR=$$imaketop \		@@\
 			-DCURDIR=$$curdir$$i \				@@\
 			-DPackageTop=$(PACKAGETOP) \			@@\
-			-DPackageName=$(PACKAGE_NAME); \		@@\
+			-DPackageName=$(PACKAGE_NAME) || \		@@\
+			ImakeSubCmdHelper -DTOPDIR=$$imaketop \		@@\
+			-DCURDIR=$$curdir$$i \				@@\
+			-DPackageTop=$(PACKAGETOP) \			@@\
+			-DPackageName=$(PACKAGE_NAME) || exit 1; \	@@\
 		fi; \							@@\
 		$(MAKE) $(MFLAGS) Makefiles; \				@@\
 		cd $$newtop; \						@@\
@@ -2322,7 +2330,12 @@
 			-DCURDIR=$$curdir$$i \				@@\
 			-DPackageTop=$(PACKAGETOP) \			@@\
 			-DPackageName=$(PACKAGE_NAME) \			@@\
-			-f $$imakefile; \				@@\
+			-f $$imakefile || \				@@\
+			ImakeSubCmdHelper -DTOPDIR=$$imaketop \		@@\
+			-DCURDIR=$$curdir$$i \				@@\
+			-DPackageTop=$(PACKAGETOP) \			@@\
+			-DPackageName=$(PACKAGE_NAME) \			@@\
+			-f $$imakefile || exit 1; \			@@\
 		fi; \							@@\
 	fi;
 #endif


--- NEW FILE cernlib-320-support-ifort.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 320-support-ifort.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Support compilation with Intel's ifort compiler.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/config/linux.cf cernlib-2005.05.09.dfsg/src/config/linux.cf
--- cernlib-2005.05.09.dfsg~/src/config/linux.cf	2006-07-05 14:40:47.890234094 -0400
+++ cernlib-2005.05.09.dfsg/src/config/linux.cf	2006-07-05 14:41:49.656893427 -0400
@@ -446,8 +446,8 @@
 #  define OptimisedFortranFlags  -O -mp1 -fp_port
 #  define NoOpFortranDebugFlags  -O0
 #  define DefaultFCOptions       
-#  define CernlibSystem          CernlibDefaultDefines
- 
+#  define CernlibSystem          CernlibDefaultDefines -DCERNLIB_INTELIFC
+#  define CERNLIB_INTELIFC 
 #else
 
 # ifdef HasIntelefc
diff -urNad cernlib-2005.05.09.dfsg~/src/packlib/kuip/programs/kxterm/Imakefile cernlib-2005.05.09.dfsg/src/packlib/kuip/programs/kxterm/Imakefile
--- cernlib-2005.05.09.dfsg~/src/packlib/kuip/programs/kxterm/Imakefile	2006-07-05 14:40:47.633289557 -0400
+++ cernlib-2005.05.09.dfsg/src/packlib/kuip/programs/kxterm/Imakefile	2006-07-05 14:42:42.088557013 -0400
@@ -14,6 +14,9 @@
 
 #if defined(CERNLIB_UNIX)
 CLIBS= -G Motif kernlib
+# if defined(CERNLIB_INTELIFC)
+CLIBS= $(CLIBS) -nofor_main
+# endif
 #endif
 
 #if defined(CERNLIB_VAXVMS)


--- NEW FILE cernlib-701-patch-hbook-comis-Imakefiles.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 701-patch-hbook-comis-Imakefiles.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix up makefiles after moving hkfill.F and hkf1q.F in the other
## DP: 701 dpatch (a shell script).

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/packlib/hbook/code/Imakefile cernlib-2005.05.09.dfsg/src/packlib/hbook/code/Imakefile
--- cernlib-2005.05.09.dfsg~/src/packlib/hbook/code/Imakefile	1997-09-02 09:09:01.000000000 -0400
+++ cernlib-2005.05.09.dfsg/src/packlib/hbook/code/Imakefile	2005-12-07 14:59:31.519940694 -0500
@@ -19,8 +19,8 @@
 	hgn.F hgnf.F hgnpar.F hgstat.F hhipar.F hhxye.F hi.F \ @@\
 	hictoi.F hid1.F hid2.F hidall.F hidopt.F hidpos.F hie.F  \ @@\
 	hif.F hij.F hije.F hijxy.F hindex.F hinprx.F hinteg.F  \ @@\
-	hipak1.F histdo.F histgo.F hix.F hkf1.F hkf1q.F hkf2.F  \ @@\
-	hkff1.F hkff2.F hkffi1.F hkfi1.F hkfil2.F hkfill.F hkfilpf.F \ @@\
+	hipak1.F histdo.F histgo.F hix.F hkf1.F         hkf2.F  \ @@\
+	hkff1.F hkff2.F hkffi1.F hkfi1.F hkfil2.F          hkfilpf.F \ @@\
 	hkind.F hknul1.F hknuli.F hlabel.F hlabeq.F hlabnb.F \ @@\
 	hlattr.F hlccmp.F hldir.F hldir1.F hldir2.F hldirt.F \ @@\
 	hlgnxt.F hlhcmp.F hlimit.F hllsq.F hlnext.F hlocat.F \ @@\


--- NEW FILE cernlib-704-patch-code_kuip-higzcc-Imakefiles.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 704-patch-code_kuip-higzcc-Imakefiles.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch Imakefiles after moving kuwhag.c from packlib to grafX11.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/graflib/higz/higzcc/Imakefile /tmp/dpep.IDWarm/cernlib-2005.05.09/src/graflib/higz/higzcc/Imakefile
--- cernlib-2005.05.09/src/graflib/higz/higzcc/Imakefile	1998-11-16 04:36:53.000000000 -0500
+++ /tmp/dpep.IDWarm/cernlib-2005.05.09/src/graflib/higz/higzcc/Imakefile	2005-06-13 09:45:37.637201936 -0400
@@ -1,7 +1,7 @@
 DoIncludePackage(higz)
 #include "pilot.h"
 
-SRCS_C=	igvers.c
+SRCS_C=	igvers.c kuwhag.c /* <-- moved here from packlib/kuip/code_kuip */
 
 #if defined(CERNLIB_FALCO) && !defined(CERNLIB_VAX)
 SRCS_C := $(SRCS_C) falint.c 
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_kuip/Imakefile /tmp/dpep.IDWarm/cernlib-2005.05.09/src/packlib/kuip/code_kuip/Imakefile
--- cernlib-2005.05.09/src/packlib/kuip/code_kuip/Imakefile	2005-06-13 09:44:00.536042728 -0400
+++ /tmp/dpep.IDWarm/cernlib-2005.05.09/src/packlib/kuip/code_kuip/Imakefile	2005-06-13 09:44:41.448261682 -0400
@@ -2,7 +2,7 @@
 
 SRCS_C=	getline.c kalias.c kbrow.c kedit.c kexec.c khash.c kicon.c \ @@\
 	kienbr.c kipiaf.c kkern.c kmacro.c kmath.c kmenu.c kmisc.c \ @@\
-	kmodel.c kmterm.c kuinit.c kutrue.c kuvers.c kuwhag.c	   \ @@\
+	kmodel.c kmterm.c kuinit.c kutrue.c kuvers.c         	   \ @@\
 	kuwhat.c kvect.c \ @@\
 	kmutil.c
 	/* ^^ moved here from code_motif.  --Kevin McCarty */


--- NEW FILE cernlib-800-implement-shared-library-rules-in-Imake.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 800-implement-shared-library-rules-in-Imake.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Implement macros for shared libraries on Linux in the Imake cfg files.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/config/Imake.rules cernlib-2005.05.09.dfsg/src/config/Imake.rules
--- cernlib-2005.05.09.dfsg~/src/config/Imake.rules	2006-01-02 10:42:00.576902424 -0500
+++ cernlib-2005.05.09.dfsg/src/config/Imake.rules	2006-01-02 10:42:08.484202137 -0500
@@ -904,6 +904,8 @@
  * InstallSharedLibrary - generate rules to install the indicated sharable 
  * Library
  */
+/* Commented out because this appears to be overriding the definition
+ * in lnxLib.rules --Kevin McCarty, 16 May 2002
 #undef InstallSharedLibrary
 #ifndef InstallSharedLibrary
 #define InstallSharedLibrary(libname,rev,dest)				@@\
@@ -917,7 +919,8 @@
 	$(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS)  $< $@		@@\
 	RemoveFile($<)							@@\
 	$(LN) $@ $<
-#endif /* InstallSharedLibrary */
+#endif InstallSharedLibrary
+*/
 
 /*
  * InstallLinkKitLibrary - rule to install Link Kit library.
@@ -1967,6 +1970,15 @@
 #endif /* InstallSubdirs */
 
 /*
+ * InstallSharedLibSubdirs - generate rules to recursively install shared
+ * libraries.  Added by Kevin McCarty for Debian, 15 May 2002
+ */
+#ifndef InstallSharedLibSubdirs
+#define InstallSharedLibSubdirs(dirs) \
+NamedTargetSubdirs(install.shlib,dirs,"installing",DESTDIR=$(DESTDIR),install.shlib)
+#endif /* InstallSharedLibSubdirs */
+
+/*
  * InstallBinSubdirs - generate rules to recursively install programs and
  *		       scripts
  */
@@ -2354,9 +2366,12 @@
  */
 #ifndef DefinePackageLibrary
 #define DefinePackageLibrary(locallib) \
+/* commented out since these will be .so files. -Kevin */		@@\
+/*									@@\
 ifeq ($(strip $(PACKAGE_LIB)),)						@@\
 PACKAGE_LIB=$(TOP)$(PACKAGETOP)/LibraryTargetName($(PACKAGE_NAME))	@@\
 endif									@@\
+*/									@@\
 ifneq (locallib,)							@@\
 override PACKAGE_LIB:= LibraryTargetName(locallib) $(PACKAGE_LIB)	@@\
 									@@\
diff -urNad cernlib-2005.05.09.dfsg~/src/config/biglib.rules cernlib-2005.05.09.dfsg/src/config/biglib.rules
--- cernlib-2005.05.09.dfsg~/src/config/biglib.rules	2000-04-19 06:51:01.000000000 -0400
+++ cernlib-2005.05.09.dfsg/src/config/biglib.rules	2006-01-02 10:42:08.485201922 -0500
@@ -227,7 +227,7 @@
 	RanLibrary($@)
 #endif
 
-#if defined(HPArchitecture)
+#if defined(HPArchitecture) && !defined(LinuxArchitecture)
 
 #ifndef SharedLibraryTargetName
 #define SharedLibraryTargetName(name)Concat(lib,name.sl)
@@ -264,7 +264,7 @@
 	@date
 #endif
 
-#elif defined(AlphaArchitecture)
+#elif defined(AlphaArchitecture) && !defined(LinuxArchitecture)
 
 #ifndef SharedLibraryTargetName
 #define SharedLibraryTargetName(name)Concat(lib,name.so)
@@ -281,6 +281,41 @@
 	@date
 #endif
 
+#elif defined(LinuxArchitecture) /* added by Kevin McCarty
+				    for Debian, 15 May 2002 */
+#ifndef SharedLibraryTargetName
+#define SharedLibraryTargetName(name)Concat(lib,name.so.$(LIB_SONAME).$(CERN_LEVEL))
+#endif
+
+#ifndef SharedLibraryBuild
+#define SharedLibraryBuild(libname,version)				@@\
+SharedLibraryTargetName(libname): version/objects.list			@@\
+	@echo rebuild version library $@ in $(CURRENT_DIR)		@@\
+	@$(RM) $@							@@\
+	@date								@@\
+	@$(FCLINK) -shared -Wl,-soname=Concat(lib,libname.so.$(LIB_SONAME))\ @@\
+		-o $@ `cat version/objects.list` `cernlib -v "" -dy libname\ @@\
+		| sed s/Concat(-l,libname)//g`				@@\
+	@date
+#endif
+
+#elif defined(DarwinArchitecture) /* added by Kevin McCarty
+				      for fink, 10 May 2003 */
+#ifndef SharedLibraryTargetName
+#define SharedLibraryTargetName(name)Concat(lib,name.$(LIB_SONAME).$(CERN_LEVEL).dylib)
+#endif
+
+#ifndef SharedLibraryBuild
+#define SharedLibraryBuild(libname,version)				@@\
+SharedLibraryTargetName(libname): version/objects.list			@@\
+	@echo rebuild version library $@ in $(CURRENT_DIR)		@@\
+	@$(RM) $@							@@\
+	@/usr/bin/libtool -dynamic -o $@ -compatibility_version $(LIB_SONAME) \ @@\
+		`cat version/objects.list` `cernlib -v "" -dy libname	\ @@\
+		| sed s/Concat(-l,libname)//g`				@@\
+	@date
+#endif
+
 #elif 1 
 #ifndef SharedLibraryBuild
 #define SharedLibraryBuild(libname,version)				@@\
diff -urNad cernlib-2005.05.09.dfsg~/src/config/lnxLib.rules cernlib-2005.05.09.dfsg/src/config/lnxLib.rules
--- cernlib-2005.05.09.dfsg~/src/config/lnxLib.rules	1995-12-20 10:26:45.000000000 -0500
+++ cernlib-2005.05.09.dfsg/src/config/lnxLib.rules	2006-01-02 10:42:08.485201922 -0500
@@ -43,6 +43,9 @@
 #ifndef PositionIndependentCplusplusFlags
 #define PositionIndependentCplusplusFlags -fPIC
 #endif
+#ifndef PositionIndependentFortranFlags
+#define PositionIndependentFortranFlags -fPIC
+#endif
 
 /*
  * InstallSharedLibrary - generate rules to install the shared library.
@@ -50,13 +53,20 @@
  */
 #ifndef InstallSharedLibrary
 #define	InstallSharedLibrary(libname,rev,dest)				@@\
-install:: Concat(lib,libname.so.rev) 					@@\
+.PHONY: install.shlib shlib/libname					@@\
+shlib/libname:: $(DESTDIR)dest/SharedLibraryTargetName(libname)		@@\
+									@@\
+install.shlib:: $(DESTDIR)dest/SharedLibraryTargetName(libname)		@@\
+									@@\
+$(DESTDIR)dest/SharedLibraryTargetName(libname): SharedLibraryTargetName(libname) @@\
 	MakeDir($(DESTDIR)dest)						@@\
-	$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+	$(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
 	(T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\
 		$(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T)	@@\
 	$(RM) Concat($(DESTDIR)dest/lib,libname.so)			@@\
-	$(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
+	$(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so) @@\
+	$(RM) $<                                                        @@\
+	$(LN) $@ $<
 #endif /* InstallSharedLibrary */
 
 /*


--- NEW FILE cernlib-801-non-optimized-rule-uses-fPIC-g.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 801-non-optimized-rule-uses-fPIC-g.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Ensure that special rules for creating non-optimized object files
## DP: use -fPIC for files that go into shared libs, and -g for all files.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/config/fortran.rules /tmp/dpep.gResDB/cernlib-2005.05.09/src/config/fortran.rules
--- cernlib-2005.05.09/src/config/fortran.rules	1997-05-30 12:25:18.000000000 -0400
+++ /tmp/dpep.gResDB/cernlib-2005.05.09/src/config/fortran.rules	2005-06-09 10:37:19.092244331 -0400
@@ -345,9 +345,9 @@
 
 #ifndef SpecialFortranLibObjectRule
 #define SpecialFortranLibObjectRule(baseobj,basedep,options,cppoptions)	@@\
-SpecialFortranArchiveObjectRule(baseobj,basedep,options,cppoptions)	@@\
-SpecialFortranSharedObjectRule(baseobj,basedep,options,cppoptions)	@@\
-SpecialFortranDebugObjectRule(baseobj,basedep,options,cppoptions)
+SpecialFortranArchiveObjectRule(baseobj,basedep,options -g,cppoptions)	    @@\
+SpecialFortranSharedObjectRule(baseobj,basedep,options -g -fPIC,cppoptions) @@\
+SpecialFortranDebugObjectRule(baseobj,basedep,options -g,cppoptions)
 #endif
 
 #ifndef SpecialFortranArchiveObjectRule


--- NEW FILE cernlib-803-link-binaries-dynamically.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 803-link-binaries-dynamically.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Link binaries dynamically against Cern libraries.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/config/fortran.rules /tmp/dpep.E9pQlc/cernlib-2005.05.09/src/config/fortran.rules
--- cernlib-2005.05.09/src/config/fortran.rules	2005-06-13 15:26:19.991403858 -0400
+++ /tmp/dpep.E9pQlc/cernlib-2005.05.09/src/config/fortran.rules	2005-06-13 15:26:23.699609849 -0400
@@ -189,13 +189,13 @@
  */
 #ifndef CernlibDependLibrary
 #define CernlibDependLibrary(cernlibs)\
-$(filter-out +%,$(filter-out -%,$(shell cernlib cernlibs)))
+$(filter-out +%,$(filter-out -%,$(shell cernlib -dy cernlibs)))
 #endif
 
 /* Helper to use cernlib command
  */
 #ifndef CernlibCmd
-#define CernlibCmd(libraries)cernlib libraries
+#define CernlibCmd(libraries)cernlib -dy libraries
 #endif
 /*
  * CernlibFortranProgramTarget - rule to link fortran program using
@@ -207,7 +207,7 @@
 ProgramTargetName(program): SetWin32ObjSuffix(objects) deplibs CernlibDependLibrary(cernlibs)	@@\
 	RemoveTargetProgram($@)						@@\
 	@echo "Linking with cern libraries"				@@\
-	@cernlib cernlibs						@@\
+	@cernlib -dy cernlibs						@@\
 	CernlibFortranLinkRule($@,$(FCLDOPTIONS),objects,locallibs $(LDLIBS),CernlibCmd(cernlibs)) @@\
 									@@\
 clean::									@@\
@@ -233,8 +233,8 @@
 ProgramTargetName(program): objects deplibs CernlibDependLibrary(cernlibs) @@\
 	RemoveTargetProgram($@)						@@\
 	@echo "Linking with cern libraries"				@@\
-	@cernlib cernlibs						@@\
-	CernlibLinkRule($@,$(LDOPTIONS),objects,locallibs $(LDLIBS),cernlib cernlibs) @@\
+	@cernlib -dy cernlibs						@@\
+	CernlibLinkRule($@,$(LDOPTIONS),objects,locallibs $(LDLIBS),cernlib -dy cernlibs) @@\
 									@@\
 clean::									@@\
 	RemoveFile(ProgramTargetName(program))				@@\
diff -urNad cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile /tmp/dpep.E9pQlc/cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile
--- cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile	2005-06-13 15:26:18.903636773 -0400
+++ /tmp/dpep.E9pQlc/cernlib-2005.05.09/src/packlib/kuip/programs/kxterm/Imakefile	2005-06-13 15:26:23.699609849 -0400
@@ -13,17 +13,17 @@
 DefinePackageLibrary(kxtlib)
 
 #if defined(CERNLIB_UNIX)
-CLIBS= -G Motif kernlib
+CLIBS= -G Motif Xm
 # if defined(CERNLIB_INTELIFC)
 CLIBS= $(CLIBS) -nofor_main
 # endif
 #endif
 
 #if defined(CERNLIB_VAXVMS)
-CLIBS= graflib/motif packlib kernlib
+CLIBS= -G Motif Xm
 #endif
 
 
-CernlibCcProgramTarget(kxterm,kxterm.o,libkxtlib.a,libkxtlib.a,$(CLIBS))
+CernlibFortranProgramTarget(kxterm,kxterm.o,libkxtlib.a,libkxtlib.a,$(CLIBS))
 
 InstallProgram(kxterm,$(CERN_BINDIR))


--- NEW FILE cernlib-805-expunge-missing-mathlib-kernlib-symbols.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 805-expunge-missing-mathlib-kernlib-symbols.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remove some unreferenced symbols from mathlib and kernlib and add
## DP: dummy symbols where needed.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/kernlib/kerngen/ccgen/Imakefile cernlib-2005.05.09.dfsg/src/kernlib/kerngen/ccgen/Imakefile
--- cernlib-2005.05.09.dfsg~/src/kernlib/kerngen/ccgen/Imakefile	2006-05-16 10:42:32.138587850 -0400
+++ cernlib-2005.05.09.dfsg/src/kernlib/kerngen/ccgen/Imakefile	2006-05-16 10:42:40.475808665 -0400
@@ -1,6 +1,8 @@
 #ifndef CERNLIB_VAXVMS
 
-SRCS_F= accessf.F chdirf.F getenvf.F getwdf.F lstatf.F perrorf.F \ @@\
+/* perrorf.F has been removed since it depends upon files which introduce
+   unreferenced dependencies into the shared libraries.  --Kevin McCarty */
+SRCS_F= accessf.F chdirf.F getenvf.F getwdf.F lstatf.F           \ @@\
 	readlnf.F renamef.F setenvf.F statf.F systemf.F tmpro.F \ @@\
 	tmproi.F toslat.F unlinkf.F
 
diff -urNad cernlib-2005.05.09.dfsg~/src/mathlib/gen/d/Imakefile cernlib-2005.05.09.dfsg/src/mathlib/gen/d/Imakefile
--- cernlib-2005.05.09.dfsg~/src/mathlib/gen/d/Imakefile	2006-05-16 10:42:32.921420791 -0400
+++ cernlib-2005.05.09.dfsg/src/mathlib/gen/d/Imakefile	2006-05-16 10:46:11.446026937 -0400
@@ -2,7 +2,13 @@
 #include "pilot.h"
 
 /* rgmlt*.F have been moved into packlib/hbook to remove circular dependencies.
+   old506.F is removed since it is equivalent to obsolete code under
+   packlib/minuit.  dummy.c contains dummy callback functions so the code
+   can function when built as a shared library.
    --Kevin McCarty, for Debian. */
+
+SRCS_C= dummy.c
+
 SRCS_F=	arithm.F c128.F c256.F c512.F c64.F cauchy64.F cft.F cfstft.F \ @@\
 	rfstft.F cgauss.F d107d1.F d107r1.F d501l1.F d501l2.F d501n1.F \ @@\
         d501n2.F d501p1.F d501p2.F d501sf.F d700su.F d701bd.F \ @@\
@@ -11,7 +17,7 @@
         epdchn.F epdcj.F epde1.F epdecc.F epdfix.F epdin.F \ @@\
         epditr.F epdje.F epdloc.F epdsrt.F epdtab.F errorf.F esolve.F \ @@\
 	fcn1.F fftrc.F fumili.F gauss.F i128.F i32.F i64.F linsq.F \ @@\
-	mconv.F mft.F minfc.F minsq.F monito.F newro.F old506.F radapt.F \ @@\
+	mconv.F mft.F minfc.F minsq.F monito.F newro.F          radapt.F \ @@\
 	radmul.F rca.F rfrdh164.F rfrdh264.F rft.F           rgquad.F \ @@\
 	rgs56p.F rgset.F riwiad.F riwibd.F rknys64.F rknysd.F rkstp.F \ @@\
 	rpa.F rps.F rrkstp.F rsa.F rtriint.F s128.F s256.F s512.F \ @@\
diff -urNad cernlib-2005.05.09.dfsg~/src/mathlib/gen/d/dummy.c cernlib-2005.05.09.dfsg/src/mathlib/gen/d/dummy.c
--- cernlib-2005.05.09.dfsg~/src/mathlib/gen/d/dummy.c	1969-12-31 19:00:00.000000000 -0500
+++ cernlib-2005.05.09.dfsg/src/mathlib/gen/d/dummy.c	2006-05-16 11:36:09.331168663 -0400
@@ -0,0 +1,54 @@
+/* Dummy file to avoid undefined symbols in the library */
+/* Kevin McCarty, 16 May 2006 */
+
+#include <stdio.h>
+#include <stdlib.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) dummy_ ## x
+
+#define DUMMY(UPPERNAME, fortranname_, returntype, exitcode, docs) \
+static returntype underline(fortranname_)() \
+        { print_dummy(#UPPERNAME, docs, exitcode); } \
+void fortranname_() \
+	__attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
+
+static void print_dummy(const char *function, const char * docs, int exitcode)
+{
+  fprintf(stderr, "mathlib: Now in dummy %s routine.\n", function);
+  fprintf(stderr,
+          "If you see this message, you %s define your own such routine.\n",
+	  exitcode ? "must" : "may wish to");
+  if (docs)
+    fprintf(stderr,
+	  "For details, the CERN writeup that can be found at\n"
+	  "%s\n"
+	  "may be helpful.\n", docs);
+  if (exitcode)
+    exit(exitcode);
+}
+
+static char d151docs[] = "http://preprints.cern.ch/cgi-bin/setlink?base=preprint&categ=cern&id=IT-ASD-D151";
+static char d300docs[] = "http://preprints.cern.ch/cgi-bin/setlink?base=preprint&categ=cern&id=IT-ASD-D300";
+static char d510docs[] = "http://wwwasdoc.web.cern.ch/wwwasdoc/shortwrupsdir/d510/top.html";
+
+/* User-defined callback functions and subroutines */
+
+/* D151: DIVONNE: multidimensional integration */
+DUMMY(DFUN, dfun_, double, EXIT_FAILURE, d151docs);
+
+/* D300: elliptic partial differential equation callbacks */
+DUMMY(GETCO, getco_, void, EXIT_FAILURE, d300docs);
+DUMMY(USER1, user1_, void, 0, d300docs);
+DUMMY(USER2, user2_, void, 0, d300docs);
+
+/* D510: fitting likelihood functions (obsolete; use MINUIT instead!) */
+DUMMY(FUNCT, funct_, double, EXIT_FAILURE, d510docs);
+
+/* No docs for MINSQ / LINSQ?  Not clear what CERN package they come from. */
+DUMMY(FCN, fcn_, void, EXIT_FAILURE, 0);
+


--- NEW FILE cernlib-806-bump-mathlib-and-dependents-sonames.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 806-bump-mathlib-and-dependents-sonames.dpatch by  <kmccarty at 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/mathlib/Imakefile cernlib-2005.05.09.dfsg/src/mathlib/Imakefile
--- cernlib-2005.05.09.dfsg~/src/mathlib/Imakefile	2005-11-23 15:49:19.723162159 +0000
+++ cernlib-2005.05.09.dfsg/src/mathlib/Imakefile	2005-11-23 15:49:27.431512287 +0000
@@ -2,6 +2,7 @@
 #define IHaveSubdirs
 #define PassCDebugFlags 
 
+export LIB_SONAME := 2
 
 LIBDIRS= gen bvsl hbook /* hdiff stuff moved from packlib */
 


--- NEW FILE cernlib-debian-copyright.in ---
This package was debianized by Kevin B. McCarty <kmccarty at debian.org>.
It was downloaded from the web page
http://wwwinfo.cern.ch/asd/cernlib/download/2005_source/tar/


COPYRIGHT
---------

Cernlib is copyright (C) CERN and others.  As of this writing (13 Jan 2005),
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 Cernlib source
code and binary packages distributed by Debian.  It should also be noted
that the above license supersedes the non-free license stated in the file
located at

  /usr/share/doc/libpdflib804-2-dev/pdfdoc.txt.gz  (package libpdflib804-2-dev)
  cernlib-$VERSION/src/mclibs/pdf/doc/pdfdoc.dat   (unpacked Debian source).


EXCEPTIONS
----------

Some source files of Cernlib are provided (in parts, or in entirety) under
different licenses which are compatible with the GPL.  See the table and
licenses below for details.  (File paths are relative to the directory
cernlib-$VERSION/src/ after running "debian/rules unpack".)  Most of the
differences in the licenses below are only in the exact wordings.  The
"Package(s)" column lists the binary Debian packages in which each piece of
code is compiled or otherwise included.

Copyright codes are as follows:

LGPL	- Library GPL
BSD	- BSD style license
NO AD	- BSD style license with negative advertising clause

Package codes are as follows:

Dev   = most development packages
Kx    = kxterm
Graf  = libgrafx11-1, libgrafx11-1-dev, paw, paw++
Pack  = libpacklib1, libpacklib1-dev, paw, paw++
KuiM  = libpacklib1-lesstif, libpacklib1-lesstif-dev, paw, paw++
Paw++ = libpawlib2-lesstif, libpawlib2-lesstif-dev, paw++
Src   = [not included in binary packages, only source package]

File(s)					Package(s)	License type	Owner
-------					----------	------------	-----
cfortran/*				Dev		LGPL [1]	[a]
graflib/higz/higzcc/rotated.c		Graf		BSD [3]		[b]
graflib/higz/higzcc/tkhigz.c		Graf		BSD [4]		[c]
packlib/cspack/sysreq/telnet.h		Pack		BSD [2]		[c]
packlib/kuip/code_kuip/getline.c	Pack		BSD [5]		[d]
packlib/kuip/code_motif/icbox.h		KuiM		NO AD [6]	[e]
packlib/kuip/code_motif/icboxp.h	KuiM		NO AD [6]	[e]
packlib/kuip/code_motif/iconbox.c	KuiM		NO AD [6]	[e]
packlib/kuip/code_motif/iconwidget.c	KuiM		NO AD [7]	[f]
packlib/kuip/code_motif/icwid.h		KuiM		NO AD [7]	[f]
packlib/kuip/code_motif/icwidp.h	KuiM		NO AD [7]	[f]
packlib/kuip/code_motif/kuxxt.c		KuiM		NO AD [8]	[g]
packlib/kuip/code_motif/mkuxxt.h	KuiM		NO AD [8]	[g]
packlib/kuip/programs/kxterm/uxxt.c	Kx		NO AD [8]	[g]
packlib/kuip/programs/kxterm/uxxt.h	Kx		NO AD [8]	[g]
pawlib/paw/hmotif/uxxt.h		Paw++		NO AD [8]	[g]
pawlib/paw/paw/tree.h			Paw++		BSD [9]		[h]
pawlib/paw/tree/tree.c			Paw++		BSD [9]		[h]
pawlib/paw/tree/treep.h			Paw++		BSD [9]		[h]
pawlib/paw/xbae/caption.c		Paw++		NO AD [10]	[i]
pawlib/paw/xbae/caption.h		Paw++		NO AD [10]	[i]
pawlib/paw/xbae/captionp.h		Paw++		NO AD [10]	[i]
pawlib/paw/xbae/cell.c			Paw++		NO AD [11]	[j]
pawlib/paw/xbae/cell.h			Paw++		NO AD [11]	[j]
pawlib/paw/xbae/cellp.h			Paw++		NO AD [11]	[j]
pawlib/paw/xbae/clip.c			Paw++		NO AD [10]	[i]
pawlib/paw/xbae/clip.h			Paw++		NO AD [10]	[i]
pawlib/paw/xbae/clipp.h			Paw++		NO AD [10]	[i]
pawlib/paw/xbae/matrix.c		Paw++		NO AD [10]	[i]
pawlib/paw/xbae/matrix.h		Paw++		NO AD [10]	[i]
pawlib/paw/xbae/matrixp.h		Paw++		NO AD [10]	[i]
pawlib/paw/xbae/version.c		Paw++		NO AD [10]	[i]
pawlib/paw/xbaevms/caption.c		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/caption.h		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/captionp.h		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/clip.c		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/clip.h		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/clipp.h		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/matrix.c		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/matrix.h		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/matrixp.h		Src		NO AD [10]	[i]
pawlib/paw/xbaevms/version.c		Src		NO AD [10]	[i]


Exception copyright holders
---------------------------

[a] Burkhard Burow, <burow at desy.de>,
    http://www-zeus.desy.de/~burow/cfortran/index.htm

[b] Alan Richardson, <mppa3 at syma.sussex.ac.uk>, and O. Couet

[c] The Regents of the University of California

[d] Chris Thewalt, <thewalt at ce.berkeley.edu>

[e] Alphonse A. Rademakers, <rdm at cernvm.cern.ch>,
    CN/AS Division
    CERN, European Organization for Nuclear Research
    1123 Geneve, Switzerland

[f] Addison-Wesley Publishing Company

[g] Visual Edge Software Ltd.

[h] Massachusetts Institute of Technology and Prentice Hall

[i] Bell Communications Research, Inc. (Bellcore)

[j] Q. Frank Xia, <qx at math.columbia.edu>


Exception license details
-------------------------

[1] 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'.

[2] On Debian systems, the complete text of the BSD License
    can be found in the file `/usr/share/common-licenses/BSD'.

[3] xvertext 5.0, Copyright (c) 1993 Alan Richardson (mppa3 at uk.ac.sussex.syma)
    Alignment definition modified by O.Couet.
    Mods IBM/VM by O.Couet.

    Permission to use, copy, modify, and distribute this software and its
    documentation for any purpose and without fee is hereby granted, provided
    that the above copyright notice appear in all copies and that both the
    copyright notice and this permission notice appear in supporting
    documentation.  All work developed as a consequence of the use of
    this program should duly acknowledge such use. No representations are
    made about the suitability of this software for any purpose.  It is
    provided "as is" without express or implied warranty.

[4] Copyright (c) 1991-1993 The Regents of the University of California.
    All rights reserved.

    Permission is hereby granted, without written agreement and without
    license or royalty fees, to use, copy, modify, and distribute this
    software and its documentation for any purpose, provided that the
    above copyright notice and the following two paragraphs appear in
    all copies of this software.

    IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
    DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
    OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
    CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
    ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
    PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

[5] Copyright (C) 1991, 1992 by Chris Thewalt (thewalt at ce.berkeley.edu)

    Permission to use, copy, modify, and distribute this software
    for any purpose and without fee is hereby granted, provided
    that the above copyright notices appear in all copies and that both the
    copyright notice and this permission notice appear in supporting
    documentation.  This software is provided "as is" without express or
    implied warranty.

[6] Copyright 1992 Alphonse A. Rademakers

    Permission to use, copy, modify, distribute, and sell this software
    and its documentation for any purpose is hereby granted without
    fee, provided that the above copyright notice appears in all copies
    and that both that copyright notice and this permission notice
    appear in supporting documentation, and that the name of
    Alphonse A. Rademakers or CERN not be used in advertising or
    publicity pertaining to distribution of the software without
    specific, written prior permission.  Alphonse A. Rademakers and
    CERN make no representations about the suitability of this software
    for any purpose.  It is provided "as is" without express or implied
    warranty.

    Alphonse A. Rademakers and CERN disclaim all warranties with
    regard to this software, including all implied warranties of
    merchantability and fitness, in no event shall
    Alphonse A. Rademakers or CERN be liable for any special, indirect
    or consequential damages or any damages whatsoever resulting from
    loss of use, data or profits, whether in an action of contract,
    negligence or other tortious action, arising out of or in
    connection with the use or performance of this software.

    [Debian maintainer's note: Although the files with this copyright are
    described as "based on ideas by Thomas Berlage" (see next entry), a
    comparison with the original IconBox code of Thomas Berlage, available by
    FTP at (e.g.) ftp://ftp.x.org/R5contrib/berlage.motif.tar.Z , shows that
    they were written from scratch.]

[7] Copyright 1991 Addison-Wesley Publishing Company

    Permission to use, copy, modify, distribute, and sell this software and its
    documentation for any purpose is hereby granted without fee, provided that
    the above copyright notice appear in all copies and that both that
    copyright notice and this permission notice appear in supporting
    documentation, and that the name of Addison-Wesley not be used in
    advertising or publicity pertaining to distribution of the software without
    specific, written prior permission.  Addison-Wesley makes no representations
    about the suitability of this software for any purpose.  It is provided 
    as is" without express or implied warranty.

    ADDISON-WESLEY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
    SHALL ADDISON-WESLEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
    DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
    PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
    ACTION, ARISING OUT OF OR IN  CONNECTION WITH THE USE OR PERFORMANCE OF
    THIS SOFTWARE.

    Berlage: OSF/MOTIF: CONCEPTS AND PROGRAMMING

    ISBN 0 201 55792 4

    To order please contact your local Addison-Wesley office.

    [Debian maintainer's note: The COPYRIGHT file referred to by the files
    iconwidget.c, icwid.h, and icwidp.h, and quoted above, is not included in
    the Cernlib source code.  It, along with the original versions of those
    files (named IconWidget.c, IconWidget.h, and IconWidgetP.h, respectively),
    may be found in the materials distributed with the book _OSF/Motif:
    Concepts and Programming_, by Thomas Berlage, (C) 1991 Addison-Wesley
    Publishing Company, or downloadable by FTP from (e.g.)
    ftp://ftp.x.org/R5contrib/berlage.motif.tar.Z .]

[8] Copyright (c) 1991, Visual Edge Software Ltd.

    ALL  RIGHTS  RESERVED.   Permission to use, copy, modify, and
    distribute  this  software  and its documentation for any purpose
    and  without  fee  is  hereby  granted,  provided  that the above
    copyright  notice  appear  in  all  copies  and  that  both  that
    copyright  notice and this permission notice appear in supporting
    documentation,  and that  the name of Visual Edge Software not be
    used  in advertising  or publicity  pertaining to distribution of
    the software without specific, written prior permission. The year
    included in the notice is the year of the creation of the work.

[9] Copyright 1990 Massachusetts Institute of Technology
    Copyright 1989 Prentice Hall

    Permission to use, copy, modify, and distribute this software for any
    purpose and without fee is hereby granted, provided that the above
    copyright notice appear in all copies and that both the copyright notice
    and this permission notice appear in supporting documentation.

    M.I.T., Prentice Hall and the authors disclaim all warranties with regard
    to this software, including all implied warranties of merchantability and
    fitness.  In no event shall M.I.T., Prentice Hall or the authors be liable
    for any special, indirect or cosequential damages or any damages whatsoever
    resulting from loss of use, data or profits, whether in an action of
    contract, negligence or other tortious action, arising out of or in
    connection with the use or performance of this software.

[10] Copyright(c) 1992 Bell Communications Research, Inc. (Bellcore)
                            All rights reserved

     Permission to use, copy, modify and distribute this material for
     any purpose and without fee is hereby granted, provided that the
     above copyright notice and this permission notice appear in all
     copies, and that the name of Bellcore not be used in advertising
     or publicity pertaining to this material without the specific,
     prior written permission of an authorized representative of
     Bellcore.

     BELLCORE MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES, EX-
     PRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE, INCLUDING, BUT
     NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
     FITNESS FOR ANY PARTICULAR PURPOSE, AND THE WARRANTY AGAINST IN-
     FRINGEMENT OF PATENTS OR OTHER INTELLECTUAL PROPERTY RIGHTS.  THE
     SOFTWARE IS PROVIDED "AS IS", AND IN NO EVENT SHALL BELLCORE OR
     ANY OF ITS AFFILIATES BE LIABLE FOR ANY DAMAGES, INCLUDING ANY
     LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES RELAT-
     ING TO THE SOFTWARE.

[11] Copyright(C) Q. Frank Xia (qx at math.columbia.edu), 1994.

                           All Rights Reserved
  
     Permission to use, copy, modify, and distribute this software and its
     documentation for any purpose and without fee is hereby granted,
     provided that the above copyright notice appear in all copies and that
     both that copyright notice and this permission notice appear in
     supporting documentation, and that the name of Q. Frank Xia not be
     used in advertising or publicity pertaining to distribution of the
     software without specific, written prior permission.

     This software is provided as-is and without any warranty of any kind.


DELETIA
-------

The following files and directories have been removed from the Debian source
package of Cernlib 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.  Please see the README.Debian files for libmathlib2,
montecarlo-base, and libgeant321-2 packages for more information on obtaining
the Ariadne, Fluka, Fritiof, Jetset, Lepto, and Pythia libraries.

DEADPOOL_LIST_GOES_HERE

cernlib_2005.dfsg-1.diff:

***** Error reading new file: [Errno 2] No such file or directory: 'cernlib_2005.dfsg-1.diff'

--- NEW FILE geant321-001-fix-missing-fluka.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 001-fix-missing-fluka.dpatch by  <kmccarty at 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


--- NEW FILE geant321-003-geant-dummy-functions.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 003-geant-dummy-functions.dpatch by  <kmccarty at 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);
+


--- NEW FILE geant321-117-fix-optimizer-bug-in-gphot.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 117-fix-optimizer-bug-in-gphot.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch by Harald Vogt <hvogt at 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


--- NEW FILE geant321-203-compile-geant-with-ertrak.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 203-compile-geant-with-ertrak.dpatch by  <kmccarty at 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
 


--- NEW FILE geant321-806-bump-mathlib-and-dependents-sonames.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 806-bump-mathlib-and-dependents-sonames.dpatch by  <kmccarty at 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-1.diff:

--- NEW FILE geant321_3.21.14.dfsg-1.diff ---
--- 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 at 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 at 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 at 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 at 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
[...2933 lines suppressed...]
+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 at 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 at 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 at 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


--- NEW FILE mclibs-100-fix-isajet-manual-corruption.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 100-fix-isajet-manual-corruption.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix corruption in LaTeX source to the Isajet manual.
## DP: (Replacement text obtained from a PS version of the manual on the web.)

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mclibs/isajet/doc/physics.doc /tmp/dpep.tlmeFD/cernlib-2005.05.09/src/mclibs/isajet/doc/physics.doc
--- cernlib-2005.05.09/src/mclibs/isajet/doc/physics.doc	2001-10-08 10:03:08.000000000 -0400
+++ /tmp/dpep.tlmeFD/cernlib-2005.05.09/src/mclibs/isajet/doc/physics.doc	2005-06-08 16:12:37.814042242 -0400
@@ -122,7 +122,7 @@
 $W/Z$ decay. These were calculated using FORM 1.1 by J.~Vermaseren. The
 process $g + t \to W + b$ is {\it not} included. Both $g + b \to W^- +
 t$ and $g + \bar t \to W^- + \bar b$ of course give the same $W^- + t
-+\BARB_FINALSTATEAFTERQCDEVOLUTION
++\bar b$ final state after QCD evolution.  While the latter process is
 needed to describe the $m_t = 0$(!) mass singularity for $q_t \gg
 m_t$, it has a pole in the physical region at low $q_t$ from on-shell
 $t \to W + b$ decays. There is no obvious way to avoid this without


--- NEW FILE mclibs-101-undefine-PPC.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 101-undefine-PPC.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: If "PPC" is defined by compiler, undefine where it clashes with a
## DP: local variable.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mclibs/cojets/code/bradlp.F /tmp/dpep.aeMGeJ/cernlib-2005.05.09/src/mclibs/cojets/code/bradlp.F
--- cernlib-2005.05.09/src/mclibs/cojets/code/bradlp.F	1996-01-11 09:14:33.000000000 -0500
+++ /tmp/dpep.aeMGeJ/cernlib-2005.05.09/src/mclibs/cojets/code/bradlp.F	2005-06-08 17:00:48.403200778 -0400
@@ -37,6 +37,15 @@
 #include "cojets/zpar2.inc"
 #include "cojets/zwpar.inc"
 #include "cojets/weakon.inc"
+
+C     The following is necessary since PPC is defined in g77 on
+C     the powerpc architecture, but it's also a variable in this
+C     file.
+C       -- Kevin McCarty
+#ifdef PPC
+#undef PPC
+#endif
+
       DIMENSION QP(4),QM(4),QK(4),QE(4),QN(4)
       DIMENSION COEF(2,2),QQV(2)
 C


--- NEW FILE mclibs-102-dont-optimize-some-code.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 102-dont-optimize-some-code.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Don't allow the compiler to optimize several files that cause trouble
## DP: (either compiler crash or broken code generation).

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mclibs/isajet/isatape/Imakefile /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mclibs/isajet/isatape/Imakefile
--- cernlib-2005.05.09/src/mclibs/isajet/isatape/Imakefile	1996-05-06 11:19:44.000000000 -0400
+++ /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mclibs/isajet/isatape/Imakefile	2005-06-09 11:16:58.039286811 -0400
@@ -4,4 +4,8 @@
 
 FORTRANSAVEOPTION = FortranSaveFlags
 
+#if defined(CERNLIB_LINUX)
+SpecialFortranLibObjectRule(isawev,isawev,-O0,NullParameter)
+#endif
+
 SubdirLibraryTarget(NullParameter,NullParameter)
diff -urNad cernlib-2005.05.09/src/mclibs/pdf/spdf/Imakefile /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mclibs/pdf/spdf/Imakefile
--- cernlib-2005.05.09/src/mclibs/pdf/spdf/Imakefile	2000-04-19 09:51:56.000000000 -0400
+++ /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/mclibs/pdf/spdf/Imakefile	2005-06-09 11:22:02.812494322 -0400
@@ -97,4 +97,10 @@
 #ifdef CERNLIB_HPUX
 FORTRANOPTIONS += '-WF,-P'
 #endif
+
+#if defined(CERNLIB_LINUX)
+/* -O2 optimization on ARM breaks in g77 3.3.3 */
+SpecialFortranLibObjectRule(structm,structm,-O0,NullParameter)
+#endif
+
 SubdirLibraryTarget(NullParameter,NullParameter)


--- NEW FILE mclibs-204-compile-isajet-with-isasrt.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 204-compile-isajet-with-isasrt.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Include isasrt in the Isajet library, by request (cf.
## DP: http://bugs.debian.org/260469 )

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile /tmp/dpep.PM12lm/cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile
--- cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile	2001-10-08 09:06:49.000000000 -0400
+++ /tmp/dpep.PM12lm/cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile	2005-06-09 14:25:29.621215677 -0400
@@ -9,7 +9,7 @@
 	 fortop.F frgjet.F frgmnt.F gamma.F getpt.F gettot.F heavyx.F \ @@\
 	 hevolv.F higgs.F idanti.F idgen.F iframs.F inisap.F ipartns.F \ @@\
 	 ipjset.F iprtns.F irmov0.F isabeg.F isaend.F isaevt.F isaini.F \ @@\
-	 isajet.F ispjet.F istrad.F iswdky.F jetgen.F \ @@\
+	 isajet.F isasrt.F ispjet.F istrad.F iswdky.F jetgen.F \ @@\
 	 label.F lboost.F logerr.F \ @@\
 	 logic.F logp.F logphi.F logphw.F logpt.F logqm.F logqt.F logthw.F \ @@\
 	 logx.F logxw.F logyth.F logyw.F lstsq.F mbias.F mbset.F nogood.F \ @@\


--- NEW FILE mclibs-206-herwig-uses-DBLE-not-REAL.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 206-herwig-uses-DBLE-not-REAL.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Have libherwig use double precision consistently

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mclibs/herwig/code/hwhiga.F /tmp/dpep.1kYOCO/cernlib-2005.05.09/src/mclibs/herwig/code/hwhiga.F
--- cernlib-2005.05.09/src/mclibs/herwig/code/hwhiga.F	1996-12-03 09:16:56.000000000 -0500
+++ /tmp/dpep.1kYOCO/cernlib-2005.05.09/src/mclibs/herwig/code/hwhiga.F	2005-06-09 15:22:00.263743792 -0400
@@ -72,7 +72,7 @@
       TAMP(6)=HWHIG5(T,S,U,EMH2,EMQ2,2,0,5,0,0,0)
       TAMP(7)=HWHIG5(U,T,S,EMH2,EMQ2,3,0,6,0,0,0)
       DO 20 I=1,7
-      TAMPI(I)= REAL(TAMP(I))
+      TAMPI(I)= DBLE(TAMP(I))
   20  TAMPR(I)=-IMAG(TAMP(I))
 C Square and add prefactors
       WTGG=0.03125*FLOAT(NCOLO*(NCOLO**2-1))
diff -urNad cernlib-2005.05.09/src/mclibs/herwig/code/hwuli2.F /tmp/dpep.1kYOCO/cernlib-2005.05.09/src/mclibs/herwig/code/hwuli2.F
--- cernlib-2005.05.09/src/mclibs/herwig/code/hwuli2.F	1996-12-03 09:17:04.000000000 -0500
+++ /tmp/dpep.1kYOCO/cernlib-2005.05.09/src/mclibs/herwig/code/hwuli2.F	2005-06-09 15:22:00.263743792 -0400
@@ -18,7 +18,7 @@
      &  1.644934066848226D0/
       PROD(Y,Y2)=Y*(ONE+A1*Y*(ONE+A2*Y*(ONE+A3*Y2*(ONE+A4*Y2*(ONE+A5*Y2*
      & (ONE+A6*Y2*(ONE+A7*Y2*(ONE+A8*Y2*(ONE+A9*Y2*(ONE+A10*Y2))))))))))
-      XR=REAL(X)
+      XR=DBLE(X)
       XI=IMAG(X)
       R2=XR*XR+XI*XI
       IF (R2.GT.ONE.AND.(XR/R2).GT.HALF) THEN


--- NEW FILE mclibs-305-use-POWERPC-not-PPC-as-test.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 305-use-POWERPC-not-PPC-as-test.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Since patch 304 changed the meaning of CERNLIB_PPC to a mere endianness
## DP: test, we now use CERNLIB_POWERPC to mean actually checking for a PowerPC
## DP: processor; fix the three occurences of this in Imakefiles.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mclibs/herwig/code/Imakefile /tmp/dpep.fQy2EP/cernlib-2005.05.09/src/mclibs/herwig/code/Imakefile
--- cernlib-2005.05.09/src/mclibs/herwig/code/Imakefile	1998-09-25 11:34:28.000000000 -0400
+++ /tmp/dpep.fQy2EP/cernlib-2005.05.09/src/mclibs/herwig/code/Imakefile	2005-06-09 10:51:45.913019086 -0400
@@ -43,7 +43,7 @@
 
 SubdirLibraryTarget(NullParameter,NullParameter)
 
-#if defined(CERNLIB_LINUX) && defined(CERNLIB_PPC)
+#if defined(CERNLIB_LINUX) && defined(CERNLIB_POWERPC)
 SpecialFortranLibObjectRule(hwuci2,hwuci2,-O0,NullParameter)
 #endif
 


--- NEW FILE mclibs-309-define-dummy-herwig-routines.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 309-define-dummy-herwig-routines.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Define stub functions for herwig routines that are supposed to be
## DP: provided by the user.  Also, comment out the dummy functions pdfset
## DP: and structm; real versions are provided in pdflib.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/mclibs/herwig/code/Imakefile cernlib-2005.05.09.dfsg/src/mclibs/herwig/code/Imakefile
--- cernlib-2005.05.09.dfsg~/src/mclibs/herwig/code/Imakefile	2005-11-28 19:46:53.619963660 +0000
+++ cernlib-2005.05.09.dfsg/src/mclibs/herwig/code/Imakefile	2005-11-28 19:46:58.890844233 +0000
@@ -24,8 +24,13 @@
 	hwulob.F hwulof.F hwulor.F hwumas.F hwupcm.F hwurap.F hwures.F \ @@\
 	hwurob.F hwurof.F hwurot.F hwusor.F hwusqr.F hwusta.F hwutab.F \ @@\
 	hwutim.F hwvdif.F hwvdot.F hwvequ.F hwvsca.F hwvsum.F hwvzro.F \ @@\
-	hwwarn.F ieupdg.F ipdgeu.F pdfset.F qqinit.F qqlmat.F sasano.F \ @@\
-	sasbeh.F sasdir.F sasgam.F sasvmd.F structm.F
+	hwwarn.F ieupdg.F ipdgeu.F /*pdfset.F*/ qqinit.F qqlmat.F sasano.F \ @@\
+	sasbeh.F sasdir.F sasgam.F sasvmd.F /*structm.F*/
+	/* comment out pdfset.F, structm.F; real versions are in pdflib */
+
+/* add the following file to define dummy routines as weak symbols */
+/* --Kevin McCarty, for Debian */
+SRCS_C= dummy.c
 
 FORTRANSAVEOPTION = FortranSaveFlags
 
diff -urNad cernlib-2005.05.09.dfsg~/src/mclibs/herwig/code/dummy.c cernlib-2005.05.09.dfsg/src/mclibs/herwig/code/dummy.c
--- cernlib-2005.05.09.dfsg~/src/mclibs/herwig/code/dummy.c	1970-01-01 00:00:00.000000000 +0000
+++ cernlib-2005.05.09.dfsg/src/mclibs/herwig/code/dummy.c	2005-11-28 19:49:17.897320746 +0000
@@ -0,0 +1,34 @@
+/* Dummy file to avoid undefined symbols in the library */
+/* Kevin McCarty, 14 Jan 2003 */
+
+#include <stdio.h>
+#include <stdlib.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) dummy_ ## x
+
+#define DUMMY(UPPERNAME, fortranname_, returntype) \
+static returntype underline(fortranname_)() { print_dummy(#UPPERNAME); } \
+void fortranname_() \
+	__attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
+
+static void print_dummy(const char *function)
+{
+  fprintf(stderr, "herwig59: Now in dummy %s routine.\n", function);
+  fprintf(stderr,
+          "If you see this message, you should define your own such routine.\n"
+#if defined (CERNLIB_DEBIAN)
+	  "For details, see the file /usr/share/doc/libherwig59-2-dev/herwig59.txt.gz\n"
+#endif
+  );
+  exit(EXIT_FAILURE);
+}
+
+DUMMY(HWABEG, hwabeg_, void);
+DUMMY(HWANAL, hwanal_, void);
+DUMMY(HWAEND, hwaend_, void);
+


--- NEW FILE mclibs-310-define-dummy-fowl-routines.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 310-define-dummy-fowl-routines.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Define stub functions for routines in fowl that are supposed to be
## DP: user-defined.  Also, rename START to FSTART to avoid name clash
## DP: with mathlib.

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/phtools/fowl/Imakefile cernlib-2005.05.09.dfsg/src/phtools/fowl/Imakefile
--- cernlib-2005.05.09.dfsg~/src/phtools/fowl/Imakefile	1996-04-26 07:13:52.000000000 +0000
+++ cernlib-2005.05.09.dfsg/src/phtools/fowl/Imakefile	2005-11-28 19:49:52.412989577 +0000
@@ -1,10 +1,12 @@
-SRCS_F=	 beamin.F breitw.F chmove.F delsq.F dumpme.F finish.F \ @@\
+SRCS_F=	 beamin.F breitw.F chmove.F delsq.F dumpme.F /* finish.F */ \ @@\
 	fmass.F fmassq.F fowl.F fowlmp.F fowlpr.F genev.F histey.F \ @@\
 	labsys.F pdk.F qqstrt.F rangnr.F redat2.F redata.F rotes2.F \ @@\
 	scout.F teedia.F tranch.F xplsdx.F
 
+SRCS_C= dummy.c /*"fake" defn of start, user, finish to avoid undefined syms*/
+
 #if !defined(CERNLIB_UNIX)
-SRCS_F := $(SRCS_F) start.F
+SRCS_F := $(SRCS_F) /* start.F */
 #endif
 
 SubdirLibraryTarget(fowl,NullParameter)
diff -urNad cernlib-2005.05.09.dfsg~/src/phtools/fowl/dummy.c cernlib-2005.05.09.dfsg/src/phtools/fowl/dummy.c
--- cernlib-2005.05.09.dfsg~/src/phtools/fowl/dummy.c	1970-01-01 00:00:00.000000000 +0000
+++ cernlib-2005.05.09.dfsg/src/phtools/fowl/dummy.c	2005-11-28 19:53:31.287496776 +0000
@@ -0,0 +1,39 @@
+/* Dummy file to avoid undefined symbols in the library */
+/* Kevin McCarty, 26 Apr 2004 */
+/* Last revised 13 Aug 2004 */
+
+#include <stdio.h>
+#include <stdlib.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) dummy_ ## x
+
+#define DUMMY(UPPERNAME, fortranname_, returntype) \
+static returntype underline(fortranname_)() { print_dummy(#UPPERNAME); } \
+void fortranname_() \
+	__attribute__ ((weak, alias (stringify(underline(fortranname_))) ))
+
+static void print_dummy(const char *function)
+{
+  fprintf(stderr, "phtools: Now in dummy %s routine.\n", function);
+  fprintf(stderr,
+          "If you see this message, you should define your own such routine.\n"
+	  "For details, see "
+#if defined (CERNLIB_DEBIAN)
+	                   "/usr/share/doc/libphtools2-dev/README.Debian\n"
+	  "and "
+#endif
+	      "the CERN writeup for FOWL (available at the URL\n"
+	  "http://wwwasdoc.web.cern.ch/wwwasdoc/Welcome.html ; scroll down\n"
+	  "to the link for W505 - FOWL.)\n");
+  exit(EXIT_FAILURE);
+}
+
+DUMMY(FSTART, fstart_, void);
+DUMMY(USER,   user_,   void);
+DUMMY(FINISH, finish_, void);
+
diff -urNad cernlib-2005.05.09.dfsg~/src/phtools/fowl/fowlmp.F cernlib-2005.05.09.dfsg/src/phtools/fowl/fowlmp.F
--- cernlib-2005.05.09.dfsg~/src/phtools/fowl/fowlmp.F	1996-03-22 16:42:46.000000000 +0000
+++ cernlib-2005.05.09.dfsg/src/phtools/fowl/fowlmp.F	2005-11-28 19:49:52.412989577 +0000
@@ -30,7 +30,7 @@
       CALL REDATA
       IF(NEVTOT.LT.NGRP) NGRP = NEVTOT
       N2 = MIN (NEVTOT/NGRP, 30000)
-      CALL START
+      CALL FSTART
       DO  500 I2= 1, N2
       DO  400  I= 1, NGRP
       IEVENT = IEVENT + 1
diff -urNad cernlib-2005.05.09.dfsg~/src/phtools/fowl/qqstrt.F cernlib-2005.05.09.dfsg/src/phtools/fowl/qqstrt.F
--- cernlib-2005.05.09.dfsg~/src/phtools/fowl/qqstrt.F	1996-03-22 16:42:47.000000000 +0000
+++ cernlib-2005.05.09.dfsg/src/phtools/fowl/qqstrt.F	2005-11-28 19:49:52.412989577 +0000
@@ -38,6 +38,9 @@
       COMMON
      +/TAPES / NTPIN     ,NTPOUT   ,NTPNCH   ,NTPBIN   ,KONSOL
       IF(JEVT.LE.0) RETURN
+#if 0
+C     Comment this section out; "which" is obsolete
+C     -- Kevin McCarty, for Debian, 26 April 2004
       CALL WHICH(ISIT,VAL)
       WRITE(6,700)JEVT,VAL
   700 FORMAT('0RANDOM NUMBER GENERATOR INITIATED TO',I12,
@@ -46,6 +49,7 @@
 C--     CDC   60-BIT WORD
 CDC                             )B10000000000000007171 .RO.  TVEJ( = POL
       GOTO 200
+#endif
   100 CONTINUE
 C         FOR -CDC JUST MAKE SURE IT IS ODD
       IGLOP = JEVT


--- NEW FILE mclibs-312-skip-duplicate-gamma.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 312-skip-duplicate-gamma.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Don't compile in redundant gamma function in isajet; use the mathlib one

@DPATCH@
diff -urNad cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile /tmp/dpep.IX54UM/cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile
--- cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile	2005-06-09 14:29:18.976494518 -0400
+++ /tmp/dpep.IX54UM/cernlib-2005.05.09/src/mclibs/isajet/code/Imakefile	2005-06-09 14:30:21.913126207 -0400
@@ -1,12 +1,13 @@
 DoIncludePackage(isajet)
 #include "pilot.h"
 
+/* gamma.F removed; use the one defined in mathlib/gen/c/gamma.F */
 SRCS_F= \ @@\
 	 amass.F charge.F cteq5l.F ctxc2i.F ctxi2c.F ctxin.F ctxout.F \ @@\
 	 dblpcm.F dblvec.F dboost.F decay.F decjet.F \ @@\
 	 domssm.F drllyn.F eebeg.F eemax.F elctrn.F epf.F evol01.F evol02.F \ @@\
 	 evol03.F evol05.F evol06.F evol07.F evolms.F evolve.F flavor.F \ @@\
-	 fortop.F frgjet.F frgmnt.F gamma.F getpt.F gettot.F heavyx.F \ @@\
+	 fortop.F frgjet.F frgmnt.F         getpt.F gettot.F heavyx.F \ @@\
 	 hevolv.F higgs.F idanti.F idgen.F iframs.F inisap.F ipartns.F \ @@\
 	 ipjset.F iprtns.F irmov0.F isabeg.F isaend.F isaevt.F isaini.F \ @@\
 	 isajet.F isasrt.F ispjet.F istrad.F iswdky.F jetgen.F \ @@\


--- NEW FILE mclibs-806-bump-mathlib-and-dependents-sonames.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 806-bump-mathlib-and-dependents-sonames.dpatch by  <kmccarty at 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/mclibs/cojets/Imakefile cernlib-2005.05.09.dfsg/src/mclibs/cojets/Imakefile
--- cernlib-2005.05.09.dfsg~/src/mclibs/cojets/Imakefile	2005-11-23 15:49:19.723162159 +0000
+++ cernlib-2005.05.09.dfsg/src/mclibs/cojets/Imakefile	2005-11-23 15:49:27.431512287 +0000
@@ -2,6 +2,8 @@
 #define IHaveSubdirs
 #define PassCDebugFlags
 
+export LIB_SONAME := 2
+
 AllTarget(cojets)
 
 LIBDIRS= code cojdata cojtapew
diff -urNad cernlib-2005.05.09.dfsg~/src/mclibs/herwig/Imakefile cernlib-2005.05.09.dfsg/src/mclibs/herwig/Imakefile
--- cernlib-2005.05.09.dfsg~/src/mclibs/herwig/Imakefile	2005-11-23 15:49:19.724161945 +0000
+++ cernlib-2005.05.09.dfsg/src/mclibs/herwig/Imakefile	2005-11-23 15:49:27.432512073 +0000
@@ -2,6 +2,8 @@
 #define IHaveSubdirs
 #define PassCDebugFlags
 
+export LIB_SONAME := 2
+
 SUBDIRS= code doc test herwig59
 
 TopOfPackage(herwig59)
diff -urNad cernlib-2005.05.09.dfsg~/src/mclibs/isajet/Imakefile cernlib-2005.05.09.dfsg/src/mclibs/isajet/Imakefile
--- cernlib-2005.05.09.dfsg~/src/mclibs/isajet/Imakefile	2005-11-23 15:49:19.724161945 +0000
+++ cernlib-2005.05.09.dfsg/src/mclibs/isajet/Imakefile	2005-11-23 15:49:27.432512073 +0000
@@ -3,6 +3,8 @@
 #define IHaveSubdirs
 #define PassCDebugFlags
 
+export LIB_SONAME := 2
+
 LIBDIRS= code isadata isasusy isarun isatape
 
 SUBDIRS= $(LIBDIRS) test data isajet
diff -urNad cernlib-2005.05.09.dfsg~/src/mclibs/pdf/Imakefile cernlib-2005.05.09.dfsg/src/mclibs/pdf/Imakefile
--- cernlib-2005.05.09.dfsg~/src/mclibs/pdf/Imakefile	2005-11-23 15:49:19.724161945 +0000
+++ cernlib-2005.05.09.dfsg/src/mclibs/pdf/Imakefile	2005-11-23 15:49:27.432512073 +0000
@@ -6,6 +6,8 @@
 IMAKE_DEFINES=-DFortranDoesCpp=NO
 #endif
 
+export LIB_SONAME := 2
+
 AllTarget(pdflib804)
 
 SUBDIRS= spdf npdf tpdf pdf
diff -urNad cernlib-2005.05.09.dfsg~/src/phtools/Imakefile cernlib-2005.05.09.dfsg/src/phtools/Imakefile
--- cernlib-2005.05.09.dfsg~/src/phtools/Imakefile	2005-11-23 15:49:19.725161731 +0000
+++ cernlib-2005.05.09.dfsg/src/phtools/Imakefile	2005-11-23 15:49:27.432512073 +0000
@@ -2,6 +2,8 @@
 #define IHaveSubdirs
 #define PassCDebugFlags
 
+export LIB_SONAME := 2
+
 LIBDIRS= genbod fowl wico
 
 SUBDIRS= $(LIBDIRS) wicoexam

mclibs_2005.dfsg-1.diff:

--- NEW FILE mclibs_2005.dfsg-1.diff ---
--- mclibs-2005.dfsg.orig/debian/control
+++ mclibs-2005.dfsg/debian/control
@@ -0,0 +1,242 @@
+Source: mclibs
+Maintainer: Kevin B. McCarty <kmccarty at 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), libmathlib2-dev, tetex-bin
+
+Package: cernlib-montecarlo
+Architecture: all
+Section: science
+Depends: cernlib-base, montecarlo-base (= ${Source-Version}), libcojets2-dev, libeurodec1-dev, libherwig59-2-dev, libpdflib804-2-dev, libphotos202-dev, libphtools2-dev
+Recommends: libisajet758-2-dev
+Description: Cernlib Monte Carlo libraries
+ Cernlib is a suite of data analysis tools and libraries created for
+ use in physics experiments, but also with applications to other
+ fields such as the biological sciences.
+ .
+ This metapackage provides various Monte Carlo libraries included in Cernlib
+ (both shared and static).  Likely only physicists will be interested in
+ these packages.  Note that the Geant 3.21 program is not included, but it may
+ be obtained by also installing the geant321 Debian package.
+ .
+ Be aware that the libraries of Ariadne, Fritiof, Jetset, Lepto, and Pythia are
+ not available within Debian due to licensing issues; see the README.Debian
+ file in the montecarlo-base package for information on obtaining them.
+ .
+ Additionally, the Isajet library is not available on the m68k architecture
+ due to a compiler flaw.
+
+Package: libcojets2-dev
+Architecture: any
+Section: libdevel
+Depends: libcojets2 (= ${Source-Version}), libmathlib2-dev
+Replaces: libcojets1-dev
+Conflicts: libcojets1-dev
+Description: [Physics] COJETS p-p and pbar-p interaction Monte Carlo
+ COJETS is a Monte Carlo library which simulates pbar-p and p-p interactions at
+ high energy.  The interaction process is first calculated at the parton level
+ by means of perturbative QCD and the Weinberg-Salam model for electroweak
+ interactions.  Partons are then independently fragmented into jets of hadrons,
+ according to the Field-Feynman model, and the beam jets contribution is
+ added, according to a longitudinal phase-space model.  Multiple QCD radiation
+ of initial and final partons is included.
+ .
+ This is the static version of the library.  The package also includes
+ FORTRAN header files and documentation for COJETS.
+
+Package: libcojets2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, montecarlo-base
+Description: [Physics] COJETS p-p and pbar-p interaction Monte Carlo library
+ COJETS is a Monte Carlo library which simulates pbar-p and p-p interactions at
+ high energy.  The interaction process is first calculated at the parton level
+ by means of perturbative QCD and the Weinberg-Salam model for electroweak
+ interactions.  Partons are then independently fragmented into jets of hadrons,
+ according to the Field-Feynman model, and the beam jets contribution is
+ added, according to a longitudinal phase-space model.  Multiple QCD radiation
+ of initial and final partons is included.
+ .
+ Note that in order to compile and link programs against this library, you
+ must also install the libcojets2-dev package.
+
+Package: libeurodec1-dev
+Architecture: any
+Section: libdevel
+Depends: libeurodec1 (= ${Source-Version}), cfortran, libc6-dev | libc-dev
+Description: [Physics] Monte Carlo library for quark / heavy lepton decays
+ Eurodec is a general purpose Monte Carlo library for the fragmentation and
+ decay of quarks, di-quarks, heavy leptons, etc.  It can be used with the
+ included event generator EUROJET, or with your own event generator.
+ .
+ This is the static version of the library.  FORTRAN header files are also
+ included.
+
+Package: libeurodec1
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, cernlib-base, montecarlo-base
+Description: [Physics] Monte Carlo library for quark and heavy lepton decays
+ Eurodec is a general purpose Monte Carlo library for the fragmentation and
+ decay of quarks, di-quarks, heavy leptons, etc.  It can be used with the
+ included event generator EUROJET, or with your own event generator.
+ .
+ Note that in order to compile and link programs against this library, you
+ must also install the libeurodec1-dev package.
+
+Package: libherwig59-2-dev
+Architecture: any
+Section: libdevel
+Depends: libherwig59-2 (= ${Source-Version}), libpdflib804-2-dev (= ${Source-Version})
+Replaces: libherwig59-dev
+Conflicts: libherwig59-dev
+Description: [Physics] Monte Carlo event generator for hadrons (development)
+ HERWIG is a general-purpose event generator for high energy hadronic
+ processes, with particular emphasis on the detailed simulation of
+ QCD parton showers.
+ .  
+ This is the static version of the library.  Also included are a FORTRAN
+ header file and some documentation.
+
+Package: libherwig59-2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, montecarlo-base
+Description: [Physics] Monte Carlo event generator simulating hadronic events
+ HERWIG is a general-purpose event generator for high energy hadronic
+ processes, with particular emphasis on the detailed simulation of
+ QCD parton showers. 
+ .
+ Note that in order to compile and link programs against this library, you
+ must also install the libherwig59-2-dev package.
+
+Package: libisajet758-2-dev
+Architecture: any
+Section: libdevel
+Depends: libisajet758-2 (= ${Source-Version}), libpdflib804-2-dev (= ${Source-Version})
+Replaces: libisajet758-dev
+Conflicts: libisajet758-dev
+Description: [Physics] Monte Carlo generator for proton/electron reactions
+ ISAJET is a Monte Carlo library which simulates p-p, pbar-p, and e+ e-
+ interactions at high energies.  The library is based on perturbative QCD
+ combined with phenomenological models for parton and beam jet fragmentation.
+ ISAJET incorporates ISASUSY, which evaluates branching ratios for the minimal
+ supersymmetric extension of the Standard Model.
+ .  
+ This is the static version of the library.  Also included are FORTRAN header
+ files and some documentation.
+
+Package: libisajet758-2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, montecarlo-base
+Description: [Physics] Monte Carlo generator for proton / electron reactions
+ ISAJET is a Monte Carlo library which simulates p-p, pbar-p, and e+ e-
+ interactions at high energies.  The library is based on perturbative QCD
+ combined with phenomenological models for parton and beam jet fragmentation.
+ ISAJET incorporates ISASUSY, which evaluates branching ratios for the minimal
+ supersymmetric extension of the Standard Model.
+ .
+ Note that in order to compile and link programs against this library, you
+ must also install the libisajet758-2-dev package.
+
+Package: libpdflib804-2-dev
+Architecture: any
+Section: libdevel
+Depends: libpdflib804-2 (= ${Source-Version}), libmathlib2-dev
+Replaces: libpdflib804-dev
+Conflicts: libpdflib804-dev
+Description: [Physics] Comprehensive library of parton density functions
+ The PDFLIB package gathers about 100 different sets of Parton Density
+ Functions into a comprehensive library in a consistent way.  Density functions
+ are available for the nucleon, pion and photon.  The library also allows the
+ calculation of the strong force coupling constant to first or second order
+ at a given value of Q-squared.
+ .
+ This is the static version of the library.  Also included are FORTRAN
+ header files and some documentation.
+
+Package: libpdflib804-2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, montecarlo-base
+Description: [Physics] Comprehensive library of parton density functions
+ The PDFLIB package gathers about 100 different sets of Parton Density
+ Functions into a comprehensive library in a consistent way.  Density functions
+ are available for the nucleon, pion and photon.  The library also allows the
+ calculation of the strong force coupling constant to first or second order
+ at a given value of Q-squared.
+ .
+ Note that in order to compile and link programs against this library, you
+ must also install the libpdflib804-2-dev package.
+
+Package: libphotos202-dev
+Architecture: any
+Section: libdevel
+Depends: libphotos202 (= ${Source-Version}), cfortran, libc6-dev | libc-dev
+Description: [Physics] Monte Carlo simulation of photon radiation in decays
+ The PHOTOS library simulates QED photon radiative corrections in
+ electromagnetic decays.  The library is universal; it allows for easy
+ interface with any program generating decays of any particle.  It can be
+ used to estimate the size of the QED bremsstrahlung in leading-logarithmic
+ approximation.  The proper soft photon behavior is also reproduced.
+ .  
+ This is the static version of the library.
+
+Package: libphotos202
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, cernlib-base, montecarlo-base
+Description: [Physics] Monte Carlo simulation of photon radiation in decays
+ The PHOTOS library simulates QED photon radiative corrections in
+ electromagnetic decays.  The library is universal; it allows for easy
+ interface with any program generating decays of any particle.  It can be
+ used to estimate the size of the QED bremsstrahlung in leading-logarithmic
+ approximation.  The proper soft photon behavior is also reproduced.
[...2775 lines suppressed...]
@@ -0,0 +1,3 @@
+debian/tmp/usr/lib/libeurodec.so.1.2005
+debian/tmp/usr/lib/libeurodec.so.1
+debian/tmp/usr/share/eurodec/eurodec.dat
--- mclibs-2005.dfsg.orig/debian/debhelper/libpdflib804-2.dirs
+++ mclibs-2005.dfsg/debian/debhelper/libpdflib804-2.dirs
@@ -0,0 +1 @@
+usr/lib
--- mclibs-2005.dfsg.orig/debian/debhelper/libherwig59-2.install
+++ mclibs-2005.dfsg/debian/debhelper/libherwig59-2.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libherwig59.so.2.2005
+debian/tmp/usr/lib/libherwig59.so.2
--- mclibs-2005.dfsg.orig/debian/debhelper/libisajet758-2-dev.links
+++ mclibs-2005.dfsg/debian/debhelper/libisajet758-2-dev.links
@@ -0,0 +1 @@
+usr/include/isajet usr/include/jetset74
--- mclibs-2005.dfsg.orig/debian/debhelper/libpdflib804-2-dev.dirs
+++ mclibs-2005.dfsg/debian/debhelper/libpdflib804-2-dev.dirs
@@ -0,0 +1 @@
+usr/lib
--- mclibs-2005.dfsg.orig/debian/debhelper/libphtools2.dirs
+++ mclibs-2005.dfsg/debian/debhelper/libphtools2.dirs
@@ -0,0 +1 @@
+usr/lib
--- mclibs-2005.dfsg.orig/debian/debhelper/libphotos202-dev.dirs
+++ mclibs-2005.dfsg/debian/debhelper/libphotos202-dev.dirs
@@ -0,0 +1 @@
+usr/lib
--- mclibs-2005.dfsg.orig/debian/debhelper/libpdflib804-2-dev.README.debian
+++ mclibs-2005.dfsg/debian/debhelper/libpdflib804-2-dev.README.debian
@@ -0,0 +1,8 @@
+Note on libpdflib804-2-dev:
+---------------------------
+
+The apparently non-free license stated in the file pdfdoc.txt.gz in this
+directory is superseded by CERN's placement of Cernlib under the GNU
+General Public License.  See the copyright file in this directory for details.
+
+--Kevin B. McCarty <kmccarty at debian.org>
--- mclibs-2005.dfsg.orig/debian/debhelper/libphotos202.dirs
+++ mclibs-2005.dfsg/debian/debhelper/libphotos202.dirs
@@ -0,0 +1 @@
+usr/lib
--- mclibs-2005.dfsg.orig/debian/debhelper/libphotos202-dev.install
+++ mclibs-2005.dfsg/debian/debhelper/libphotos202-dev.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libphotos202.a
+debian/tmp/usr/lib/libphotos202.so
--- mclibs-2005.dfsg.orig/debian/debhelper/libphotos202.install
+++ mclibs-2005.dfsg/debian/debhelper/libphotos202.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libphotos202.so.1.2005
+debian/tmp/usr/lib/libphotos202.so.1
--- mclibs-2005.dfsg.orig/debian/debhelper/montecarlo-base.install
+++ mclibs-2005.dfsg/debian/debhelper/montecarlo-base.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/include/jetset74.h
+debian/tmp/usr/include/lepto62.h
--- mclibs-2005.dfsg.orig/debian/debhelper/libphtools2-dev.dirs
+++ mclibs-2005.dfsg/debian/debhelper/libphtools2-dev.dirs
@@ -0,0 +1 @@
+usr/lib
--- mclibs-2005.dfsg.orig/debian/debhelper/montecarlo-base.dirs
+++ mclibs-2005.dfsg/debian/debhelper/montecarlo-base.dirs
@@ -0,0 +1,2 @@
+usr/include
+usr/include/cfortran
--- mclibs-2005.dfsg.orig/debian/debhelper/libcojets2.install
+++ mclibs-2005.dfsg/debian/debhelper/libcojets2.install
@@ -0,0 +1,3 @@
+debian/tmp/usr/lib/libcojets.so.2.2005
+debian/tmp/usr/lib/libcojets.so.2
+debian/tmp/usr/share/cojets/cojets.dat
--- mclibs-2005.dfsg.orig/debian/debhelper/libeurodec1-dev.docs
+++ mclibs-2005.dfsg/debian/debhelper/libeurodec1-dev.docs
@@ -0,0 +1 @@
+debian/tmp/usr/share/doc/montecarlo-doc/eurodec/eurodec.txt
--- mclibs-2005.dfsg.orig/debian/debhelper/libisajet758-2-dev.install
+++ mclibs-2005.dfsg/debian/debhelper/libisajet758-2-dev.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/lib/libisajet758.a
+debian/tmp/usr/lib/libisajet758.so
+debian/tmp/usr/include/isajet758/
+debian/tmp/usr/include/isajet
--- mclibs-2005.dfsg.orig/debian/debhelper/libpdflib804-2-dev.install
+++ mclibs-2005.dfsg/debian/debhelper/libpdflib804-2-dev.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/lib/libpdflib804.a
+debian/tmp/usr/lib/libpdflib804.so
+debian/tmp/usr/include/pdf804/
+debian/tmp/usr/include/pdf
--- mclibs-2005.dfsg.orig/debian/debhelper/libcojets2-dev.install
+++ mclibs-2005.dfsg/debian/debhelper/libcojets2-dev.install
@@ -0,0 +1,3 @@
+debian/tmp/usr/lib/libcojets.a
+debian/tmp/usr/lib/libcojets.so
+debian/tmp/usr/include/cojets/
--- mclibs-2005.dfsg.orig/debian/debhelper/libeurodec1-dev.doc-base
+++ mclibs-2005.dfsg/debian/debhelper/libeurodec1-dev.doc-base
@@ -0,0 +1,10 @@
+Document: eurodec-manual
+Title: Eurodec
+Author: A. Ali, B. van Eijk
+Abstract: Summary of the Eurodec Monte Carlo simulation library, a general
+  purpose Monte Carlo simulator for the fragmentation and decay of quarks,
+  di-quarks, heavy leptons, etc.
+Section: Apps/Science
+
+Format: text
+Files: /usr/share/doc/libeurodec1-dev/eurodec.txt
--- mclibs-2005.dfsg.orig/debian/debhelper/libherwig59-2-dev.docs
+++ mclibs-2005.dfsg/debian/debhelper/libherwig59-2-dev.docs
@@ -0,0 +1 @@
+debian/tmp/usr/share/doc/montecarlo-doc/herwig/herwig59.txt
--- mclibs-2005.dfsg.orig/debian/debhelper/libisajet758-2-dev.docs
+++ mclibs-2005.dfsg/debian/debhelper/libisajet758-2-dev.docs
@@ -0,0 +1,3 @@
+debian/tmp/usr/share/doc/montecarlo-doc/isajet/isajet.ps
+debian/tmp/usr/share/doc/montecarlo-doc/isajet/isasusy.txt
+debian/tmp/usr/share/doc/montecarlo-doc/isajet/isajet-zebra.txt
--- mclibs-2005.dfsg.orig/debian/debhelper/libpdflib804-2-dev.docs
+++ mclibs-2005.dfsg/debian/debhelper/libpdflib804-2-dev.docs
@@ -0,0 +1 @@
+debian/tmp/usr/share/doc/montecarlo-doc/pdflib/pdfdoc.txt
--- mclibs-2005.dfsg.orig/debian/debhelper/libphtools2-dev.install
+++ mclibs-2005.dfsg/debian/debhelper/libphtools2-dev.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libphtools.a
+debian/tmp/usr/lib/libphtools.so
--- mclibs-2005.dfsg.orig/debian/debhelper/montecarlo-base.links
+++ mclibs-2005.dfsg/debian/debhelper/montecarlo-base.links
@@ -0,0 +1,2 @@
+usr/include/jetset74.h usr/include/cfortran/jetset74.h
+usr/include/lepto62.h  usr/include/cfortran/lepto62.h
--- mclibs-2005.dfsg.orig/debian/debhelper/libcojets2-dev.doc-base
+++ mclibs-2005.dfsg/debian/debhelper/libcojets2-dev.doc-base
@@ -0,0 +1,9 @@
+Document: cojets-manual
+Title: COJETS 5.15
+Author: Roberto Odorico
+Abstract: Description of the COJETS Monte Carlo simulation program, which
+  simulates collisions of protons and antiprotons at high energy.
+Section: Apps/Science
+
+Format: text
+Files: /usr/share/doc/libcojets2-dev/cojets.txt.gz
--- mclibs-2005.dfsg.orig/debian/debhelper/montecarlo-base.TODO
+++ mclibs-2005.dfsg/debian/debhelper/montecarlo-base.TODO
@@ -0,0 +1,8 @@
+Future goals for Monte Carlo Debian packages:
+
+* Extract numerical data from source code in mclibs/pdf into text data files
+  and put them into a separate package with "Architecture: all"
+* Update numerical cross-sections, branching ratios, etc. where possible
+* Determine licensing status more clearly
+* Include better documentation
+
--- mclibs-2005.dfsg.orig/debian/debhelper/libherwig59-2-dev.doc-base
+++ mclibs-2005.dfsg/debian/debhelper/libherwig59-2-dev.doc-base
@@ -0,0 +1,11 @@
+Document: herwig-manual
+Title: HERWIG
+Author: G. Marchesini, I.G. Knowles, M.H. Seymour, B.R. Webber
+Abstract: Summary of the HERWIG Monte Carlo simulation library, an event
+  generator for simulating Hadron Emission Reactions With Interfering Gluons.
+  It places particular emphasis on the detailed simulation of 
+  quantum chromodynamic (QCD) parton showers.
+Section: Apps/Science
+
+Format: text
+Files: /usr/share/doc/libherwig59-2-dev/herwig59.txt.gz
--- mclibs-2005.dfsg.orig/debian/debhelper/libherwig59-2-dev.install
+++ mclibs-2005.dfsg/debian/debhelper/libherwig59-2-dev.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/lib/libherwig59.a
+debian/tmp/usr/lib/libherwig59.so
+debian/tmp/usr/include/herwig59/
+debian/tmp/usr/include/herwig
--- mclibs-2005.dfsg.orig/debian/debhelper/libphtools2-dev.README.debian
+++ mclibs-2005.dfsg/debian/debhelper/libphtools2-dev.README.debian
@@ -0,0 +1,18 @@
+Notes on libphtools2-dev
+------------------------
+
+If you are using the FOWL component of libphtools (Cernlib routine W505),
+you should be aware that you must create your own routines FSTART, USER,
+and FINISH in code linked against the library in order to use FOWL.
+For more information, please see the Cernlib documentation on FOWL:
+http://preprints.cern.ch/cgi-bin/setlink?base=preprint&categ=cern&id=IT-ASDW505
+
+Please note that I cannot guarantee the above URL will continue to be valid
+forever.
+
+
+Additionally, the documentation describes a user routine START that must
+be created.  In Debian, you must instead name that routine FSTART in order
+to avoid a name clash with the mathlib library.
+
+-- Kevin McCarty <kmccarty at debian.org>, Mon, 26 Apr 2004


--- NEW FILE paw-102-dont-optimize-some-code.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 102-dont-optimize-some-code.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Don't allow the compiler to optimize several files that cause trouble
## DP: (either compiler crash or broken code generation).

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/comis/code/Imakefile /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/pawlib/comis/code/Imakefile
--- cernlib-2005.05.09/src/pawlib/comis/code/Imakefile	2001-09-14 09:08:51.000000000 -0400
+++ /tmp/dpep.hNz5sX/cernlib-2005.05.09/src/pawlib/comis/code/Imakefile	2005-06-09 11:19:57.756983183 -0400
@@ -101,4 +101,10 @@
 SpecialFortranLibObjectRule(cskide,cskide,-O0,NullParameter)
 #endif
 
+#if defined(CERNLIB_LINUX)
+/* optimizing this file, even at -O1, causes runtime breakage with g77 3.3
+   cf. http://bugs.debian.org/233689 */
+SpecialFortranLibObjectRule(csrfun,csrfun,-O0,NullParameter)
+#endif
+
 SubdirLibraryTarget(NullParameter,NullParameter)


--- NEW FILE paw-105-fix-obsolete-xmfontlistcreate-warning.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 105-fix-obsolete-xmfontlistcreate-warning.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix Lesstif warning about use of obsolete XmFontListCreate() function

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/paw/cmotif/att_font.c /tmp/dpep.kv7bf1/cernlib-2005.05.09/src/pawlib/paw/cmotif/att_font.c
--- cernlib-2005.05.09/src/pawlib/paw/cmotif/att_font.c	2000-10-03 10:11:22.000000000 -0400
+++ /tmp/dpep.kv7bf1/cernlib-2005.05.09/src/pawlib/paw/cmotif/att_font.c	2005-06-09 14:39:00.803818666 -0400
@@ -215,18 +215,22 @@
  *****************************************************************************/
 static void MajButton(Widget w, Widget font,Widget pre,int postab)
 {
+   /* this function edited not to use obsolete function XmFontListCreate() */
    XmFontList police;
+   XmFontListEntry entry;
    XFontStruct *info_police;
    char strlabel[20];
    int prenum,policenum;
-
+   
    XtVaGetValues(pre,XmNuserData,&prenum,NULL);
    prenum--;
    XtVaGetValues(font,XmNuserData,&policenum,NULL);
    policenum--;
    if (( info_police=XLoadQueryFont(UxDisplay,StrFontTab[policenum]))== NULL)
       fprintf(stderr,"Unable to load font %s \n ",StrFontTab[policenum]);
-   police=XmFontListCreate(info_police,XmSTRING_DEFAULT_CHARSET);
+   entry = XmFontListEntryCreate(XmSTRING_DEFAULT_CHARSET,XmFONT_IS_FONT,
+				 (XtPointer)info_police);
+   police=XmFontListAppendEntry(NULL,entry);
    XtVaSetValues(w,XmNfontList,police,NULL);
    /* XFreeFont(UxDisplay,info_police);*/
 


--- NEW FILE paw-108-quote-protect-comis-script.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 108-quote-protect-comis-script.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F /tmp/dpep.tIRzzG/cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F
--- cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F	2000-09-25 10:16:36.000000000 -0400
+++ /tmp/dpep.tIRzzG/cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F	2005-06-09 15:41:16.757077306 -0400
@@ -70,7 +70,7 @@
       LEXEC=LENOCC(FEXEC)
       OPEN(LUNOUT,FILE=FEXEC(:LEXEC), STATUS='UNKNOWN',ERR=99)
       WRITE(LUNOUT,'(A)')         '#!/bin/sh'
-      WRITE(LUNOUT,'(A)')         'olddir=`pwd`'
+      WRITE(LUNOUT,'(A)')         'olddir="`pwd`"'
 *      WRITE(LUNOUT,'(A)')         'cd '//CHPATH(:LPATH)
       CHLINE=                     'cd '//CHPATH(:LPATH)
       L=LENOCC(CHLINE)
@@ -206,7 +206,7 @@
       CHLINE=                     '/bin/rm -f '//NAME(:LN)//'.o'
       L=LENOCC(CHLINE)
       WRITE(LUNOUT,'(A)')CHLINE(:L)
-      WRITE(LUNOUT,'(A)')         'cd $olddir'
+      WRITE(LUNOUT,'(A)')         'cd "$olddir"'
       WRITE(LUNOUT,'(A)')         'exit 0'
       CALL CSCLOS(LUNOUT)
       CLOSE(LUNOUT)


--- NEW FILE paw-200-comis-allow-special-chars-in-path.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 200-comis-allow-special-chars-in-path.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/paw/code/pawfca.F /tmp/dpep.gkT1Y2/cernlib-2005.05.09/src/pawlib/paw/code/pawfca.F
--- cernlib-2005.05.09/src/pawlib/paw/code/pawfca.F	1997-05-20 05:37:58.000000000 -0400
+++ /tmp/dpep.gkT1Y2/cernlib-2005.05.09/src/pawlib/paw/code/pawfca.F	2005-06-08 19:34:43.101436210 -0400
@@ -29,6 +29,7 @@
 C.    *        CHFUNC may be the name of a COMIS function              *
 C.    *        or a file name. A file cannot contain one of            *
 C.    *        the following characters: +*=-()<>                      *
+C.    *        [n.b. patched to work around this. --Kevin McCarty]     *
 C.    *                                                                *
 C.    ******************************************************************
 #include "paw/pawcfu.inc"
@@ -60,7 +61,11 @@
       IF(NCH.LE.0)GO TO 99
       IFILE=0
       TFILE=' '
-      IF(INDEX(CHFUNC,']').EQ.0.AND.INDEX(CHFUNC,':').EQ.0)THEN
+* Added '/' as a character symbolizing a filename; otherwise Unix paths
+* containing +, *, =, -, etc. return a bogus "Unknown routine" error
+* (Fix by Kevin McCarty)
+      IF(INDEX(CHFUNC,']').EQ.0.AND.INDEX(CHFUNC,':').EQ.0.AND.
+     +   INDEX(CHFUNC,'/').EQ.0)THEN
          IF(INDEX(CHFUNC,'+').NE.0.OR.
      +      INDEX(CHFUNC,'*').NE.0.OR.
      +      INDEX(CHFUNC,'=').NE.0.OR.


--- NEW FILE paw-207-compile-temp-libs-with-fPIC.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 207-compile-temp-libs-with-fPIC.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Compile temporary COMIS libraries with -fPIC for non-x86 arches.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F /tmp/dpep.srSRmd/cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F
--- cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F	2000-09-25 10:16:36.000000000 -0400
+++ /tmp/dpep.srSRmd/cernlib-2005.05.09/src/pawlib/comis/code/cscrexec.F	2005-06-09 15:47:44.859676286 -0400
@@ -81,12 +81,12 @@
       WRITE(LUNOUT,'(A)')CHLINE(:L)
       IF(FEXT.EQ.'.c')THEN
         L=LENOCC(CHCC)
-*                                 'cc -c .... name.c'
-        CHLINE=CHCC(:L)//' '//NAME(:LN)// '.c'
+*                                 'cc -c .... -fPIC name.c'
+        CHLINE=CHCC(:L)//' -fPIC '//NAME(:LN)// '.c'
       ELSE
         L=LENOCC(CHF77)
-*                                 'f77 -c .... name.f'
-        CHLINE=CHF77(:L)//' '//NAME(:LN)// '.f'
+*                                 'f77 -c .... -fPIC name.f'
+        CHLINE=CHF77(:L)//' -fPIC '//NAME(:LN)// '.f'
       ENDIF
       L=LENOCC(CHLINE)
       WRITE(LUNOUT,'(A)')CHLINE(:L)
@@ -176,7 +176,7 @@
       ENDIF
 #endif
 #if defined(CERNLIB_LINUX)
-      CHLINE=                   'ld -shared -o '
+      CHLINE=                   'g77 -shared -o '
      +                    // NAME(:LN) //'.sl '// NAME(:LN) //'.o'
 #endif
 #if defined(CERNLIB_ALPHA_OSF)


--- NEW FILE paw-211-fix-comis-on-ia64-alpha.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 211-fix-comis-on-ia64-alpha.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Further patch building on Harald Vogt's amd64 patch attempting to
## DP: fix PAW on Itanium/Alpha Linux.  This does not yet work completely...

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/ccopys.c cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/ccopys.c
--- cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/ccopys.c	2006-03-24 15:36:37.723420777 -0500
+++ cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/ccopys.c	2006-03-24 15:36:45.236828642 -0500
@@ -39,12 +39,45 @@
  * using the CERNLIB_QMLXIA64 cpp flag (H. Vogt - Sep 2005)
  */
 
+/* For Itanium and Alpha, the situation is even worse.  Itanium architecture
+ * has the data section starts at 0x6000000000000000.  The stack is
+ * supposed to be between 0x80...0 and 0xa0...0 starting at the high end
+ * and growing downwards, although on a test machine (merulo.debian.org)
+ * it seemed instead to start at 0x6000100000000000 and grow downwards.
+ * The addresses we actually get are truncated to the lowest 32 bits,
+ * so we assume that those greater than 0x80000000 are in the stack.
+ *
+ * Constant strings are in the text section starting at 0x40...0; we hope
+ * this function doesn't receive any.
+ *
+ * On Alpha, on the other hand, I couldn't find any docs for the Linux
+ * segmentation for virtual memory.  Judging by a test machine
+ * (escher.debian.org), the data section starts slightly above 0x120010000.
+ * On the other hand the stack grows downward from 0x120000000.  Here it
+ * seems safe to suppose that the variable is in the stack if the uint32
+ * truncated address received is less than 0x20000000.
+ * 
+ * -- Kevin McCarty
+ */
+	
 #if defined(CERNLIB_QMLXIA64)
      int *ja, *jb;
      int *nn;
 {
   int i,n; char *a,*b;
   n=*nn; a=*ja; b=*jb;
+# if defined (__ia64__) || defined (__alpha__)
+#  if defined (__ia64__)
+#   define autotest(_var) ((unsigned long)(_var) > 0x80000000)
+#  else /* __alpha__ */
+#   define autotest(_var) ((unsigned long)(_var) < 0x20000000)
+#  endif
+  static int dummy = 0;
+  unsigned long staticbase = ((unsigned long)&dummy) & 0xffffffff00000000L;
+  unsigned long autobase = ((unsigned long)&i) & 0xffffffff00000000L;
+  a = (unsigned long)a + (autotest(a) ? autobase : staticbase);
+  b = (unsigned long)b + (autotest(b) ? autobase : staticbase);
+# endif
 #else
      char **ja, **jb;
      int *nn;
diff -urNad cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cscald.c cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cscald.c
--- cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cscald.c	2006-03-24 15:36:37.723420777 -0500
+++ cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cscald.c	2006-03-24 15:51:18.796348318 -0500
@@ -74,6 +74,24 @@
 /*    printf ("cscald - *fptr,ptr,jumpad_ are: %p %p %p %p\n", *fptr, ptr, jumpad_); */
    long p[16];
    int  count;  for ( count=0; count<16; count++ )  p[count] = pin[count];
+
+/* See relevant comments in cstrcmp.c regarding this hideous hack */
+# if defined (__ia64__) || defined (__alpha__)
+#  if defined (__ia64__)
+#   define autotest(_var) ((unsigned long)(_var) > 0x80000000)
+#  else /* __alpha__ */
+#   define autotest(_var) ((unsigned long)(_var) < 0x20000000)
+#  endif
+  static int dummy = 0;
+  unsigned long staticbase = ((unsigned long)&dummy) & 0xffffffff00000000L;
+  unsigned long autobase = ((unsigned long)&count) & 0xffffffff00000000L;
+  for (count = 0; count < 16; count++)
+    if (p[count])
+      if (autotest(p[count]))
+	p[count] += autobase;
+      else
+	p[count] += staticbase;  
+# endif
 #else
  double (type_of_call *(*name)) ();
  int *n;
diff -urNad cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cscali.c cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cscali.c
--- cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cscali.c	2006-03-24 15:36:37.723420777 -0500
+++ cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cscali.c	2006-03-24 15:51:05.440199025 -0500
@@ -67,6 +67,24 @@
 /*    printf ("cscali - *fptr,ptr,jumpad_ are: %p %p %p %p\n", *fptr, ptr, jumpad_); */
    long p[16];
    int  count;  for ( count=0; count<16; count++ )  p[count] = pin[count];
+
+/* See relevant comments in cstrcmp.c regarding this hideous hack */
+# if defined (__ia64__) || defined (__alpha__)
+#  if defined (__ia64__)
+#   define autotest(_var) ((unsigned long)(_var) > 0x80000000)
+#  else /* __alpha__ */
+#   define autotest(_var) ((unsigned long)(_var) < 0x20000000)
+#  endif
+  static int dummy = 0;
+  unsigned long staticbase = ((unsigned long)&dummy) & 0xffffffff00000000L;
+  unsigned long autobase = ((unsigned long)&count) & 0xffffffff00000000L;
+  for (count = 0; count < 16; count++)
+    if (p[count])
+      if (autotest(p[count]))
+        p[count] += autobase;
+      else
+        p[count] += staticbase;
+# endif
 #else
  int (type_of_call *(*name)) ();
  int *n;
diff -urNad cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cscalr.c cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cscalr.c
--- cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cscalr.c	2006-03-24 15:36:37.724420566 -0500
+++ cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cscalr.c	2006-03-24 15:50:47.519024096 -0500
@@ -89,6 +89,24 @@
    long p[16];
    int  count;  for ( count=0; count<16; count++ )  p[count] = pin[count];
    double r;
+
+/* See relevant comments in cstrcmp.c regarding this hideous hack */
+# if defined (__ia64__) || defined (__alpha__)
+#  if defined (__ia64__)
+#   define autotest(_var) ((unsigned long)(_var) > 0x80000000)
+#  else /* __alpha__ */
+#   define autotest(_var) ((unsigned long)(_var) < 0x20000000)
+#  endif
+  static int dummy = 0;
+  unsigned long staticbase = ((unsigned long)&dummy) & 0xffffffff00000000L;
+  unsigned long autobase = ((unsigned long)&count) & 0xffffffff00000000L;
+  for (count = 0; count < 16; count++)
+    if (p[count])
+      if (autotest(p[count]))
+        p[count] += autobase;
+      else
+        p[count] += staticbase;
+# endif
 #else
  float (type_of_call *(*name)) ();
  int *n;
diff -urNad cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cstrcmp.c cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cstrcmp.c
--- cernlib-2005.05.09.dfsg~/src/pawlib/comis/deccc/cstrcmp.c	2006-03-24 15:36:37.724420566 -0500
+++ cernlib-2005.05.09.dfsg/src/pawlib/comis/deccc/cstrcmp.c	2006-03-24 15:36:45.236828642 -0500
@@ -42,6 +42,27 @@
  * using the CERNLIB_QMLXIA64 cpp flag (H. Vogt - Sep 2005)
  */
 
+/* For Itanium and Alpha, the situation is even worse.  Itanium architecture
+ * has the data section starts at 0x6000000000000000.  The stack is
+ * supposed to be between 0x80...0 and 0xa0...0 starting at the high end
+ * and growing downwards, although on a test machine (merulo.debian.org)
+ * it seemed instead to start at 0x6000100000000000 and grow downwards.
+ * The addresses we actually get are truncated to the lowest 32 bits,
+ * so we assume that those greater than 0x80000000 are in the stack.
+ *
+ * Constant strings are in the text section starting at 0x40...0; we hope
+ * this function doesn't receive any.
+ *
+ * On Alpha, on the other hand, I couldn't find any docs for the Linux
+ * segmentation for virtual memory.  Judging by a test machine
+ * (escher.debian.org), the data section starts slightly above 0x120010000.
+ * On the other hand the stack grows downward from 0x120000000.  Here it
+ * seems safe to suppose that the variable is in the stack if the uint32
+ * truncated address received is less than 0x20000000.
+ *
+ * -- Kevin McCarty
+ */
+
 #if defined(CERNLIB_QMLXIA64)
      int *ja, *jb;
      int *na, *nb;
@@ -56,6 +77,18 @@
     {
       a=*jb; b=*ja; la=*nb; lb=*na; k=-1;
      }
+# if defined (__ia64__) || defined (__alpha__)
+#  if defined (__ia64__)
+#   define autotest(_var) ((unsigned long)(_var) > 0x80000000)
+#  else /* __alpha__ */
+#   define autotest(_var) ((unsigned long)(_var) < 0x20000000)
+#  endif
+  static int dummy = 0;
+  unsigned long staticbase = ((unsigned long)&dummy) & 0xffffffff00000000L;
+  unsigned long autobase = ((unsigned long)&i) & 0xffffffff00000000L;
+  a = (unsigned long)a + (autotest(a) ? autobase : staticbase);
+  b = (unsigned long)b + (autotest(b) ? autobase : staticbase);
+# endif
 #else
      char **ja, **jb;
      int *na, *nb;


--- NEW FILE paw-305-use-POWERPC-not-PPC-as-test.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 305-use-POWERPC-not-PPC-as-test.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Since patch 304 changed the meaning of CERNLIB_PPC to a mere endianness
## DP: test, we now use CERNLIB_POWERPC to mean actually checking for a PowerPC
## DP: processor; fix the three occurences of this in Imakefiles.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/paw/code/Imakefile /tmp/dpep.fQy2EP/cernlib-2005.05.09/src/pawlib/paw/code/Imakefile
--- cernlib-2005.05.09/src/pawlib/paw/code/Imakefile	1998-09-25 05:33:51.000000000 -0400
+++ /tmp/dpep.fQy2EP/cernlib-2005.05.09/src/pawlib/paw/code/Imakefile	2005-06-09 10:50:47.068482917 -0400
@@ -56,7 +56,7 @@
 
 SubdirLibraryTarget(NullParameter,NullParameter)
 
-#if defined(CERNLIB_LINUX) && defined(CERNLIB_PPC)
+#if defined(CERNLIB_LINUX) && defined(CERNLIB_POWERPC)
 SpecialFortranLibObjectRule(pawins,pawins,-O0,NullParameter)
 #endif
 
diff -urNad cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile /tmp/dpep.fQy2EP/cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile
--- cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile	1999-09-14 05:20:08.000000000 -0400
+++ /tmp/dpep.fQy2EP/cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile	2005-06-09 10:51:15.807396176 -0400
@@ -46,7 +46,7 @@
 
 SubdirLibraryTarget(NullParameter,NullParameter)
 
-#if defined(CERNLIB_LINUX) && defined(CERNLIB_PPC)
+#if defined(CERNLIB_LINUX) && defined(CERNLIB_POWERPC)
 SpecialObjectRule(archive/qp_execute.o,qp_execute.c archive/qp_execute.d,-O0 -o $@)
 SpecialObjectRule(debug/qp_execute.o,qp_execute.c debug/qp_execute.d,-O0 -o $@)
 SpecialObjectRule(shared/qp_execute.o,qp_execute.c shared/qp_execute.d,-O0 -o $@)


--- NEW FILE paw-308-use-canonical-cfortran-location.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 308-use-canonical-cfortran-location.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: All code compiled at Cernlib build-time should look for cfortran.h
## DP: at <cfortran/cfortran.h>.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/paw/testsuite/tuple/tuple.c /tmp/dpep.d3syqe/cernlib-2005.05.09/src/pawlib/paw/testsuite/tuple/tuple.c
--- cernlib-2005.05.09/src/pawlib/paw/testsuite/tuple/tuple.c	1996-04-17 10:46:29.000000000 -0400
+++ /tmp/dpep.d3syqe/cernlib-2005.05.09/src/pawlib/paw/testsuite/tuple/tuple.c	2005-06-09 13:14:58.654908060 -0400
@@ -16,7 +16,7 @@
 #include	<float.h>
 
 
-#include	"cfortran.h"
+#include	<cfortran/cfortran.h>
 
 /* #include	"packlib.h" */
 #include	"hbook_interface.h"


--- NEW FILE paw-313-comis-preserves-filename-case.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 313-comis-preserves-filename-case.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Have COMIS preserve filename case when interpreting FORTRAN code.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/paw/code/pawint3.F /tmp/dpep.GROFhd/cernlib-2005.05.09/src/pawlib/paw/code/pawint3.F
--- cernlib-2005.05.09/src/pawlib/paw/code/pawint3.F	1999-05-20 03:37:18.000000000 -0400
+++ /tmp/dpep.GROFhd/cernlib-2005.05.09/src/pawlib/paw/code/pawint3.F	2005-06-09 15:23:49.276738602 -0400
@@ -140,7 +140,7 @@
       CHUTIT = ' '
 *
       IF (IPIAF.EQ.0) THEN
-         CALL KUOPEN(10,'PAW.METAFILE','UNKNOWN',ISTAT)
+         CALL KUOPEN(10,'paw.metafile','UNKNOWN',ISTAT)
 #if (defined(CERNLIB_IBM))&&(!defined(CERNLIB_IBMMVS))
          CALL HERMES(19)
          CALL VMCMS('FILEDEF 19 DISK GKSERROR OUTPUT A',IRET)


--- NEW FILE paw-701-patch-hbook-comis-Imakefiles.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 701-patch-hbook-comis-Imakefiles.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix up makefiles after moving hkfill.F and hkf1q.F in the other
## DP: 701 dpatch (a shell script).

@DPATCH@
diff -urNad cernlib-2005.05.09.dfsg~/src/pawlib/comis/code/Imakefile cernlib-2005.05.09.dfsg/src/pawlib/comis/code/Imakefile
--- cernlib-2005.05.09.dfsg~/src/pawlib/comis/code/Imakefile	2005-12-07 14:59:22.782783593 -0500
+++ cernlib-2005.05.09.dfsg/src/pawlib/comis/code/Imakefile	2005-12-07 14:59:31.519940694 -0500
@@ -37,7 +37,8 @@
 	csspar.F cssubr.F cssvpt.F cstadv.F cstarr.F csterr.F cstext.F \ @@\
 	cstfrf.F cstinf.F cstlgb.F cstlog.F cstpar.F cstran.F cstrer.F \ @@\
 	cstypar.F cstype.F csubad.F csunam.F csundf.F csxpar.F \ @@\
-	mcline.F mcsident.F
+	mcline.F mcsident.F \ @@\
+	hkfill.F hkf1q.F /* moved here from src/packlib/hbook/code */
 
 #if defined(CERNLIB_PAW)
 SRCS_F := $(SRCS_F) cspawi.F cskuix.F cktoiv.F cspawv.F csmkvd.F \ @@\


--- NEW FILE paw-801-non-optimized-rule-uses-fPIC-g.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 801-non-optimized-rule-uses-fPIC-g.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Ensure that special rules for creating non-optimized object files
## DP: use -fPIC for files that go into shared libs, and -g for all files.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/paw_motif/fmotif/Imakefile /tmp/dpep.gResDB/cernlib-2005.05.09/src/paw_motif/fmotif/Imakefile
--- cernlib-2005.05.09/src/paw_motif/fmotif/Imakefile	1996-09-23 10:20:46.000000000 -0400
+++ /tmp/dpep.gResDB/cernlib-2005.05.09/src/paw_motif/fmotif/Imakefile	2005-06-09 10:37:55.631538119 -0400
@@ -3,7 +3,7 @@
 	plotisto.F pmhist.F pminit.F show_chain.F
 
 #ifdef CERNLIB_LINUX
-FORTRANOPTIONS = -fno-backslash  $(FORTRANSAVEOPTION) -fno-second-underscore
+FORTRANOPTIONS = -g -fno-backslash  $(FORTRANSAVEOPTION) -fno-second-underscore
 #endif
 
 SubdirLibraryTarget(NullParameter,NullParameter)
diff -urNad cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile /tmp/dpep.gResDB/cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile
--- cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile	1999-09-14 05:20:08.000000000 -0400
+++ /tmp/dpep.gResDB/cernlib-2005.05.09/src/pawlib/paw/ntuple/Imakefile	2005-06-09 10:40:47.421285771 -0400
@@ -46,8 +46,8 @@
 
 SubdirLibraryTarget(NullParameter,NullParameter)
 
-#if defined(CERNLIB_LINUX) && defined(CERNLIB_POWERPC)
-SpecialObjectRule(archive/qp_execute.o,qp_execute.c archive/qp_execute.d,-O0 -o $@)
-SpecialObjectRule(debug/qp_execute.o,qp_execute.c debug/qp_execute.d,-O0 -o $@)
-SpecialObjectRule(shared/qp_execute.o,qp_execute.c shared/qp_execute.d,-O0 -o $@)
+#if defined(CERNLIB_LINUX)
+SpecialObjectRule(archive/qp_execute.o,qp_execute.c archive/qp_execute.d,-O0 -g -o $@)
+SpecialObjectRule(debug/qp_execute.o,qp_execute.c debug/qp_execute.d,-O0 -g -o $@)
+SpecialObjectRule(shared/qp_execute.o,qp_execute.c shared/qp_execute.d,-O0 -g -fPIC -o $@)
 #endif


--- NEW FILE paw-803-link-binaries-dynamically.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 803-link-binaries-dynamically.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Link binaries dynamically against Cern libraries.

@DPATCH@
diff -urNad cernlib-2005.05.09/src/pawlib/paw/programs/Imakefile /tmp/dpep.E9pQlc/cernlib-2005.05.09/src/pawlib/paw/programs/Imakefile
--- cernlib-2005.05.09/src/pawlib/paw/programs/Imakefile	2005-06-13 15:26:19.418526524 -0400
+++ /tmp/dpep.E9pQlc/cernlib-2005.05.09/src/pawlib/paw/programs/Imakefile	2005-06-13 15:27:38.102678258 -0400
@@ -20,7 +20,7 @@
 InstallScript(paw,$(CERN_BINDIR))
 
 #if defined (CERNLIB_UNIX) && !defined(CERNLIB_WINNT)
-CernlibFortranProgramTarget(pawX11,0pamain.o,NullParameter,NullParameter,pawlib graflib/X11 packlib mathlib kernlib)
+CernlibFortranProgramTarget(pawX11,0pamain.o,NullParameter,NullParameter,-G X11 pawlib)
 
 InstallProgram(pawX11,$(CERN_BINDIR))
 
@@ -34,7 +34,7 @@
 /* This is a gmake ifeq, not a Imake/cpp #if... ! */
 ifeq ($(DO_PAW_PP),YES)
 
-CernlibFortranProgramTarget(paw++,0pamainm.o,NullParameter,NullParameter,pawlib graflib/Motif packlib mathlib kernlib)
+CernlibFortranProgramTarget(paw++,0pamainm.o,NullParameter,NullParameter,-G Motif pawlib)
 
 InstallProgram(paw++,$(CERN_BINDIR))
 


--- NEW FILE paw-804-workaround-for-comis-mdpool-struct-location.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 804-workaround-for-comis-mdpool-struct-location.dpatch by  <kmccarty at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Hack to workaround Comis not liking it when code has a negative
## DP: offset from the mdpool struct (as is the case when using shared
## DP: libraries on some arches).

@DPATCH@
diff -urNad cernlib-2005.05.09/src/cfortran/Examples/pamain.c /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/cfortran/Examples/pamain.c
--- cernlib-2005.05.09/src/cfortran/Examples/pamain.c	2002-09-12 12:05:18.000000000 -0400
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/cfortran/Examples/pamain.c	2005-06-11 09:59:51.875449396 -0400
@@ -2,6 +2,7 @@
 #include <cfortran.h>
 #include <paw.h>
 #include <kuip.h>
+#include <comis/mdpool.h>
 
 #define PAWC_SIZE 9000000
 
diff -urNad cernlib-2005.05.09/src/pawlib/comis/comis/cspar.inc /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/cspar.inc
--- cernlib-2005.05.09/src/pawlib/comis/comis/cspar.inc	2000-05-30 09:53:58.000000000 -0400
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/cspar.inc	2005-06-11 09:59:51.876449180 -0400
@@ -15,7 +15,9 @@
 *
 * cspar.inc
 *
-        PARAMETER (LHP=50006, KON1=17694720, KON2=KON1
+#include "comis/mdsize.h"
+
+        PARAMETER (LHP=MDSIZE, KON1=17694720, KON2=KON1
      +, KON3=2**16, LRECU=8,NRECU=5,MLRECU=NRECU*LRECU
      +, MXRECU=MLRECU-LRECU
      1,      LASTK=2000,LSSTK=50,KLENID=32
diff -urNad cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.h /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.h
--- cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.h	1969-12-31 19:00:00.000000000 -0500
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.h	2004-06-30 21:54:11.000000000 -0400
@@ -0,0 +1,33 @@
+#ifndef _MDPOOL_H
+#define _MDPOOL_H
+
+/* mdpool.h */
+
+/* #include <comis/mdpool.h> or <comis/mdpool.inc> in one source code file of
+ * your executable program dynamically linked against libpaw
+ * so that MDPOOL is defined in your executable.  This is
+ * necessary for proper functioning of the COMIS interpreter when
+ * dynamically linked.
+ */
+
+/* define MDSIZE: */
+#include <comis/mdsize.h>
+
+#include <cfortran.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+  int iq[MDSIZE];
+} mdpool_def;
+
+#define MDPOOL COMMON_BLOCK(MDPOOL, mdpool)
+COMMON_BLOCK_DEF(mdpool_def, MDPOOL);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _MDPOOL_H */
diff -urNad cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.inc /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.inc
--- cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.inc	1996-02-26 12:16:34.000000000 -0500
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/mdpool.inc	2005-06-11 09:59:51.876449180 -0400
@@ -12,6 +12,8 @@
 *
 * mdpool.inc
 *
+#include "comis/cspar.inc"
+
       COMMON/MDPOOL/IQ(LHP)
       INTEGER ISEM(LHP),KD(LHP),IDA(LHP),KD1(99),KD2(99),KD3(99)
       EQUIVALENCE (IQ,ISEM),(IQ,KD),(IQ,IDA)
diff -urNad cernlib-2005.05.09/src/pawlib/comis/comis/mdsize.h /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/mdsize.h
--- cernlib-2005.05.09/src/pawlib/comis/comis/mdsize.h	1969-12-31 19:00:00.000000000 -0500
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/comis/mdsize.h	2004-06-30 21:54:11.000000000 -0400
@@ -0,0 +1,6 @@
+#ifndef _MDSIZE_H
+#define _MDSIZE_H
+
+#define MDSIZE 50006
+
+#endif
diff -urNad cernlib-2005.05.09/src/pawlib/comis/deccc/csallo.c /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/deccc/csallo.c
--- cernlib-2005.05.09/src/pawlib/comis/deccc/csallo.c	1999-11-15 08:36:24.000000000 -0500
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/comis/deccc/csallo.c	2005-06-11 09:59:51.875449396 -0400
@@ -39,21 +39,20 @@
 /*-- Author :*/
 
 #include <cfortran/cfortran.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "comis/mdsize.h"
 
 typedef struct {
-    int iq[6];
+    int iq[MDSIZE]; /* instead of int iq[6] */
 } mdpool_def;
 
 #define MDPOOL COMMON_BLOCK(MDPOOL,mdpool)
-COMMON_BLOCK_DEF(mdpool_def,MDPOOL);
+extern COMMON_BLOCK_DEF(mdpool_def,MDPOOL);
 
-unsigned long iqpntr = (unsigned long)MDPOOL.iq;
+unsigned long iqpntr = 0;
 
 
-#ifdef CERNLIB_WINNT
-# include <stdlib.h>
-#endif
-
 #if defined(CERNLIB_QX_SC)
 int type_of_call csallo_(lenb)
 #endif
@@ -65,11 +64,31 @@
 #endif
  int *lenb;
 {
-  long lpntr;
+  unsigned long lpntr;
   int pntr; 
 
+  if (! iqpntr)
+    iqpntr = (unsigned long)MDPOOL.iq;
   lpntr= (long)( malloc(*lenb) );
-  pntr=lpntr - iqpntr;
+  if (! lpntr) {
+    fprintf(stderr,
+	    "CSALLO: not enough dynamic memory to allocate %d bytes\n", *lenb);
+    exit(EXIT_FAILURE);
+  }
+
+  pntr = (long)lpntr - (long)iqpntr;
+  if (pntr < 0) {
+    fprintf(stderr, "CSALLO: heap below bss?!");
+#if defined (CERNLIB_DEBIAN)
+    fprintf(stderr, "\n"
+"See the file /usr/share/doc/libpawlib2-dev/README.Debian for more information.\n"
+"If it does not help to solve this problem, please file a bug report against\n"
+"the libpawlib2 package, including the source code of your executable.\n");
+#else
+    fprintf(stderr, "  Try linking against pawlib statically.\n");
+#endif
+    exit(EXIT_FAILURE);
+  }
   return pntr;
 }
 
diff -urNad cernlib-2005.05.09/src/pawlib/paw/paw/pawsiz.inc /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/paw/paw/pawsiz.inc
--- cernlib-2005.05.09/src/pawlib/paw/paw/pawsiz.inc	1996-03-01 11:50:06.000000000 -0500
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/pawlib/paw/paw/pawsiz.inc	2005-06-11 09:59:51.875449396 -0400
@@ -28,5 +28,9 @@
 #include "paw/pawsmall.inc"
 #endif
 
+C      Include this file so that MDPOOL/IQ is present in pawX11 and
+C      paw++ dynamically linked executables.
+C      -- Kevin McCarty, for Debian, 1 Nov 2003
+#include "comis/mdpool.inc"
 
 #endif
diff -urNad cernlib-2005.05.09/src/paw_motif/paw/pawsiz.inc /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/paw_motif/paw/pawsiz.inc
--- cernlib-2005.05.09/src/paw_motif/paw/pawsiz.inc	1996-03-01 11:50:06.000000000 -0500
+++ /tmp/dpep.nHIc6F/cernlib-2005.05.09/src/paw_motif/paw/pawsiz.inc	2005-06-11 09:59:51.875449396 -0400
@@ -28,5 +28,9 @@
 #include "paw/pawsmall.inc"
 #endif
 
+C      Include this file so that MDPOOL/IQ is present in pawX11 and
+C      paw++ dynamically linked executables.
+C      -- Kevin McCarty, for Debian, 1 Nov 2003
+#include "comis/mdpool.inc"
 
 #endif


--- NEW FILE paw-806-bump-mathlib-and-dependents-sonames.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 806-bump-mathlib-and-dependents-sonames.dpatch by  <kmccarty at 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/paw_motif/Imakefile cernlib-2005.05.09.dfsg/src/paw_motif/Imakefile
--- cernlib-2005.05.09.dfsg~/src/paw_motif/Imakefile	2005-11-23 15:49:19.724161945 +0000
+++ cernlib-2005.05.09.dfsg/src/paw_motif/Imakefile	2005-11-23 15:49:27.432512073 +0000
@@ -1,6 +1,8 @@
 DoIncludePackage(paw)
 #include "paw/pilot.h"
 
+export LIB_SONAME := 2
+
 #define IHaveSubdirs
 #define PassCDebugFlags
 
diff -urNad cernlib-2005.05.09.dfsg~/src/pawlib/Imakefile cernlib-2005.05.09.dfsg/src/pawlib/Imakefile
--- cernlib-2005.05.09.dfsg~/src/pawlib/Imakefile	2005-11-23 15:49:19.724161945 +0000
+++ cernlib-2005.05.09.dfsg/src/pawlib/Imakefile	2005-11-23 15:49:27.432512073 +0000
@@ -2,6 +2,7 @@
 #define IHaveSubdirs
 #define PassCDebugFlags
 
+export LIB_SONAME := 2
 
 LIBDIRS= comis paw sigma
 SUBDIRS= $(LIBDIRS)

paw_2.14.04-2.diff:

***** Error reading new file: [Errno 2] No such file or directory: 'paw_2.14.04-2.diff'

Index: 307-use-canonical-cfortran.dpatch
===================================================================
RCS file: /cvs/extras/rpms/cernlib/devel/307-use-canonical-cfortran.dpatch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- 307-use-canonical-cfortran.dpatch	11 Apr 2006 22:45:34 -0000	1.3
+++ 307-use-canonical-cfortran.dpatch	1 Sep 2006 13:15:22 -0000	1.4
@@ -8,7 +8,7 @@
 @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	2005-12-27 11:33:41.183131708 -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
@@ -39,7 +39,19 @@
  
  o f2c
  [Thanks to Dario Autiero for pointing out the following.]
-@@ -643,7 +644,7 @@
+@@ -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
@@ -48,7 +60,7 @@
     #define ASSIGNFLOAT(x,y)	*(int *)(&x) = y
     #endif
  
-@@ -874,7 +875,7 @@
+@@ -874,7 +880,7 @@
  works everywhere and would seem to be an obvious choice.
  
  
@@ -57,7 +69,7 @@
  
  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 +1836,7 @@
+@@ -1835,7 +1841,7 @@
  
  Unlike all other C compilers supported by cfortran.h,
  'gcc -traditional' promotes to double all functions returning float
@@ -66,7 +78,7 @@
  
  /* m.c */
  #include <stdio.h>
-@@ -2017,8 +2018,9 @@
+@@ -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
@@ -80,14 +92,14 @@
    (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	2005-12-19 08:29:41.000000000 -0500
++++ 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 at desy.de                 1990 - 2002. */
  
-@@ -11,6 +11,38 @@
+@@ -11,11 +11,71 @@
     MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
  */
  
@@ -97,6 +109,7 @@
 + * DM  = Doug Mink
 + * LEB = Lee E Brotzman
 + * MR  = Martin Reinecke
++ * WDP = William D Pence
 + * -- Kevin McCarty, for Debian (19 Dec. 2005) */
 +
 +/*******
@@ -121,22 +134,56 @@
 +		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
-@@ -75,7 +107,8 @@
+ 
+- */
++*/
++
++/* 
++   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 */
-+#if defined(CLIPPERFortran) || defined(pgiFortran) || defined(__INTEL_COMPILER) || defined(INTEL_COMPILER)
++/* 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 +123,27 @@
+@@ -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
@@ -164,7 +211,7 @@
  #if defined(__hpux)             /* 921107: Use __hpux instead of __hp9000s300 */
  #define       hpuxFortran       /*         Should also allow hp9000s7/800 use.*/
  #endif
-@@ -131,6 +185,7 @@
+@@ -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:\
@@ -172,7 +219,14 @@
      - 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.                                  \
-@@ -151,7 +206,8 @@
+@@ -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 \
@@ -182,7 +236,7 @@
  /* Compiler must throw us out at this point! */
  #endif
  #endif
-@@ -164,7 +220,8 @@
+@@ -164,7 +251,8 @@
  
  /* Throughout cfortran.h we use: UN = Uppercase Name.  LN = Lowercase Name.   */
  
@@ -192,7 +246,7 @@
  #define CFC_(UN,LN)            _(LN,_)      /* Lowercase FORTRAN symbols.     */
  #define orig_fcallsc(UN,LN)    CFC_(UN,LN)
  #else 
-@@ -268,7 +325,8 @@
+@@ -268,7 +356,8 @@
  #endif
  
  #ifndef apolloFortran
@@ -202,7 +256,7 @@
  #define CF_NULL_PROTO
  #else                                         /* HP doesn't understand #elif. */
  /* Without ANSI prototyping, Apollo promotes float functions to double.    */
-@@ -512,7 +570,7 @@
+@@ -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))
  
@@ -211,7 +265,7 @@
  #define _NUM_ELEMS      -1
  #define _NUM_ELEM_ARG   -2
  #define NUM_ELEMS(A)    A,_NUM_ELEMS
-@@ -538,9 +596,14 @@
+@@ -538,9 +627,14 @@
    if (i==(unsigned)num_term) break;
    else strv += elem_len-i;
  }
@@ -227,23 +281,23 @@
  /*-------------------------------------------------------------------------*/
  
  /*           UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS       */
-@@ -1318,6 +1381,7 @@
+@@ -1318,6 +1412,7 @@
  #define     INTVVVVVVV_cfTYPE int
  #define LOGICALVVVVVVV_cfTYPE int
  #define    LONGVVVVVVV_cfTYPE long
-+#define LONGLONGVVVVVVV_cfTYPE long long   /* added by MR December 2005 */
++#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 +1389,7 @@
+@@ -1325,6 +1420,7 @@
  #define           PINT_cfTYPE int
  #define       PLOGICAL_cfTYPE int
  #define          PLONG_cfTYPE long
-+#define      PLONGLONG_cfTYPE long long  /* added by MR December 2005 */
++#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 +1407,7 @@
+@@ -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)
@@ -251,7 +305,7 @@
  #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 +1415,7 @@
+@@ -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)
@@ -259,7 +313,7 @@
  #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 +1459,13 @@
+@@ -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)
@@ -273,11 +327,11 @@
  #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 +1525,12 @@
+@@ -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)
++#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
@@ -286,7 +340,7 @@
  #else				   	                   
  #define     FLOAT_cfPU(A)   CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
  #endif				   	                   
-@@ -1589,6 +1668,7 @@
+@@ -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)
@@ -294,7 +348,7 @@
  #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 +1712,13 @@
+@@ -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)
@@ -308,7 +362,7 @@
  #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 +1732,7 @@
+@@ -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)
@@ -316,7 +370,7 @@
  #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 +2045,7 @@
+@@ -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
@@ -324,7 +378,7 @@
  #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 +2053,7 @@
+@@ -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
@@ -332,7 +386,7 @@
  #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 +2091,12 @@
+@@ -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
@@ -345,7 +399,7 @@
  #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 +2109,7 @@
+@@ -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
@@ -353,18 +407,18 @@
  #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 +2180,18 @@
+@@ -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) long long FCALLSC_QUALIFIER fcallsc(UN,LN)( /* added by MR December 2005 */
++#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)
++#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
@@ -373,11 +427,11 @@
  #ifdef vmsFortran
  #define  STRING_cfFZ(UN,LN) void  FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
  #else
-@@ -2104,7 +2207,12 @@
+@@ -2104,7 +2238,12 @@
  #endif
  #else
  #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-+#if defined (f2cFortran)
++#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
@@ -386,11 +440,11 @@
  #else
  #define   FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
  #endif
-@@ -2118,13 +2226,19 @@
+@@ -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)
++#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
@@ -406,7 +460,7 @@
  #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 +2301,7 @@
+@@ -2187,6 +2332,7 @@
  #define LOGICAL_cfI  return C2FLOGICAL(A0);
  #endif
  #define    LONG_cfI  return A0;


Index: cernlib.spec
===================================================================
RCS file: /cvs/extras/rpms/cernlib/devel/cernlib.spec,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- cernlib.spec	31 Aug 2006 21:59:14 -0000	1.33
+++ cernlib.spec	1 Sep 2006 13:15:22 -0000	1.34
@@ -1,6 +1,6 @@
 Name:          cernlib
 Version:       2005
-Release:       22%{?dist}
+Release:       23%{?dist}
 Summary:       General purpose CERN library and associated binaries
 Group:         Development/Libraries
 # As explained in the cernlib on debian FAQ, cfortran can be considered LGPL.
@@ -85,103 +85,137 @@
 # GPL incompatible licences from upstream sources
 Source200: cernlib-remove-deadpool
 Source201: cernlib-deadpool.txt
+# copyright.in from the non split debian patchset
+Source203: cernlib-debian-copyright.in
 
-# debian patchset
-Patch0: cernlib_2005.05.09.dfsg-6.diff
+# debian patchsets
+Patch100001: cernlib_2005.dfsg-1.diff 
+Patch100002: paw_2.14.04-2.diff
+Patch100003: mclibs_2005.dfsg-1.diff
+Patch100004: geant321_3.21.14.dfsg-1.diff
 # change file to directory to DATADIR
 Patch1100: cernlib-enforce-FHS.diff
-Patch1: 001-fix-missing-fluka.dpatch
+Patch1: geant321-001-fix-missing-fluka.dpatch
+# mclibs debian split also remove other packages from LIBDIRS
 Patch2: 002-fix-missing-mclibs.dpatch
-Patch3: 003-geant-dummy-functions.dpatch
-Patch100: 100-fix-isajet-manual-corruption.dpatch
-Patch101: 101-undefine-PPC.dpatch
-Patch102: 102-dont-optimize-some-code.dpatch
-Patch103: 103-ignore-overly-long-macro-in-gen.h.dpatch
-Patch104: 104-fix-undefined-insertchar-warning.dpatch
-Patch105: 105-fix-obsolete-xmfontlistcreate-warning.dpatch 
-Patch106: 106-fix-paw++-menus-in-lesstif.dpatch
-Patch107: 107-define-strdup-macro-safely.dpatch
-Patch108: 108-quote-protect-comis-script.dpatch
+Patch3: geant321-003-geant-dummy-functions.dpatch
+Patch100: mclibs-100-fix-isajet-manual-corruption.dpatch
+Patch101: mclibs-101-undefine-PPC.dpatch
+Patch10201: cernlib-102-dont-optimize-some-code.dpatch
+Patch10202: paw-102-dont-optimize-some-code.dpatch
+Patch10203: mclibs-102-dont-optimize-some-code.dpatch
+Patch103: cernlib-103-ignore-overly-long-macro-in-gen.h.dpatch
+Patch104: cernlib-104-fix-undefined-insertchar-warning.dpatch
+Patch10501: cernlib-105-fix-obsolete-xmfontlistcreate-warning.dpatch 
+Patch10502: paw-105-fix-obsolete-xmfontlistcreate-warning.dpatch 
+Patch106: cernlib-106-fix-paw++-menus-in-lesstif.dpatch
+Patch107: cernlib-107-define-strdup-macro-safely.dpatch
+Patch108: paw-108-quote-protect-comis-script.dpatch
 # not used as xsneut.dat is at the right place
 #Patch109: 109-fix-broken-xsneut95.dat-link.dpatch
-Patch110: 110-ignore-included-lapack-rule.dpatch
-Patch111: 111-fix-kuesvr-install-location.dpatch
-Patch112: 112-remove-nonexistent-prototypes-from-gen.h.dpatch
+Patch110: cernlib-110-ignore-included-lapack-rule.dpatch
+Patch111: cernlib-111-fix-kuesvr-install-location.dpatch
+Patch112: cernlib-112-remove-nonexistent-prototypes-from-gen.h.dpatch
 # a workaround for cups. Applied in doubt.
-Patch113: 113-cups-postscript-fix.dpatch
+Patch113: cernlib-113-cups-postscript-fix.dpatch
+# it is the same in all source packages...
 Patch114: 114-install-scripts-properly.dpatch
-Patch115: 115-rsrtnt64-goto-outer-block.dpatch
-Patch116: 116-fix-fconc64-spaghetti-code.dpatch
-Patch117: 117-fix-optimizer-bug-in-gphot.dpatch
-Patch200: 200-comis-allow-special-chars-in-path.dpatch
-Patch201: 201-update-kuip-helper-apps.dpatch
-Patch202: 202-fix-includes-in-minuit-example.dpatch
-Patch203: 203-compile-geant-with-ertrak.dpatch
-Patch204: 204-compile-isajet-with-isasrt.dpatch
-Patch205: 205-max-path-length-to-256.dpatch
-Patch206: 206-herwig-uses-DBLE-not-REAL.dpatch
-Patch207: 207-compile-temp-libs-with-fPIC.dpatch
+Patch115: cernlib-115-rsrtnt64-goto-outer-block.dpatch
+Patch116: cernlib-116-fix-fconc64-spaghetti-code.dpatch
+Patch117: geant321-117-fix-optimizer-bug-in-gphot.dpatch
+Patch118: cernlib-118-rename-mathlib-common-blocks.dpatch
+Patch200: paw-200-comis-allow-special-chars-in-path.dpatch
+Patch201: cernlib-201-update-kuip-helper-apps.dpatch
+Patch202: cernlib-202-fix-includes-in-minuit-example.dpatch
+Patch203: geant321-203-compile-geant-with-ertrak.dpatch
+Patch204: mclibs-204-compile-isajet-with-isasrt.dpatch
+Patch205: cernlib-205-max-path-length-to-256.dpatch
+Patch206: mclibs-206-herwig-uses-DBLE-not-REAL.dpatch
+Patch207: paw-207-compile-temp-libs-with-fPIC.dpatch
 # without that patch the binaries are linked with something like
 # libzftplib.a /builddir/build/BUILD/cernlib-2005/2005/build/packlib/cspack/programs/zftp/libzftplib.a
-Patch208: 208-fix-redundant-packlib-dependencies.dpatch
-Patch209: 209-ignore-unneeded-headers-in-kmutil.c.dpatch
+Patch208: cernlib-208-fix-redundant-packlib-dependencies.dpatch
+Patch209: cernlib-209-ignore-unneeded-headers-in-kmutil.c.dpatch
+# in debian split the patches are specific for paw geant and mclibs but
+# not cernlib. Here we keeep the cernlib one since it contains all the others
 Patch210: 210-improve-cfortran-header-files.dpatch
 # split in newer debian patchset
+# in debian split there is a common part at the beginning of the patch
 Patch2110: 211-fix-comis-on-amd64.dpatch
-Patch2111: 211-fix-comis-on-ia64-alpha.dpatch
-Patch300: 300-skip-duplicate-lenocc.dpatch
+Patch2111: paw-211-fix-comis-on-ia64-alpha.dpatch
+Patch300: cernlib-300-skip-duplicate-lenocc.dpatch
 # Use another approach, see cernlib-enforce-FHS
 # Patch33: 301-datafiles-comply-with-FHS.dpatch
 # use cernlib-gxint-script.diff instead and sed for paw and dzedit.script
 # Patch34: 302-scripts-comply-with-FHS.dpatch
-Patch303: 303-shadow-passwords-supported.dpatch
-Patch304: 304-update-Imake-config-files.dpatch
-Patch305: 305-use-POWERPC-not-PPC-as-test.dpatch
+Patch303: cernlib-303-shadow-passwords-supported.dpatch
+Patch304: cernlib-304-update-Imake-config-files.dpatch
+Patch30501: paw-305-use-POWERPC-not-PPC-as-test.dpatch
+Patch30502: mclibs-305-use-POWERPC-not-PPC-as-test.dpatch
 # the bug in /usr/include/assert.h seems to be present in FC-4. So a local
 # version is provided in that patch. Will have to look at newer glibc-headers
 # packages
+# it is the same in all packages in cernlib split
 Patch306: 306-patch-assert.h-for-makedepend.dpatch
+# it is the same in all packages in cernlib split
 Patch307: 307-use-canonical-cfortran.dpatch
-Patch308: 308-use-canonical-cfortran-location.dpatch
-Patch309: 309-define-dummy-herwig-routines.dpatch
-Patch310: 310-define-dummy-fowl-routines.dpatch
+Patch30801: cernlib-308-use-canonical-cfortran-location.dpatch
+Patch30802: paw-308-use-canonical-cfortran-location.dpatch
+Patch309: mclibs-309-define-dummy-herwig-routines.dpatch
+Patch310: mclibs-310-define-dummy-fowl-routines.dpatch
 # The zebra qnexte is a fake, removing it remove an unneeded dependency.
 # the other qnext don't seem to be the same code? They are duplicate symbols
 # anyway so one must be removed
-Patch311: 311-skip-duplicate-qnext.dpatch
-Patch312: 312-skip-duplicate-gamma.dpatch
+Patch311: cernlib-311-skip-duplicate-qnext.dpatch
+Patch312: mclibs-312-skip-duplicate-gamma.dpatch
 # It is a departure from upstream. Apply, but may revert if not agreed.  
-Patch313: 313-comis-preserves-filename-case.dpatch
-Patch314: 314-permit-using-regcomp-for-re_comp.dpatch
+Patch31301: cernlib-313-comis-preserves-filename-case.dpatch
+Patch31302: paw-313-comis-preserves-filename-case.dpatch
+Patch314: cernlib-314-permit-using-regcomp-for-re_comp.dpatch
+# first chunk of the patches are the same in the split cernlib
 Patch315: 315-fixes-for-MacOSX.dpatch
-Patch318: 318-additional-gcc-3.4-fixes.dpatch
+
+Patch318: cernlib-318-additional-gcc-3.4-fixes.dpatch
 # certainly not needed, but who knows?
-Patch319: 319-work-around-imake-segfaults.dpatch
+Patch319: cernlib-319-work-around-imake-segfaults.dpatch
+# debian not applied, nor distributed patch related with ifort
+Patch320: cernlib-320-support-ifort.dpatch
 
+# in cernlib debian split also remove other packages from LIBDIRS
 Patch700: 700-remove-kernlib-from-packlib-Imakefile.dpatch
-Patch701: 701-patch-hbook-comis-Imakefiles.dpatch
+Patch70101: cernlib-701-patch-hbook-comis-Imakefiles.dpatch
+Patch70102: paw-701-patch-hbook-comis-Imakefiles.dpatch
 Patch702: 702-patch-Imakefiles-for-packlib-mathlib.dpatch
 # I would have preferred not to move the motif code to toplevel...
+# in cernlib debian split also remove other packages from LIBDIRS
 Patch703: 703-patch-code_motif-packlib-Imakefiles.dpatch
-Patch704: 704-patch-code_kuip-higzcc-Imakefiles.dpatch
+Patch704: cernlib-704-patch-code_kuip-higzcc-Imakefiles.dpatch
 # I would have preferred not to move the motif code to toplevel...
+# in paw debian split also remove other packages from LIBDIRS
 Patch705: 705-patch-paw_motif-paw-Imakefiles.dpatch
 
-Patch800: 800-implement-shared-library-rules-in-Imake.dpatch
-Patch801: 801-non-optimized-rule-uses-fPIC-g.dpatch
+Patch800: cernlib-800-implement-shared-library-rules-in-Imake.dpatch
+Patch80101: cernlib-801-non-optimized-rule-uses-fPIC-g.dpatch
+Patch80102: paw-801-non-optimized-rule-uses-fPIC-g.dpatch
+# in cernlib debian split also remove other packages from LIBDIRS
+# otherwise patches are cleanly split
 Patch802: 802-create-shared-libraries.dpatch
 # in the original cernlib kxterm is built with the C compiler, which cause
 # a failure if compiled with the cernlib debian script as -lg2c isn't found. 
 # It is corrected in
-Patch803: 803-link-binaries-dynamically.dpatch
+Patch80301: cernlib-803-link-binaries-dynamically.dpatch
+Patch80302: paw-803-link-binaries-dynamically.dpatch
 # 803 depends on 
 # 208-fix-redundant-packlib-dependencies.dpatch
 
 # no idea about what this does
-Patch804: 804-workaround-for-comis-mdpool-struct-location.dpatch
-Patch805: 805-expunge-missing-mathlib-kernlib-symbols.dpatch 
+Patch804: paw-804-workaround-for-comis-mdpool-struct-location.dpatch
+Patch805: cernlib-805-expunge-missing-mathlib-kernlib-symbols.dpatch 
 # not needed but keep sync with debian, that'll avoid bumping sonames
-Patch806: 806-bump-mathlib-and-dependents-sonames.dpatch
+Patch80601: cernlib-806-bump-mathlib-and-dependents-sonames.dpatch
+Patch80602: paw-806-bump-mathlib-and-dependents-sonames.dpatch
+Patch80603: geant321-806-bump-mathlib-and-dependents-sonames.dpatch
+Patch80604: mclibs-806-bump-mathlib-and-dependents-sonames.dpatch
 
 # not applied in newer debian patchset
 Patch3006: 022-no-assign-string-literals
@@ -369,7 +403,10 @@
 %patch -P 1503
 
 
-%patch -p1
+%patch -P 100001 -p0
+%patch -P 100002 -p0
+%patch -P 100003 -p0
+%patch -P 100004 -p0 
 cd %{version}
 %patch -P 1100 -p2
 %patch -P 1 -p1
@@ -377,10 +414,13 @@
 %patch -P 3 -p1
 %patch -P 100 -p1
 %patch -P 101 -p1
-%patch -P 102 -p1
+%patch -P 10201 -p1
+%patch -P 10202 -p1
+%patch -P 10203 -p1
 %patch -P 103 -p1
 %patch -P 104 -p1
-%patch -P 105 -p1
+%patch -P 10501 -p1
+%patch -P 10502 -p1
 %patch -P 106 -p1
 %patch -P 107 -p1
 %patch -P 108 -p1
@@ -411,15 +451,18 @@
 #%patch -P 302 -p1
 %patch -P 303 -p1
 %patch -P 304 -p1
-%patch -P 305 -p1
+%patch -P 30501 -p1
+%patch -P 30502 -p1
 %patch -P 306 -p1
 %patch -P 307 -p1
-%patch -P 308 -p1
+%patch -P 30801 -p1
+%patch -P 30802 -p1
 %patch -P 309 -p1
 %patch -P 310 -p1
 %patch -P 311 -p1
 %patch -P 312 -p1
-%patch -P 313 -p1
+%patch -P 31301 -p1
+%patch -P 31302 -p1
 %patch -P 314 -p1
 %patch -P 315 -p1
 
@@ -429,6 +472,7 @@
 
 %patch -P 318 -p1
 %patch -P 319 -p1
+%patch -P 320 -p1
 
 # move kernlib out of packlib (debian 700-move-kernlib-to-top-level.sh.dpatch)
 mv src/packlib/kernlib src/kernlib
@@ -449,7 +493,8 @@
                 cp -p packlib/hbook/hbook/hcfast.inc pawlib/comis/hbook/
 popd
 
-%patch -P 701 -p1
+%patch -P 70101 -p1
+%patch -P 70102 -p1
 
 # Must create dirs before applying following patch. 
 # Corresponds with 702-fix-packlib-mathlib-circular-mess.sh.dpatch
@@ -518,9 +563,11 @@
 %patch -P 705 -p1
 
 %patch -P 800 -p1
-%patch -P 801 -p1
+%patch -P 80101 -p1
+%patch -P 80102 -p1
 %patch -P 802 -p1
-%patch -P 803 -p1
+%patch -P 80301 -p1
+%patch -P 80302 -p1
 
 # Shell script to link pawlib/comis/comis into the top-level include directory.
 # debian 804-link-to-comis-includes.sh.dpatch
@@ -530,7 +577,10 @@
 
 %patch -P 804 -p1
 %patch -P 805 -p1
-%patch -P 806 -p1
+%patch -P 80601 -p1
+%patch -P 80602 -p1
+%patch -P 80603 -p1
+%patch -P 80604 -p1
 
 %patch -P 1504 -p1
 %patch -P 1505 -p1
@@ -581,10 +631,10 @@
 cp %{SOURCE102} .
 cp %{SOURCE103} .
 
-# Regenerate the copyright file (from debian/rules)
-grep -v DEADPOOL_LIST_GOES_HERE debian/copyright.in > copyright
-sed -e 's/#.*//g' -e '/^[[:space:]]*$$/d' %{SOURCE200} | \
-                sort | uniq >> copyright
+# Regenerate the copyright file (from non split debian/rules)
+grep -v DEADPOOL_LIST_GOES_HERE %{SOURCE203} > debian-copyright
+sed -e 's/#.*//g' -e '/^[[:space:]]*$$/d' %{SOURCE201} | \
+    sort | uniq >> debian-copyright
 
 # copy xsneut.data in 2005/share/lib, where geant expects it to be
 # there is a link from 2005/lib
@@ -595,8 +645,8 @@
 
 # substitude the right defaults in the scripts
 sed -i -e 's:"/cern":"%{_libdir}/cernlib/":' -e 's:"pro":"%{version}":' \
-	src/scripts/paw src/scripts/cernlib src/graflib/dzdoc/dzedit/dzedit.script \
-	../patchy/ylist ../patchy/yindex
+   src/scripts/paw src/scripts/cernlib src/graflib/dzdoc/dzedit/dzedit.script \
+   ../patchy/ylist ../patchy/yindex
 
 # substitute version in gxint with the right version
 # substitute includedir in gxint to conform to FHS, and gxint.o to gxint.f
@@ -620,7 +670,7 @@
 sed -e 's:@PREFIX@:%{_prefix}:g' \
   -e 's:@LIBPREFIX@:%{_libdir}/cernlib/%{version}:g' \
   -e 's/-lg2c//' \
-  ../debian/add-ons/bin/cernlib.in > src/scripts/cernlib
+  ../cernlib-2005.dfsg/debian/add-ons/bin/cernlib.in > src/scripts/cernlib
 chmod 0755 src/scripts/cernlib
 
 # install mkdirhier which is needed to make directories
@@ -688,8 +738,8 @@
 rm -rf $RPM_BUILD_ROOT
 
 %{__install} -d -m755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
-%{__install} -m755 cernlib-%{version}.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
-%{__install} -m755 cernlib-%{version}.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
+%{__install} -m644 cernlib-%{version}.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
+%{__install} -m644 cernlib-%{version}.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
 
 %{__install} -d -m755 cfortran/Examples
 %{__install} -m644 %{version}/src/cfortran/Examples/*.c cfortran/Examples/
@@ -723,7 +773,7 @@
 # add links for cfortran header files in the top include directory
 pushd $RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}
 for file in *.h; do
-	%{__ln_s} ../$file cfortran/$file
+   %{__ln_s} ../$file cfortran/$file
 done
 %{__ln_s} gxint321.f gxint.f
 popd
@@ -731,10 +781,10 @@
 cd src
 # install include directories for the cernlib libraries
 base_include=$RPM_BUILD_ROOT%{_includedir}/cernlib/%{version}
-for dir in `cat ../../debian/add-ons/includelist.txt`; do
-	basedir=`basename $dir`
-	rm -rf $base_include/$basedir
-	cp -Rp $dir $base_include/
+for dir in `cat ../../*/debian/add-ons/includelist.txt`; do
+   basedir=`basename $dir`
+   rm -rf $base_include/$basedir
+   cp -Rp $dir $base_include/
 done
 
 %{__install} -d -m755 $RPM_BUILD_ROOT/etc/ld.so.conf.d
@@ -759,10 +809,10 @@
 %dir %{_libdir}/cernlib/%{version}/bin
 %{_libdir}/cernlib/%{version}/lib/*.so.*
 %{_datadir}/cernlib/
-%doc cernlib.README copyright
-%doc debian/debhelper/geant321.README.debian 
-%doc debian/debhelper/libpdflib804-2-dev.README.debian
-%doc debian/debhelper/montecarlo-base.README.debian
+%doc cernlib.README debian-copyright
+%doc geant321-3.21.14.dfsg/debian/debhelper/geant321.README.debian 
+%doc mclibs-2005.dfsg/debian/debhelper/libpdflib804-2-dev.README.debian
+%doc mclibs-2005.dfsg/debian/debhelper/montecarlo-base.README.debian
 
 # the utils and devel are separated to have the possibility to install
 # parallel versions of the library
@@ -816,7 +866,7 @@
 %{_bindir}/hepdb
 %{_bindir}/kxterm
 %{_bindir}/zftp
-%doc debian/debhelper/zftp.README.debian
+%doc cernlib-2005.dfsg/debian/debhelper/zftp.README.debian
 
 %files -n patchy
 %defattr(-,root,root,-)
@@ -849,6 +899,10 @@
 
 
 %changelog
+* Fri Sep  1 2006 Patrice Dumas <pertusus at free.fr> 2005-23
+- update to newer source split debian patchsets
+- don't set the exec bits on file installed in /etc/profile.d/
+
 * Thu Aug 31 2006 Patrice Dumas <pertusus at free.fr> - 2005-22
 - add -q to %%setup
 - rebuild against lesstif for FC6


--- 001-fix-missing-fluka.dpatch DELETED ---


--- 003-geant-dummy-functions.dpatch DELETED ---


--- 100-fix-isajet-manual-corruption.dpatch DELETED ---


--- 101-undefine-PPC.dpatch DELETED ---


--- 102-dont-optimize-some-code.dpatch DELETED ---


--- 103-ignore-overly-long-macro-in-gen.h.dpatch DELETED ---


--- 104-fix-undefined-insertchar-warning.dpatch DELETED ---


--- 105-fix-obsolete-xmfontlistcreate-warning.dpatch DELETED ---


--- 106-fix-paw++-menus-in-lesstif.dpatch DELETED ---


--- 107-define-strdup-macro-safely.dpatch DELETED ---


--- 108-quote-protect-comis-script.dpatch DELETED ---


--- 110-ignore-included-lapack-rule.dpatch DELETED ---


--- 111-fix-kuesvr-install-location.dpatch DELETED ---


--- 112-remove-nonexistent-prototypes-from-gen.h.dpatch DELETED ---


--- 113-cups-postscript-fix.dpatch DELETED ---


--- 115-rsrtnt64-goto-outer-block.dpatch DELETED ---


--- 116-fix-fconc64-spaghetti-code.dpatch DELETED ---


--- 117-fix-optimizer-bug-in-gphot.dpatch DELETED ---


--- 200-comis-allow-special-chars-in-path.dpatch DELETED ---


--- 201-update-kuip-helper-apps.dpatch DELETED ---


--- 202-fix-includes-in-minuit-example.dpatch DELETED ---


--- 203-compile-geant-with-ertrak.dpatch DELETED ---


--- 204-compile-isajet-with-isasrt.dpatch DELETED ---


--- 205-max-path-length-to-256.dpatch DELETED ---


--- 206-herwig-uses-DBLE-not-REAL.dpatch DELETED ---


--- 207-compile-temp-libs-with-fPIC.dpatch DELETED ---


--- 208-fix-redundant-packlib-dependencies.dpatch DELETED ---


--- 209-ignore-unneeded-headers-in-kmutil.c.dpatch DELETED ---


--- 211-fix-comis-on-ia64-alpha.dpatch DELETED ---


--- 300-skip-duplicate-lenocc.dpatch DELETED ---


--- 303-shadow-passwords-supported.dpatch DELETED ---


--- 304-update-Imake-config-files.dpatch DELETED ---


--- 305-use-POWERPC-not-PPC-as-test.dpatch DELETED ---


--- 308-use-canonical-cfortran-location.dpatch DELETED ---


--- 309-define-dummy-herwig-routines.dpatch DELETED ---


--- 310-define-dummy-fowl-routines.dpatch DELETED ---


--- 311-skip-duplicate-qnext.dpatch DELETED ---


--- 312-skip-duplicate-gamma.dpatch DELETED ---


--- 313-comis-preserves-filename-case.dpatch DELETED ---


--- 314-permit-using-regcomp-for-re_comp.dpatch DELETED ---


--- 318-additional-gcc-3.4-fixes.dpatch DELETED ---


--- 319-work-around-imake-segfaults.dpatch DELETED ---


--- 701-patch-hbook-comis-Imakefiles.dpatch DELETED ---


--- 704-patch-code_kuip-higzcc-Imakefiles.dpatch DELETED ---


--- 800-implement-shared-library-rules-in-Imake.dpatch DELETED ---


--- 801-non-optimized-rule-uses-fPIC-g.dpatch DELETED ---


--- 803-link-binaries-dynamically.dpatch DELETED ---


--- 804-workaround-for-comis-mdpool-struct-location.dpatch DELETED ---


--- 805-expunge-missing-mathlib-kernlib-symbols.dpatch DELETED ---


--- 806-bump-mathlib-and-dependents-sonames.dpatch DELETED ---


--- cernlib_2005.05.09.dfsg-6.diff DELETED ---




More information about the fedora-extras-commits mailing list