4b5a59b
#! /bin/sh /usr/share/dpatch/dpatch-run
4b5a59b
## 702-patch-Imakefiles-for-packlib-mathlib.dpatch by  <kmccarty@debian.org>
4b5a59b
##
4b5a59b
## All lines beginning with `## DP:' are a description of the patch.
4b5a59b
## DP: Hacks to Imakefiles to go along with the 702 shellscript for moving
4b5a59b
## DP: files around.
4b5a59b
4b5a59b
@DPATCH@
4b5a59b
diff -urNad cernlib-2005.05.09/src/mathlib/gen/d/Imakefile /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/gen/d/Imakefile
4b5a59b
--- cernlib-2005.05.09/src/mathlib/gen/d/Imakefile	2005-06-10 22:19:15.720962444 -0400
4b5a59b
+++ /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/gen/d/Imakefile	2005-06-10 22:24:26.783925145 -0400
4b5a59b
@@ -1,6 +1,8 @@
4b5a59b
 DoIncludePackage(gen)
4b5a59b
 #include "pilot.h"
4b5a59b
 
4b5a59b
+/* rgmlt*.F have been moved into packlib/hbook to remove circular dependencies.
4b5a59b
+   --Kevin McCarty, for Debian. */
4b5a59b
 SRCS_F=	arithm.F c128.F c256.F c512.F c64.F cauchy64.F cft.F cfstft.F \ @@\
4b5a59b
 	rfstft.F cgauss.F d107d1.F d107r1.F d501l1.F d501l2.F d501n1.F \ @@\
4b5a59b
         d501n2.F d501p1.F d501p2.F d501sf.F d700su.F d701bd.F \ @@\
4b5a59b
@@ -10,14 +12,14 @@
4b5a59b
         epditr.F epdje.F epdloc.F epdsrt.F epdtab.F errorf.F esolve.F \ @@\
4b5a59b
 	fcn1.F fftrc.F fumili.F gauss.F i128.F i32.F i64.F linsq.F \ @@\
4b5a59b
 	mconv.F mft.F minfc.F minsq.F monito.F newro.F old506.F radapt.F \ @@\
4b5a59b
-	radmul.F rca.F rfrdh164.F rfrdh264.F rft.F rgmlt64.F rgquad.F \ @@\
4b5a59b
+	radmul.F rca.F rfrdh164.F rfrdh264.F rft.F           rgquad.F \ @@\
4b5a59b
 	rgs56p.F rgset.F riwiad.F riwibd.F rknys64.F rknysd.F rkstp.F \ @@\
4b5a59b
 	rpa.F rps.F rrkstp.F rsa.F rtriint.F s128.F s256.F s512.F \ @@\
4b5a59b
 	s64.F scal.F sgz.F simps.F synt.F traper.F triint.F vd01a.F
4b5a59b
 
4b5a59b
 #if defined(CERNLIB_DOUBLE)
4b5a59b
 SRCS_F:= $(SRCS_F) cgauss64.F dgquad.F dgset.F gauss64.F minfc64.F \ @@\
4b5a59b
-	rcauch.F rdeqbs.F rdeqmr.F rderiv.F rfrdh1.F rgmlt.F rkstp64.F \ @@\
4b5a59b
+	rcauch.F rdeqbs.F rdeqmr.F rderiv.F rfrdh1.F         rkstp64.F \ @@\
4b5a59b
 	simps64.F triint64.F 
4b5a59b
 #if defined(CERNLIB_LINUX)
4b5a59b
 /* -O3 optimization breaks in g77 3.2 */
4b5a59b
@@ -26,7 +28,7 @@
4b5a59b
 #endif
4b5a59b
 #else
4b5a59b
 SRCS_F:= $(SRCS_F) cgauss128.F cauchy.F cauchy128.F deqbs128.F deqmr128.F \ @@\
4b5a59b
-	deriv128.F minfc128.F rfrdh128.F rgmlt128.F rkstp128.F simps128.F \ @@\
4b5a59b
+	deriv128.F minfc128.F rfrdh128.F            rkstp128.F simps128.F \ @@\
4b5a59b
 	triint128.F 
4b5a59b
 #endif
4b5a59b
 
4b5a59b
diff -urNad cernlib-2005.05.09/src/mathlib/gen/Imakefile /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/gen/Imakefile
4b5a59b
--- cernlib-2005.05.09/src/mathlib/gen/Imakefile	1996-10-02 12:09:45.000000000 -0400
4b5a59b
+++ /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/gen/Imakefile	2005-06-10 22:20:55.683416711 -0400
4b5a59b
@@ -8,7 +8,8 @@
4b5a59b
 IMAKE_DEFINES=-DFortranDoesCpp=NO
4b5a59b
 #endif
4b5a59b
 
4b5a59b
-LIBDIRS= a b c d divon e f g h j m n s u v x
4b5a59b
+/* "n" subdir moved to packlib/hbook/  --Kevin McCarty, for Debian */
4b5a59b
+LIBDIRS= a b c d divon e f g h j m   s u v x
4b5a59b
 
4b5a59b
 SUBDIRS= $(LIBDIRS) gen tests
4b5a59b
 
4b5a59b
diff -urNad cernlib-2005.05.09/src/mathlib/hbook/Imakefile /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/hbook/Imakefile
4b5a59b
--- cernlib-2005.05.09/src/mathlib/hbook/Imakefile	1969-12-31 19:00:00.000000000 -0500
4b5a59b
+++ /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/hbook/Imakefile	2004-06-30 21:54:11.000000000 -0400
4b5a59b
@@ -0,0 +1,12 @@
4b5a59b
+/* this Imakefile used to get hdiff to compile within the mathlib tree */
4b5a59b
+
4b5a59b
+#define IHaveSubdirs
4b5a59b
+#define PassCDebugFlags
4b5a59b
+
4b5a59b
+LIBDIRS= hdiff
4b5a59b
+SUBDIRS= $(LIBDIRS) hbook
4b5a59b
+
4b5a59b
+TopOfPackage(hbook)
4b5a59b
+SubdirLibraryTarget(hbook,$(LIBDIRS))
4b5a59b
+DoIncludePackage(hbook)
4b5a59b
+InstallIncludeSubdirs(hbook)
4b5a59b
diff -urNad cernlib-2005.05.09/src/mathlib/Imakefile /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/Imakefile
4b5a59b
--- cernlib-2005.05.09/src/mathlib/Imakefile	2005-06-10 22:19:15.834937877 -0400
4b5a59b
+++ /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/mathlib/Imakefile	2005-06-10 22:20:05.279280394 -0400
4b5a59b
@@ -3,7 +3,7 @@
4b5a59b
 #define PassCDebugFlags 
4b5a59b
 
4b5a59b
 
4b5a59b
-LIBDIRS= gen bvsl
4b5a59b
+LIBDIRS= gen bvsl hbook /* hdiff stuff moved from packlib */
4b5a59b
 
f521126
 /* Lapack is independent of Cernlib and should be installed as one of
4b5a59b
    the build dependencies.
4b5a59b
diff -urNad cernlib-2005.05.09/src/packlib/hbook/d/Imakefile /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/packlib/hbook/d/Imakefile
4b5a59b
--- cernlib-2005.05.09/src/packlib/hbook/d/Imakefile	1969-12-31 19:00:00.000000000 -0500
4b5a59b
+++ /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/packlib/hbook/d/Imakefile	2004-06-30 21:54:11.000000000 -0400
4b5a59b
@@ -0,0 +1,25 @@
4b5a59b
+/* this Imakefile is used to get some things from mathlib/gen/d to compile
4b5a59b
+   within the packlib/hbook tree */
4b5a59b
+
4b5a59b
+DoIncludePackage(gen)
4b5a59b
+#include "pilot.h"
4b5a59b
+
4b5a59b
+SRCS_F=	rgmlt64.F
4b5a59b
+
4b5a59b
+#if defined(CERNLIB_DOUBLE)
4b5a59b
+SRCS_F:= $(SRCS_F) rgmlt.F
4b5a59b
+#else
4b5a59b
+SRCS_F:= $(SRCS_F) rgmlt128.F
4b5a59b
+#endif
4b5a59b
+
4b5a59b
+#ifdef CERNLIB_HPUX
4b5a59b
+FORTRANOPTIONS += -WF,-P
4b5a59b
+#endif
4b5a59b
+
4b5a59b
+#if defined(CERNLIB_SGI)
4b5a59b
+IMAKE_DEFINES=-DFortranDoesCpp=NO
4b5a59b
+#endif
4b5a59b
+
4b5a59b
+FORTRANSAVEOPTION = FortranSaveFlags
4b5a59b
+
4b5a59b
+SubdirLibraryTarget(NullParameter,NullParameter)
4b5a59b
diff -urNad cernlib-2005.05.09/src/packlib/hbook/Imakefile /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/packlib/hbook/Imakefile
4b5a59b
--- cernlib-2005.05.09/src/packlib/hbook/Imakefile	1997-04-28 04:21:23.000000000 -0400
4b5a59b
+++ /tmp/dpep.aVAPwe/cernlib-2005.05.09/src/packlib/hbook/Imakefile	2005-06-10 22:26:27.063010420 -0400
4b5a59b
@@ -2,7 +2,9 @@
4b5a59b
 #define IHaveSubdirs
4b5a59b
 #define PassCDebugFlags
4b5a59b
 
4b5a59b
-LIBDIRS= hdiff hmerge hquad chbook fpclassc \ @@\
4b5a59b
+/* hdiff moved to mathlib to avoid circular DLL dependencies; "d" and "n"
4b5a59b
+   moved here from mathlib for the same reasons */
4b5a59b
+LIBDIRS= d n   hmerge hquad chbook fpclassc \ @@\
4b5a59b
 	 hrz code hmcstat hntup
4b5a59b
 
4b5a59b
 #ifdef CERNLIB_VAX