summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fisette <ribosome@gentoo.org>2004-12-28 14:30:11 +0000
committerOlivier Fisette <ribosome@gentoo.org>2004-12-28 14:30:11 +0000
commit134e6845bf5451b11d5bbade227c9a652f304176 (patch)
treeeff8df086fc308da3c6dfe8de17c1ed4da56ecd0 /sci-mathematics/Macaulay2
parentMoving to sci-mathematics/Macaulay2 (diff)
downloadgentoo-2-134e6845bf5451b11d5bbade227c9a652f304176.tar.gz
gentoo-2-134e6845bf5451b11d5bbade227c9a652f304176.tar.bz2
gentoo-2-134e6845bf5451b11d5bbade227c9a652f304176.zip
Moved from app-sci/Macaulay2 to sci-mathematics/Macaulay2.
Diffstat (limited to 'sci-mathematics/Macaulay2')
-rw-r--r--sci-mathematics/Macaulay2/ChangeLog24
-rw-r--r--sci-mathematics/Macaulay2/Macaulay2-0.9.2.ebuild83
-rw-r--r--sci-mathematics/Macaulay2/Manifest7
-rw-r--r--sci-mathematics/Macaulay2/files/digest-Macaulay2-0.9.23
-rw-r--r--sci-mathematics/Macaulay2/files/gentoo-Macaulay2-0.9.2.diff245
-rw-r--r--sci-mathematics/Macaulay2/files/gentoo-factory-1.3b.diff24
-rw-r--r--sci-mathematics/Macaulay2/files/gentoo-libfac-0.3.2.include.diff14
-rw-r--r--sci-mathematics/Macaulay2/metadata.xml14
8 files changed, 414 insertions, 0 deletions
diff --git a/sci-mathematics/Macaulay2/ChangeLog b/sci-mathematics/Macaulay2/ChangeLog
new file mode 100644
index 000000000000..5125cf89139e
--- /dev/null
+++ b/sci-mathematics/Macaulay2/ChangeLog
@@ -0,0 +1,24 @@
+# ChangeLog for app-sci/Macaulay2
+# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/Macaulay2/ChangeLog,v 1.1 2004/12/28 14:30:11 ribosome Exp $
+
+*Macaulay2-0.9.2 (28 Dec 2004)
+
+ 28 Dec 2004; Olivier Fisette <ribosome@gentoo.org> +metadata.xml,
+ +files/gentoo-Macaulay2-0.9.2.diff, +files/gentoo-factory-1.3b.diff,
+ +files/gentoo-libfac-0.3.2.include.diff, +Macaulay2-0.9.2.ebuild:
+ Moved from app-sci/Macaulay2 to sci-mathematics/Macaulay2.
+
+ 13 Dec 2004; Patrick Kursawe <phosphan@gentoo.org>
+ files/gentoo-Macaulay2-0.9.2.diff, files/gentoo-factory-1.3b.diff,
+ Macaulay2-0.9.2.ebuild:
+ Extending patches to get the program through gcc 3.4
+
+*Macaulay2-0.9.2 (19 May 2004)
+
+ 19 May 2004; Thomas Veith <xtv@gentoo.org> Macaulay2-0.9.2.ebuild,
+metadata.xml, Manifest, files/{gentoo-factory-1.3b.diff,
+gentoo-libfac-0.3.2.include.diff, gentoo-Macaulay2-0.9.2.diff,
+digest-Macaulay2-0.9.2} :
+ Initial import.
+ research tool for commutative algebra and algebraic geometry
diff --git a/sci-mathematics/Macaulay2/Macaulay2-0.9.2.ebuild b/sci-mathematics/Macaulay2/Macaulay2-0.9.2.ebuild
new file mode 100644
index 000000000000..9c13f63e9e33
--- /dev/null
+++ b/sci-mathematics/Macaulay2/Macaulay2-0.9.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/Macaulay2/Macaulay2-0.9.2.ebuild,v 1.1 2004/12/28 14:30:11 ribosome Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+IUSE=""
+
+DESCRIPTION="research tool for commutative algebra and algebraic geometry"
+SRC_URI="http://www.math.uiuc.edu/Macaulay2/ftp-site/${P}-src.tar.gz \
+ ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Factory/factory-1.3b.tar.gz \
+ ftp://www.mathematik.uni-kl.de/pub/Math/Singular/Libfac/libfac-0.3.2.tar.gz"
+
+HOMEPAGE="http://www.math.uiuc.edu/Macaulay2/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="x86"
+
+RDEPEND="sys-libs/gdbm
+ dev-libs/gmp
+ dev-libs/boehm-gc"
+
+DEPEND="${RDEPEND}
+ sys-apps/gawk
+ dev-util/yacc"
+
+src_compile() {
+ if [ "$(gcc-version)" = "3.4" ]; then
+ append-flags "-fno-unit-at-a-time" # gcc 3.4 bug #15114, phosphan
+ fi
+ cd ${WORKDIR}/factory
+ epatch ${FILESDIR}/gentoo-factory-1.3b.diff
+ ./configure --disable-streamio --prefix=${WORKDIR} || die
+ make || die
+ make install || die
+
+ cd ${WORKDIR}/libfac
+ epatch ../Macaulay2-0.9.2/INSTALL.libfac-0.3.2-diffs
+ ./configure --prefix=${WORKDIR} || die
+ make DEFS=-DHAVE_SINGULAR_ERROR || die
+ make prefix=${WORKDIR} install || die
+
+ cd ${WORKDIR}/include
+ epatch ${FILESDIR}/gentoo-libfac-0.3.2.include.diff
+
+ CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
+ filter-flags "-fomit-frame-pointer"
+
+ cd ${WORKDIR}/Macaulay2-0.9.2
+ epatch ${FILESDIR}/gentoo-Macaulay2-0.9.2.diff
+ CPPFLAGS='-I/usr/include/gc -I${WORKDIR}/include' LDFLAGS=-L${WORKDIR}/lib \
+ ./configure --prefix=${D}/usr || die
+ make || die
+}
+
+src_install () {
+ cd ${WORKDIR}/Macaulay2-0.9.2
+ einstall || die
+
+ cp ${D}/usr/bin/M2-help tmp
+ if has_version 'kde-base/kdebase' ; then
+ einfo "Using konqueror as default help-browser!"
+ sed "s:netscape:konqueror:g" < tmp > ${D}/usr/bin/M2-help
+ elif has_version 'net-www/mozilla' ; then
+ einfo "Using mozilla as default help-browser!"
+ sed "s:netscape:mozilla:g" < tmp > ${D}/usr/bin/M2-help
+ elif has_version 'net-www/mozilla-firefox' ; then
+ einfo "Using mozilla-firefox as default help-browser!"
+ sed "s:netscape:firefox:g" < tmp > ${D}/usr/bin/M2-help
+ elif has_version 'net-www/epiphany' ; then
+ einfo "Using epiphany as default help-browser!"
+ sed "s:netscape:epiphany:g" < tmp > ${D}/usr/bin/M2-help
+ else
+ mv tmp ${D}/usr/bin/M2-help
+ fi
+ chmod a+x ${D}/usr/bin/M2-help
+
+ einfo "To change the default help browser, please set the environment"
+ einfo "variable WWBROWSER to the browser of your choice"
+
+ rm ${D}/usr/libexec/*data*
+}
diff --git a/sci-mathematics/Macaulay2/Manifest b/sci-mathematics/Macaulay2/Manifest
new file mode 100644
index 000000000000..4256434742ba
--- /dev/null
+++ b/sci-mathematics/Macaulay2/Manifest
@@ -0,0 +1,7 @@
+MD5 ee6f02d0e41ad14889cba1b79f5eb6cf Macaulay2-0.9.2.ebuild 2584
+MD5 11178139341ebefcbb14ef34a55660ec ChangeLog 742
+MD5 8ed0bde4e7e96671f190d97c92e1d67b metadata.xml 514
+MD5 0926cfa1c448a5d6464a6c0fc04425d6 files/gentoo-Macaulay2-0.9.2.diff 10410
+MD5 02f8c3fb68df6d22a55f92102a3956ee files/gentoo-libfac-0.3.2.include.diff 641
+MD5 22fafa18c7db240002ce1110747a9c9b files/gentoo-factory-1.3b.diff 680
+MD5 49353124d1f121c795a570079153114d files/digest-Macaulay2-0.9.2 199
diff --git a/sci-mathematics/Macaulay2/files/digest-Macaulay2-0.9.2 b/sci-mathematics/Macaulay2/files/digest-Macaulay2-0.9.2
new file mode 100644
index 000000000000..7533be4e7062
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/digest-Macaulay2-0.9.2
@@ -0,0 +1,3 @@
+MD5 f2181baccdb9bbe75c4f6ee61f782533 Macaulay2-0.9.2-src.tar.gz 1562476
+MD5 893adc69b64ea9b527651d3726be82b8 factory-1.3b.tar.gz 466264
+MD5 4ec3988168916f415240a347b8dfb2a4 libfac-0.3.2.tar.gz 83114
diff --git a/sci-mathematics/Macaulay2/files/gentoo-Macaulay2-0.9.2.diff b/sci-mathematics/Macaulay2/files/gentoo-Macaulay2-0.9.2.diff
new file mode 100644
index 000000000000..358705c770ec
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/gentoo-Macaulay2-0.9.2.diff
@@ -0,0 +1,245 @@
+diff -U 4 -H -d -r -N -- Macaulay2-0.9.2-org/Macaulay2/c/Makefile.in Macaulay2-0.9.2/Macaulay2/c/Makefile.in
+--- Macaulay2-0.9.2-org/Macaulay2/c/Makefile.in 2001-08-16 00:52:01.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/c/Makefile.in 2004-04-27 21:00:55.529735512 +0200
+@@ -11,9 +11,9 @@
+ rm -f y.tab.h y.output
+ ############################################################
+ .PHONY : clean all install
+ YFLAGS := -vdlt
+-LOADLIBES += -lm -lgc
++LOADLIBES += -lm -lgc -ldl
+ CNAMES := scc1.c readfile.c error.c dictionary.c list.c cprint.c type.c chk.c compat.c
+ HFILES := $(CNAMES:.c=.h) scc.h grammar.h
+ OFILES := $(CNAMES:.c=.o) grammar.o
+ SRCFILES := $(HFILES) $(CNAMES) grammar.y
+diff -U 4 -H -d -r -N -- Macaulay2-0.9.2-org/Macaulay2/d/Makefile.in Macaulay2-0.9.2/Macaulay2/d/Makefile.in
+--- Macaulay2-0.9.2-org/Macaulay2/d/Makefile.in 2002-01-10 17:46:37.000000000 +0100
++++ Macaulay2-0.9.2/Macaulay2/d/Makefile.in 2004-04-27 21:20:55.014386128 +0200
+@@ -349,9 +349,9 @@
+ endif
+
+ ../libexec/Macaulay2$(EXE) : $(ALLOBJ) $(LIBRARYFILES)
+ rm -f $@
+- time $(PURIFYCMD) $(CC) $(LDFLAGS) $(ALLOBJ) $(LOADLIBES) $(LDLIBS) $(LINK_OUTPUT_OPTION)
++ $(PURIFYCMD) $(CC) $(LDFLAGS) $(ALLOBJ) $(LOADLIBES) -ldl -lpthread $(LDLIBS) $(LINK_OUTPUT_OPTION)
+ $(STRIPCMD) $@
+
+ t_main.o : types.h
+ t : t_main.o gmp.o stdio.o strings.o system.o varstrin.o nets.o scclib.o C.o t.o
+diff -U 4 -H -d -r -N -- Macaulay2-0.9.2-org/Macaulay2/e/x_factor.cpp Macaulay2-0.9.2/Macaulay2/e/x_factor.cpp
+--- Macaulay2-0.9.2-org/Macaulay2/e/x_factor.cpp 2001-08-08 03:15:34.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/e/x_factor.cpp 2004-04-27 21:05:20.549446392 +0200
+@@ -3,9 +3,9 @@
+ //#if !defined(__MWERKS__)
+ #if 1
+ #include <assert.h>
+ #include <iostream.h>
+-#define divides ignore_this_symbol /* bits/stl_function.h contains a generic one, sigh, gcc 3.0 */
++//#define divides ignore_this_symbol /* bits/stl_function.h contains a generic one, sigh, gcc 3.0 */
+ #include "interp.hpp"
+ #undef divides
+ #include "matrix.hpp"
+ #include "z_mod_p.hpp"
+diff -U 4 -H -d -r -N -- Macaulay2-0.9.2-org/Macaulay2/m2/Makefile.in Macaulay2-0.9.2/Macaulay2/m2/Makefile.in
+--- Macaulay2-0.9.2-org/Macaulay2/m2/Makefile.in 2001-08-15 22:46:13.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/m2/Makefile.in 2004-04-27 21:11:14.595623192 +0200
+@@ -102,9 +102,9 @@
+ phase1 :: ../$(DUMPDATAFILE)
+ ../$(DUMPDATAFILE) : $(DUMPEDM2FILES) ../libexec/Macaulay2
+ # phase 1: read *.m2 and dump data
+ rm -f ../$(DUMPDATAFILE)
+- time env M2HOME=.. ../libexec/Macaulay2 -q -silent -tty '-ephase=1' \
++ env M2HOME=.. ../libexec/Macaulay2 -q -silent -tty '-ephase=1' \
+ @srcdir@/setup.m2 @srcdir@/dumpdata.m2 '-edump()'
+ else
+ ARGS := -silent setup.m2
+ endif
+diff -U 4 -H -d -r -N -- Macaulay2-0.9.2-org/Macaulay2/test/Makefile.in Macaulay2-0.9.2/Macaulay2/test/Makefile.in
+--- Macaulay2-0.9.2-org/Macaulay2/test/Makefile.in 2001-08-15 22:46:13.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/test/Makefile.in 2004-04-27 21:11:44.443085688 +0200
+@@ -41,9 +41,9 @@
+ endif
+
+ %.okay : %.m2
+ @ echo testing $<
+- @ ulimit -t 600; time env M2HOME=.. ../libexec/Macaulay2 $(ARGS) $< '-eexit(0)'
++ @ ulimit -t 600; env M2HOME=.. ../libexec/Macaulay2 $(ARGS) $< '-eexit(0)'
+ @ touch $@
+
+ clean :
+ rm -f *.okay
+diff -U 3 -dHrN -- Macaulay2-0.9.2-orig/Macaulay2/Makefile.in Macaulay2-0.9.2/Macaulay2/Makefile.in
+--- Macaulay2-0.9.2-orig/Macaulay2/Makefile.in 2001-08-18 21:17:15.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/Makefile.in 2004-05-14 13:35:33.266819848 +0200
+@@ -8,11 +8,11 @@
+
+ include ../include/config.Makefile
+ VPATH = @srcdir@
+-install :: $(packagedir)/COPYING $(packagedir)/CHANGES $(packagedir)/README
+-$(packagedir)/COPYING : COPYING $(packagedir) ; $(INSTALL_DATA) $< "$@"
+-$(packagedir)/CHANGES : CHANGES $(packagedir) ; $(INSTALL_DATA) $< "$@"
+-$(packagedir)/README : README $(packagedir) ; $(INSTALL_DATA) $< "$@"
+-$(packagedir):; $(INSTALL) -d "$@"
++install :: $(packagedocdir)/COPYING $(packagedocdir)/CHANGES $(packagedocdir)/README
++$(packagedocdir)/COPYING : COPYING $(packagedocdir) ; $(INSTALL_DATA) $< "$@"
++$(packagedocdir)/CHANGES : CHANGES $(packagedocdir) ; $(INSTALL_DATA) $< "$@"
++$(packagedocdir)/README : README $(packagedocdir) ; $(INSTALL_DATA) $< "$@"
++$(packagedocdir):; $(INSTALL) -d "$@"
+ ################################# libexec
+ libexec :; mkdir $@
+ clean ::; rm -rf libexec
+@@ -76,15 +76,15 @@
+ all ::; $(MAKE) -C emacs all
+ install distclean clean ::; $(MAKE) -C emacs $@
+ ################################# libexec
+-install :: $(packagedir)/libexec
+-$(packagedir)/libexec:; $(INSTALL) -d "$@"
+-install :: $(packagedir)/libexec/Macaulay2
+-$(packagedir)/libexec/Macaulay2 : libexec/Macaulay2
+- $(INSTALL_PROGRAM) $^ $(packagedir)/libexec
++install :: $(packageexecdir)/libexec
++$(packageexecdir)/libexec:; $(INSTALL) -d "$@"
++install :: $(packageexecdir)/libexec/Macaulay2
++$(packageexecdir)/libexec/Macaulay2 : libexec/Macaulay2
++ $(INSTALL_PROGRAM) $^ $(packageexecdir)/libexec
+ ifeq "$(DUMPDATA)" "yes"
+ ifeq "$(encap)" "no"
+-install :: $(packagedir)/$(DUMPDATAFILE)
+-$(packagedir)/$(DUMPDATAFILE) : $(DUMPDATAFILE); $(INSTALL) $< "$@"
++install :: $(packageexecdir)/$(DUMPDATAFILE)
++$(packageexecdir)/$(DUMPDATAFILE) : $(DUMPDATAFILE); $(INSTALL) $< "$@"
+ endif
+ endif
+ #################################
+diff -U 3 -dHrN -- Macaulay2-0.9.2-orig/Macaulay2/html/Makefile.in Macaulay2-0.9.2/Macaulay2/html/Makefile.in
+--- Macaulay2-0.9.2-orig/Macaulay2/html/Makefile.in 2001-08-14 05:10:18.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/html/Makefile.in 2004-05-14 13:18:10.166395216 +0200
+@@ -54,7 +54,7 @@
+ clean::; rm -f ./*.html
+ clean::; rm -rf *.doc *.fn *.hl *.inv* *.cat *.src *.dct Macaulay2-index-cache
+ distclean: clean; rm -f Makefile
+-$(packagedir)/html:; $(INSTALL) -d "$@"
+-install:: $(packagedir)/html
+- $(INSTALL_DATA) Makefile $(IMAGES) *.html @srcdir@/html.m2 $(packagedir)/html
++$(packagehtmldir):; $(INSTALL) -d "$@"
++install:: $(packagehtmldir)
++ $(INSTALL_DATA) Makefile $(IMAGES) *.html @srcdir@/html.m2 $(packagehtmldir)
+
+diff -U 3 -dHrN -- Macaulay2-0.9.2-orig/Macaulay2/tutorial/Makefile.in Macaulay2-0.9.2/Macaulay2/tutorial/Makefile.in
+--- Macaulay2-0.9.2-orig/Macaulay2/tutorial/Makefile.in 2001-08-14 05:10:18.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/tutorial/Makefile.in 2004-05-14 13:48:15.494943560 +0200
+@@ -35,10 +35,10 @@
+ ../../bin/M2 -e'readExamples=true' tutbook.m2 '-e exit 0'
+
+ #################################
+-install:: $(packagedir)/tutorial/final
++install:: $(packagedocdir)/tutorial/final
+ install:: $(TUTORIALS) $(OUTPUTS)
+- $(INSTALL_DATA) $^ "$(packagedir)/tutorial/final"
+-$(packagedir)/tutorial/final :; $(INSTALL) -d "$@"
++ $(INSTALL_DATA) $^ "$(packagedocdir)/tutorial/final"
++$(packagedocdir)/tutorial/final :; $(INSTALL) -d "$@"
+ #################################
+
+ clean :
+diff -U 3 -dHrN -- Macaulay2-0.9.2-orig/bin/M2-final.in Macaulay2-0.9.2/bin/M2-final.in
+--- Macaulay2-0.9.2-orig/bin/M2-final.in 2001-08-15 15:52:20.000000000 +0200
++++ Macaulay2-0.9.2/bin/M2-final.in 2004-05-14 12:45:00.298901056 +0200
+@@ -1,8 +1,8 @@
+ #! /bin/sh
+-M2HOME="`dirname $0`/../Macaulay2"
++M2HOME="/usr/share/Macaulay2-0.9.2"
+ export M2HOME
+-EXE="$M2HOME/libexec/Macaulay2"
+-DATA="$M2HOME/libexec/Macaulay2-`uname -m |sed s=/=-=g`-data"
++EXE="/usr/libexec/Macaulay2"
++DATA="/usr/libexec/Macaulay2-`uname -m |sed s=/=-=g`-data"
+ SETUP="$M2HOME/m2/setup.m2"
+ if [ -f "$DATA" ]
+ then exec "$EXE" "-e loaddata \"$DATA\"" -- "-e runStartFunctions()" "$@"
+diff -U 3 -dHrN -- Macaulay2-0.9.2-orig/bin/M2-help.in Macaulay2-0.9.2/bin/M2-help.in
+--- Macaulay2-0.9.2-orig/bin/M2-help.in 2002-01-09 17:21:35.000000000 +0100
++++ Macaulay2-0.9.2/bin/M2-help.in 2004-05-14 12:45:48.760533768 +0200
+@@ -1,3 +1,3 @@
+ #! /bin/sh
+-M2HOME="`dirname $0`/../Macaulay2"
++M2HOME="/usr/share/doc/Macaulay2-0.9.2"
+ ${WWBROWSER:-netscape} "$M2HOME/html/index.html"
+diff -U 3 -dHrN -- Macaulay2-0.9.2-orig/bin/Makefile.in Macaulay2-0.9.2/bin/Makefile.in
+--- Macaulay2-0.9.2-orig/bin/Makefile.in 2002-01-09 17:21:35.000000000 +0100
++++ Macaulay2-0.9.2/bin/Makefile.in 2004-05-14 13:16:46.060181304 +0200
+@@ -10,8 +10,8 @@
+ install :: $(bindir)/M2
+ $(bindir)/M2 : M2-final.in
+ $(INSTALL) -d $(bindir)
+- sed -e 's,^M2HOME=.*,M2HOME=$(prefix)/lib/Macaulay2-@PACKAGE_VERSION@,' $< >"$@".tmp
+- mv "$@".tmp "$@"
++ #sed -e 's,^M2HOME=.*,M2HOME=$(prefix)/lib/Macaulay2-@PACKAGE_VERSION@,' $< >"$@".tmp
++ mv M2-final.in "$@"
+ chmod 0755 "$@"
+
+ all :: M2-help
+@@ -20,8 +20,8 @@
+ install :: $(bindir)/M2-help
+ $(bindir)/M2-help : M2-help
+ $(INSTALL) -d $(bindir)
+- sed -e 's,^M2HOME=.*,M2HOME=$(prefix)/lib/Macaulay2-@PACKAGE_VERSION@,' $< >"$@".tmp
+- mv "$@".tmp "$@"
++ #sed -e 's,^M2HOME=.*,M2HOME=$(prefix)/lib/Macaulay2-@PACKAGE_VERSION@,' $< >"$@".tmp
++ mv M2-help.in "$@"
+ chmod 0755 "$@"
+
+ clean :; rm -f M2
+diff -U 3 -dHrN -- Macaulay2-0.9.2-orig/include/config.Makefile.in Macaulay2-0.9.2/include/config.Makefile.in
+--- Macaulay2-0.9.2-orig/include/config.Makefile.in 2002-01-09 17:21:35.000000000 +0100
++++ Macaulay2-0.9.2/include/config.Makefile.in 2004-05-14 13:05:36.563960200 +0200
+@@ -57,7 +57,11 @@
+ target = $(prefix)
+ endif
+
+-packagedir = $(target)/lib/$(package)
++packagedir = $(target)/share/$(package)
++packageexecdir = $(target)
++packagedocdir = $(target)/share/doc/$(package)
++packagehtmldir = $(target)/share/doc/$(package)/html
++
+ bindir = $(target)/bin
+
+ RANLIB = @RANLIB@
+--- Macaulay2-0.9.2/Macaulay2/e/EGB1.hpp 1999-09-09 23:47:12.000000000 +0200
++++ Macaulay2-0.9.2/Macaulay2/e/EGB1.hpp.new 2004-12-13 11:48:17.208554431 +0100
+@@ -104,8 +104,6 @@
+ };
+ class EGB1 : public EGroebnerComputation
+ {
+- class iterator;
+- friend class iterator;
+ private:
+ // Ring information
+ const EInterface I;
+@@ -255,6 +253,9 @@
+
+ virtual int new_calc(const EStopConditions &stop);
+
++ class iterator;
++ friend class iterator;
++
+ class iterator {
+ const EGB1 *comp;
+ int i;
+--- Macaulay2-0.9.2/include/config.Makefile.in 2004-12-13 12:29:02.776249827 +0100
++++ Macaulay2-0.9.2/include/config.Makefile.in.new 2004-12-13 12:47:35.221607868 +0100
+@@ -110,13 +110,6 @@
+ ifeq "$(GCC)" "yes"
+ CFLAGS += -Wall -Wshadow -Wcast-qual
+ CXXFLAGS += -Wall -Wshadow -Wcast-qual
+-ifeq "$(OPTIMIZE)" "yes"
+-CFLAGS += -O3 -fexpensive-optimizations
+-CXXFLAGS += -O3 -fexpensive-optimizations
+-else
+-CFLAGS += -O0
+-CXXFLAGS += -O0
+-endif
+ endif
+
+ ifeq "$(STRIP)" "no"
diff --git a/sci-mathematics/Macaulay2/files/gentoo-factory-1.3b.diff b/sci-mathematics/Macaulay2/files/gentoo-factory-1.3b.diff
new file mode 100644
index 000000000000..d600ce003f54
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/gentoo-factory-1.3b.diff
@@ -0,0 +1,24 @@
+diff -U 4 -H -d -r -N -- factory-org/cf_gmp.h factory/cf_gmp.h
+--- factory-org/cf_gmp.h 2001-06-25 09:51:46.000000000 +0200
++++ factory/cf_gmp.h 2004-04-27 20:46:57.155187816 +0200
+@@ -5,9 +5,7 @@
+ #define INCL_CF_GMP_H
+
+ #include <config.h>
+
+-extern "C" {
+ #include <gmp.h>
+-}
+
+ #endif /* ! INCL_CF_GMP_H */
+--- factory/cf_random.h 2001-06-25 09:51:46.000000000 +0200
++++ factory.new/cf_random.h 2004-12-13 11:25:04.000000000 +0100
+@@ -62,6 +62,8 @@
+ ~AlgExtRandomF();
+ CanonicalForm generate() const;
+ CFRandom * clone() const;
++
++ friend CFFList FpFactorizeUnivariateCZ(const CanonicalForm&, bool, int, Variable, Variable);
+ };
+
+ class CFRandomFactory {
diff --git a/sci-mathematics/Macaulay2/files/gentoo-libfac-0.3.2.include.diff b/sci-mathematics/Macaulay2/files/gentoo-libfac-0.3.2.include.diff
new file mode 100644
index 000000000000..40c5c60e4931
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/gentoo-libfac-0.3.2.include.diff
@@ -0,0 +1,14 @@
+diff -U 4 -H -d -r -N -- include-orig/factory.h include/factory.h
+--- include-orig/factory.h 2004-04-27 20:52:59.116161000 +0200
++++ include/factory.h 2004-04-27 21:05:17.617892056 +0200
+@@ -488,9 +488,9 @@
+ void psqr ( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & q, CanonicalForm & r, const Variable & x );
+
+ CanonicalForm bCommonDen ( const CanonicalForm & f );
+
+-bool divides ( const CanonicalForm & f, const CanonicalForm & g );
++//bool divides ( const CanonicalForm & f, const CanonicalForm & g );
+
+ CanonicalForm maxNorm ( const CanonicalForm & f );
+
+ CanonicalForm euclideanNorm ( const CanonicalForm & f );
diff --git a/sci-mathematics/Macaulay2/metadata.xml b/sci-mathematics/Macaulay2/metadata.xml
new file mode 100644
index 000000000000..d1791fc62ca1
--- /dev/null
+++ b/sci-mathematics/Macaulay2/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+ <email>xtv@gentoo.org</email>
+</maintainer>
+<longdescription>
+Macaulay2 is a computer algebra system for doing polynomial computations,
+particularly Grobner basis calculations. Macaulay2 is designed for solving
+problems in algebraic geometry and has a quite simple syntax,
+often described as "algebraic machine language"
+</longdescription>
+</pkgmetadata>