Skip to content

Commit

Permalink
Trac #21083: Upgrade BRiAl and build it with C++11
Browse files Browse the repository at this point in the history
We currently work around BRiAl 0.8.5 not building in C++11 mode by
passing `-std=c++98`, which is odd.

'''Fixed upstream''': [BRiAl/BRiAl#11]

Also the patch from BRiAl/BRiAl#15 is added,
which is needed for #23943.

'''Tarball''': https://github.com/BRiAl/BRiAl/releases/download/1.0.1/br
ial-1.0.1.tar.bz2

URL: https://trac.sagemath.org/21083
Reported by: leif
Ticket author(s): Jeroen Demeyer
Reviewer(s): François Bissey
  • Loading branch information
Release Manager authored and vbraun committed Oct 18, 2017
2 parents 9958210 + 2d18149 commit f7bf326
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 8 deletions.
8 changes: 8 additions & 0 deletions build/pkgs/brial/SPKG.txt
Expand Up @@ -13,3 +13,11 @@ this C++-library we provide a Python interface. This allows parsing of
complex polynomial systems, as well as sophisticated and extendable
strategies for Gröbner base computation. PolyBoRi features a powerful
reference implementation for Gröbner basis computation.

== License ==

GPL version 2 or later

== Upstream Contact ==

https://github.com/BRiAl/BRiAl
6 changes: 3 additions & 3 deletions build/pkgs/brial/checksums.ini
@@ -1,4 +1,4 @@
tarball=brial-VERSION.tar.bz2
sha1=7e6b7a625773da78cefda241dc016f242da27d7f
md5=449858d7e7f918066eb9224d903cd8f6
cksum=2006315550
sha1=619b94d9640616cdc782fbfdd2baa087c04de5e6
md5=8b75aa118ff91732a00d8099d24ad4c2
cksum=4058332917
2 changes: 1 addition & 1 deletion build/pkgs/brial/package-version.txt
@@ -1 +1 @@
0.8.7
1.0.1
21 changes: 21 additions & 0 deletions build/pkgs/brial/patches/BooleConstant_not_const.patch
@@ -0,0 +1,21 @@
See https://github.com/BRiAl/BRiAl/pull/15

commit f82632367865ea57f98257f984cbe0c8465e6a29
Author: Jeroen Demeyer <jdemeyer@cage.ugent.be>
Date: Mon Oct 2 15:32:54 2017 +0200

BooleConstant member should not be const

diff --git a/libbrial/include/polybori/BooleConstant.h b/libbrial/include/polybori/BooleConstant.h
index d593029..d7599fe 100644
--- a/libbrial/include/polybori/BooleConstant.h
+++ b/libbrial/include/polybori/BooleConstant.h
@@ -101,7 +101,7 @@ public:

protected:
/// Boolean value is stored as simple bool
- const bool m_value;
+ bool m_value;
};

/// Stream output operator
25 changes: 21 additions & 4 deletions build/pkgs/brial/spkg-install
Expand Up @@ -12,15 +12,22 @@ rm -rf "$SAGE_LOCAL"/share/polybori

cd src

# C++11 workaround https://trac.sagemath.org/ticket/20926
export CXXFLAGS="$CXXFLAGS -std=c++98"
# Use C++11 to compile BRiAl, see https://trac.sagemath.org/ticket/21083
export CXXFLAGS="$CXXFLAGS -std=c++11"

export PYTHON=sage-python23

#
# BRiAl consists of a C++ library and a Python module
#
# First, install the library
#

./configure \
--prefix="$SAGE_LOCAL" \
--libdir="$SAGE_LOCAL/lib" \
--enable-shared --disable-static
--enable-shared --disable-static \
--with-boost-unit-test-framework=no
if [ $? -ne 0 ]; then
echo "Error configuring BRiAl"
exit 1
Expand All @@ -32,8 +39,18 @@ if [ $? -ne 0 ]; then
exit 1
fi

$MAKE install -j1
$MAKE install
if [ $? -ne 0 ]; then
echo "Error installing BRiAl"
exit 1
fi

#
# Next, install the Python module
#

cd sage-brial && $PIP_INSTALL .
if [ $? -ne 0 ]; then
echo "Error installing BRiAl Python module"
exit 1
fi
1 change: 1 addition & 0 deletions src/sage/libs/polybori/decl.pxd
@@ -1,4 +1,5 @@
# distutils: language = c++
# distutils: extra_compile_args = -std=c++11

cdef extern from "pb_wrap.h":
ctypedef struct std_string "std::string":
Expand Down

0 comments on commit f7bf326

Please sign in to comment.