[Macaulay2] 1.4

Rex Dieter rdieter at fedoraproject.org
Fri May 27 15:42:36 UTC 2011


commit 60d1bc30ec7739887e9faa805ddc106ab2102b11
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Fri May 27 10:42:26 2011 -0500

    1.4

 .gitignore                                         |    3 +
 Macaulay2-1.1-optflags.patch                       |   14 ---
 Macaulay2-1.2-pari.patch                           |   18 ----
 Macaulay2-1.2-prefix.patch                         |   12 ---
 Macaulay2-1.2-xdg_open.patch                       |   11 ---
 Macaulay2-1.3.1-dso.patch                          |   10 --
 ...dora.patch => Macaulay2-1.3.1-fedora_4ti2.patch |   11 ---
 ...-bz201739.patch => Macaulay2-1.4-bz201739.patch |   20 ++++-
 Macaulay2-1.4-fedora_normaliz27.patch              |   33 +++++++
 Macaulay2-1.4-makefile_fix.patch                   |   15 ++++
 Macaulay2-1.4-optflags.patch                       |   16 ++++
 Macaulay2-1.4-xdg_open.patch                       |   21 +++++
 Macaulay2.spec                                     |   89 ++++++++++++++------
 sources                                            |    4 +-
 14 files changed, 169 insertions(+), 108 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 471cb41..06c7c39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
 Macaulay2.png
 Macaulay2-1.3.1-r10737.bz2
+/Macaulay2-1.4-r12617-src.tar.bz2
+/frobby_v0.8.2.tar.gz
+/nauty24r2.tar.gz
diff --git a/Macaulay2-1.3.1-fedora.patch b/Macaulay2-1.3.1-fedora_4ti2.patch
similarity index 77%
rename from Macaulay2-1.3.1-fedora.patch
rename to Macaulay2-1.3.1-fedora_4ti2.patch
index 404e802..dd038e9 100644
--- a/Macaulay2-1.3.1-fedora.patch
+++ b/Macaulay2-1.3.1-fedora_4ti2.patch
@@ -1,14 +1,3 @@
---- Macaulay2-1.3.1-r10737/Macaulay2/packages/Normaliz.m2.fedora	2009-10-18 18:38:58.000000000 +0100
-+++ Macaulay2-1.3.1-r10737/Macaulay2/packages/Normaliz.m2	2010-02-24 15:35:56.000000000 +0000
-@@ -30,7 +30,7 @@
- 
- 
- -- initialising some values
--nmzExecPath=prefixDirectory|currentLayout#"programs";
-+nmzExecPath="/usr/bin/";
- nmzDataPath="";
- nmzFilename="";
- nmzUserCalled=true;  -- wether the user calls a method
 --- Macaulay2-1.3.1-r10737/Macaulay2/packages/FourTiTwo.m2.fedora	2009-10-18 18:40:09.000000000 +0100
 +++ Macaulay2-1.3.1-r10737/Macaulay2/packages/FourTiTwo.m2	2010-02-24 15:35:56.000000000 +0000
 @@ -47,7 +47,7 @@
diff --git a/Macaulay2-0.9.95-bz201739.patch b/Macaulay2-1.4-bz201739.patch
similarity index 50%
rename from Macaulay2-0.9.95-bz201739.patch
rename to Macaulay2-1.4-bz201739.patch
index 053681e..9cf6780 100644
--- a/Macaulay2-0.9.95-bz201739.patch
+++ b/Macaulay2-1.4-bz201739.patch
@@ -1,7 +1,7 @@
-diff -rauN Macaulay2-1.3.1-r10737-prefix/Macaulay2/d/M2lib.c Macaulay2-1.3.1-r10737.bz201739/Macaulay2/d/M2lib.c
---- Macaulay2-1.3.1-r10737-prefix/Macaulay2/d/M2lib.c	2010-02-17 09:26:36.000000000 +0000
-+++ Macaulay2-1.3.1-r10737.bz201739/Macaulay2/d/M2lib.c	2010-02-17 09:27:07.000000000 +0000
-@@ -572,7 +572,19 @@
+diff -up Macaulay2-1.4-r12617/Macaulay2/d/M2lib.c.bz201739 Macaulay2-1.4-r12617/Macaulay2/d/M2lib.c
+--- Macaulay2-1.4-r12617/Macaulay2/d/M2lib.c.bz201739	2010-10-16 21:26:17.000000000 -0500
++++ Macaulay2-1.4-r12617/Macaulay2/d/M2lib.c	2011-01-14 14:04:06.887943585 -0600
+@@ -581,7 +581,19 @@ char **argv;
  	       personality(oldpersonality | ADDR_NO_RANDOMIZE);
  	       newpersonality = personality(-1);
  	       personality(oldpersonality | ADDR_NO_RANDOMIZE);	/* just in case the previous line sets the personality to -1, which can happen */
@@ -22,3 +22,15 @@ diff -rauN Macaulay2-1.3.1-r10737-prefix/Macaulay2/d/M2lib.c Macaulay2-1.3.1-r10
  	  }
  	  else personality(oldpersonality);
       }
+diff -up Macaulay2-1.4-r12617/Macaulay2/d/Makefile.in.bz201739 Macaulay2-1.4-r12617/Macaulay2/d/Makefile.in
+--- Macaulay2-1.4-r12617/Macaulay2/d/Makefile.in.bz201739	2010-10-07 14:16:00.000000000 -0500
++++ Macaulay2-1.4-r12617/Macaulay2/d/Makefile.in	2011-01-14 14:04:36.724216755 -0600
+@@ -142,7 +142,7 @@ M2INCLUDES += -I at srcdir@/../regex
+ 
+ # it's important that *our* directories get searched first:
+ CPPFLAGS := $(M2INCLUDES) $(CPPFLAGS) $(M2_CPPFLAGS)
+-CFLAGS += $(M2_CFLAGS) -Werror
++CFLAGS += $(M2_CFLAGS)
+ ifeq "@__INTEL_COMPILER@" "no"
+ CFLAGS += -Wno-unused-label
+ endif
diff --git a/Macaulay2-1.4-fedora_normaliz27.patch b/Macaulay2-1.4-fedora_normaliz27.patch
new file mode 100644
index 0000000..6b768ca
--- /dev/null
+++ b/Macaulay2-1.4-fedora_normaliz27.patch
@@ -0,0 +1,33 @@
+diff -up Macaulay2-1.4-r12617/Macaulay2/packages/Normaliz.m2.fedora_normaliz Macaulay2-1.4-r12617/Macaulay2/packages/Normaliz.m2
+--- Macaulay2-1.4-r12617/Macaulay2/packages/Normaliz.m2.fedora_normaliz	2010-09-09 13:52:08.000000000 -0500
++++ Macaulay2-1.4-r12617/Macaulay2/packages/Normaliz.m2	2011-05-27 07:31:17.365407323 -0500
+@@ -99,7 +99,7 @@ nmzFilename="";
+ nmzNumberThreads=1;
+ nmzUserCalled=true;  -- wether the user calls a method
+ nmzFile="";
+-nmzVersion="";     -- norm64 or normbig
++nmzVersion="";     -- normaliz, norm64, or normbig
+ nmzExecVersion=""; -- needs to be at last "2.5"
+ nmzGen=true;      -- indicates whether ".gen" is generated
+ -- component 1 is name of option
+@@ -146,17 +146,17 @@ setNmzExec=()->
+ (
+     if(nmzVersion!="")
+     then(
+-        if(nmzVersion!="norm64" and nmzVersion !="normbig") then <<error("nmzVersion must be one of the following: norm64, normbig")
++        if(nmzVersion!="normaliz" and nmzVersion!="norm64" and nmzVersion !="normbig") then <<error("nmzVersion must be one of the following: normaliz, norm64, normbig")
+         else(
+         nmzExec:=nmzVersion;
+         );
+     )
+     else
+     (
+-        nmzExec="norm64";
++        nmzExec="normaliz";
+     );
+ --    return nmzExec;
+-    return prefixDirectory | currentLayout#"programs" | nmzExec;
++    return "/usr/bin/" | nmzExec;
+ );
+ 
+ 
diff --git a/Macaulay2-1.4-makefile_fix.patch b/Macaulay2-1.4-makefile_fix.patch
new file mode 100644
index 0000000..ec6fde0
--- /dev/null
+++ b/Macaulay2-1.4-makefile_fix.patch
@@ -0,0 +1,15 @@
+diff -up Macaulay2-1.4-r12617/Macaulay2/bin/Makefile.in.makefile_fix Macaulay2-1.4-r12617/Macaulay2/bin/Makefile.in
+--- Macaulay2-1.4-r12617/Macaulay2/bin/Makefile.in.makefile_fix	2010-09-02 15:33:59.000000000 -0500
++++ Macaulay2-1.4-r12617/Macaulay2/bin/Makefile.in	2011-05-27 09:42:21.797565260 -0500
+@@ -25,10 +25,9 @@ all: $(EXEFILE)
+ relink:
+ 	rm -f $(EXEFILE)
+ 	$(MAKE)
+-
+ ifeq (@OS@ @SHARED@,Linux yes)
+ ifneq (@BUILDLIST@,)
+-M2_LDFLAGS += -Wl,-rpath, at librariesdir@/lib
++	M2_LDFLAGS += -Wl,-rpath, at librariesdir@/lib
+ ifneq (@OBJDUMP@,)
+ 	@OBJDUMP@ -x $< | egrep RPATH
+ 	@OBJDUMP@ -x $< | egrep "RPATH + at librariesdir@/lib$$"
diff --git a/Macaulay2-1.4-optflags.patch b/Macaulay2-1.4-optflags.patch
new file mode 100644
index 0000000..cd141dc
--- /dev/null
+++ b/Macaulay2-1.4-optflags.patch
@@ -0,0 +1,16 @@
+diff -up Macaulay2-1.4-r12617/configure.ac.optflags Macaulay2-1.4-r12617/configure.ac
+--- Macaulay2-1.4-r12617/configure.ac.optflags	2010-10-19 17:00:55.000000000 -0500
++++ Macaulay2-1.4-r12617/configure.ac	2011-01-14 13:03:45.894830844 -0600
+@@ -226,9 +226,9 @@ FFLAGS=` echo $FFLAGS | sed -e 's/-O[0-9
+ ]
+ 
+ if test "$OPTIMIZE" = yes
+-then CFLAGS="$CFLAGS -O3"
+-     CXXFLAGS="$CXXFLAGS -O3"
+-     FFLAGS="$FFLAGS -O3"
++then CFLAGS="-O3 $CFLAGS"
++     CXXFLAGS="-O3 $CXXFLAGS"
++     FFLAGS="-O3 $FFLAGS"
+ else CFLAGS="$CFLAGS -O0"
+      CXXFLAGS="$CXXFLAGS -O0"
+      FFLAGS="$FFLAGS -O0"
diff --git a/Macaulay2-1.4-xdg_open.patch b/Macaulay2-1.4-xdg_open.patch
new file mode 100644
index 0000000..378423a
--- /dev/null
+++ b/Macaulay2-1.4-xdg_open.patch
@@ -0,0 +1,21 @@
+diff -up Macaulay2-1.4-r12617/Macaulay2/m2/html.m2.xdg_open Macaulay2-1.4-r12617/Macaulay2/m2/html.m2
+--- Macaulay2-1.4-r12617/Macaulay2/m2/html.m2.xdg_open	2010-10-25 17:23:21.000000000 -0500
++++ Macaulay2-1.4-r12617/Macaulay2/m2/html.m2	2011-01-14 14:03:28.173589110 -0600
+@@ -1244,6 +1244,7 @@ chk := ret -> if ret != 0 then (
+      error "external command failed"
+      )
+ browserMethods := hashTable {
++     "xdg open" => url -> {"xdg-open", url},
+      "firefox" => url -> {"firefox", url},
+      "open" => url -> {"open", url},
+      "cygstart" => url -> {"cygstart", url},
+@@ -1259,7 +1260,8 @@ show URL := x -> (
+      else
+      if version#"issue" === "Cygwin" then browser = "cygstart";
+      if browser === "" then (
+-	  if runnable "firefox" then browser = "firefox"
++	  if runnable "xdg-open" then browser = "xdg-open"
++	  else if runnable "firefox" then browser = "firefox"
+ 	  else if runnable "netscape" then browser = "netscape"
+ 	  else error "no browser found, and none specified in $WWWBROWSER"
+ 	  );
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 1e11d03..73e5c20 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -1,20 +1,20 @@
-%global svn r10737
+%global svn r12617
 
 %global emacs_sitelisp  %{_datadir}/emacs/site-lisp/
 %global xemacs_sitelisp %{_datadir}/xemacs/site-packages/lisp/
 
-%global INFO_FILES BGG BeginningMacaulay2 Benchmark BoijSoederberg Browse Bruns ChainComplexExtras Classic ConvexInterface ConwayPolynomials Depth Dmodules EdgeIdeals Elimination FirstPackage FourTiTwo FourierMotzkin GenericInitialIdeal HyperplaneArrangements IntegralClosure InvolutiveBases LLLBases LexIdeals LocalRings Macaulay2Doc MapleInterface Markov NoetherNormalization Normaliz NumericalAlgebraicGeometry OpenMath PackageTemplate Parsing PieriMaps Points Polyhedra Polymake Posets PrimaryDecomposition RationalPoints ReesAlgebra Regularity SCSCP SRdeformations Schubert2 SchurFunctors SchurRings SimpleDoc SimplicialComplexes StatePolytope Style SymmetricPolynomials TangentCone Text XML gfanInterface
+%global INFO_FILES AdjointIdeal BeginningMacaulay2 Benchmark BGG Binomials BoijSoederberg BooleanGB Browse Bruns ChainComplexExtras Classic ConvexInterface ConwayPolynomials Cyclotomic Depth DGAlgebras Dmodules EdgeIdeals Elimination FirstPackage FormalGroupLaws FourierMotzkin FourTiTwo GenericInitialIdeal gfanInterface GraphicalModels Graphics Graphs HodgeIntegrals HyperplaneArrangements IntegralClosure InvolutiveBases Kronecker LexIdeals LLLBases LocalRings Macaulay2Doc MapleInterface Markov ModuleDeformations NAGtypes Nauty NoetherNormalization Normaliz NormalToricVarieties NumericalAlgebraicGeometry OpenMath PackageTemplate Parametrization Parsing PHCpack PieriMaps Points Polyhedra Polymake Posets PrimaryDecomposition RationalPoints ReesAlgebra Regularity Schubert2 SchurFunctors SchurRings SCSCP Serialization SimpleDoc SimplicialComplexes SimplicialDecomposability SRdeformations StatePolytope Style SymmetricPolynomials TangentCone Text ToricVectorBundles WeylGroups XML
  
 Summary: System for algebraic geometry and commutative algebra
 Name:    Macaulay2
-Version: 1.3.1
-Release: 9%{?dist}
+Version: 1.4
+Release: 1%{?dist}
 
 License: GPLv2
 Group:   Applications/Engineering
 URL:     http://www.math.uiuc.edu/Macaulay2/
 # the SVN revision is being used as a unique ID
-Source0: http://www.math.uiuc.edu/Macaulay2/Downloads/SourceCode/Macaulay2-%{version}-%{svn}.bz2
+Source0: http://www.math.uiuc.edu/Macaulay2/Downloads/SourceCode/Macaulay2-%{version}-%{svn}-src.tar.bz2
 #Source0: Macaulay2-%{version}-%{pre}.tar.bz2
 #Source1: Macaulay2-svn_checkout.sh
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -23,12 +23,27 @@ Source10: Macaulay2.png
 Source11: Macaulay2.desktop
 Source20: etags.sh
 
-Patch0: Macaulay2-1.1-optflags.patch
-Patch1: Macaulay2-1.2-xdg_open.patch
-# Use the Fedora versions of Normaliz and 4ti2
-Patch8: Macaulay2-1.3.1-fedora.patch
-Patch9: Macaulay2-1.3.1-dso.patch
-Patch201739: Macaulay2-0.9.95-bz201739.patch
+## BUNDLED code
+%global _enable_frobby --enable-frobby
+%if 0%{?_enable_frobby:1}
+Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/1.4/frobby_v0.8.2.tar.gz 
+Provides: bundled(frobby) = 0.8.2
+%endif
+Source101: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/1.4/nauty24r2.tar.gz 
+Provides: bundled(nauty) = 2.4
+
+
+Patch0: Macaulay2-1.4-optflags.patch
+Patch1: Macaulay2-1.4-xdg_open.patch
+# fix makefiles for building bundled code
+Patch2: Macaulay2-1.4-makefile_fix.patch
+# use fedora version of 4ti2
+Patch7: Macaulay2-1.3.1-fedora_4ti2.patch
+# use fedora version of normliz
+Patch8: Macaulay2-1.4-fedora_normaliz27.patch
+%global system_normaliz 1
+
+Patch201739: Macaulay2-1.4-bz201739.patch
 
 BuildRequires: autoconf
 BuildRequires: bison
@@ -44,6 +59,7 @@ BuildRequires: gdbm-devel
 BuildRequires: info
 BuildRequires: factory-static
 BuildRequires: factory-devel >= 3.1
+BuildRequires: libatomic_ops-devel
 BuildRequires: libfac-static
 BuildRequires: libfac-devel >= 3.1
 BuildRequires: lapack-devel
@@ -59,13 +75,17 @@ BuildRequires: mpfr-devel
 BuildRequires: glpk-devel
 BuildRequires: cddlib-devel cddlib-static
 BuildRequires: gfan
-BuildRequires: normaliz
 BuildRequires: 4ti2
-# Runtime deps that RPM didn't pick up
+
 Requires: gfan
-Requires: normaliz
 Requires: 4ti2
 
+## FIXME/TODO : feodra currently only has normliz = 2.2, need at *least* 2.5 for Macaulay-1.4 -- Rex
+%if 0%{?system_normalize}
+BuildRequires: normaliz >= 2.7
+Requires: normaliz >= 2.7
+%endif
+
 Obsoletes: Macaulay2-common < %{version}-%{release}
 Provides:  Macaulay2-common = %{version}-%{release}
 Obsoletes: Macaulay2-doc < %{version}-%{release} 
@@ -85,23 +105,35 @@ Macaulay 2 is a new software system devoted to supporting research in
 algebraic geometry and commutative algebra written by Daniel R. Grayson
 and Michael E. Stillman
 
+
 %prep
 %setup -q  -n %{name}-%{version}-%{svn}
 
 install -p -m755 %{SOURCE20} ./etags
 
+## bundled code
+mkdir -p BUILD/tarfiles/
+%if 0%{?_enable_frobby:1}
+install -D -p %{SOURCE100} BUILD/tarfiles/
+%endif
+install -D -p %{SOURCE101} BUILD/tarfiles/
+
 %patch0 -p1 -b .optflags
 %patch1 -p1 -b .xdg_open
+%patch2 -p1 -b .makefile_fix
 %patch201739 -p1 -b .bz201739
-%patch8 -p1 -b .fedora
-# SVN revision 10971
-%patch9 -p1 -b .dso
+%patch7 -p1 -b .fedora_4ti2
 # 4ti2 binaries are tucked away in %{_libdir}/4ti2/bin/
-# and are thus arch dependant
-sed -i "s|@@LIBDIR@@|%{_libdir}|g" Macaulay2/packages/FourTiTwo.m2 
+# and are thus arch dependant, or figure out a better way to use
+# environment modules here
+sed -i "s|@@LIBDIR@@|%{_libdir}|g" Macaulay2/packages/FourTiTwo.m2
+%if 0%{?system_normaliz}
+%patch8 -p1 -b .fedora_normaliz
+%endif
 
 [ -f configure -a -f include/config.h ] || make 
 
+
 %build
 
 # We need /sbin:. in PATH to find install-info,etags
@@ -119,16 +151,15 @@ LDFLAGS="-L%{_libdir}/readline5" \
   --enable-shared \
   --disable-fc-lib-ldflags \
   --disable-strip \
-  --disable-building \
-  --with-unbuilt-programs="gfan 4ti2 normaliz" \
-  --disable-frobby
+  %{?_enable_frobby}%{!?_enable_frobby:--disable-frobby} \
+  --with-unbuilt-programs="cddplus gfan 4ti2 lrslib %{?system_normaliz:normaliz}" 
 
 # Not smp-safe
 make -j 1
 
 
-%check 
-make -k check ||:
+#check 
+#time make -k check ||:
 
 
 %install
@@ -142,9 +173,8 @@ make install DESTDIR=%{buildroot} \
 install -p -m644 -D %{SOURCE10} \
   %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/Macaulay2.png
 
-desktop-file-install \
+desktop-file-install --vendor ="" \
   --dir=%{buildroot}%{_datadir}/applications \
-  --vendor="fedora" \
   %{SOURCE11}
 
 # Make a new home for emacs files
@@ -219,7 +249,8 @@ fi
 
 %files
 %defattr(-,root,root,-)
-%doc Macaulay2/COPYING Macaulay2/README
+%doc Macaulay2/COPYING-GPL-2 
+%doc Macaulay2/README
 %{_bindir}/M2
 %{_datadir}/applications/*Macaulay2.desktop
 %{_datadir}/icons/hicolor/*/*/*
@@ -227,12 +258,16 @@ fi
 %{_docdir}/Macaulay2/
 %{_infodir}/*.info*
 %{_libdir}/Macaulay2/
+%{_libexecdir}/Macaulay2/
 %{_mandir}/man1/*
 %ghost %{emacs_sitelisp} 
 %ghost %{xemacs_sitelisp}
 
 
 %changelog
+* Thu May 26 2011 Rex Dieter <rdieter at fedoraproject.org> 1.4-1
+- 1.4
+
 * Thu May 26 2011 Rex Dieter <rdieter at fedoraproject.org> 1.3.1-9
 - Typo in INFO_FILES (#708086)
 
diff --git a/sources b/sources
index f6309d7..6447e84 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,4 @@
 cbd99341ddfbed3f87dfd062e4673937  Macaulay2.png
-ea9c1e7fdbf9b30ae02f12a5635e9cd0  Macaulay2-1.3.1-r10737.bz2
+a1c46c5ef1d0c5baff5b02ee3395e31a  Macaulay2-1.4-r12617-src.tar.bz2
+1acadb2039df96c313d870e1972a2d39  frobby_v0.8.2.tar.gz
+53f83420491a32e3fe9b03a44c559a89  nauty24r2.tar.gz


More information about the scm-commits mailing list