|
|
4b5a59b |
#! /bin/sh /usr/share/dpatch/dpatch-run
|
|
|
4b5a59b |
## 315-fixes-for-MacOSX.dpatch by <kmccarty@debian.org>
|
|
|
4b5a59b |
##
|
|
|
4b5a59b |
## All lines beginning with `## DP:' are a description of the patch.
|
|
|
b7adf43 |
## DP: Patch set (mostly due to Keisuke Fujii) to allow CERNLIB to compile
|
|
|
4b5a59b |
## DP: and run on OS X.
|
|
|
4b5a59b |
|
|
|
4b5a59b |
@DPATCH@
|
|
|
24be4e6 |
diff -urNad cernlib-2006.dfsg~/src/Imakefile cernlib-2006.dfsg/src/Imakefile
|
|
|
24be4e6 |
--- cernlib-2006.dfsg~/src/Imakefile 2007-01-09 19:27:31.059892042 -0500
|
|
|
24be4e6 |
+++ cernlib-2006.dfsg/src/Imakefile 2007-01-09 19:27:33.049467233 -0500
|
|
|
3110904 |
@@ -7,8 +7,12 @@
|
|
|
3110904 |
SUBDIRS= $(LIBDIRS) patchy cfortran
|
|
|
3110904 |
|
|
|
3110904 |
#ifdef CERNLIB_UNIX
|
|
|
3110904 |
+#ifdef CERNLIB_MACOSX
|
|
|
a158709 |
+SUBDIRS:= $(SUBDIRS) p5boot scripts
|
|
|
3110904 |
+#else
|
|
|
a158709 |
SUBDIRS:= $(SUBDIRS) p5boot scripts mgr
|
|
|
3110904 |
#endif
|
|
|
3110904 |
+#endif
|
|
|
3110904 |
|
|
|
3110904 |
InstallLibSubdirs($(LIBDIRS))
|
|
|
3110904 |
|
|
|
24be4e6 |
diff -urNad cernlib-2006.dfsg~/src/config/Imake.rules cernlib-2006.dfsg/src/config/Imake.rules
|
|
|
24be4e6 |
--- cernlib-2006.dfsg~/src/config/Imake.rules 2005-04-18 11:39:25.000000000 -0400
|
|
|
24be4e6 |
+++ cernlib-2006.dfsg/src/config/Imake.rules 2007-01-09 19:27:33.050467019 -0500
|
|
|
4b5a59b |
@@ -2171,7 +2171,7 @@
|
|
|
4b5a59b |
#define CppScriptTarget(dst,src,defs,deplist) @@\
|
|
|
4b5a59b |
dst:: src deplist @@\
|
|
|
4b5a59b |
RemoveFile($@) @@\
|
|
|
4b5a59b |
- $(CPP) defs <src | CppSedMagic >$@ @@\
|
|
|
4b5a59b |
+ $(CPP) defs src | CppSedMagic >$@ @@\
|
|
|
4b5a59b |
chmod a+x $@ @@\
|
|
|
4b5a59b |
@@\
|
|
|
4b5a59b |
clean:: @@\
|
|
|
4b5a59b |
@@ -2203,7 +2203,7 @@
|
|
|
4b5a59b |
#define CppFileTarget(dst,src,defs,deplist) @@\
|
|
|
4b5a59b |
dst:: src deplist @@\
|
|
|
4b5a59b |
RemoveFile($@) @@\
|
|
|
4b5a59b |
- $(CPP) defs <src | CppSedMagic >$@ @@\
|
|
|
4b5a59b |
+ $(CPP) defs src | CppSedMagic >$@ @@\
|
|
|
4b5a59b |
@@\
|
|
|
4b5a59b |
clean:: @@\
|
|
|
4b5a59b |
RemoveFiles(dst)
|
|
|
24be4e6 |
diff -urNad cernlib-2006.dfsg~/src/config/MacOSX.cf cernlib-2006.dfsg/src/config/MacOSX.cf
|
|
|
24be4e6 |
--- cernlib-2006.dfsg~/src/config/MacOSX.cf 2006-11-23 09:25:33.000000000 -0500
|
|
|
24be4e6 |
+++ cernlib-2006.dfsg/src/config/MacOSX.cf 2007-01-09 19:41:23.844091722 -0500
|
|
|
24be4e6 |
@@ -73,8 +73,12 @@
|
|
|
24be4e6 |
#define BuildDPMSExt NO
|
|
|
24be4e6 |
|
|
|
24be4e6 |
# define BuildXvExt NO
|
|
|
24be4e6 |
-#define OptimizedCDebugFlags -O0 -g -pipe
|
|
|
24be4e6 |
-#define ExtraLoadFlags -L/usr/X11R6/lib
|
|
|
4b5a59b |
+
|
|
|
4b5a59b |
+#ifndef OptimizationLevel
|
|
|
4b5a59b |
+# define OptimizationLevel -O
|
|
|
4b5a59b |
+#endif
|
|
|
24be4e6 |
+#define OptimizedCDebugFlags OptimizationLevel -g -pipe
|
|
|
24be4e6 |
+#define ExtraLoadFlags -L/usr/X11R6/lib -L/sw/lib
|
|
|
24be4e6 |
|
|
|
24be4e6 |
#define BuildExamples YES
|
|
|
24be4e6 |
|
|
|
24be4e6 |
@@ -87,9 +91,11 @@
|
|
|
24be4e6 |
#define HasVoidSignalReturn YES
|
|
|
24be4e6 |
|
|
|
24be4e6 |
#ifndef DependFlags
|
|
|
24be4e6 |
-#define DependFlags -I/usr/include/ansi -I/usr/include/bsd
|
|
|
4b5a59b |
+#define DependFlags -I/usr/include/ansi -I/usr/include/bsd -I/sw/include
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
|
|
|
4b5a59b |
+#define StandardIncludes -I/sw/include
|
|
|
4b5a59b |
+
|
|
|
24be4e6 |
#define InstallCmd install /* unlink old */
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/* #define ArCmd libtool -a -o */
|
|
|
24be4e6 |
@@ -103,7 +109,7 @@
|
|
|
24be4e6 |
|
|
|
24be4e6 |
#define PrimaryScreenResolution 95 /* for 17 inch screen */
|
|
|
24be4e6 |
|
|
|
24be4e6 |
-#define ServerCDebugFlags -O0 -g -pipe
|
|
|
24be4e6 |
+#define ServerCDebugFlags OptimizationLevel -g -pipe
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/* #define HasGcc YES */
|
|
|
24be4e6 |
#ifndef HasGcc
|
|
|
24be4e6 |
@@ -122,7 +128,7 @@
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
#ifndef CcCmd
|
|
|
24be4e6 |
-#define CcCmd cc
|
|
|
4b5a59b |
+#define CcCmd cc -g
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
|
|
|
24be4e6 |
#define CppCmd /usr/bin/cpp
|
|
|
24be4e6 |
@@ -133,25 +139,35 @@
|
|
|
24be4e6 |
/* #define GLX_DIRECT_RENDERING */
|
|
|
24be4e6 |
|
|
|
24be4e6 |
#define f2cFortran YES
|
|
|
24be4e6 |
-#define FortranCmd gfortran
|
|
|
24be4e6 |
+#define FortranCmd gfortran -g
|
|
|
24be4e6 |
#define XargsCmd xargs
|
|
|
24be4e6 |
#define FortranSaveFlags /* -fno-automatic */ /* Everything static !? */
|
|
|
24be4e6 |
-#define OptimisedFortranFlags -O0 -g -funroll-loops -fomit-frame-pointer \
|
|
|
24be4e6 |
+#define OptimisedFortranFlags OptimizationLevel -g -funroll-loops \
|
|
|
24be4e6 |
-ftree-vectorize
|
|
|
24be4e6 |
-#define DefaultFCOptions -fno-second-underscore
|
|
|
24be4e6 |
-/*#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX \
|
|
|
24be4e6 |
- -DCERNLIB_PPC -DCERNLIB_QMGLIBC \
|
|
|
24be4e6 |
- -DCERNLIB_MACOSX -DCERNLIB_GFORTRAN */
|
|
|
24be4e6 |
+#define DefaultFCOptions -fno-second-underscore OptimizationLevel
|
|
|
24be4e6 |
|
|
|
4b5a59b |
+#ifndef CernlibLocalDefines
|
|
|
4b5a59b |
+# define CernlibLocalDefines
|
|
|
4b5a59b |
+#endif
|
|
|
24be4e6 |
+#ifdef PpcDarwinArchitecture
|
|
|
4b5a59b |
+#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX \
|
|
|
4b5a59b |
+ -DCERNLIB_PPC -DCERNLIB_QMGLIBC \
|
|
|
24be4e6 |
+ -DCERNLIB_MACOSX -DCERNLIB_GFORTRAN \
|
|
|
24be4e6 |
+ CernlibLocalDefines
|
|
|
24be4e6 |
+#else
|
|
|
24be4e6 |
#define CernlibSystem -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX \
|
|
|
24be4e6 |
-DCERNLIB_QMGLIBC \
|
|
|
24be4e6 |
- -DCERNLIB_MACOSX -DCERNLIB_GFORTRAN
|
|
|
24be4e6 |
+ -DCERNLIB_MACOSX -DCERNLIB_GFORTRAN \
|
|
|
24be4e6 |
+ CernlibLocalDefines
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/* #define CERNLIB_SHIFT NO */
|
|
|
24be4e6 |
#define CERNLIB_LINUX
|
|
|
24be4e6 |
#define CERNLIB_UNIX
|
|
|
24be4e6 |
#define CERNLIB_LNX
|
|
|
24be4e6 |
-/*#define CERNLIB_PPC*/
|
|
|
24be4e6 |
+#ifdef PpcDarwinArchitecture
|
|
|
24be4e6 |
+# define CERNLIB_PPC
|
|
|
24be4e6 |
+#endif
|
|
|
24be4e6 |
#define CERNLIB_QMGLIBC
|
|
|
24be4e6 |
#define CERNLIB_MACOSX
|
|
|
24be4e6 |
#define CERNLIB_GFORTRAN
|
|
|
24be4e6 |
diff -urNad cernlib-2006.dfsg~/src/config/MacOSX.rules cernlib-2006.dfsg/src/config/MacOSX.rules
|
|
|
24be4e6 |
--- cernlib-2006.dfsg~/src/config/MacOSX.rules 2006-09-04 08:32:56.000000000 -0400
|
|
|
24be4e6 |
+++ cernlib-2006.dfsg/src/config/MacOSX.rules 2007-01-09 15:47:15.542676000 -0500
|
|
|
24be4e6 |
@@ -28,18 +28,24 @@
|
|
|
24be4e6 |
#endif
|
|
|
24be4e6 |
|
|
|
24be4e6 |
|
|
|
24be4e6 |
-
|
|
|
24be4e6 |
-
|
|
|
24be4e6 |
/*
|
|
|
24be4e6 |
* InstallSharedLibrary - generate rules to install the shared library.
|
|
|
4b5a59b |
+ * Edited 2003-05-09 by Kevin McCarty to add an install.shlib target.
|
|
|
24be4e6 |
*/
|
|
|
24be4e6 |
#ifndef InstallSharedLibrary
|
|
|
24be4e6 |
#define InstallSharedLibrary(libname,rev,dest) @@\
|
|
|
24be4e6 |
-install:: Concat(lib,libname.dylib) @@\
|
|
|
4b5a59b |
+.PHONY: install.shlib shlib/libname @@\
|
|
|
4b5a59b |
+shlib/libname:: $(DESTDIR)dest/SharedLibraryTargetName(libname) @@\
|
|
|
4b5a59b |
+ @@\
|
|
|
4b5a59b |
+install.shlib:: $(DESTDIR)dest/SharedLibraryTargetName(libname) @@\
|
|
|
4b5a59b |
+ @@\
|
|
|
4b5a59b |
+$(DESTDIR)dest/SharedLibraryTargetName(libname): SharedLibraryTargetName(libname) @@\
|
|
|
24be4e6 |
MakeDir($(DESTDIR)dest) @@\
|
|
|
24be4e6 |
- $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.dylib) $(DESTDIR)dest
|
|
|
24be4e6 |
-@@\
|
|
|
24be4e6 |
-
|
|
|
4b5a59b |
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.rev.dylib) $(DESTDIR)dest @@\
|
|
|
4b5a59b |
+ (T=`echo Concat($(DESTDIR)dest/lib,libname.rev.dylib) | sed 's/\.[^\.d]*\.dylib/\.dylib/'`;\ @@\
|
|
|
4b5a59b |
+ $(RM) $$T && $(LN) Concat(lib,libname.rev.dylib) $$T) @@\
|
|
|
4b5a59b |
+ $(RM) Concat($(DESTDIR)dest/lib,libname.dylib) @@\
|
|
|
4b5a59b |
+ $(LN) Concat(lib,libname.rev.dylib) Concat($(DESTDIR)dest/lib,libname.dylib)
|
|
|
24be4e6 |
#endif /* InstallSharedLibrary */
|
|
|
24be4e6 |
|
|
|
24be4e6 |
/*
|
|
|
24be4e6 |
diff -urNad cernlib-2006.dfsg~/src/config/site.def cernlib-2006.dfsg/src/config/site.def
|
|
|
24be4e6 |
--- cernlib-2006.dfsg~/src/config/site.def 2002-04-26 10:46:04.000000000 -0400
|
|
|
24be4e6 |
+++ cernlib-2006.dfsg/src/config/site.def 2007-01-09 19:27:33.051466806 -0500
|
|
|
4b5a59b |
@@ -99,9 +99,7 @@
|
|
|
4b5a59b |
/* if it is already defined and false, undef it! */
|
|
|
4b5a59b |
/* do not use shift by default
|
|
|
4b5a59b |
#if defined(CERNLIB_UNIX) && !defined(CERNLIB_WINNT)
|
|
|
4b5a59b |
-#if ! defined(CERNLIB_SHIFT)
|
|
|
4b5a59b |
-#define CERNLIB_SHIFT
|
|
|
4b5a59b |
-#elif ! CERNLIB_SHIFT
|
|
|
4b5a59b |
+#if defined(CERNLIB_SHIFT) && !CERNLIB_SHIFT
|
|
|
4b5a59b |
#undef CERNLIB_SHIFT
|
|
|
4b5a59b |
#endif
|
|
|
4b5a59b |
#endif
|
|
|
3110904 |
diff -urNad cernlib-2005.05.09.dfsg~/src/geant321/gxint/Imakefile cernlib-2005.05.09.dfsg/src/geant321/gxint/Imakefile
|
|
|
3110904 |
--- cernlib-2005.05.09.dfsg~/src/geant321/gxint/Imakefile 1997-01-29 11:37:40.000000000 -0500
|
|
|
3110904 |
+++ cernlib-2005.05.09.dfsg/src/geant321/gxint/Imakefile 2005-12-07 14:47:34.140148771 -0500
|
|
|
4b5a59b |
@@ -30,7 +30,7 @@
|
|
|
4b5a59b |
|
|
|
4b5a59b |
gxint321.f: gxint.F
|
|
|
4b5a59b |
RemoveFile($@)
|
|
|
4b5a59b |
- $(CPP) $(FORTRANALLDEFMDEPEND) < $^ | sed -e '/^$$/d' | CppSedMagic >$@
|
|
|
4b5a59b |
+ FortranCmd -E $(FORTRANALLDEFMDEPEND) $^ | sed -e '/^$$/d' | CppSedMagic >$@
|
|
|
4b5a59b |
|
|
|
4b5a59b |
install.lib:: $(CERN_LIBDIR)/gxint.f
|
|
|
4b5a59b |
|
|
|
3110904 |
diff -urNad cernlib-2005.05.09.dfsg~/src/mclibs/cojets/data/Imakefile cernlib-2005.05.09.dfsg/src/mclibs/cojets/data/Imakefile
|
|
|
3110904 |
--- cernlib-2005.05.09.dfsg~/src/mclibs/cojets/data/Imakefile 1996-03-27 04:31:06.000000000 -0500
|
|
|
3110904 |
+++ cernlib-2005.05.09.dfsg/src/mclibs/cojets/data/Imakefile 2005-12-07 14:47:34.141148558 -0500
|
|
|
4b5a59b |
@@ -1,11 +1,11 @@
|
|
|
4b5a59b |
|
|
|
4b5a59b |
.SUFFIXES:
|
|
|
4b5a59b |
|
|
|
4b5a59b |
-CopyFile(cojets.cpp,cojets.cin)
|
|
|
4b5a59b |
+CopyFile(cojets.cpp,cojets.s)
|
|
|
4b5a59b |
CopyFile(decay.cpp,decay.cin)
|
|
|
4b5a59b |
CopyFile(table.cpp,table.cin)
|
|
|
4b5a59b |
|
|
|
4b5a59b |
-CppFileTarget(cojets.dat,cojets.cin,NullParameter,table.cin decay.cin)
|
|
|
4b5a59b |
+CppFileTarget(cojets.dat,cojets.s,-E -traditional,table.cin decay.cin)
|
|
|
4b5a59b |
|
|
|
4b5a59b |
PackageDirFileTarget(cojets.dat)
|
|
|
4b5a59b |
|
|
|
3110904 |
diff -urNad cernlib-2005.05.09.dfsg~/src/mclibs/isajet/data/Imakefile cernlib-2005.05.09.dfsg/src/mclibs/isajet/data/Imakefile
|
|
|
3110904 |
--- cernlib-2005.05.09.dfsg~/src/mclibs/isajet/data/Imakefile 1996-03-27 04:33:19.000000000 -0500
|
|
|
3110904 |
+++ cernlib-2005.05.09.dfsg/src/mclibs/isajet/data/Imakefile 2005-12-07 14:47:34.141148558 -0500
|
|
|
4b5a59b |
@@ -1,9 +1,9 @@
|
|
|
4b5a59b |
|
|
|
4b5a59b |
.SUFFIXES:
|
|
|
4b5a59b |
|
|
|
4b5a59b |
-CopyFile(decay.cpp,decay.cin)
|
|
|
4b5a59b |
+CopyFile(decay.cpp,decay.s)
|
|
|
4b5a59b |
|
|
|
4b5a59b |
-CppFileTarget(isajet.dat,decay.cin,NullParameter,NullParameter)
|
|
|
4b5a59b |
+CppFileTarget(isajet.dat,decay.s,-E -traditional ,NullParameter)
|
|
|
4b5a59b |
|
|
|
4b5a59b |
PackageDirFileTarget(isajet.dat)
|
|
|
4b5a59b |
|