aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Bissey <francois@vrooom.(none)>2009-11-22 21:58:46 +1300
committerFrançois Bissey <francois@vrooom.(none)>2009-11-22 21:58:46 +1300
commit26799665de32fe5f10119ba1b6956c93412a2a71 (patch)
treee2daea62d08e2ec64e8d52daea42a018e9e7b044 /sci-mathematics
parentAdd a patch and a use flag to dev-libs/mpir (diff)
downloadsci-26799665de32fe5f10119ba1b6956c93412a2a71.tar.gz
sci-26799665de32fe5f10119ba1b6956c93412a2a71.tar.bz2
sci-26799665de32fe5f10119ba1b6956c93412a2a71.zip
Import polybori
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/polybori/ChangeLog10
-rw-r--r--sci-mathematics/polybori/Manifest5
-rw-r--r--sci-mathematics/polybori/files/PyPolyBoRi.py22
-rw-r--r--sci-mathematics/polybori/metadata.xml9
-rw-r--r--sci-mathematics/polybori/polybori-0.6.3.ebuild91
5 files changed, 137 insertions, 0 deletions
diff --git a/sci-mathematics/polybori/ChangeLog b/sci-mathematics/polybori/ChangeLog
new file mode 100644
index 000000000..a89dc1b3d
--- /dev/null
+++ b/sci-mathematics/polybori/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-mathematics/polybori
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*polybori-0.6.3 (22 Nov 2009)
+
+ 22 Nov 2009; François Bissey <f.r.bissey@massey.ac.nz>
+ +polybori-0.6.3.ebuild, +files/PyPolyBoRi.py, +metadata.xml:
+ Initial import in the overlay
+
diff --git a/sci-mathematics/polybori/Manifest b/sci-mathematics/polybori/Manifest
new file mode 100644
index 000000000..05042cd2f
--- /dev/null
+++ b/sci-mathematics/polybori/Manifest
@@ -0,0 +1,5 @@
+AUX PyPolyBoRi.py 390 RMD160 4bf30194777c6e52cfae57c270ba0710e1be36b1 SHA1 2edd95bb03464042f82b331af3974ebbcaec3619 SHA256 d9590d4f3b5ff5e5c4cce745943da3b688b4d5894365dfacb93bc078abc5a0e7
+DIST polybori-0.6.3.tar.gz 2369450 RMD160 498a987be59c9d75e5f52d953d65e6ee01f0234a SHA1 f69bb39b984db04a2514f956a01a12999be03bf6 SHA256 30d808c2530b6cf92d7502bec2e8b69cc41a3e609fb8ce63bc6a3df380f2da93
+EBUILD polybori-0.6.3.ebuild 2232 RMD160 eb9dd44d9f5d6fe4ef3d2a2ae81a8d2799cda72d SHA1 7bd210ae53f6f068f2ae32492c703dd9582c0f3c SHA256 036bc9ec7ea19330c4058ac560ac81944300e78caa0d66135ed45d1e12b986a9
+MISC ChangeLog 310 RMD160 cac2604335382f4ef3dd30cf0f23eb414fa307a4 SHA1 6928cd72ad37b2b91d064b2ac9e7ad781a914717 SHA256 b0a5613709ce91374b73c7fea47e2e25f668223bfd9ff4b52b9bfdaa2804e026
+MISC metadata.xml 600 RMD160 aa2468b3ce80b36762f1b24f01893a1c6729bda5 SHA1 82e1aaad5d3ce0c8fbf94e17dc881d09af3da1a0 SHA256 cd0dcdae3aa7c7625cbb34a07d15a41da2749b50247a2ee2306544d8099b23eb
diff --git a/sci-mathematics/polybori/files/PyPolyBoRi.py b/sci-mathematics/polybori/files/PyPolyBoRi.py
new file mode 100644
index 000000000..d1008cb5d
--- /dev/null
+++ b/sci-mathematics/polybori/files/PyPolyBoRi.py
@@ -0,0 +1,22 @@
+from sage import all
+from sage.rings.polynomial.pbori import *
+
+def global_ring():
+ return get_cring()
+
+Polynomial = PolynomialFactory()
+
+Monomial = MonomialFactory()
+
+class OrderCode:
+ pass
+
+OrderCode.__dict__ = order_dict
+
+Variable = VariableFactory()
+
+def Ring(n, order='lp'):
+ return BooleanPolynomialRing(n, 'x', order=order)
+
+BoolePolynomialVector = BooleanPolynomialVector
+
diff --git a/sci-mathematics/polybori/metadata.xml b/sci-mathematics/polybori/metadata.xml
new file mode 100644
index 000000000..069b6fe51
--- /dev/null
+++ b/sci-mathematics/polybori/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription>PolyBoRi is a C++ library, which provides high-level data types for Boolean polynomials and monomials, exponent vectors, as well as for the underlying polynomial rings and subsets of the powerset of the Boolean variables. It also include a python interface on top of it.</longdescription>
+ <use>
+ <flag name='sage'>Replace the standard python interface by sage's python interface for easy integration in sage.</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/polybori/polybori-0.6.3.ebuild b/sci-mathematics/polybori/polybori-0.6.3.ebuild
new file mode 100644
index 000000000..6409d0f3d
--- /dev/null
+++ b/sci-mathematics/polybori/polybori-0.6.3.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils python versionator
+
+DESCRIPTION="Polynomials over Boolean Rings"
+HOMEPAGE="http://polybori.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${PN}-$(replace_version_separator 2 '-').tar.gz -> ${P}.tar.gz"
+
+RESTRICT="mirror"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+IUSE="doc sage"
+
+DEPEND=">=dev-util/scons-0.98
+ >=dev-libs/boost-1.34.1
+ >=dev-lang/python-2.5
+ dev-python/ipython
+ >=sci-libs/m4ri-20090512
+ doc? ( dev-tex/tex4ht
+ app-doc/doxygen )"
+RDEPEND=">=dev-libs/boost-1.34.1
+ >=dev-lang/python-2.5
+ dev-python/ipython"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-2)"
+
+src_prepare(){
+ use sage && cp "${FILESDIR}/PyPolyBoRi.py" "${S}/pyroot/polybori/"
+}
+
+src_compile(){
+
+# hevea and l2h are deprecated and will be removed so we focus on tex4ht
+# tried to summarize all the options in a variable but it didn't parse correctly
+ if ( use doc); then
+ DOC="True"
+ else
+ DOC="False"
+ fi
+
+ scons CFLAGS="${CFLAGS}" \
+ CCFLAGS="" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ HAVE_HEVEA="False" \
+ HAVE_L2H="False" \
+ HAVE_TEX4HT="${DOC}" \
+ HAVE_DOXYGEN="${DOC}" prepare-install || die "scons prepare-install failed"
+
+ scons CFLAGS="${CFLAGS}" \
+ CCFLAGS="" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ HAVE_HEVEA="False" \
+ HAVE_L2H="False" \
+ HAVE_TEX4HT="${DOC}" \
+ HAVE_DOXYGEN="${DOC}" prepare-devel || die "scons prepare-devel failed"
+
+}
+
+src_install() {
+ mkdir -p "${D}"
+ scons CFLAGS="${CFLAGS}" \
+ CCFLAGS="" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ HAVE_HEVEA="False" \
+ HAVE_L2H="False" \
+ HAVE_TEX4HT="${DOC}" \
+ HAVE_DOXYGEN="${DOC}" \
+ PREFIX="${D}/usr" PYINSTALLPREFIX="${D}$(python_get_sitedir)" install \
+ || die "scons install failed"
+
+ scons CFLAGS="${CFLAGS}" \
+ CCFLAGS="" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LINKFLAGS="${LDFLAGS}" \
+ HAVE_HEVEA="False" \
+ HAVE_L2H="False" \
+ HAVE_TEX4HT="${DOC}" \
+ HAVE_DOXYGEN="${DOC}" \
+ DEVEL_PREFIX="${D}/usr" PYINSTALLPREFIX="${D}$(python_get_sitedir)" devel-install \
+ || die "scons devel-install failed"
+
+}