-
-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29369: spkg-configure.m4 for brial
Nothing unusual here except that this is a C++ library with no pkg- config file, and that makes it a bit harder to search for. I've assumed that any version we find is acceptable, which probably is not quite true. URL: https://trac.sagemath.org/29369 Reported by: mjo Ticket author(s): Michael Orlitzky Reviewer(s): Matthias Koeppe, Dima Pasechnik
- Loading branch information
Showing
21 changed files
with
103 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
libbrial-dev libbrial-groebner-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
brial | ||
brial-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sci-libs/brial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
SAGE_SPKG_CONFIGURE([brial], [ | ||
SAGE_SPKG_DEPCHECK([boost m4ri], [ | ||
# If we're using the system m4ri and boost, ensure that we can | ||
# compile and run an executable linked against both libbrial and | ||
# libbrial_groebner (both are used by SageMath). | ||
AC_LANG_PUSH(C++) | ||
SAVED_LIBS=$LIBS | ||
LIBS="$LIBS -lbrial -lbrial_groebner" | ||
AC_MSG_CHECKING([if we can link against brial libraries]) | ||
AC_RUN_IFELSE([ | ||
AC_LANG_PROGRAM([ | ||
#include <polybori.h> | ||
#include <polybori/groebner/groebner_alg.h> | ||
USING_NAMESPACE_PBORI | ||
USING_NAMESPACE_PBORIGB | ||
class MyConstant : public BooleConstant{ | ||
public: void negate() { this->m_value = !this->m_value; } | ||
}; | ||
],[ | ||
BoolePolyRing r = BoolePolyRing(2, COrderEnums::dlex); | ||
ReductionStrategy rs = ReductionStrategy(r); | ||
rs.llReduceAll(); // uses groebner lib | ||
if (2 != r.nVariables()) { return 1; } | ||
if (r.constant(true) == r.constant(false)) { return 2; } | ||
MyConstant f = MyConstant(); | ||
f.negate(); // ensures v1.1.0+ if m_value isn't const | ||
if (!f.isOne()) { return 3; } | ||
return 0; | ||
]) | ||
], | ||
[ | ||
AC_MSG_RESULT([yes]) | ||
sage_spkg_install_brial=no | ||
], | ||
[ | ||
AC_MSG_RESULT([no]) | ||
sage_spkg_install_brial=yes | ||
]) | ||
LIBS=$SAVED_LIBS | ||
AC_LANG_POP | ||
], | ||
[ # If we're installing sage's boost or m4ri, then we have to | ||
# install its BRiAl, too. | ||
sage_spkg_install_brial=yes | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
cd src | ||
|
||
export PYTHON=sage-python23 | ||
|
||
# | ||
# BRiAl consists of a C++ library and a Python module | ||
# | ||
# First, install the library | ||
# BRiAl consists of a both C++ library and a SageMath-specific python | ||
# module. This spkg installs only the C++ library; the python module | ||
# is installed by the "sage_brial" spkg. | ||
# | ||
|
||
cd src | ||
sdh_configure \ | ||
--enable-shared --disable-static \ | ||
--with-boost-unit-test-framework=no | ||
sdh_make | ||
sdh_make_install | ||
|
||
# | ||
# Next, install the Python module | ||
# | ||
|
||
cd sage-brial && sdh_pip_install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
echo "Cleaning out old PolyBoRi and BRiAl installations" | ||
rm -rf "$SAGE_LOCAL"/lib/python*/site-packages/{polybori,brial} | ||
rm -f "$SAGE_LOCAL"/lib/lib{polybori,brial}* | ||
rm -rf "$SAGE_LOCAL"/include/polybori* | ||
rm -rf "$SAGE_LOCAL"/share/polybori |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
= BRiAl = | ||
|
||
== Description == | ||
|
||
BRiAl is the successor to PolyBoRi. | ||
|
||
The core of PolyBoRi is a C++ library, which provides high-level data | ||
types for Boolean polynomials and monomials, exponent vectors, as well | ||
as for the underlying polynomial rings and subsets of the powerset of | ||
the Boolean variables. This SPKG is a (sage) python wrapper around the | ||
functionality of the C++ library. | ||
|
||
== License == | ||
|
||
GPL version 2 or later | ||
|
||
== Upstream Contact == | ||
|
||
https://github.com/BRiAl/BRiAl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tarball=brial-VERSION.tar.bz2 | ||
sha1=5795c0d73b63e9daa5318b0f22514b7797c59823 | ||
md5=fddbc0cebfbac161de110acf30a6b89d | ||
cksum=2578889224 | ||
upstream_url=https://github.com/BRiAl/BRiAl/releases/download/VERSION/brial-VERSION.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
brial $(PYTHON) | pip | ||
|
||
---------- | ||
All lines of this file are ignored except the first. | ||
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.2.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# | ||
# BRiAl consists of a both C++ library and a SageMath-specific python | ||
# module. This spkg installs only the python module; the C++ library | ||
# is installed by the "brial" spkg. | ||
# | ||
export PYTHON=sage-python23 | ||
cd src/sage-brial && sdh_pip_install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo "Cleaning out old PolyBoRi and BRiAl installations" | ||
rm -rf "$SAGE_LOCAL"/lib/python*/site-packages/{polybori,brial} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
standard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters