diff options
author | Antonio Rojas | 2021-12-26 15:07:52 +0100 |
---|---|---|
committer | Antonio Rojas | 2021-12-26 15:07:52 +0100 |
commit | b4d7c1ca04f9c7d1de599f451d5c0ec75db2461f (patch) | |
tree | 9b63c6f85c407c7dd783aa447ebcf11c584c5a17 | |
parent | fa1520d20845c22c3d9db46d7a61607aed9aa038 (diff) | |
download | aur-b4d7c1ca04f9c7d1de599f451d5c0ec75db2461f.tar.gz |
Add patch for bliss 0.77, remove debug option
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | sagemath-bliss-0.77.patch | 183 |
3 files changed, 193 insertions, 5 deletions
@@ -70,6 +70,7 @@ pkgbase = sagemath-git optdepends = jupyter-jsmol: alternative 3D plot engine in the Jupyter notebook optdepends = sagemath-doc: HTML documentation optdepends = python-igraph: igraph backend for graph theory + optdepends = bliss: bliss backend for graph theory optdepends = sage-numerical-backends-coin: COIN mixed integer linear programming backend optdepends = sage-numerical-backends-gurobi: Gurobi mixed integer linear programming backend optdepends = coin-or-csdp: for computing Lovász theta-function of graphs @@ -95,8 +96,6 @@ pkgbase = sagemath-git optdepends = python-database-knotinfo: interface to the KnotInfo and LinkInfo databases provides = sagemath conflicts = sagemath - options = debug - options = !strip source = git://git.sagemath.org/sage.git#branch=develop source = sagemath-optional-packages.patch source = latte-count.patch @@ -105,6 +104,7 @@ pkgbase = sagemath-git source = sagemath-singular-4.2.1.p1.patch source = sagemath-linbox-1.7.patch source = sagemath-python3.10.patch + source = sagemath-bliss-0.77.patch sha256sums = SKIP sha256sums = eee5fa15d8c7be7e009166dbde3ea24bb10d7793dc12880516f278f86b1a6694 sha256sums = 2f310081357996b7d3bf813e63d07c0fc04d6724adbfbd1beeb554e9476e2e4c @@ -113,5 +113,6 @@ pkgbase = sagemath-git sha256sums = 1f0c44a4998ed239a3d77e3028b98b6f2c28a95e9bb4b8557523cc8f12ffba34 sha256sums = eacea27b214d32cb886a75695153dfc36b5bad2fd2517e8e4eee18e74220e9e3 sha256sums = b9ca4fb0e3083e73560df5f0aca7e87d7aa8c05eca3eea49c704bcee102919c7 + sha256sums = 49ede468b8e1e7b8d7a390aab9ff1a6e899a0c5e487632cbf76902d80c637505 pkgname = sagemath-git @@ -23,6 +23,7 @@ optdepends=('cython: to compile cython code' 'jupyter-jsmol: alternative 3D plot engine in the Jupyter notebook' 'sagemath-doc: HTML documentation' 'python-igraph: igraph backend for graph theory' + 'bliss: bliss backend for graph theory' 'sage-numerical-backends-coin: COIN mixed integer linear programming backend' 'sage-numerical-backends-gurobi: Gurobi mixed integer linear programming backend' 'coin-or-csdp: for computing Lovász theta-function of graphs' @@ -56,7 +57,8 @@ source=(git://git.sagemath.org/sage.git#branch=develop sagemath-lrcalc2.patch sagemath-singular-4.2.1.p1.patch sagemath-linbox-1.7.patch - sagemath-python3.10.patch) + sagemath-python3.10.patch + sagemath-bliss-0.77.patch) sha256sums=('SKIP' 'eee5fa15d8c7be7e009166dbde3ea24bb10d7793dc12880516f278f86b1a6694' '2f310081357996b7d3bf813e63d07c0fc04d6724adbfbd1beeb554e9476e2e4c' @@ -64,8 +66,8 @@ sha256sums=('SKIP' '8534700f78690a9f1b07df25b281138ed870fdfb70ab4df3818df79d5468ec9f' '1f0c44a4998ed239a3d77e3028b98b6f2c28a95e9bb4b8557523cc8f12ffba34' 'eacea27b214d32cb886a75695153dfc36b5bad2fd2517e8e4eee18e74220e9e3' - 'b9ca4fb0e3083e73560df5f0aca7e87d7aa8c05eca3eea49c704bcee102919c7') -options=(debug !strip) + 'b9ca4fb0e3083e73560df5f0aca7e87d7aa8c05eca3eea49c704bcee102919c7' + '49ede468b8e1e7b8d7a390aab9ff1a6e899a0c5e487632cbf76902d80c637505') pkgver() { cd sage @@ -84,6 +86,8 @@ prepare(){ patch -p1 -i ../sagemath-linbox-1.7.patch # Fix tests with Python 3.10 https://trac.sagemath.org/ticket/30766 patch -p1 -i ../sagemath-python3.10.patch +# Fix build with bliss 0.77 https://trac.sagemath.org/ticket/33010 + patch -p1 -i ../sagemath-bliss-0.77.patch # Arch-specific patches # assume all optional packages are installed diff --git a/sagemath-bliss-0.77.patch b/sagemath-bliss-0.77.patch new file mode 100644 index 000000000000..2c0f11b56b81 --- /dev/null +++ b/sagemath-bliss-0.77.patch @@ -0,0 +1,183 @@ +diff --git a/build/pkgs/bliss/checksums.ini b/build/pkgs/bliss/checksums.ini +index e97d89587b..0c1ebf647b 100644 +--- a/build/pkgs/bliss/checksums.ini ++++ b/build/pkgs/bliss/checksums.ini +@@ -1,4 +1,5 @@ +-tarball=bliss-VERSION.tar.gz +-sha1=1da8f098046824fbfff4c64c337e28b2a082f74f +-md5=452aea8737d3c4ad0d8ff39180be8004 +-cksum=2193930007 ++tarball=bliss-VERSION.zip ++sha1=c91c9dcbc11d66ffbcf6415e09ebe793df37be2a ++md5=5707cbfd9fd00980571c64ab3584c505 ++cksum=1626493724 ++upstream_url=https://users.aalto.fi/~tjunttil/bliss/downloads/bliss-VERSION.zip +diff --git a/build/pkgs/bliss/dependencies b/build/pkgs/bliss/dependencies +index 3546cda461..66d6773d90 100644 +--- a/build/pkgs/bliss/dependencies ++++ b/build/pkgs/bliss/dependencies +@@ -1,4 +1,4 @@ +-# no dependencies ++| cmake + + ---------- + All lines of this file are ignored except the first. +diff --git a/build/pkgs/bliss/package-version.txt b/build/pkgs/bliss/package-version.txt +index e93ee1376f..9e1e206c41 100644 +--- a/build/pkgs/bliss/package-version.txt ++++ b/build/pkgs/bliss/package-version.txt +@@ -1 +1 @@ +-0.73+debian-1+sage-2016-08-02.p0 ++0.77 +diff --git a/build/pkgs/bliss/spkg-install.in b/build/pkgs/bliss/spkg-install.in +index aaf4c3037b..ad1fe8176c 100644 +--- a/build/pkgs/bliss/spkg-install.in ++++ b/build/pkgs/bliss/spkg-install.in +@@ -1,4 +1,6 @@ + cd src +-sdh_configure --disable-gmp ++sdh_cmake -DUSE_GMP=OFF -DCMAKE_VERBOSE_MAKEFILE=ON + sdh_make +-sdh_make_install ++sdh_install src/*.hh $SAGE_LOCAL/include/bliss/ ++sdh_install libbliss.so $SAGE_LOCAL/lib/ ++sdh_install bliss $SAGE_LOCAL/bin/ +diff --git a/build/pkgs/bliss/spkg-src b/build/pkgs/bliss/spkg-src +deleted file mode 100755 +index 90073233b7..0000000000 +--- a/build/pkgs/bliss/spkg-src ++++ /dev/null +@@ -1,28 +0,0 @@ +-#!/bin/sh +-# +-# creates the tarball in the current dir, to be moved to ../../../upstream +-# +-# adapted from cliquer/spkg-src +- +-die () { +- echo >&2 "$@" +- exit 1 +-} +- +-rm -rf bliss/ +-git clone -b sage_package https://github.com/mkoeppe/bliss.git || die "Failed to git clone" +-cd bliss/ +- +-VERSION=`autoconf --trace='AC_INIT:$2'` +-libtoolize || die "Failed to autoreconf" +-autoreconf -fi || die "Failed to autoreconf" +-automake --add-missing --copy || die "automake failed" +-./configure || die "configure failed" +- +-rm -f bliss-$VERSION.tar.gz +-make dist || die "make dist failed" +-mv bliss-$VERSION.tar.gz ../ +-cd .. +-rm -rf bliss/ +- +- +diff --git a/src/sage/graphs/bliss.pyx b/src/sage/graphs/bliss.pyx +index 22e861a587..fa426e3d11 100644 +--- a/src/sage/graphs/bliss.pyx ++++ b/src/sage/graphs/bliss.pyx +@@ -47,22 +47,27 @@ cdef extern from "bliss/graph.hh" namespace "bliss": + cdef cppclass Graph(AbstractGraph): + Graph(const unsigned int) + void add_edge(const unsigned int, const unsigned int) +- void find_automorphisms(Stats&, void (*)(void* , unsigned int, +- const unsigned int*), void*) ++ #void find_automorphisms(Stats&, void (*)(void* , unsigned int, ++ #const unsigned int*), void*) + void change_color(const unsigned int, const unsigned int); +- const unsigned int* canonical_form(Stats&, void (*)(void*,unsigned int, +- const unsigned int*), void*) ++ const unsigned int* canonical_form(Stats&) ++ ++cdef extern from "bliss/digraph.hh" namespace "bliss": + + cdef cppclass Digraph(AbstractGraph): + Digraph(const unsigned int) + void add_edge(const unsigned int, const unsigned int) +- void find_automorphisms(Stats&, void (*)(void* , unsigned int, +- const unsigned int*), void*) ++ #void find_automorphisms(Stats&, void (*)(void* , unsigned int, ++ #const unsigned int*), void*) + void change_color(const unsigned int, const unsigned int); +- const unsigned int* canonical_form(Stats&, void (*)(void*,unsigned int, +- const unsigned int*), void*) ++ const unsigned int* canonical_form(Stats&) + unsigned int get_hash() + ++cdef extern from "bliss_find_automorphisms.h": ++ ++ void bliss_find_automorphisms(Graph*, void (*)(void*, unsigned int, const unsigned int*), void*, Stats&) ++ void bliss_find_automorphisms(Digraph*, void (*)(void*, unsigned int, const unsigned int*), void*, Stats&) ++ + + cdef int encoding_numbits(int n): + r""" +@@ -124,9 +129,6 @@ cdef void add_gen(void *user_param, unsigned int n, const unsigned int *aut): + + sig_free(done) + +-cdef void empty_hook(void *user_param , unsigned int n, const unsigned int *aut): +- return +- + ##################################################### + # constructing bliss graphs from edge lists + ##################################################### +@@ -345,10 +347,10 @@ cdef canonical_form_from_edge_list(int Vnr, list Vout, list Vin, int Lnr=1, list + + if directed: + d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition) +- aut = d.canonical_form(s, empty_hook, NULL) ++ aut = d.canonical_form(s) + else: + g = bliss_graph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition) +- aut = g.canonical_form(s, empty_hook, NULL) ++ aut = g.canonical_form(s) + + for i in range(len(Vout)): + x = Vout[i] +@@ -640,11 +642,11 @@ cdef automorphism_group_gens_from_edge_list(int Vnr, Vout, Vin, int Lnr=1, label + + if directed: + d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition) +- d.find_automorphisms(s, add_gen, <void*>data) ++ bliss_find_automorphisms(d, add_gen, <void*>data, s) + del d + else: + g = bliss_graph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition) +- g.find_automorphisms(s, add_gen, <void*>data) ++ bliss_find_automorphisms(g, add_gen, <void*>data, s) + del g + + return [[cyc for cyc in gen if cyc[0] is not None] for gen in gens] +diff --git a/src/sage/graphs/bliss_find_automorphisms.h b/src/sage/graphs/bliss_find_automorphisms.h +new file mode 100644 +index 0000000000..a2c084a163 +--- /dev/null ++++ b/src/sage/graphs/bliss_find_automorphisms.h +@@ -0,0 +1,22 @@ ++#include <bliss/graph.hh> ++#include <bliss/digraph.hh> ++ ++inline void bliss_find_automorphisms(bliss::Graph *graph, void (*hook)(void *user_param, unsigned int n, const unsigned int *aut), void *hook_user_param, bliss::Stats s) ++{ ++ auto report_aut = [&](unsigned int n, const unsigned int *aut) -> void { ++ if(hook) ++ (*hook)(hook_user_param, n, aut); ++ }; ++ ++ graph->find_automorphisms(s, report_aut); ++} ++ ++inline void bliss_find_automorphisms(bliss::Digraph *graph, void (*hook)(void *user_param, unsigned int n, const unsigned int *aut), void *hook_user_param, bliss::Stats s) ++{ ++ auto report_aut = [&](unsigned int n, const unsigned int *aut) -> void { ++ if(hook) ++ (*hook)(hook_user_param, n, aut); ++ }; ++ ++ graph->find_automorphisms(s, report_aut); ++} |