#12754: Fix scoping / name look-up issue und PolyBoRi 0.8.1 and support flags
from
the envrionment
-------------------------------------------------------------+--------------
Reporter: AlexanderDreyer | Owner:
AlexanderDreyer
Type: defect | Status:
needs_review
Priority: major | Milestone:
sage-5.0
Component: algebra | Resolution:
Keywords: | Work issues:
Report Upstream: Reported upstream. Little or no feedback. | Reviewers:
Leif Leonhardy, Martin Albrecht, Burcin Erocal
Authors: Alexander Dreyer | Merged in:
Dependencies: #12750 | Stopgaps:
-------------------------------------------------------------+--------------
Comment (by AlexanderDreyer):
For convenience I put the diffs of patchsets here (they arise from merging
#12750 into #12655):
{{{ #!diff
--- diff-0.8.1.p0.109-115.patch 2012-03-29 21:29:27.063819557 +0200
+++ diff-0.8.1.p1.111-119.patch 2012-03-29 21:42:55.422372689 +0200
@@ -1,7 +1,7 @@
-diff -r f05b48d16bc7 -r 0ff1dee2843e SPKG.txt
+diff -r 82bcfd079628 -r 666438ae9200 SPKG.txt
--- a/SPKG.txt Mon Mar 12 16:08:02 2012 +0100
-+++ b/SPKG.txt Thu Mar 22 17:21:37 2012 +0100
-@@ -36,6 +36,10 @@
++++ b/SPKG.txt Mon Mar 26 23:47:06 2012 +0200
+@@ -36,8 +36,15 @@
* png/libpng12 (accomplished because Python and gd depend on it, too)
* libz (accomplished because e.g. libpng depends on it)
@@ -11,18 +11,32 @@
+
== Releases ==
++=== polybori-0.8.1.p1 (Alexander Dreyer, March 26th, 2012) ===
++ * Rebased spkg on polybori-0.8.0.p2
++
=== polybori-0.8.1.p0 (Alexander Dreyer, March 7th, 2012) ===
-diff -r f05b48d16bc7 -r 0ff1dee2843e custom.py
+ * Updating sources to PolyBoRi's release 0.8.1
+
+diff -r 82bcfd079628 -r 666438ae9200 custom.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/custom.py Thu Mar 22 17:21:37 2012 +0100
-@@ -0,0 +1,64 @@
++++ b/custom.py Mon Mar 26 23:47:06 2012 +0200
+@@ -0,0 +1,73 @@
+import os
+import sys
+
+# FIXME: Do we really want to *overwrite* the flags (e.g. if set by the
user)?
-+CCFLAGS=["-O3 -Wno-long-long -Wreturn-type -g -fPIC"]
-+#CXXFLAGS=CCFLAGS+["-ftemplate-depth-100 -g -fPIC"]
-+CXXFLAGS=CCFLAGS+["-ftemplate-depth-100"]
++# Answer: Should be fixed now.
++CCFLAGS += ["-Wno-long-long", "-Wreturn-type"]
++
++# Note: PolyBoRi still appends DEFAULT_*FLAGS (overwrite those, if
necessary)
++if 'CFLAGS' in os.environ:
++ CFLAGS = os.environ['CFLAGS'].split(' ')
++
++if 'CXXFLAGS' in os.environ:
++ CXXFLAGS = os.environ['CXXFLAGS'].split(' ')
++
++if 'CPPFLAGS' in os.environ:
++ CCFLAGS = os.environ['CPPFLAGS'].split(' ')
+
+GD_LIBS+=["png12","z"]
+
@@ -80,7 +94,7 @@
+ CXX = os.environ['CXX']
+except:
+ pass
-diff -r f05b48d16bc7 -r 0ff1dee2843e patches/PyPolyBoRi.patch
+diff -r 82bcfd079628 -r 666438ae9200 patches/PyPolyBoRi.patch
--- a/patches/PyPolyBoRi.patch Mon Mar 12 16:08:02 2012 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
@@ -337,7 +351,7 @@
-+Polynomial = PolynomialFactory()
-+Variable = VariableFactory()
-
-diff -r f05b48d16bc7 -r 0ff1dee2843e patches/PyPolyBoRi.py
+diff -r 82bcfd079628 -r 666438ae9200 patches/PyPolyBoRi.py
--- a/patches/PyPolyBoRi.py Mon Mar 12 16:08:02 2012 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
@@ -388,17 +402,40 @@
-Polynomial = PolynomialFactory()
-Variable = VariableFactory()
-
-diff -r f05b48d16bc7 -r 0ff1dee2843e patches/custom.py
+diff -r 82bcfd079628 -r 666438ae9200 patches/base_lookup.patch
+--- a/patches/base_lookup.patch Mon Mar 12 16:08:02 2012 +0100
++++ b/patches/base_lookup.patch Mon Mar 26 23:47:06 2012 +0200
+@@ -8,7 +8,7 @@
+ diff -r 617ce1a715329d16e5ebde0bfdde9c4d09072451 -r
43b3931ceed7b57c4c5385442de6ff45bd0f477c
libpolybori/include/polybori/iterators/CTermStack.h
+ --- a/libpolybori/include/polybori/iterators/CTermStack.h Mon Mar 19
22:53:46 2012 +0100
+ +++ b/libpolybori/include/polybori/iterators/CTermStack.h Wed Mar 21
22:18:37 2012 +0100
+-@@ -853,7 +853,7 @@
++@@ -854,7 +854,7 @@
+ PBORI_ASSERT(m_zero.isValid());
+ PBORI_ASSERT(m_zero.isEmpty());
+
+diff -r 82bcfd079628 -r 666438ae9200 patches/custom.py
--- a/patches/custom.py Mon Mar 12 16:08:02 2012 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
-@@ -1,64 +0,0 @@
+@@ -1,75 +0,0 @@
-import os
-import sys
-
-# FIXME: Do we really want to *overwrite* the flags (e.g. if set by the
user)?
+-# Note: there will be better ways in PolyBoRi 0.8.1
-CCFLAGS=["-O3 -Wno-long-long -Wreturn-type -g -fPIC"]
-#CXXFLAGS=CCFLAGS+["-ftemplate-depth-100 -g -fPIC"]
-CXXFLAGS=CCFLAGS+["-ftemplate-depth-100"]
+-CFLAGS=["-std=c99"]
+-
+-if 'CFLAGS' in os.environ:
+- CFLAGS += os.environ['CFLAGS'].split(' ')
+-
+-if 'CXXFLAGS' in os.environ:
+- CXXFLAGS += os.environ['CXXFLAGS'].split(' ')
+-
+-if 'CPPFLAGS' in os.environ:
+- CCFLAGS += os.environ['CPPFLAGS'].split(' ')
-
-GD_LIBS+=["png12","z"]
-
@@ -456,9 +493,9 @@
- CXX = os.environ['CXX']
-except:
- pass
-diff -r f05b48d16bc7 -r 0ff1dee2843e patches/gbcore.py.patch
+diff -r 82bcfd079628 -r 666438ae9200 patches/gbcore.py.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/patches/gbcore.py.patch Thu Mar 22 17:21:37 2012 +0100
++++ b/patches/gbcore.py.patch Mon Mar 26 23:47:06 2012 +0200
@@ -0,0 +1,33 @@
+# HG changeset patch
+# User Alexander Dreyer <[email protected]>
@@ -493,9 +530,9 @@
+ ocode=old_ring.get_order_code()
+ try:
+ new_ring = old_ring.clone(ordering=options["switch_to"])
-diff -r f05b48d16bc7 -r 0ff1dee2843e patches/ipbori.patch
+diff -r 82bcfd079628 -r 666438ae9200 patches/ipbori.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/patches/ipbori.patch Thu Mar 22 17:21:37 2012 +0100
++++ b/patches/ipbori.patch Mon Mar 26 23:47:06 2012 +0200
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Alexander Dreyer <[email protected]>
@@ -521,9 +558,9 @@
+ except:
+ return False
+
-diff -r f05b48d16bc7 -r 0ff1dee2843e patches/nf.h.patch
+diff -r 82bcfd079628 -r 666438ae9200 patches/nf.h.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/patches/nf.h.patch Thu Mar 22 17:21:37 2012 +0100
++++ b/patches/nf.h.patch Mon Mar 26 23:47:06 2012 +0200
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Alexander Dreyer <[email protected]>
@@ -544,14 +581,14 @@
+ extern "C"{
+ #include <m4ri/m4ri.h>
+
-diff -r f05b48d16bc7 -r 0ff1dee2843e spkg-install
+diff -r 82bcfd079628 -r 666438ae9200 spkg-install
--- a/spkg-install Mon Mar 12 16:08:02 2012 +0100
-+++ b/spkg-install Thu Mar 22 17:21:37 2012 +0100
-@@ -10,17 +10,30 @@
++++ b/spkg-install Mon Mar 26 23:47:06 2012 +0200
+@@ -10,21 +10,30 @@
WORKDIR=${PWD}/src
SCONS=scons
--patch()
+-prepare()
+prepare_polybori()
{
if [ $UNAME = "CYGWIN" ]; then
@@ -561,7 +598,9 @@
- cp patches/custom.py src/${PBDIR}
- cp patches/PyPolyBoRi.py src/${PBDIR}/pyroot/polybori
+ cd ${PBDIR}
-+
+
+- cd ${WORKDIR}/${PBDIR}
+- patch -p1 < ../../patches/base_lookup.patch
+ # place configuration file
+ cp ../../custom.py .
+
@@ -575,22 +614,21 @@
+ fi
+ done
+
-+ cd ${WORKDIR}
+ cd ${WORKDIR}
}
-
build_polybori()
{
cd ${PBDIR}
-@@ -57,9 +70,9 @@
+@@ -61,8 +70,9 @@
rm -rf ${SAGE_LOCAL}/include/cudd
}
--patch
+-prepare
+cd ${WORKDIR}
--cd src
+prepare_polybori
-
echo "Starting build..."
+ echo "Removing old PolyBoRi install..."
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12754#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.