Add -polymake patch to fix polymake plugin.

This commit is contained in:
Jerry James 2019-07-10 19:46:43 -06:00
parent 0f6728accd
commit 899538a022
2 changed files with 120 additions and 2 deletions

112
Singular-polymake.patch Normal file
View File

@ -0,0 +1,112 @@
--- singular-4.1.1/Singular/dyn_modules/polymake/polymake_conversion.cc.orig 2018-12-18 09:45:32.000000000 -0700
+++ singular-4.1.1/Singular/dyn_modules/polymake/polymake_conversion.cc 2019-07-10 16:25:26.662602392 -0600
@@ -403,7 +403,7 @@ gfan::ZFan* PmFan2ZFan (polymake::perl::
int n = pf->give("N_MAXIMAL_CONES");
for (int i=0; i<n; i++)
{
- polymake::perl::Object pmcone=pf->CallPolymakeMethod("cone",i);
+ polymake::perl::Object pmcone=pf->call_method("cone",i);
gfan::ZCone* zc=PmCone2ZCone(&pmcone);
zf->insert(*zc);
}
--- singular-4.1.1/Singular/dyn_modules/polymake/polymake_wrapper.cc.orig 2018-12-18 09:45:32.000000000 -0700
+++ singular-4.1.1/Singular/dyn_modules/polymake/polymake_wrapper.cc 2019-07-10 16:33:46.722537723 -0600
@@ -34,7 +34,7 @@ static BOOLEAN bbpolytope_Op2(int op, le
polymake::perl::Object* pp = ZPolytope2PmPolytope(zp);
polymake::perl::Object* pq = ZPolytope2PmPolytope(zq);
polymake::perl::Object pms;
- CallPolymakeFunction("minkowski_sum", *pp, *pq) >> pms;
+ polymake::call_function("minkowski_sum", *pp, *pq) >> pms;
ms = PmPolytope2ZPolytope(&pms);
delete pp;
delete pq;
@@ -1063,7 +1063,7 @@ BOOLEAN PMlatticePoints(leftv res, leftv
{
polymake::perl::Object* p = ZPolytope2PmPolytope(zp);
#if (POLYMAKEVERSION >=214)
- polymake::Matrix<polymake::Integer> lp = p->CallPolymakeMethod("LATTICE_POINTS");
+ polymake::Matrix<polymake::Integer> lp = p->call_method("LATTICE_POINTS");
#elif (POLYMAKEVERSION >=212)
polymake::Matrix<polymake::Integer> lp = p->give("LATTICE_POINTS");
#else
@@ -1291,7 +1291,7 @@ BOOLEAN PMhilbertBasis(leftv res, leftv
{
polymake::perl::Object* p = ZPolytope2PmPolytope(zp);
#if (POLYMAKEVERSION >=214)
- polymake::Matrix<polymake::Integer> lp = p->CallPolymakeMethod("HILBERT_BASIS");
+ polymake::Matrix<polymake::Integer> lp = p->call_method("HILBERT_BASIS");
#elif (POLYMAKEVERSION >=212)
polymake::Matrix<polymake::Integer> lp = p->give("HILBERT_BASIS");
#else
@@ -1375,7 +1375,7 @@ BOOLEAN PMminkowskiSum(leftv res, leftv
polymake::perl::Object* pp = ZPolytope2PmPolytope(zp);
polymake::perl::Object* pq = ZPolytope2PmPolytope(zq);
polymake::perl::Object pms;
- CallPolymakeFunction("minkowski_sum", *pp, *pq) >> pms;
+ polymake::call_function("minkowski_sum", *pp, *pq) >> pms;
delete pp;
delete pq;
ms = PmPolytope2ZPolytope(&pms);
@@ -1403,7 +1403,7 @@ BOOLEAN PMminkowskiSum(leftv res, leftv
polymake::perl::Object* pp = ZPolytope2PmPolytope(zp);
polymake::perl::Object* pq = ZPolytope2PmPolytope(zq);
polymake::perl::Object pms;
- CallPolymakeFunction("minkowski_sum", *pp, *pq) >> pms;
+ polymake::call_function("minkowski_sum", *pp, *pq) >> pms;
delete pp;
delete pq;
ms = PmPolytope2ZPolytope(&pms);
@@ -1437,7 +1437,7 @@ BOOLEAN PMminkowskiSum(leftv res, leftv
polymake::perl::Object* pp = ZPolytope2PmPolytope(zp);
polymake::perl::Object* pq = ZPolytope2PmPolytope(zq);
polymake::perl::Object pms;
- CallPolymakeFunction("minkowski_sum", *pp, *pq) >> pms;
+ polymake::call_function("minkowski_sum", *pp, *pq) >> pms;
delete pp;
delete pq;
ms = PmPolytope2ZPolytope(&pms);
@@ -1466,7 +1466,7 @@ BOOLEAN PMminkowskiSum(leftv res, leftv
polymake::perl::Object* pp = ZPolytope2PmPolytope(zp);
polymake::perl::Object* pq = ZPolytope2PmPolytope(zq);
polymake::perl::Object pms;
- CallPolymakeFunction("minkowski_sum", *pp, *pq) >> pms;
+ polymake::call_function("minkowski_sum", *pp, *pq) >> pms;
delete pp;
delete pq;
ms = PmPolytope2ZPolytope(&pms);
@@ -1494,7 +1494,7 @@ polymake::Matrix<polymake::Integer> vert
polymake::Matrix<polymake::Integer> allrays = p->give("VERTICES");
polymake::Matrix<polymake::Integer> wantedrays;
bool ok = true;
- for(polymake::Entire<polymake::Set<polymake::Integer> >::const_iterator i=polymake::entire(*s); !i.at_end(); i++)
+ for(auto i=polymake::entire(*s); !i.at_end(); i++)
{
wantedrays = wantedrays / allrays.row(PmInteger2Int(*i,ok));
}
@@ -1709,7 +1709,7 @@ BOOLEAN visual(leftv res, leftv args)
try
{
polymake::perl::Object* pp = ZPolytope2PmPolytope(zp);
- VoidCallPolymakeFunction("jreality",pp->CallPolymakeMethod("VISUAL"));
+ polymake::call_function("jreality",pp->call_method("VISUAL"));
delete pp;
}
catch (const std::exception& ex)
@@ -1730,7 +1730,7 @@ BOOLEAN visual(leftv res, leftv args)
try
{
polymake::perl::Object* pf=ZFan2PmFan(zf);
- VoidCallPolymakeFunction("jreality",pf->CallPolymakeMethod("VISUAL"));
+ polymake::call_function("jreality",pf->call_method("VISUAL"));
}
catch (const std::exception& ex)
{
@@ -1759,7 +1759,7 @@ BOOLEAN normalFan(leftv res, leftv args)
{
polymake::perl::Object* p=ZPolytope2PmPolytope(zp);
polymake::perl::Object pf;
- CallPolymakeFunction("normal_fan", *p) >> pf;
+ polymake::call_function("normal_fan", *p) >> pf;
delete p;
zf = PmFan2ZFan(&pf);
}

View File

@ -15,7 +15,7 @@
Name: Singular
Version: %{downstreamver}%{?patchver}
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Computer Algebra System for polynomial computations
# License analysis:
# - factory/readcf.cc, Singular/grammar.cc, and Singular/grammar.h are
@ -36,7 +36,7 @@ Source0: http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/%{upstrea
# - git reset --hard c4532ad56fe482b30e500057ca76121dac774af2
# - tar cJf surfex.tar.xz Singular/LIB/surfex
Source1: surfex.tar.xz
URL: http://www.singular.uni-kl.de/
URL: https://www.singular.uni-kl.de/
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: boost-python2-devel
@ -89,6 +89,8 @@ Patch6: %{name}-gfanlib.patch
Patch7: %{name}-alias.patch
# Let ESingular read a compressed singular.hlp file
Patch8: %{name}-emacs.patch
# Adapt to polymake >= 3.3
Patch9: %{name}-polymake.patch
%description
Singular is a computer algebra system for polynomial computations, with
@ -200,6 +202,7 @@ This package contains the Singular java interface.
%patch6 -p1 -b .gfanlib
%patch7 -p1 -b .alias
%patch8 -p1 -b .emacs
%patch9 -p1 -b .polymake
# Fix the name of the boost_python library
sed -ri 's/(lboost_python)-\$\{PYTHON_VERSION\}/\1%{python2_version_nodots}/' \
@ -448,6 +451,9 @@ make check
%changelog
* Wed Jul 10 2019 Jerry James <loganjerry@gmail.com> - 4.1.1p3-5
- Add -polymake patch to fix polymake plugin
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1.1p3-4
- Rebuild for readline 8.0