From 7bbefdd45b1e3cd00295f7e125a3d8389c214040 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Apr 11 2006 17:51:40 +0000 Subject: - 0.9.8 (cvs, no tarball yet) - drop -doc subpkg (in main now) --- diff --git a/Macaulay2-0.9-htmlview.patch b/Macaulay2-0.9-htmlview.patch deleted file mode 100644 index dcaeab2..0000000 --- a/Macaulay2-0.9-htmlview.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- Macaulay2-0.9/bin/M2-help.in_orig Thu Sep 27 06:09:38 2001 -+++ Macaulay2-0.9/bin/M2-help.in Mon Oct 29 13:54:55 2001 -@@ -1,3 +1,3 @@ - #! /bin/sh - M2HOME="`dirname $0`/../Macaulay2" --${WWBROWSER:-netscape} "$M2HOME/html/index.html" -+${WWBROWSER:-htmlview} "$M2HOME/html/index.html" diff --git a/Macaulay2-0.9-optimize.patch b/Macaulay2-0.9-optimize.patch deleted file mode 100644 index 18e1cb4..0000000 --- a/Macaulay2-0.9-optimize.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- Macaulay2-0.9/include/config.Makefile.in_orig Sun Sep 9 09:55:36 2001 -+++ Macaulay2-0.9/include/config.Makefile.in Mon Oct 29 11:01:53 2001 -@@ -110,8 +110,8 @@ - CFLAGS += -O3 -fexpensive-optimizations - CXXFLAGS += -O3 -fexpensive-optimizations - else --CFLAGS += -O0 --CXXFLAGS += -O0 -+CFLAGS += -+CXXFLAGS += - endif - endif - diff --git a/Macaulay2-0.9.2-gcc3.patch b/Macaulay2-0.9.2-gcc3.patch deleted file mode 100644 index 691b6b0..0000000 --- a/Macaulay2-0.9.2-gcc3.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- Macaulay2-0.9.2/Macaulay2/e/style.hpp.gcc3 2001-08-07 22:16:19.000000000 -0500 -+++ Macaulay2-0.9.2/Macaulay2/e/style.hpp 2003-09-12 08:48:39.000000000 -0500 -@@ -3,7 +3,8 @@ - #define _style_hh_ - - #include // to get fabs(), gcc 3.0 --#include // just to get swap(), which is included from algobase.h by vector.h, gcc 3.0 -+#include // to get swap(), gcc 3.0 -+using namespace std; - #include - #include - #include ---- Macaulay2-0.9.2/Macaulay2/e/x_factor.cpp.gcc3 2001-08-07 20:15:34.000000000 -0500 -+++ Macaulay2-0.9.2/Macaulay2/e/x_factor.cpp 2003-09-12 08:50:41.000000000 -0500 -@@ -3,7 +3,7 @@ - //#if !defined(__MWERKS__) - #if 1 - #include --#include -+#include - #define divides ignore_this_symbol /* bits/stl_function.h contains a generic one, sigh, gcc 3.0 */ - #include "interp.hpp" - #undef divides diff --git a/Macaulay2-0.9.2-gcc34.patch b/Macaulay2-0.9.2-gcc34.patch deleted file mode 100644 index 6a46a9c..0000000 --- a/Macaulay2-0.9.2-gcc34.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Macaulay2-0.9.2/Macaulay2/e/EGB1.hpp.gcc34 1999-09-09 16:47:12.000000000 -0500 -+++ Macaulay2-0.9.2/Macaulay2/e/EGB1.hpp 2004-10-18 14:55:59.000000000 -0500 -@@ -104,7 +104,7 @@ - }; - class EGB1 : public EGroebnerComputation - { -- class iterator; -+public: class iterator; - friend class iterator; - private: - // Ring information diff --git a/Macaulay2-0.9.2-gcc4.patch b/Macaulay2-0.9.2-gcc4.patch deleted file mode 100644 index ef40e4a..0000000 --- a/Macaulay2-0.9.2-gcc4.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Nur Macaulay2-0.9.2-orig/Macaulay2/c/compat.h Macaulay2-0.9.2/Macaulay2/c/compat.h ---- Macaulay2-0.9.2-orig/Macaulay2/c/compat.h 2002-01-10 17:46:37.000000000 +0100 -+++ Macaulay2-0.9.2/Macaulay2/c/compat.h 2005-05-18 01:13:01.000000000 +0200 -@@ -99,7 +99,7 @@ - int open(const char *, int, ...); - #endif - --#ifdef __STDC__ -+#if 0 - int close(int); - int fputs(const char *,FILE *); /* needed for sunos 4.1 */ - int fprintf(FILE *,const char *,...); /* needed for sunos 4.1 */ -diff -Nur Macaulay2-0.9.2-orig/Macaulay2/e/Elookup.cpp Macaulay2-0.9.2/Macaulay2/e/Elookup.cpp ---- Macaulay2-0.9.2-orig/Macaulay2/e/Elookup.cpp 1999-07-08 19:09:59.000000000 +0200 -+++ Macaulay2-0.9.2/Macaulay2/e/Elookup.cpp 2005-05-18 01:15:21.000000000 +0200 -@@ -1,12 +1,12 @@ - // Copyright 1999 Michael E. Stillman - #include "EGB1.hpp" --int EMonomialLookupTable::compare(egb_elem *p, egb_elem *q) const -+template<> int EMonomialLookupTable::compare(egb_elem *p, egb_elem *q) const - { - const monomial *m = I.lead_monomial(p->f); - const monomial *n = I.lead_monomial(q->f); - return I.compare_monomials(m,n); - } --int EMonomialLookupTable::compare(ering_elem *p, ering_elem *q) const -+template<> int EMonomialLookupTable::compare(ering_elem *p, ering_elem *q) const - { - const monomial *m = I.lead_monomial_of_polynomial(p->f); - const monomial *n = I.lead_monomial_of_polynomial(q->f); diff --git a/Macaulay2-0.9.2-static.patch b/Macaulay2-0.9.2-static.patch deleted file mode 100644 index eb3bc0c..0000000 --- a/Macaulay2-0.9.2-static.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Macaulay2-0.9.2/Macaulay2/d/Makefile.in.static 2002-10-19 11:15:30.000000000 -0500 -+++ Macaulay2-0.9.2/Macaulay2/d/Makefile.in 2002-10-19 11:18:01.000000000 -0500 -@@ -308,7 +308,7 @@ - ###################### libraries - - ifneq ($(OS),Darwin) --ifeq "$(GCC) $(STATIC)" "yes no" -+ifeq "$(GCC) $(STATIC)" "yes" - LIBRARYOPTIONS += -Wl,-Bstatic - endif - endif -@@ -326,7 +326,7 @@ - LIBRARYOPTIONS += -lstdc++ - - ifneq ($(OS),Darwin) --ifeq "$(GCC) $(STATIC)" "yes no" -+ifeq "$(GCC) $(STATIC)" "yes" - LIBRARYOPTIONS += -Wl,-Bdynamic - endif - endif diff --git a/Macaulay2-0.9.8-cout.patch b/Macaulay2-0.9.8-cout.patch new file mode 100644 index 0000000..45bcaad --- /dev/null +++ b/Macaulay2-0.9.8-cout.patch @@ -0,0 +1,18 @@ +--- M2/Macaulay2/e/x_factor.cpp.std_namespace 2005-08-31 08:28:45.000000000 -0500 ++++ M2/Macaulay2/e/x_factor.cpp 2006-02-10 13:24:34.000000000 -0600 +@@ -31,10 +31,11 @@ + + // debugging display routines to be called from gdb + // needs factory to be configured without option --disable-streamio +-void showvar(Variable &t) { cout << t << endl; } +-void showcf(CanonicalForm &t) { cout << t << endl; } +-void showcfl(CFList &t) { cout << t << endl; } +-void showcffl(CFFList &t) { cout << t << endl; } ++//using namespace std; ++//void showvar(Variable &t) { cout << t << endl; } ++//void showcf(CanonicalForm &t) { cout << t << endl; } ++//void showcfl(CFList &t) { cout << t << endl; } ++//void showcffl(CFFList &t) { cout << t << endl; } + + extern "C" { + extern void factory_setup_2(); diff --git a/Macaulay2-0.9.8-gcc4.patch b/Macaulay2-0.9.8-gcc4.patch new file mode 100644 index 0000000..3f8da89 --- /dev/null +++ b/Macaulay2-0.9.8-gcc4.patch @@ -0,0 +1,72 @@ +--- M2/Macaulay2/e/linalgGB/MonomialSet.hpp.gcc4 2006-04-10 13:22:14.000000000 -0500 ++++ M2/Macaulay2/e/linalgGB/MonomialSet.hpp 2006-04-10 13:22:32.000000000 -0500 +@@ -16,7 +16,7 @@ + }; + + public: +- MonomialSet::MonomialSet(); ++ MonomialSet(); + + static MonomialSet *make(); + +--- M2/Macaulay2/e/Eschreyer.hpp.gcc4 2006-04-10 13:28:44.000000000 -0500 ++++ M2/Macaulay2/e/Eschreyer.hpp 2006-04-10 13:29:02.000000000 -0500 +@@ -53,7 +53,7 @@ + int find_divisor(const MonomialIdeal * mi, const int *exponents, int &result); + // Returns the index of the least element in the monomial order which divides. + +- void GBKernelComputation::wipe_unneeded_terms(gbvector * & f); ++ void wipe_unneeded_terms(gbvector * & f); + // removes every term of f which is not a lead term of some element of gb. + + gbvector * s_pair(gbvector * syz); +--- M2/Macaulay2/e/x_factor.cpp.gcc4 2006-04-10 13:35:25.000000000 -0500 ++++ M2/Macaulay2/e/x_factor.cpp 2006-04-10 13:35:47.000000000 -0500 +@@ -56,8 +56,8 @@ + __gmp_reallocate_func = save_gmp_reallocate_func; + __gmp_free_func = save_gmp_free_func; + } +- enter_factory:: enter_factory() { enter(); } +- enter_factory::~enter_factory() { exit(); } ++ enter_factory() { enter(); } ++ ~enter_factory() { exit(); } + }; + + struct enter_M2 { +@@ -75,8 +75,8 @@ + __gmp_reallocate_func = save_gmp_reallocate_func; + __gmp_free_func = save_gmp_free_func; + } +- enter_M2:: enter_M2() { enter(); } +- enter_M2::~enter_M2() { exit(); } ++ enter_M2() { enter(); } ++ ~enter_M2() { exit(); } + }; + + static MP_INT toInteger(CanonicalForm h) { +--- M2/Macaulay2/e/mat-symm.cpp.gcc4 2006-04-10 13:34:41.000000000 -0500 ++++ M2/Macaulay2/e/mat-symm.cpp 2006-04-10 13:34:54.000000000 -0500 +@@ -4,7 +4,7 @@ + class SymmMatrix + { + public: +- static MatrixOrNull * SymmMatrix::symmetricPower(const Matrix *m0, int p) ++ static MatrixOrNull * symmetricPower(const Matrix *m0, int p) + { + if (m0->n_rows() != 1) + { +--- M2/Macaulay2/c/compat.h.gcc4 2003-11-12 08:22:54.000000000 -0600 ++++ M2/Macaulay2/c/compat.h 2006-04-10 13:27:34.000000000 -0500 +@@ -99,7 +99,11 @@ + int open(const char *, int, ...); + #endif + +-#ifdef __STDC__ ++/* ifdef __STDC__ */ ++/* the following doesn't compile on linux w/gcc-4.x, so ++ maybe use some sun-specific define instead? -- Rex ++*/ ++#if 0 + int close(int); + int fputs(const char *,FILE *); /* needed for sunos 4.1 */ + int fprintf(FILE *,const char *,...); /* needed for sunos 4.1 */ diff --git a/Macaulay2-0.9.8-htmlview.patch b/Macaulay2-0.9.8-htmlview.patch new file mode 100644 index 0000000..a5d4911 --- /dev/null +++ b/Macaulay2-0.9.8-htmlview.patch @@ -0,0 +1,6 @@ +--- M2/Macaulay2/bin/M2-help.htmlview 2005-03-13 20:00:26.000000000 -0600 ++++ M2/Macaulay2/bin/M2-help 2006-03-28 08:50:07.000000000 -0600 +@@ -1,2 +1,2 @@ + #! /bin/sh +-${WWBROWSER:-firefox} "$HOME/.Macaulay2/index.html" ++${WWBROWSER:-htmlview} "$HOME/.Macaulay2/index.html" diff --git a/Macaulay2-0.9.8-infodir.patch b/Macaulay2-0.9.8-infodir.patch new file mode 100644 index 0000000..461187b --- /dev/null +++ b/Macaulay2-0.9.8-infodir.patch @@ -0,0 +1,12 @@ +--- M2/include/config.Makefile.in.infodir 2006-03-27 13:47:11.000000000 -0600 ++++ M2/include/config.Makefile.in 2006-03-28 07:50:32.000000000 -0600 +@@ -88,8 +88,8 @@ + + binRelDir = bin + libRelDir = lib +-infoRelDir = info + dataRelDir = share ++infoRelDir = $(dataRelDir)/info + manRelDir = $(dataRelDir)/man + man1RelDir = $(manRelDir)/man1 + man3RelDir = $(manRelDir)/man3 diff --git a/Macaulay2-0.9.8-optflags.patch b/Macaulay2-0.9.8-optflags.patch new file mode 100644 index 0000000..18e1cb4 --- /dev/null +++ b/Macaulay2-0.9.8-optflags.patch @@ -0,0 +1,13 @@ +--- Macaulay2-0.9/include/config.Makefile.in_orig Sun Sep 9 09:55:36 2001 ++++ Macaulay2-0.9/include/config.Makefile.in Mon Oct 29 11:01:53 2001 +@@ -110,8 +110,8 @@ + CFLAGS += -O3 -fexpensive-optimizations + CXXFLAGS += -O3 -fexpensive-optimizations + else +-CFLAGS += -O0 +-CXXFLAGS += -O0 ++CFLAGS += ++CXXFLAGS += + endif + endif + diff --git a/Macaulay2.desktop b/Macaulay2.desktop index 3dc6ca9..08855d2 100644 --- a/Macaulay2.desktop +++ b/Macaulay2.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=Macaulay2 Exec=M2 -Icon=Macaulay2.png +Icon=Macaulay2 SwallowTitle=Macaulay2 Terminal=true Type=Application diff --git a/Macaulay2.spec b/Macaulay2.spec index 713c9f4..bb058d3 100644 --- a/Macaulay2.spec +++ b/Macaulay2.spec @@ -1,95 +1,98 @@ -# busted on x86_64 -- Rex -# define m2home %{_libdir}/%{name}-%{version} -# Makefiles hardcode "%prefix/lib" instead, ok? -- Rex -%define m2home %{_prefix}/lib/%{name}-%{version} + +%define beta cvs20060327 Summary: System for algebraic geometry and commutative algebra Name: Macaulay2 -Version: 0.9.2 -Release: 22%{?dist} +Version: 0.9.8 +Release: 0.2.%{beta}%{?dist} + License: GPL Group: Applications/Engineering URL: http://www.math.uiuc.edu/Macaulay2/ -Source: http://www.math.uiuc.edu/Macaulay2/ftp-site/Macaulay2-0.9.2-src.tar.gz +#Source: http://www.math.uiuc.edu/Macaulay2/ftp-site/Macaulay2-0.9.5.beta.tar.gz +Source: M2-0.9.8-%{beta}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source1: Macaulay2.png Source2: Macaulay2.desktop -Patch0: Macaulay2-0.9-optimize.patch -Patch1: Macaulay2-0.9-htmlview.patch -Patch2: Macaulay2-0.9.2-static.patch -Patch3: Macaulay2-0.9.2-gcc3.patch -Patch4: Macaulay2-0.9.2-gcc34.patch -Patch5: Macaulay2-0.9.2-gcc4.patch +Patch0: Macaulay2-0.9.8-optflags.patch +Patch1: Macaulay2-0.9.8-htmlview.patch +Patch2: Macaulay2-0.9.8-cout.patch +Patch3: Macaulay2-0.9.8-infodir.patch +Patch4: Macaulay2-0.9.8-gcc4.patch BuildRequires: desktop-file-utils BuildRequires: gc-devel -BuildRequires: factory-devel >= 2.0.5 -BuildRequires: libfac-devel >= 2.0.5 +# See http://bugzilla.redhat.com/bugzilla/188499 +BuildRequires: ntl-devel +BuildRequires: factory-devel +BuildRequires: libfac-devel +BuildRequires: lapack +%if "%{?fedora}" > "3" +BuildRequires: lapack-devel +%endif BuildRequires: gdbm-devel +BuildRequires: readline-devel BuildRequires: time -#BuildRequires: lapack-devel +BuildRequires: byacc +# /sbin/install-info +BuildRequires: info +# etags +BuildRequires: emacs-common +Source10: etags.sh +# M2-help +Requires: htmlview + +BuildRequires: automake -Obsoletes: %{name}-emacs < %{version}-%{release} -Provides: %{name}-emacs = %{version}-%{release} +Obsoletes: Macaulay2-docs < %{version}-%{release} +Provides: Macaulay2-docs = %{version}-%{release} +Obsoletes: Macaulay2-emacs < %{version}-%{release} +Provides: Macaulay2-emacs = %{version}-%{release} %description 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 -%package doc -Summary: %{name} documentation -Group: Documentation -Requires: %{name} = %{version} -Requires: htmlview -%description doc -%{name} documentation. - %prep -%setup -q +%setup -q -n M2 -%patch0 -p1 -b .opt +install -m755 %{SOURCE10} ./etags + +%patch0 -p1 -b .optflags %patch1 -p1 -b .htmlview -%patch2 -p1 -b .static -# fix gcc3 blocker, some warnings about use of deprecated headers -%patch3 -p1 -b .gcc3 -# fc3/gcc34 fix -%patch4 -p1 -b .gcc34 -# fc4/gcc4 fix -%patch5 -p1 -b .gcc4 +%patch2 -p1 -b .cout +%patch3 -p1 -b .infodir +%patch4 -p1 -b .gcc4 %build +# We need /sbin:. in PATH to find install-info,etags +export PATH=/sbin:`pwd`:$PATH + %configure \ --disable-dumpdata \ - --disable-optimize - -#TODO: --with-lapacklibs + --disable-optimize \ + --disable-static \ + --with-lapacklibs="-llapack" +# Not smp-safe make %check || : -# NOTE: util/screen dies on fc5/buildsystem (could not open pty) -#make check ||: +# util/screen dies on fc5/buildsystem (could not open pty) +#make -k check ||: %install -%makeinstall - -# Fix locations -sed -i -e "s@M2HOME=.*@M2HOME=%{m2home}@" $RPM_BUILD_ROOT%{_bindir}/M2 -sed -i -e "s@M2HOME=.*@M2HOME=%{m2home}@" $RPM_BUILD_ROOT%{_bindir}/M2-help -sed -i -e "s@$RPM_BUILD_ROOT@@g" $RPM_BUILD_ROOT%{m2home}/emacs/* +rm -rf $RPM_BUILD_ROOT -## emacs files -install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp -cp -alf $RPM_BUILD_ROOT%{m2home}/emacs/*.el \ - $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ +make install prefix=$RPM_BUILD_ROOT%{_prefix} # app img install -p -m644 -D %{SOURCE1} \ @@ -103,25 +106,12 @@ desktop-file-install \ %{SOURCE2} ## Unpackaged files -rm -f $RPM_BUILD_ROOT%{m2home}/setup -# %doc stuff, no need to dup in appdir -rm -f $RPM_BUILD_ROOT%{m2home}/{README,CHANGES,COPYING} -# created by make check -find $RPM_BUILD_ROOT%{m2home} \( -name test.out -o -name test.out*.trim \) -exec rm -v {} \; -# .cvsignore -find $RPM_BUILD_ROOT%{m2home} -name .cvsignore -exec rm -v {} \; -# unuseful files outside of build environment -find $RPM_BUILD_ROOT%{m2home}/packages -name "Makefile*" -exec rm -v {} \; %clean rm -rf $RPM_BUILD_ROOT -#preun -# Handle possibly existing dumpdata -#rm -f %{m2home}/libexec/Macaulay2-*-data ||: - %post touch --no-create %{_datadir}/icons/hicolor ||: gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: @@ -133,32 +123,26 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: %files %defattr(-,root,root,-) -%doc Macaulay2/README Macaulay2/CHANGES +%doc Macaulay2/README Macaulay2/CHANGES Macaulay2/COPYING %{_bindir}/M2 +%{_bindir}/M2-emacs +%{_bindir}/M2-help +%{_bindir}/M2-load-libs +%{_datadir}/Macaulay2/ +%{_datadir}/emacs/ %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/*/* -%dir %{m2home} -%{m2home}/cache/ -%{m2home}/libexec/ -%{m2home}/m2/ -%{m2home}/packages/ -# emacs bits -%{m2home}/emacs/ -%{_datadir}/emacs/site-lisp/ - -%files doc -%defattr(-,root,root,-) -%{_bindir}/M2-help -%{m2home}/html/ -%{m2home}/tutorial/ +# FIXME +%{_docdir}/Macaulay2 +%{_infodir}/* +%{_mandir}/man1/M2.1* +%{_mandir}/man1/M2-help.1* %changelog -* Mon Apr 10 2006 Rex Dieter 0.9.2-22 -- fix icon location (#188384) - -* Thu Mar 30 2006 Rex Dieter 0.9.2-21 -- *really* disable %%check (fails on fc5+ anyway) +* Tue Mar 21 2006 Rex Dieter 0.9.8-0.2.cvs20060327 +- 0.9.8 (cvs, no tarball yet) +- drop -doc subpkg (in main now) * Fri Jan 20 2006 Rex Dieter 0.9.2-20 - .desktop: drop Category=Development diff --git a/etags.sh b/etags.sh new file mode 100644 index 0000000..17d0c2e --- /dev/null +++ b/etags.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +for ETAGS in etags.emacs etags ; do + test -x /usr/bin/$ETAGS && exec $ETAGS ${1+"$@"} +done + +exit 1