Skip to content
Browse files

Make polybori build against boost 1.52 with upstream's help

Package-Manager: portage-2.2.0_alpha149
  • Loading branch information...
1 parent 5a506fd commit 33f9ecbf06970cb6b861021b79493ba2c81daea8 @kiwifb kiwifb committed Dec 21, 2012
View
6 sci-mathematics/polybori/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*polybori-0.8.2-r4 (21 Dec 2012)
+
+ 21 Dec 2012; François Bissey <francois.bissey@canterbury.ac.nz>
+ +polybori-0.8.2-r4.ebuild, +files/polybori-0.8.2-boost1.52.patch:
+ Add upstream patch to build against boost-1.52
+
21 Nov 2012; François Bissey <francois.bissey@canterbury.ac.nz>
-files/polybori-0.8.0-base-lookup.patch, -polybori-0.8.1-r1.ebuild,
-files/gbcore.py.patch, -files/ipbori.patch, -files/nf.h.patch:
View
4 sci-mathematics/polybori/Manifest
@@ -1,10 +1,12 @@
AUX polybori-0.8.2-boost-mt.patch 4578 SHA256 606cf508c55851c1abd82b68caa57cce422a58cf5ba4da1294f206e2cbfda167 SHA512 df6580cc3d620ef12ee2694a1142072e6c360ae1500c70306d6e74b4ae2d16d23feb9fffb529ad011d3b48c9b51af41c986ea1f138e1cfef1f2105ffc4b2bda3 WHIRLPOOL e7a9a992875b6655da39207fffeb665cfcb1688fd3cf1f3d636f13f6239bd107a624b9c05b1d236f56282a1d4bd1c49c713b933788a4ff707ab301429a9bf109
+AUX polybori-0.8.2-boost1.52.patch 4407 SHA256 61afc6fdffbd392fa3845062caf158876dec2ba4e8bf0c0f70c504c6a1b22e72 SHA512 ccda00d5e8eaa0728493d9e87152dcc79b723159e87fc4ba9adb10aec064741fe322b0c62a50a7ca4b2f1564a9eade5b0e3e5fe69a92cd2261cc690a1994fb63 WHIRLPOOL 5952ef728f3927ca23b9bb13ab3f8cde357bf8e1276a3b7504e3403a0be3f284102de11d3c40b8ba470c43a0479455b9a807d2f27bfdcc73250116cfbc6f430e
AUX polybori-0.8.2-doc.patch 724 SHA256 92768485d1dd5c95e79fe2d2d37bb3704a225f83779c7c4c7be9d91d7e21d528 SHA512 19efc7be50bc7b98db5e7ec27c90f8f2d3c3352a9201520695bed6b2b0650300c5b041ab7120297d4259cec18ea4835309195cf21b1a14720cc3f5a77d2b614c WHIRLPOOL e36af528825e39fd85bd839ad91a8cf74d25a135be280aa8a4d67da09ad62cba1a99876dd80f0131e9f5cf686ec3879111cdda94a7a99561c94e238c3f279abc
AUX polybori-0.8.2-otool.patch 950 SHA256 326b3537ba27e7cfcf96a98fba7e8bb5622264248e18e056073213f710ac9496 SHA512 c41663ec6ae7b469db08e7e1434fbaf90e8b3f7f54029b9e199055463fa25936b8d6fddc91337ae8fc35ca52808b98277013ebd8f523cbe31ceb0510859655b9 WHIRLPOOL c6634669743de5a5619dc49593f386328daaf1de0aeedb6d942069f89904a572326ff5981360eaa58e2d7d39133f09da60a59b198a3e29046537ca1ce6db74de
AUX polybori-0.8.2-python.patch 751 SHA256 64538680c3d89d5557b9cd2855390d3102e000f21f310732b62c49f1038658c9 SHA512 5002e93699c55c36882407b238bce938a500dcff4bab69dee6038cc32fdf299d113a79260b2efd88fa6754455a23b83291898cb550a16aa3103c48c8d87d3e1b WHIRLPOOL 2cf0890e8e7912f4447ca3e74283d85d9abc07e8df8f394d0850d4ff1dc6cbe31b298661ee20d4dc6de3f6539935ec0e3a48f1cb380446923f3065c9356392a8
DIST polybori-0.8.2.tar.gz 2731004 SHA256 cfa771f5ccfa4aeb4f783ed0e6ed46580634a5c1ac33bd7a333b579da64e1635 SHA512 9fce99487ad0bb8b2f202dd12abbf16bb3fc244a47bb3f372eabd7ba45b423bff4a677999c45bde6d77a7d92347beb43bf7b2288476e22d37325d7466a0c09ce WHIRLPOOL 6bd90cfa87a94f93a5581dc8975b9cc70195942e9b5adf149793a89eaf8a86a25d6e66ea7f0b18629a7d120124f8bd3961141a83b4a0c16d5a77043385c937cf
EBUILD polybori-0.8.2-r2.ebuild 3077 SHA256 fd1e83036b5e1ecd1db94d756fde40d19018b19f858354d017381b85e8676242 SHA512 353abc243f46f8391b362fbf507c85c1f5a800e640f3fd6ed65940fcd01eef1825c23d5cb2b833cd566d9827171e3edcc6646fd5dd291d98d0e8d9d5c4ba5726 WHIRLPOOL 688b84530f09f86a28fc29b1713204d0683aa263ef39a59e62b86e62a72360ab0505436d29b217c7be78cc5e3a1d9cec5e62ce69edd0edc8fa6b1fe37c19fe2c
EBUILD polybori-0.8.2-r3.ebuild 3114 SHA256 86e86f2f16d81ac9796f457ff6093cde0480f3f8193e57aff6bf0203204c4e6e SHA512 48e54f22f4d5da6c3d5deb08d4c867824c7a975fc3840e9ee3d8fd1f10a03934559c8beb9d4a88068dbc28ba596b098adb66d1d6587deec839be262652cd6215 WHIRLPOOL 5559558e76c2da1538b6f3155a7945876ef963e4001e0070a7bf09bcfe679dabe93f65d17eaca17a5c1dff9900b543d82f2ca4f763e1e793da1ecb3305fff21b
+EBUILD polybori-0.8.2-r4.ebuild 3157 SHA256 ed21130e9591af0bbb0a7980f3b7d3dd7fcf69acac197c667a48c5acb5f5af79 SHA512 0d875d4f3fbadd1643e4d0a9a660fd2fa4778bb1ad6f41877acfef9ced0e0111c698fec8a776b779a34b8a71a6024a435d2efd41af41209feb49a8edb2a60035 WHIRLPOOL 7c9687912df08dcea1a18e898624195f75ebca53d91c212b4256cd316662d0b42fbbb7018fe825c0bc81dddceb28ed568f33147103190dd8eab0a5ac47d1505a
EBUILD polybori-9999.ebuild 3409 SHA256 9985709684812616bdf0325cf30af30715263d466850b5cc907e598303af25b0 SHA512 5d0832e4be8c29902f51957e18cfa74346d42bcda6660b4e4a223fbc04580e1ad7c0635025a95c4aa41234ee5fdb33743e1fe63806fcd475a94a2d551d890da7 WHIRLPOOL 04caf242b2d679844d5e1e7e636d67e317f14ff02de1f6f04f746818151d19e7e5dbd66905d18323d157c73a2f89237203b480060389263025e4261b17a71f80
-MISC ChangeLog 12414 SHA256 8dbffb47938c3b2da924e5492a2ae0cb281730ee1e2dc2c97d8073cc90a368f5 SHA512 d0f51ae5813038496fe1378a8176c828497ef826335a868404a646336f62bf4e6d745394dce281c5f392099dae32879196a92b60b28d0eb25728b64747ee577a WHIRLPOOL dc80fb82bce4de2f1f750a60d8ffce82f3d7da602b4fee136235c19670861afc150262f758279e0785a7ca341c186ed5cb41f3ccce0623c9f9e8e63b3f89fa09
+MISC ChangeLog 12633 SHA256 f6757f56bedf70b69b9c376affc764f7f79d140340021f57523995dddd5f175f SHA512 89099f49bc7c2865c9e254e2866d833570deaf645bfdee95fce3819551553a0e192906d015d2af89a22b406d9d316b516a72e8b8b3a9fd0ce93dabc7c2f8ab5c WHIRLPOOL 4d74cfcf06d1d30e77df4700b75d6ff7de707d6707b059521d49bf72e9ab9b82e2b5164218ffc755d15210e53291f60b24c3b60a1189ef44c7cc891ece63fce6
MISC metadata.xml 743 SHA256 ab8f18b4985485a62c3e3ad5bca3e4807b4cdfedd911a802504d394725fb9412 SHA512 d2064cb6a23af0d9bcf05f3fb6e9ba26fb5b3d886d6e35e0664b1983e380f7d12d6744895134f7ef6d48b0350f22d86f7d876dd1a32e4d668591182ae80ac150 WHIRLPOOL 1cc2582891cb94e8e0b9bc5ea8a86ac445d79e41709489a7e30a1473e53ee209f3f14415a93c0359ae42932d36d6d13d7a15f747983cd4a0100b89923701f9a6
View
78 sci-mathematics/polybori/files/polybori-0.8.2-boost1.52.patch
@@ -0,0 +1,78 @@
+# HG changeset patch
+# User Michael Brickenstein <brickenstein@mfo.de>
+# Date 1355745969 -3600
+# Node ID faeba020c16527325fcd4ffeb45f3e6f6fe59dd2
+# Parent e0498e6f2d8fb3d9b119443b230a94a90af7db10
+fixed boost::python::range disambiguity by explicitly using namespace
+
+diff -r e0498e6f2d8fb3d9b119443b230a94a90af7db10 -r faeba020c16527325fcd4ffeb45f3e6f6fe59dd2 PyPolyBoRi/Poly_wrapper.cc
+--- a/PyPolyBoRi/Poly_wrapper.cc Tue Dec 04 13:57:03 2012 +0100
++++ b/PyPolyBoRi/Poly_wrapper.cc Mon Dec 17 13:06:09 2012 +0100
+@@ -77,7 +77,7 @@
+ .def("stable_hash", &BoolePolynomial::stableHash, "Reproducible hash code")
+ .def("__len__", &BoolePolynomial::length, "Number of terms")
+ .def("terms",
+- range(&BoolePolynomial::orderedBegin, &BoolePolynomial::orderedEnd))
++ boost::python::range(&BoolePolynomial::orderedBegin, &BoolePolynomial::orderedEnd))
+ .def("__pow__",poly_power)
+ //.def(self+=self)
+ //.def(self-=self)
+diff -r e0498e6f2d8fb3d9b119443b230a94a90af7db10 -r faeba020c16527325fcd4ffeb45f3e6f6fe59dd2 PyPolyBoRi/main_wrapper.cc
+--- a/PyPolyBoRi/main_wrapper.cc Tue Dec 04 13:57:03 2012 +0100
++++ b/PyPolyBoRi/main_wrapper.cc Mon Dec 17 13:06:09 2012 +0100
+@@ -183,7 +183,7 @@
+ .def("get_order_code", get_order_code)
+ .def("append_block", append_block,
+ "Append integer, which marks the index of the start of the next block (for block orderings)")
+- .def("blocks", range(ring_block_begin, ring_block_end));
++ .def("blocks", boost::python::range(ring_block_begin, ring_block_end));
+
+
+ boost::python::class_<BooleConstant>("BooleConstant",
+@@ -196,7 +196,7 @@
+ .def(self*self)
+ .def("__str__", streamable_as_str<BooleConstant>)
+ .def("__repr__", streamable_as_str<BooleConstant>)
+- .def("variables", range(&BooleConstant::variableBegin, &BooleConstant::variableEnd))
++ .def("variables", boost::python::range(&BooleConstant::variableBegin, &BooleConstant::variableEnd))
+ .def("deg", &BooleConstant::deg)
+ .def("is_one", &BooleConstant::isOne)
+ .def("is_zero", &BooleConstant::isZero)
+diff -r e0498e6f2d8fb3d9b119443b230a94a90af7db10 -r faeba020c16527325fcd4ffeb45f3e6f6fe59dd2 PyPolyBoRi/monomial_wrapper.cc
+--- a/PyPolyBoRi/monomial_wrapper.cc Tue Dec 04 13:57:03 2012 +0100
++++ b/PyPolyBoRi/monomial_wrapper.cc Mon Dec 17 13:06:09 2012 +0100
+@@ -63,7 +63,7 @@
+ .def(init<const BooleMonomial &>())
+ .def(init<const BooleVariable &>())
+ .def("is_one", &BooleMonomial::isOne)
+- .def("variables", range(&BooleMonomial::variableBegin, &BooleMonomial::variableEnd))
++ .def("variables", boost::python::range(&BooleMonomial::variableBegin, &BooleMonomial::variableEnd))
+ //.def("__iter__", boost::python::iterator<BooleMonomial>())
+ .def("__hash__", &BooleMonomial::hash, "Fast hash code, based on the \
+ pointer to the underlying ZDD node. \nIt may vary from runtime to runtime.")
+diff -r e0498e6f2d8fb3d9b119443b230a94a90af7db10 -r faeba020c16527325fcd4ffeb45f3e6f6fe59dd2 PyPolyBoRi/set_wrapper.cc
+--- a/PyPolyBoRi/set_wrapper.cc Tue Dec 04 13:57:03 2012 +0100
++++ b/PyPolyBoRi/set_wrapper.cc Mon Dec 17 13:06:09 2012 +0100
+@@ -49,8 +49,8 @@
+ .def("__repr__", streamable_as_str<BooleSet>)
+ .def("__str__", streamable_as_str<BooleSet>)
+ .def("__len__", &BooleSet::length)
+- .def("__iter__", range(&BooleSet::begin, &BooleSet::end))
+- .def("__reversed__", range(&BooleSet::rbegin, &BooleSet::rend))
++ .def("__iter__", boost::python::range(&BooleSet::begin, &BooleSet::end))
++ .def("__reversed__", boost::python::range(&BooleSet::rbegin, &BooleSet::rend))
+ .def("__hash__", &BooleSet::hash, "Fast hash code, based on the \
+ pointer to the underlying ZDD node. \nIt may vary from runtime to runtime.")
+ .def("stable_hash", &BooleSet::stableHash, "Reproducible hash code")
+diff -r e0498e6f2d8fb3d9b119443b230a94a90af7db10 -r faeba020c16527325fcd4ffeb45f3e6f6fe59dd2 PyPolyBoRi/strategy_wrapper.cc
+--- a/PyPolyBoRi/strategy_wrapper.cc Tue Dec 04 13:57:03 2012 +0100
++++ b/PyPolyBoRi/strategy_wrapper.cc Mon Dec 17 13:06:09 2012 +0100
+@@ -264,7 +264,7 @@
+ .def("next_spoly", &GroebnerStrategy::nextSpoly)
+ .def("some_spolys_in_next_degree", someNextDegreeSpolys)
+ .def("__len__",nGenerators)
+- .def("__iter__",range(stratbegin, stratend))
++ .def("__iter__", boost::python::range(stratbegin, stratend))
+ .def("__getitem__", get_ith_gen)
+ .def("__getitem__", get_gen_by_lead)
+
View
128 sci-mathematics/polybori/polybori-0.8.2-r4.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+PYTHON_DEPEND="2:2.7"
+
+inherit base eutils flag-o-matic multilib python scons-utils toolchain-funcs
+
+DESCRIPTION="Polynomials over Boolean Rings"
+HOMEPAGE="http://polybori.sourceforge.net/"
+
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV/_rc*/rc}/${P/_rc/rc}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="doc gd"
+
+# of course polybori has a working set of tests
+RESTRICT="mirror"
+
+CDEPEND=">=dev-libs/boost-1.48.0[python]
+ dev-python/ipython
+ >=sci-libs/m4ri-20090512
+ gd? ( media-libs/gd )"
+DEPEND="${CDEPEND}
+ doc? (
+ dev-tex/tex4ht
+ app-doc/doxygen
+ )"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}/${PN}-${PV/_rc*/}"
+
+USE_SCONS_TRUE="True"
+USE_SCONS_FALSE="False"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.8.2-python.patch
+ "${FILESDIR}"/${PN}-0.8.2-boost-mt.patch
+ "${FILESDIR}"/${PN}-0.8.2-otool.patch
+ "${FILESDIR}"/${PN}-0.8.2-doc.patch
+ "${FILESDIR}"/${PN}-0.8.2-boost1.52.patch
+)
+
+pkg_setup() {
+ python_set_active_version 2.7
+ python_pkg_setup
+ export DOT_SAGE="${S}"
+}
+
+src_prepare() {
+ # make sure external m4ri is used
+ rm -r M4RI || die "failed to remove internal copy of m4ri"
+
+ base_src_prepare
+ # fix boost_python linking for boost-1.48+ see
+ # http://archives.gentoo.org/gentoo-dev/msg_ab39d8366b714ecacfc7fa64cd48ad00.xml
+ sed -i "s:boost_python:boost_python-${PYTHON_ABI}:" SConstruct || die "failed to fix boost_python"
+}
+
+src_compile(){
+ # needed to make polybori linkable
+ #append-flags -fPIC
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ append-flags -fno-strict-aliasing
+ fi
+
+ # TODO: handle singular ?
+
+ # store all parameters for scons in a bash array
+ myesconsargs=(
+ CC=$(tc-getCC)
+ CXX=$(tc-getCXX)
+ CFLAGS=${CFLAGS}
+ CCFLAGS=""
+ CXXFLAGS=${CXXFLAGS}
+ LINKFLAGS=${LDFLAGS}
+ HAVE_HEVEA=False
+ HAVE_L2H=False
+ $(use_scons doc HAVE_TEX4HT)
+ $(use_scons doc HAVE_DOXYGEN)
+ $(use_scons doc HAVE_PYDOC)
+ MANDIR="${ED}"/usr/share/man
+ PREFIX="${ED}"/usr
+ DEVEL_LIB_PREFIX="${ED}"/usr/$(get_libdir)
+ PYINSTALLPREFIX="${ED}"$(python_get_sitedir)
+ INSTALLDIR="${ED}"/usr/share/polybori
+ INSTALL_NAME_DIR="${EPREFIX}"/usr/$(get_libdir)/
+ CONFFILE="${ED}"/usr/share/polybori/flags.conf
+ )
+
+ # extra configuration for macos
+ # FIXME: don't know how to deal properly with versionned libraries with install_name so dropping it.
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ myesconsargs+=(
+ FORCE_HASH_MAP=True
+ SHLIBVERSIONING=False
+ )
+ fi
+
+ escons "${myesconsargs[@]}" prepare-install prepare-devel || die
+}
+
+src_test() {
+ export PBORI_NOSAGE=1
+ ipbori/ipbori -t || die "PolyBoRi's self-testing feature failed"
+}
+
+src_install() {
+ escons "${myesconsargs[@]}" install devel-install || die
+
+ # remove incomplete documentation
+ if ! use doc ; then
+ rm -rf "${ED}"/usr/share/polybori/doc \
+ || die "failed to remove useless documentation"
+ fi
+
+ # we only need shared objects elsewhere
+ rm "${ED}"/usr/$(get_libdir)/lib*.a \
+ || die "failed to remove static libraries"
+
+ # fixing flags.conf
+ sed -i "s:${D}:\/:" "${ED}"/usr/share/polybori/flags.conf || die
+}

0 comments on commit 33f9ecb

Please sign in to comment.
Something went wrong with that request. Please try again.