Blame polymake-singular.patch

Jerry James 334dc9
--- ./bundled/singular/apps/ideal/include/internal/singularRingManager.h.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/include/internal/singularRingManager.h	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -22,7 +22,7 @@
Jerry James 6ad223
 #include "polymake/client.h"
Jerry James 6ad223
 #include "polymake/Map.h"
Jerry James 80eaa7
 
Jerry James 80eaa7
-#include <Singular/libsingular.h>
Jerry James 80eaa7
+#include <libsingular.h>
Jerry James 6ad223
 #include "polymake/ideal/internal/singularTermOrderData.h"
Jerry James 6ad223
 #include "polymake/ideal/internal/singularTermOrderMap.h"
Jerry James 6ad223
 #include "polymake/ideal/internal/singularConvertTypes.h"
Jerry James 334dc9
--- ./bundled/singular/apps/ideal/include/internal/singularTermOrderData.h.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/include/internal/singularTermOrderData.h	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -21,7 +21,7 @@
Jerry James 6ad223
 #include "polymake/Ring.h"
Jerry James 80eaa7
 #include "polymake/Polynomial.h"
Jerry James 6ad223
 
Jerry James 6ad223
-#include "Singular/libsingular.h"
Jerry James 6ad223
+#include <libsingular.h>
Jerry James 6ad223
 
Jerry James 6ad223
 namespace polymake { 
Jerry James 6ad223
 namespace ideal {
Jerry James 334dc9
--- ./bundled/singular/apps/ideal/include/internal/singularTermOrderMap.h.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/include/internal/singularTermOrderMap.h	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -20,7 +20,7 @@
Jerry James 6ad223
 #include "polymake/Map.h"
Jerry James 6ad223
 #include "polymake/ideal/internal/singularTermOrderData.h"
Jerry James 80eaa7
 
Jerry James 80eaa7
-#include <Singular/libsingular.h>
Jerry James 80eaa7
+#include <libsingular.h>
Jerry James f50867
 
Jerry James 80eaa7
 namespace polymake { 
Jerry James 80eaa7
 namespace ideal {
Jerry James 334dc9
--- ./bundled/singular/apps/ideal/include/internal/singularUtils.h.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/include/internal/singularUtils.h	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -18,7 +18,7 @@
Jerry James 6ad223
 #define POLYMAKE_IDEAL_INTERNAL_SINGULAR_UTILS_H
Jerry James 6ad223
 
Jerry James 6ad223
 // Singular includes
Jerry James 6ad223
-#include <Singular/libsingular.h>
Jerry James 6ad223
+#include <libsingular.h>
Jerry James 6ad223
 
Jerry James 6ad223
 // polymake includes
Jerry James 6ad223
 #include "polymake/client.h"
Jerry James 334dc9
--- ./bundled/singular/apps/ideal/src/singularConvertTypes.cc.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/src/singularConvertTypes.cc	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -53,7 +53,7 @@ number convert_Rational_to_number(const
Jerry James 80eaa7
    mpz_set(num,numerator(r).get_rep());
Jerry James 80eaa7
    mpz_init(denom);
Jerry James 80eaa7
    mpz_set(denom,denominator(r).get_rep());
Jerry James 80eaa7
-   return nlInit2gmp(num,denom,NULL);
Jerry James 80eaa7
+   return nlInit2gmp(num,denom);
Jerry James 80eaa7
 }
Jerry James 80eaa7
 
Jerry James 80eaa7
 
Jerry James 6ad223
@@ -86,7 +86,7 @@ poly convert_Polynomial_to_poly(const Po
Jerry James 80eaa7
          p_SetExp(monomial,k+1,term->first[k],ring);
Jerry James f50867
       }
Jerry James 80eaa7
       p_Setm(monomial,ring);
Jerry James 80eaa7
-      p = p_Sub(p, monomial,ring);
Jerry James 80eaa7
+      p = p_Add_q(p, p_Neg(monomial, ring), ring);
Jerry James f50867
    }
Jerry James 80eaa7
    return p;
Jerry James 80eaa7
 }
Jerry James 334dc9
--- ./bundled/singular/apps/ideal/src/singularIdeal.cc.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/src/singularIdeal.cc	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -16,9 +16,9 @@
Jerry James 6ad223
 
Jerry James 6ad223
 #include <dlfcn.h>
Jerry James 6ad223
 
Jerry James 6ad223
-#include <Singular/libsingular.h>
Jerry James 334dc9
-#include <kernel/combinatorics/stairc.h>
Jerry James 6ad223
-#include <coeffs/mpr_complex.h>
Jerry James 6ad223
+#include <libsingular.h>
Jerry James 6ad223
+#include <singular/stairc.h>
Jerry James 6ad223
+#include <singular/mpr_complex.h>
Jerry James 6ad223
 
Jerry James 6ad223
 #include "polymake/ideal/singularIdeal.h"
Jerry James 6ad223
 #include "polymake/ideal/internal/singularTermOrderData.h"
Jerry James 6ad223
@@ -110,7 +110,7 @@ public:
Jerry James 80eaa7
 
Jerry James 80eaa7
    SingularIdeal_wrap* initial_ideal() const {
Jerry James 80eaa7
       check_ring(singRing); 
Jerry James 80eaa7
-      ::ideal res = id_Head(singIdeal,IDRING(singRing));
Jerry James 80eaa7
+      ::ideal res = idHead(singIdeal);
Jerry James 80eaa7
       SingularIdeal_wrap* initial = new SingularIdeal_impl(res,singRing);
Jerry James 80eaa7
       id_Delete(&res,currRing);
Jerry James 80eaa7
       return initial;
Jerry James 6ad223
@@ -195,12 +195,12 @@ public:
Jerry James 80eaa7
          ring solring = (ring)iiRETURNEXPR.Data();
Jerry James f50867
          // avoid redefinition message
Jerry James 51c14e
          BITSET oldverb;
Jerry James 80eaa7
-         SI_SAVE_OPT2(oldverb);
Jerry James 80eaa7
-         si_opt_2 &= ~Sy_bit(V_REDEFINE);
Jerry James 80eaa7
+         oldverb = verbose;
Jerry James 80eaa7
+         verbose &= ~Sy_bit(V_REDEFINE);
Jerry James 80eaa7
          // switch to the new returned ring
Jerry James 80eaa7
          idhdl solRingHdl=enterid("solveRing", 0, RING_CMD, &IDROOT, FALSE);
Jerry James 80eaa7
          IDRING(solRingHdl)=solring;
Jerry James 80eaa7
-         SI_RESTORE_OPT2(oldverb);
Jerry James 80eaa7
+         verbose = oldverb;
Jerry James 80eaa7
          rSetHdl(solRingHdl);
Jerry James 80eaa7
          // retrieve solution list SOL from the interpreter
Jerry James 80eaa7
          idhdl sol = ggetid("SOL");
Jerry James 334dc9
--- ./bundled/singular/apps/ideal/src/singularInit.cc.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/src/singularInit.cc	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -80,8 +80,8 @@ void init_singular()
Jerry James 80eaa7
    cerr << "*** singular siInit done. ***" << endl;
Jerry James 80eaa7
 #else
Jerry James 80eaa7
    // make singular library loading quiet
Jerry James 80eaa7
-   si_opt_2 &= ~Sy_bit(V_LOAD_LIB);
Jerry James 80eaa7
-   si_opt_2 &= ~Sy_bit(V_REDEFINE);
Jerry James 80eaa7
+   verbose &= ~Sy_bit(V_LOAD_LIB);
Jerry James 80eaa7
+   verbose &= ~Sy_bit(V_REDEFINE);
Jerry James 80eaa7
 #endif
Jerry James 80eaa7
    singular_initialized = 1;
Jerry James 80eaa7
 }
Jerry James 334dc9
--- ./bundled/singular/apps/ideal/src/singularUtils.cc.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/apps/ideal/src/singularUtils.cc	2014-11-08 20:00:00.000000000 -0700
Jerry James 6ad223
@@ -16,7 +16,7 @@
Jerry James 6ad223
 
Jerry James 6ad223
 #include <dlfcn.h>
Jerry James 6ad223
 
Jerry James 6ad223
-#include <Singular/libsingular.h>
Jerry James 6ad223
+#include <libsingular.h>
Jerry James 6ad223
 
Jerry James 6ad223
 #include "polymake/client.h"
Jerry James 6ad223
 #include "polymake/Matrix.h"
Jerry James 334dc9
--- ./bundled/singular/configure.pl.orig	2014-10-13 06:14:22.000000000 -0600
Jerry James 334dc9
+++ ./bundled/singular/configure.pl	2014-11-08 20:00:00.000000000 -0700
Jerry James 80eaa7
@@ -45,12 +45,12 @@ sub proceed {
Jerry James 80eaa7
    chomp $singularprefix;
Jerry James 80eaa7
    # yes we need it twice ...
Jerry James 80eaa7
 
Jerry James 80eaa7
-   $Libs = join(" ",$LDflags =~ m/(-l\w+)/g) . " -lpolys -lomalloc";
Jerry James 80eaa7
+   $Libs = join(" ",$LDflags =~ m/(-l\w+)/g) . " -lsingular";
Jerry James 80eaa7
    $LDflags =~ s/ -l\w+//g;
Jerry James 80eaa7
    $LDflags =~ s/-L(\S+)/-L$1 -Wl,-rpath,$1/g;
Jerry James 80eaa7
 
Jerry James 80eaa7
    my $error=Polymake::Configure::build_test_program(<<"---", CXXflags => $CXXflags, LDflags => $LDflags, Libs => $Libs);
Jerry James 80eaa7
-#include "Singular/libsingular.h"
Jerry James 80eaa7
+#include "libsingular.h"
Jerry James 80eaa7
 #include <string>
Jerry James 80eaa7
 int main() {
Jerry James 80eaa7
    char* cpath = omStrDup("$singularprefix/lib/libSingular.$lib_ext");