summaryrefslogtreecommitdiff
path: root/sci-mathematics/Macaulay2/files
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/Macaulay2/files')
-rw-r--r--sci-mathematics/Macaulay2/files/1.6-lapack.patch50
-rw-r--r--sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch73
-rw-r--r--sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el11
-rw-r--r--sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch50
4 files changed, 184 insertions, 0 deletions
diff --git a/sci-mathematics/Macaulay2/files/1.6-lapack.patch b/sci-mathematics/Macaulay2/files/1.6-lapack.patch
new file mode 100644
index 000000000000..e9a434eeb28e
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/1.6-lapack.patch
@@ -0,0 +1,50 @@
+--- configure.ac 2012-10-24 09:29:55.240498786 -0700
++++ configure.ac.2 2012-10-30 15:07:27.172846300 -0700
+@@ -1285,46 +1285,7 @@
+ done
+ test $BUILD_factory = yes && BUILTLIBS="$SINGULARLIBS $BUILTLIBS"
+
+-# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds
+-# one of them to $LIBS, making it impossible to check for the presence of C or
+-# C++ libraries. (I'm not sure why putting -llapack on the gcc command line
+-# needlessly causes the library to be linked against.)
+-FORTRANUSED=no
+-if test "$LAPACK" = yes
+-then AC_MSG_CHECKING([whether the vecLib framework is available])
+- SAVELIBS=$LIBS LIBS="-framework vecLib $LIBS"
+- AC_LANG(C)
+- AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])],
+- [
+- AC_MSG_RESULT(yes)
+- ],
+- [
+- AC_MSG_RESULT(no)
+- LIBS=$SAVELIBS
+- FORTRANUSED=yes
+- if test $BUILD_lapack = no
+- then AC_LANG(Fortran)
+- if test "$FC" = ""
+- then AC_MSG_ERROR(no fortran compiler found)
+- else AC_MSG_NOTICE(using fortran compiler $FC)
+- fi
+- AC_SEARCH_LIBS(sgemv,blas f77blas,,BUILD_lapack=yes)
+- AC_SEARCH_LIBS(dgetrf,lapack,,BUILD_lapack=yes)
+- fi
+- ])
+-fi
+-test $BUILD_lapack = yes && BUILTLIBS="-llapack -lblas $BUILTLIBS"
+-
+-if test $BUILD_lapack = yes
+-then # test whether the fortran compiler can handle lapack, which, starting with
+- # version 3.2, requires fortran 90, not fortran 77
+- AC_LANG(Fortran)
+- AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack])
+- AC_COMPILE_IFELSE([instrinsic maxloc],
+- AC_MSG_ERROR(the fortran compiler ($FC) does not support the Fortran 90 language required for compiling lapack),
+- AC_MSG_RESULT(yes))
+-fi
++BUILTLIBS="$(${PKG_CONFIG} --libs lapack) $BUILTLIBS"
+
+ if test $BUILD_memtailor = yes
+ then BUILTLIBS="-lmemtailor $BUILTLIBS"
diff --git a/sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch b/sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch
new file mode 100644
index 000000000000..4c090deec9d8
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch
@@ -0,0 +1,73 @@
+diff -U 3 -dHrN M2source/Macaulay2/packages/FourTiTwo.m2 M2source.patch/Macaulay2/packages/FourTiTwo.m2
+--- M2source/Macaulay2/packages/FourTiTwo.m2 2011-09-22 14:36:51.000000000 +0100
++++ M2source.patch/Macaulay2/packages/FourTiTwo.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -47,7 +47,7 @@
+
+ path'4ti2 = (options FourTiTwo).Configuration#"path"
+ -- NOTE: the absolute path should be put into the .init file for 4ti2 inside the .Macaulay2 directory.
+-if path'4ti2 == "" then path'4ti2 = prefixDirectory | currentLayout#"programs"
++if path'4ti2 == "" then path'4ti2 = "/usr/bin/"
+
+ getFilename = () -> (
+ filename := temporaryFileName();
+diff -U 3 -dHrN M2source/Macaulay2/packages/gfanInterface.m2 M2source.patch/Macaulay2/packages/gfanInterface.m2
+--- M2source/Macaulay2/packages/gfanInterface.m2 2011-05-14 12:00:59.000000000 +0100
++++ M2source.patch/Macaulay2/packages/gfanInterface.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -25,7 +25,7 @@
+ }
+
+ gfan'path = gfanInterface#Options#Configuration#"path"
+-if gfan'path == "" then gfan'path = prefixDirectory | currentLayout#"programs"
++if gfan'path == "" then gfan'path = "/usr/bin/"
+ if instance(gfan'path, String) then gfan'path = {gfan'path}
+ if not instance(gfan'path,List) then error "expected configuration option gfan'path to be a list of strings or a string"
+ gfan'path = join(
+diff -U 3 -dHrN M2source/Macaulay2/packages/NautyGraphs.m2 M2source.patch/Macaulay2/packages/NautyGraphs.m2
+--- M2source/Macaulay2/packages/NautyGraphs.m2 2011-08-26 11:05:30.000000000 +0100
++++ M2source.patch/Macaulay2/packages/NautyGraphs.m2 2011-09-24 21:25:53.000000000 +0100
+@@ -32,7 +32,7 @@
+ -- Check the ~/.Macaulay2/init-NautyGraphs.m2 file for the absolute path.
+ -- If it's not there, then use the M2-Programs directory.
+ nauty'path = (options NautyGraphs).Configuration#"path";
+-if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
++if nauty'path == "" then nauty'path = "/usr/bin/";
+
+ -------------------
+ -- Exports
+diff -U 3 -dHrN M2source/Macaulay2/packages/Nauty.m2 M2source.patch/Macaulay2/packages/Nauty.m2
+--- M2source/Macaulay2/packages/Nauty.m2 2011-08-26 11:05:30.000000000 +0100
++++ M2source.patch/Macaulay2/packages/Nauty.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -48,7 +48,8 @@
+ -- Check the ~/.Macaulay2/init-Nauty.m2 file for the absolute path.
+ -- If it's not there, then use the M2-Programs directory.
+ nauty'path = (options Nauty).Configuration#"path";
+-if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
++if nauty'path == "" then nauty'path = "/usr/bin/";
++
+
+ -------------------
+ -- Exports
+diff -U 3 -dHrN M2source/Macaulay2/packages/Normaliz.m2 M2source.patch/Macaulay2/packages/Normaliz.m2
+--- M2source/Macaulay2/packages/Normaliz.m2 2011-05-25 16:47:50.000000000 +0100
++++ M2source.patch/Macaulay2/packages/Normaliz.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -166,7 +166,7 @@
+ nmzExec="normaliz";
+ );
+ -- return nmzExec;
+- return prefixDirectory | currentLayout#"programs" | nmzExec;
++ return "/usr/bin/" | nmzExec;
+ );
+
+
+diff -U 3 -dHrN M2source/Macaulay2/packages/StatePolytope.m2 M2source.patch/Macaulay2/packages/StatePolytope.m2
+--- M2source/Macaulay2/packages/StatePolytope.m2 2010-09-10 16:47:20.000000000 +0100
++++ M2source.patch/Macaulay2/packages/StatePolytope.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -31,7 +31,7 @@
+
+
+ gfanCommand = (options StatePolytope)#Configuration#"gfan command"
+-if gfanCommand === "gfan" then gfanCommand = prefixDirectory | currentLayout#"programs" | gfanCommand
++if gfanCommand === "gfan" then gfanCommand = "/usr/bin/" | gfanCommand
+ gfanCommand = "!" | gfanCommand
+
+ --The next two functions print out the ring and the ideal in the format required by gfan
diff --git a/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el b/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el
new file mode 100644
index 000000000000..ac86e2132ed5
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el
@@ -0,0 +1,11 @@
+;; sci-mathematics/Macaulay2 init file
+
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/Macaulay2")
+
+(defvar M2-exe "/usr/bin/M2" "*The default Macaulay2 executable name.")
+(autoload 'M2 "M2.el" "Run Macaulay 2 in a buffer." t)
+(autoload 'Macaulay2 "M2" "Run Macaulay 2 in a buffer, non-interactive." t)
+(autoload 'M2-mode "M2" "Macaulay 2 editing mode" t)
+(autoload 'm2-mode "M2" "Macaulay 2 editing mode, name in lower case" t)
+(autoload 'm2-comint-mode "M2" "Macaulay 2 command interpreter mode, name in lower case" t)
+(setq auto-mode-alist (append auto-mode-alist '(("\\.m2$" . M2-mode)))) \ No newline at end of file
diff --git a/sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch b/sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch
new file mode 100644
index 000000000000..25185e7c560e
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch
@@ -0,0 +1,50 @@
+--- configure.ac 2015-09-03 14:49:42.000000000 +0200
++++ configure.ac.new 2016-01-27 12:50:07.812215547 +0100
+@@ -1301,46 +1301,7 @@
+ BUILTLIBS="$SINGULARLIBS $BUILTLIBS"
+ fi
+
+-# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds
+-# one of them to $LIBS, making it impossible to check for the presence of C or
+-# C++ libraries. (I'm not sure why putting -llapack on the gcc command line
+-# needlessly causes the library to be linked against.)
+-FORTRANUSED=no
+-if test "$LAPACK" = yes
+-then AC_MSG_CHECKING([whether the Accelerate framework is available])
+- SAVELIBS=$LIBS LIBS="-framework Accelerate $LIBS"
+- AC_LANG(C)
+- AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])],
+- [
+- AC_MSG_RESULT(yes)
+- ],
+- [
+- AC_MSG_RESULT(no)
+- LIBS=$SAVELIBS
+- FORTRANUSED=yes
+- if test $BUILD_lapack = no
+- then AC_LANG(Fortran)
+- if test "$FC" = ""
+- then AC_MSG_ERROR(no fortran compiler found)
+- else AC_MSG_NOTICE(using fortran compiler $FC)
+- fi
+- AC_SEARCH_LIBS(sgemv,blas f77blas,,BUILD_lapack=yes)
+- AC_SEARCH_LIBS(dgetrf,lapack,,BUILD_lapack=yes)
+- fi
+- ])
+-fi
+-test $BUILD_lapack = yes && BUILTLIBS="-llapack -lrefblas $BUILTLIBS"
+-
+-if test $BUILD_lapack = yes
+-then # test whether the fortran compiler can handle lapack, which, starting with
+- # version 3.2, requires fortran 90, not fortran 77
+- AC_LANG(Fortran)
+- AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack])
+- AC_COMPILE_IFELSE([instrinsic maxloc],
+- AC_MSG_ERROR(the fortran compiler ($FC) does not support the Fortran 90 language required for compiling lapack),
+- AC_MSG_RESULT(yes))
+-fi
++BUILTLIBS="$(${PKG_CONFIG} --libs lapack) $BUILTLIBS"
+
+ test "$USE_FCLIBS" = no && FCLIBS=
+ test "$FORTRANUSED" = no && FCLIBS=