forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-38887: libbraiding version bump Fixes sagemath#38886 by updating libbraiding package and adding new methods to braids. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38887 Reported by: miguelmarco Reviewer(s): Enrique Manuel Artal Bartolo, Travis Scrimshaw
- Loading branch information
Showing
5 changed files
with
256 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
tarball=libbraiding-VERSION-actually-VERSION.tar.gz | ||
sha1=b7e13778784fe1e36e7c0cbd7a4c234a090cd1b2 | ||
sha256=73087d1145ace719eafeda1db1c28b5fe1c981b7e784dc59f2b1d6fc4ff75f80 | ||
sha1=8c22d5d396e2c4d2dd032172589042933b651108 | ||
sha256=d1738c3ad64a90ca0ad968d2e3c9069b0de08abcf37fb44a151a229d88203950 | ||
upstream_url=https://github.com/miguelmarco/libbraiding/releases/download/VERSION/libbraiding-VERSION.tar.gz |
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 +1 @@ | ||
1.2 | ||
1.3.1 |
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,50 +1,9 @@ | ||
SAGE_SPKG_CONFIGURE([libbraiding], [ | ||
# Since libbraiding is a C++ library with no pkg-config file, | ||
# the best we can do here is compile and run a test program | ||
# linked against it. | ||
AC_LANG_PUSH(C++) | ||
SAVED_LIBS=$LIBS | ||
LIBS="$LIBS -lbraiding" | ||
AC_MSG_CHECKING([if we can link against libbraiding]) | ||
AC_RUN_IFELSE([ | ||
AC_LANG_PROGRAM([ | ||
#include <braiding.h> | ||
#include <list> | ||
using namespace Braiding; | ||
],[ | ||
// Mimic BraidGroup(2)([1,1]).thurston_type() in SageMath. | ||
// thurstontype == 1 corresponds to "periodic" | ||
if (thurstontype(2, {1,1}) == 1) { return 0; } else { return 1; } | ||
]) | ||
], | ||
[ | ||
AC_MSG_RESULT([yes]) | ||
PKG_CHECK_MODULES([libbraiding], [libbraiding >= 1.3.1], [ | ||
AC_MSG_RESULT([found libbraiding >= 1.3.1, will use installed version]) | ||
sage_spkg_install_libbraiding=no | ||
], | ||
[ | ||
AC_MSG_RESULT([no]) | ||
sage_spkg_install_libbraiding=yes | ||
],[ | ||
AC_LINK_IFELSE([ | ||
AC_LANG_PROGRAM([ | ||
#include <braiding.h> | ||
#include <list> | ||
using namespace Braiding; | ||
],[ | ||
// Mimic BraidGroup(2)([1,1]).thurston_type() in SageMath. | ||
// thurstontype == 1 corresponds to "periodic" | ||
if (thurstontype(2, {1,1}) == 1) { return 0; } else { return 1; } | ||
]) | ||
], | ||
[ | ||
AC_MSG_RESULT([yes]) | ||
sage_spkg_install_libbraiding=no | ||
], | ||
[ | ||
AC_MSG_RESULT([no]) | ||
sage_spkg_install_libbraiding=yes | ||
]) | ||
AC_MSG_RESULT([couldn't find libbraiding >= 1.3.1. It will be installed]) | ||
sage_spkg_install_libbraiding=yes | ||
]) | ||
LIBS=$SAVED_LIBS | ||
AC_LANG_POP | ||
]) |
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