1 |
commit: 561d59645a2e23179b1c1c13e9a262908a1157f1 |
2 |
Author: Christoph Junghans <junghans <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 1 18:14:44 2017 +0000 |
4 |
Commit: Christoph Junghans <junghans <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 1 18:17:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=561d5964 |
7 |
|
8 |
sci-libs/bliss: version bump |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
sci-libs/bliss/Manifest | 1 + |
13 |
sci-libs/bliss/bliss-0.73.ebuild | 51 +++ |
14 |
sci-libs/bliss/files/bliss-0.73-autotools.patch | 99 +++++ |
15 |
sci-libs/bliss/files/bliss-0.73-error.patch | 471 ++++++++++++++++++++++++ |
16 |
sci-libs/bliss/files/bliss-0.73-rehn.patch | 74 ++++ |
17 |
sci-libs/bliss/files/bliss-0.73.1.in | 55 +++ |
18 |
6 files changed, 751 insertions(+) |
19 |
|
20 |
diff --git a/sci-libs/bliss/Manifest b/sci-libs/bliss/Manifest |
21 |
index be3eecb..9cd37a6 100644 |
22 |
--- a/sci-libs/bliss/Manifest |
23 |
+++ b/sci-libs/bliss/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST bliss-0.72.zip 90970 SHA256 528d192b1e30722fc60f5f12c9d6c12b374d838198ae7f18fb41bedabf735ed3 SHA512 a09b3cea26e3ff5f5733f10bfaadaf6fb5a3f443e1cc306fad16af2f7b4cd97c90652315f911a324d6d71426a3d098cd5c7e5721f69c599fe2e0d6d34caa0ef5 WHIRLPOOL afbc41c04e843d383a2da8d5e26ec2882c847e8e5f1e71c05f884396fcc79eab764df628523336b88e0c6ef4fbf073a52870e2c68ded428002d9391894cb53d6 |
26 |
+DIST bliss-0.73.zip 94108 SHA256 f57bf32804140cad58b1240b804e0dbd68f7e6bf67eba8e0c0fa3a62fd7f0f84 SHA512 30f505945c577d8bcb265a349f5bc9d4dcd96555fa3add285199cdd95ea2710f04409008ff06432daffab62c132e884845eae7f823191407906202862509e05d WHIRLPOOL 08402453515e092604105f17f5889d252c0207fa31a1125e87e04c4792cbeb77b7a585a134fd2b3108e8620bbd643cd8b7826dee8a56cf47908a922298b70ad1 |
27 |
|
28 |
diff --git a/sci-libs/bliss/bliss-0.73.ebuild b/sci-libs/bliss/bliss-0.73.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000..cf5e839 |
31 |
--- /dev/null |
32 |
+++ b/sci-libs/bliss/bliss-0.73.ebuild |
33 |
@@ -0,0 +1,51 @@ |
34 |
+# Copyright 1999-2017 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+# $Id$ |
37 |
+ |
38 |
+EAPI=6 |
39 |
+ |
40 |
+inherit autotools |
41 |
+ |
42 |
+SRC_URI="http://www.tcs.hut.fi/Software/${PN}/${P}.zip" |
43 |
+DESCRIPTION="A Tool for Computing Automorphism Groups and Canonical Labelings of Graphs" |
44 |
+HOMEPAGE="http://www.tcs.hut.fi/Software/bliss/index.shtml" |
45 |
+ |
46 |
+LICENSE="GPL-3" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~x86" |
49 |
+IUSE="doc gmp static-libs" |
50 |
+ |
51 |
+RDEPEND="gmp? ( dev-libs/gmp:0= )" |
52 |
+ |
53 |
+DEPEND="${RDEPEND} |
54 |
+ doc? ( app-doc/doxygen )" |
55 |
+ |
56 |
+#patches from http://pkgs.fedoraproject.org/cgit/rpms/bliss.git/tree/ |
57 |
+PATCHES=( |
58 |
+ "${FILESDIR}/${P}-error.patch" |
59 |
+ "${FILESDIR}/${P}-rehn.patch" |
60 |
+ "${FILESDIR}/${P}-autotools.patch" |
61 |
+) |
62 |
+ |
63 |
+src_prepare() { |
64 |
+ cp "${FILESDIR}/${P}.1.in" "${PN}.1.in" || die |
65 |
+ rm Makefile || die |
66 |
+ default |
67 |
+ eautoreconf |
68 |
+} |
69 |
+ |
70 |
+src_configure() { |
71 |
+ econf $(use_with gmp) $(use_enable static-libs static) |
72 |
+} |
73 |
+ |
74 |
+src_compile() { |
75 |
+ emake all $(usex doc html "") |
76 |
+} |
77 |
+ |
78 |
+src_install() { |
79 |
+ use doc && HTML_DOCS=( "${S}"/html/. ) |
80 |
+ default |
81 |
+ |
82 |
+ #comes with pkg-config file |
83 |
+ find "${ED}" -name '*.la' -delete || die |
84 |
+} |
85 |
|
86 |
diff --git a/sci-libs/bliss/files/bliss-0.73-autotools.patch b/sci-libs/bliss/files/bliss-0.73-autotools.patch |
87 |
new file mode 100644 |
88 |
index 00000000..1fe209e |
89 |
--- /dev/null |
90 |
+++ b/sci-libs/bliss/files/bliss-0.73-autotools.patch |
91 |
@@ -0,0 +1,99 @@ |
92 |
+Replace simple Makefile by autotools |
93 |
+- allow shared library |
94 |
+- parallel build |
95 |
+- added pkg-config support |
96 |
+ |
97 |
+Author: Christoph Junghans <junghans@g.o> |
98 |
+ |
99 |
+diff -Naur bliss-0.72-fedora/config/.dummy bliss-0.72/config/.dummy |
100 |
+--- bliss-0.72-fedora/config/.dummy 1969-12-31 17:00:00.000000000 -0700 |
101 |
++++ bliss-0.72/config/.dummy 2013-04-28 14:43:06.143760368 -0600 |
102 |
+@@ -0,0 +1 @@ |
103 |
++Dummy file to make patch create config dir, which is needed for autotools |
104 |
+diff -Naur bliss-0.72-fedora/configure.ac bliss-0.72/configure.ac |
105 |
+--- bliss-0.72-fedora/configure.ac 1969-12-31 17:00:00.000000000 -0700 |
106 |
++++ bliss-0.72/configure.ac 2013-04-28 14:40:42.283242722 -0600 |
107 |
+@@ -0,0 +1,32 @@ |
108 |
++AC_PREREQ([2.65]) |
109 |
++AC_INIT([bliss], [0.73], [Tommi.Junttil@××.fi]) |
110 |
++ |
111 |
++AC_CONFIG_AUX_DIR(config) |
112 |
++AC_CONFIG_MACRO_DIR(config) |
113 |
++ |
114 |
++AM_INIT_AUTOMAKE([1.8 foreign]) |
115 |
++ |
116 |
++SHARED_VERSION_INFO="1:0:0" |
117 |
++AC_SUBST(SHARED_VERSION_INFO) |
118 |
++ |
119 |
++# Checks for programs. |
120 |
++AC_PROG_CXX |
121 |
++ |
122 |
++LT_INIT |
123 |
++# Checks for libraries. |
124 |
++AC_ARG_WITH([gmp], |
125 |
++ [AS_HELP_STRING([--with-gmp], [enable support for GNU Multiple Precision Arithmetic Library @<:@default=check@:>@])], |
126 |
++ [], [with_readline=no]) |
127 |
++AS_IF([test "x$with_readline" != xno], |
128 |
++ [AC_CHECK_HEADERS([gmp.h],,AC_MSG_ERROR([Cannot find gmp.h header])) |
129 |
++ AC_CHECK_LIB([gmp],_init,,AC_MSG_ERROR([Cannot find gmp library])) |
130 |
++ AC_SUBST([GMP],[-lgmp]) |
131 |
++ [CPPFLAGS="$CPPFLAGS -DBLISS_USE_GMP"]]) |
132 |
++ |
133 |
++AC_CHECK_PROG(DOXYGEN,doxygen,doxygen,no) |
134 |
++AM_CONDITIONAL(HAVE_DOXYGEN,[test .$DOXYGEN != .no]) |
135 |
++ |
136 |
++AC_CONFIG_FILES([Makefile]) |
137 |
++AC_CONFIG_FILES([bliss.pc]) |
138 |
++AC_CONFIG_FILES([bliss.1]) |
139 |
++AC_OUTPUT |
140 |
+diff -Naur bliss-0.72-fedora/bliss.pc.in bliss-0.72/bliss.pc.in |
141 |
+--- bliss-0.72-fedora/bliss.pc.in 1969-12-31 17:00:00.000000000 -0700 |
142 |
++++ bliss-0.72/bliss.pc.in 2013-04-28 14:40:54.223285686 -0600 |
143 |
+@@ -0,0 +1,13 @@ |
144 |
++prefix=@prefix@ |
145 |
++exec_prefix=@exec_prefix@ |
146 |
++libdir=@libdir@ |
147 |
++includedir=@includedir@ |
148 |
++ |
149 |
++Name: bliss |
150 |
++Description: Library for Computing Automorphism Groups and Canonical Labelings of Graphs |
151 |
++URL: http://www.tcs.hut.fi/Software/bliss/index.shtml |
152 |
++Version: @VERSION@ |
153 |
++Requires: |
154 |
++Libs: -L${libdir} -lbliss @GMP@ |
155 |
++Libs.private: -lm |
156 |
++Cflags: -I${includedir} |
157 |
+diff -Naur bliss-0.72-fedora/Makefile.am bliss-0.72/Makefile.am |
158 |
+--- bliss-0.72-fedora/Makefile.am 1969-12-31 17:00:00.000000000 -0700 |
159 |
++++ bliss-0.72/Makefile.am 2013-04-28 14:47:26.944698789 -0600 |
160 |
+@@ -0,0 +1,30 @@ |
161 |
++ACLOCAL_AMFLAGS = -I config |
162 |
++ |
163 |
++lib_LTLIBRARIES = libbliss.la |
164 |
++ |
165 |
++libbliss_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ |
166 |
++libbliss_la_SOURCES = \ |
167 |
++ defs.cc graph.cc partition.cc orbit.cc uintseqhash.cc heap.cc \ |
168 |
++ timer.cc utils.cc bliss_C.cc |
169 |
++ |
170 |
++pkginclude_HEADERS = \ |
171 |
++ bignum.hh bliss_C.h defs.hh graph.hh heap.hh kqueue.hh kstack.hh \ |
172 |
++ orbit.hh partition.hh timer.hh uintseqhash.hh utils.hh |
173 |
++ |
174 |
++bin_PROGRAMS = bliss |
175 |
++bliss_SOURCES = bliss.cc |
176 |
++bliss_LDADD = libbliss.la |
177 |
++dist_man1_MANS = bliss.1 |
178 |
++ |
179 |
++pkgconfigdir = $(libdir)/pkgconfig |
180 |
++pkgconfig_DATA = bliss.pc |
181 |
++ |
182 |
++html-local: Doxyfile |
183 |
++if HAVE_DOXYGEN |
184 |
++ $(DOXYGEN) $(srcdir)/Doxyfile |
185 |
++else |
186 |
++ @echo "doxygen was not found, please re-run configure" |
187 |
++endif |
188 |
++ |
189 |
++clean-local: |
190 |
++ -rm -rf html |
191 |
|
192 |
diff --git a/sci-libs/bliss/files/bliss-0.73-error.patch b/sci-libs/bliss/files/bliss-0.73-error.patch |
193 |
new file mode 100644 |
194 |
index 00000000..cd0f545 |
195 |
--- /dev/null |
196 |
+++ b/sci-libs/bliss/files/bliss-0.73-error.patch |
197 |
@@ -0,0 +1,471 @@ |
198 |
+--- ./bliss.cc.orig 2015-09-01 10:23:10.000000000 -0600 |
199 |
++++ ./bliss.cc 2015-09-04 15:04:09.946602735 -0600 |
200 |
+@@ -276,13 +276,16 @@ main(const int argc, const char** argv) |
201 |
+ if(opt_canonize == false) |
202 |
+ { |
203 |
+ /* No canonical labeling, only automorphism group */ |
204 |
+- g->find_automorphisms(stats, &report_aut, stdout); |
205 |
++ if (!g->find_automorphisms(stats, &report_aut, stdout)) |
206 |
++ exit(1); |
207 |
+ } |
208 |
+ else |
209 |
+ { |
210 |
+ /* Canonical labeling and automorphism group */ |
211 |
+ const unsigned int* cl = g->canonical_form(stats, &report_aut, stdout); |
212 |
+ |
213 |
++ if (!cl) |
214 |
++ exit(1); |
215 |
+ fprintf(stdout, "Canonical labeling: "); |
216 |
+ bliss::print_permutation(stdout, g->get_nof_vertices(), cl, 1); |
217 |
+ fprintf(stdout, "\n"); |
218 |
+@@ -290,6 +293,8 @@ main(const int argc, const char** argv) |
219 |
+ if(opt_output_can_file) |
220 |
+ { |
221 |
+ bliss::AbstractGraph* cf = g->permute(cl); |
222 |
++ if (!cf) |
223 |
++ exit(1); |
224 |
+ FILE* const fp = fopen(opt_output_can_file, "w"); |
225 |
+ if(!fp) |
226 |
+ _fatal("Cannot open '%s' for outputting the canonical form, aborting", opt_output_can_file); |
227 |
+--- ./bliss_C.cc.orig 2015-09-01 10:23:10.000000000 -0600 |
228 |
++++ ./bliss_C.cc 2015-09-04 15:04:09.945602814 -0600 |
229 |
+@@ -131,7 +131,7 @@ BlissGraph *bliss_permute(BlissGraph *gr |
230 |
+ } |
231 |
+ |
232 |
+ extern "C" |
233 |
+-void |
234 |
++int |
235 |
+ bliss_find_automorphisms(BlissGraph *graph, |
236 |
+ void (*hook)(void *user_param, |
237 |
+ unsigned int n, |
238 |
+@@ -142,7 +142,8 @@ bliss_find_automorphisms(BlissGraph *gra |
239 |
+ bliss::Stats s; |
240 |
+ assert(graph); |
241 |
+ assert(graph->g); |
242 |
+- graph->g->find_automorphisms(s, hook, hook_user_param); |
243 |
++ if (!graph->g->find_automorphisms(s, hook, hook_user_param)) |
244 |
++ return 0; |
245 |
+ |
246 |
+ if(stats) |
247 |
+ { |
248 |
+@@ -154,6 +155,7 @@ bliss_find_automorphisms(BlissGraph *gra |
249 |
+ stats->nof_generators = s.get_nof_generators(); |
250 |
+ stats->max_level = s.get_max_level(); |
251 |
+ } |
252 |
++ return 1; |
253 |
+ } |
254 |
+ |
255 |
+ |
256 |
+@@ -173,7 +175,7 @@ bliss_find_canonical_labeling(BlissGraph |
257 |
+ |
258 |
+ canonical_labeling = graph->g->canonical_form(s, hook, hook_user_param); |
259 |
+ |
260 |
+- if(stats) |
261 |
++ if(canonical_labeling && stats) |
262 |
+ { |
263 |
+ stats->group_size_approx = s.get_group_size_approx(); |
264 |
+ stats->nof_nodes = s.get_nof_nodes(); |
265 |
+--- ./bliss_C.h.orig 2015-09-01 10:23:10.000000000 -0600 |
266 |
++++ ./bliss_C.h 2015-09-04 15:04:09.947602656 -0600 |
267 |
+@@ -156,6 +156,7 @@ unsigned int bliss_hash(BlissGraph *grap |
268 |
+ * The argument \a perm should be an array of |
269 |
+ * N=bliss::bliss_get_nof_vertices(\a graph) elements describing |
270 |
+ * a bijection on {0,...,N-1}. |
271 |
++ * Returns NULL if insufficient memory or internal error. |
272 |
+ */ |
273 |
+ BlissGraph *bliss_permute(BlissGraph *graph, const unsigned int *perm); |
274 |
+ |
275 |
+@@ -174,8 +175,9 @@ BlissGraph *bliss_permute(BlissGraph *gr |
276 |
+ * if you want to use the automorphism later, you have to take a copy of it. |
277 |
+ * Do not call bliss_* functions in the hook. |
278 |
+ * If \a stats is non-null, then some search statistics are copied there. |
279 |
++ * \return nonzero if successful, zero if insufficient memory or internal error |
280 |
+ */ |
281 |
+-void |
282 |
++int |
283 |
+ bliss_find_automorphisms(BlissGraph *graph, |
284 |
+ void (*hook)(void *user_param, |
285 |
+ unsigned int N, |
286 |
+@@ -194,6 +196,7 @@ bliss_find_automorphisms(BlissGraph *gra |
287 |
+ * then bliss_permute() with the returned canonical labeling. |
288 |
+ * Note that the computed canonical version may depend on the applied version |
289 |
+ * of bliss. |
290 |
++ * Returns NULL if insufficient memory or internal error. |
291 |
+ */ |
292 |
+ const unsigned int * |
293 |
+ bliss_find_canonical_labeling(BlissGraph *graph, |
294 |
+--- ./defs.cc.orig 2015-09-01 10:23:12.000000000 -0600 |
295 |
++++ ./defs.cc 2015-09-04 15:04:09.947602656 -0600 |
296 |
+@@ -32,7 +32,6 @@ fatal_error(const char* fmt, ...) |
297 |
+ vfprintf(stderr, fmt, ap); |
298 |
+ fprintf(stderr, "\nAborting!\n"); |
299 |
+ va_end(ap); |
300 |
+- exit(1); |
301 |
+ } |
302 |
+ |
303 |
+ } |
304 |
+--- ./graph.cc.orig 2015-09-01 10:23:10.000000000 -0600 |
305 |
++++ ./graph.cc 2015-09-04 15:04:09.927604245 -0600 |
306 |
+@@ -34,7 +34,10 @@ |
307 |
+ namespace bliss { |
308 |
+ |
309 |
+ #define _INTERNAL_ERROR() fatal_error("%s:%d: internal error",__FILE__,__LINE__) |
310 |
+-#define _OUT_OF_MEMORY() fatal_error("%s:%d: out of memory",__FILE__,__LINE__) |
311 |
++#define _OUT_OF_MEMORY(label) do { \ |
312 |
++ fatal_error("%s:%d: out of memory",__FILE__,__LINE__); \ |
313 |
++ goto label; \ |
314 |
++ } while (0) |
315 |
+ |
316 |
+ /*------------------------------------------------------------------------- |
317 |
+ * |
318 |
+@@ -279,20 +282,6 @@ AbstractGraph::reset_permutation(unsigne |
319 |
+ *perm = i; |
320 |
+ } |
321 |
+ |
322 |
+-bool |
323 |
+-AbstractGraph::is_automorphism(unsigned int* const perm) |
324 |
+-{ |
325 |
+- _INTERNAL_ERROR(); |
326 |
+- return false; |
327 |
+-} |
328 |
+- |
329 |
+-bool |
330 |
+-AbstractGraph::is_automorphism(const std::vector<unsigned int>& perm) const |
331 |
+-{ |
332 |
+- _INTERNAL_ERROR(); |
333 |
+- return false; |
334 |
+-} |
335 |
+- |
336 |
+ |
337 |
+ |
338 |
+ |
339 |
+@@ -618,7 +607,7 @@ typedef struct { |
340 |
+ } PathInfo; |
341 |
+ |
342 |
+ |
343 |
+-void |
344 |
++bool |
345 |
+ AbstractGraph::search(const bool canonical, Stats& stats) |
346 |
+ { |
347 |
+ const unsigned int N = get_nof_vertices(); |
348 |
+@@ -658,7 +647,7 @@ AbstractGraph::search(const bool canonic |
349 |
+ if(N == 0) |
350 |
+ { |
351 |
+ /* Nothing to do, return... */ |
352 |
+- return; |
353 |
++ return true; |
354 |
+ } |
355 |
+ |
356 |
+ /* Initialize the partition ... */ |
357 |
+@@ -696,10 +685,10 @@ AbstractGraph::search(const bool canonic |
358 |
+ */ |
359 |
+ if(first_path_labeling) free(first_path_labeling); |
360 |
+ first_path_labeling = (unsigned int*)calloc(N, sizeof(unsigned int)); |
361 |
+- if(!first_path_labeling) _OUT_OF_MEMORY(); |
362 |
++ if(!first_path_labeling) _OUT_OF_MEMORY(oom1); |
363 |
+ if(best_path_labeling) free(best_path_labeling); |
364 |
+ best_path_labeling = (unsigned int*)calloc(N, sizeof(unsigned int)); |
365 |
+- if(!best_path_labeling) _OUT_OF_MEMORY(); |
366 |
++ if(!best_path_labeling) _OUT_OF_MEMORY(oom2); |
367 |
+ |
368 |
+ /* |
369 |
+ * Is the initial partition discrete? |
370 |
+@@ -710,7 +699,7 @@ AbstractGraph::search(const bool canonic |
371 |
+ update_labeling(best_path_labeling); |
372 |
+ /* Update statistics */ |
373 |
+ stats.nof_leaf_nodes = 1; |
374 |
+- return; |
375 |
++ return true; |
376 |
+ } |
377 |
+ |
378 |
+ /* |
379 |
+@@ -718,20 +707,39 @@ AbstractGraph::search(const bool canonic |
380 |
+ */ |
381 |
+ if(first_path_labeling_inv) free(first_path_labeling_inv); |
382 |
+ first_path_labeling_inv = (unsigned int*)calloc(N, sizeof(unsigned int)); |
383 |
+- if(!first_path_labeling_inv) _OUT_OF_MEMORY(); |
384 |
++ if(!first_path_labeling_inv) _OUT_OF_MEMORY(oom3); |
385 |
+ if(best_path_labeling_inv) free(best_path_labeling_inv); |
386 |
+ best_path_labeling_inv = (unsigned int*)calloc(N, sizeof(unsigned int)); |
387 |
+- if(!best_path_labeling_inv) _OUT_OF_MEMORY(); |
388 |
++ if(!best_path_labeling_inv) _OUT_OF_MEMORY(oom4); |
389 |
+ |
390 |
+ /* |
391 |
+ * Allocate space for the automorphisms |
392 |
+ */ |
393 |
+ if(first_path_automorphism) free(first_path_automorphism); |
394 |
+ first_path_automorphism = (unsigned int*)malloc(N * sizeof(unsigned int)); |
395 |
+- if(!first_path_automorphism) _OUT_OF_MEMORY(); |
396 |
++ if(!first_path_automorphism) _OUT_OF_MEMORY(oom5); |
397 |
+ if(best_path_automorphism) free(best_path_automorphism); |
398 |
+ best_path_automorphism = (unsigned int*)malloc(N * sizeof(unsigned int)); |
399 |
+- if(!best_path_automorphism) _OUT_OF_MEMORY(); |
400 |
++ if(!best_path_automorphism) { |
401 |
++ _OUT_OF_MEMORY(oom6); |
402 |
++ oom6: |
403 |
++ free(first_path_automorphism); |
404 |
++ first_path_automorphism = NULL; |
405 |
++ oom5: |
406 |
++ free(best_path_labeling_inv); |
407 |
++ best_path_labeling_inv = NULL; |
408 |
++ oom4: |
409 |
++ free(first_path_labeling_inv); |
410 |
++ first_path_labeling_inv = NULL; |
411 |
++ oom3: |
412 |
++ free(best_path_labeling); |
413 |
++ best_path_labeling = NULL; |
414 |
++ oom2: |
415 |
++ free(first_path_labeling); |
416 |
++ first_path_labeling = NULL; |
417 |
++ oom1: |
418 |
++ return false; |
419 |
++ } |
420 |
+ |
421 |
+ /* |
422 |
+ * Initialize orbit information so that all vertices are in their own orbits |
423 |
+@@ -1203,8 +1211,10 @@ AbstractGraph::search(const bool canonic |
424 |
+ |
425 |
+ #if defined(BLISS_VERIFY_EQUITABLEDNESS) |
426 |
+ /* The new partition should be equitable */ |
427 |
+- if(!is_equitable()) |
428 |
++ if(!is_equitable()) { |
429 |
+ fatal_error("consistency check failed - partition after refinement is not equitable"); |
430 |
++ return false; |
431 |
++ } |
432 |
+ #endif |
433 |
+ |
434 |
+ /* |
435 |
+@@ -1596,8 +1606,10 @@ AbstractGraph::search(const bool canonic |
436 |
+ |
437 |
+ #if defined(BLISS_VERIFY_AUTOMORPHISMS) |
438 |
+ /* Verify that it really is an automorphism */ |
439 |
+- if(!is_automorphism(best_path_automorphism)) |
440 |
++ if(!is_automorphism(best_path_automorphism)) { |
441 |
+ fatal_error("Best path automorhism validation check failed"); |
442 |
++ return false; |
443 |
++ } |
444 |
+ #endif |
445 |
+ |
446 |
+ unsigned int gca_level_with_first = 0; |
447 |
+@@ -1664,6 +1676,7 @@ AbstractGraph::search(const bool canonic |
448 |
+ |
449 |
+ |
450 |
+ _INTERNAL_ERROR(); |
451 |
++ return false; |
452 |
+ |
453 |
+ |
454 |
+ handle_first_path_automorphism: |
455 |
+@@ -1699,8 +1712,10 @@ AbstractGraph::search(const bool canonic |
456 |
+ |
457 |
+ #if defined(BLISS_VERIFY_AUTOMORPHISMS) |
458 |
+ /* Verify that it really is an automorphism */ |
459 |
+- if(!is_automorphism(first_path_automorphism)) |
460 |
++ if(!is_automorphism(first_path_automorphism)) { |
461 |
+ fatal_error("First path automorphism validation check failed"); |
462 |
++ return false; |
463 |
++ } |
464 |
+ #endif |
465 |
+ |
466 |
+ if(opt_use_long_prune) |
467 |
+@@ -1747,12 +1762,13 @@ AbstractGraph::search(const bool canonic |
468 |
+ /* Release component recursion data in partition */ |
469 |
+ if(opt_use_comprec) |
470 |
+ p.cr_free(); |
471 |
++ return true; |
472 |
+ } |
473 |
+ |
474 |
+ |
475 |
+ |
476 |
+ |
477 |
+-void |
478 |
++bool |
479 |
+ AbstractGraph::find_automorphisms(Stats& stats, |
480 |
+ void (*hook)(void *user_param, |
481 |
+ unsigned int n, |
482 |
+@@ -1762,7 +1778,8 @@ AbstractGraph::find_automorphisms(Stats& |
483 |
+ report_hook = hook; |
484 |
+ report_user_param = user_param; |
485 |
+ |
486 |
+- search(false, stats); |
487 |
++ if (!search(false, stats)) |
488 |
++ return false; |
489 |
+ |
490 |
+ if(first_path_labeling) |
491 |
+ { |
492 |
+@@ -1774,6 +1791,7 @@ AbstractGraph::find_automorphisms(Stats& |
493 |
+ free(best_path_labeling); |
494 |
+ best_path_labeling = 0; |
495 |
+ } |
496 |
++ return true; |
497 |
+ } |
498 |
+ |
499 |
+ |
500 |
+@@ -1788,7 +1806,8 @@ AbstractGraph::canonical_form(Stats& sta |
501 |
+ report_hook = hook; |
502 |
+ report_user_param = user_param; |
503 |
+ |
504 |
+- search(true, stats); |
505 |
++ if (!search(true, stats)) |
506 |
++ return NULL; |
507 |
+ |
508 |
+ return best_path_labeling; |
509 |
+ } |
510 |
+@@ -3479,15 +3498,17 @@ Digraph::initialize_certificate() |
511 |
+ * Check whether perm is an automorphism. |
512 |
+ * Slow, mainly for debugging and validation purposes. |
513 |
+ */ |
514 |
+-bool |
515 |
++int |
516 |
+ Digraph::is_automorphism(unsigned int* const perm) |
517 |
+ { |
518 |
+ std::set<unsigned int, std::less<unsigned int> > edges1; |
519 |
+ std::set<unsigned int, std::less<unsigned int> > edges2; |
520 |
+ |
521 |
+ #if defined(BLISS_CONSISTENCY_CHECKS) |
522 |
+- if(!is_permutation(get_nof_vertices(), perm)) |
523 |
++ if(!is_permutation(get_nof_vertices(), perm)) { |
524 |
+ _INTERNAL_ERROR(); |
525 |
++ return -1; |
526 |
++ } |
527 |
+ #endif |
528 |
+ |
529 |
+ for(unsigned int i = 0; i < get_nof_vertices(); i++) |
530 |
+@@ -3506,7 +3527,7 @@ Digraph::is_automorphism(unsigned int* c |
531 |
+ ei++) |
532 |
+ edges2.insert(*ei); |
533 |
+ if(!(edges1 == edges2)) |
534 |
+- return false; |
535 |
++ return 0; |
536 |
+ |
537 |
+ edges1.clear(); |
538 |
+ for(std::vector<unsigned int>::iterator ei = v1.edges_out.begin(); |
539 |
+@@ -3519,10 +3540,10 @@ Digraph::is_automorphism(unsigned int* c |
540 |
+ ei++) |
541 |
+ edges2.insert(*ei); |
542 |
+ if(!(edges1 == edges2)) |
543 |
+- return false; |
544 |
++ return 0; |
545 |
+ } |
546 |
+ |
547 |
+- return true; |
548 |
++ return 1; |
549 |
+ } |
550 |
+ |
551 |
+ bool |
552 |
+@@ -4337,8 +4358,10 @@ Graph* |
553 |
+ Graph::permute(const unsigned int* perm) const |
554 |
+ { |
555 |
+ #if defined(BLISS_CONSISTENCY_CHECKS) |
556 |
+- if(!is_permutation(get_nof_vertices(), perm)) |
557 |
++ if(!is_permutation(get_nof_vertices(), perm)) { |
558 |
+ _INTERNAL_ERROR(); |
559 |
++ return NULL; |
560 |
++ } |
561 |
+ #endif |
562 |
+ |
563 |
+ Graph* const g = new Graph(get_nof_vertices()); |
564 |
+@@ -5278,15 +5301,17 @@ Graph::initialize_certificate() |
565 |
+ * |
566 |
+ *-------------------------------------------------------------------------*/ |
567 |
+ |
568 |
+-bool |
569 |
++int |
570 |
+ Graph::is_automorphism(unsigned int* const perm) |
571 |
+ { |
572 |
+ std::set<unsigned int, std::less<unsigned int> > edges1; |
573 |
+ std::set<unsigned int, std::less<unsigned int> > edges2; |
574 |
+ |
575 |
+ #if defined(BLISS_CONSISTENCY_CHECKS) |
576 |
+- if(!is_permutation(get_nof_vertices(), perm)) |
577 |
++ if(!is_permutation(get_nof_vertices(), perm)) { |
578 |
+ _INTERNAL_ERROR(); |
579 |
++ return -1; |
580 |
++ } |
581 |
+ #endif |
582 |
+ |
583 |
+ for(unsigned int i = 0; i < get_nof_vertices(); i++) |
584 |
+@@ -5306,10 +5331,10 @@ Graph::is_automorphism(unsigned int* con |
585 |
+ edges2.insert(*ei); |
586 |
+ |
587 |
+ if(!(edges1 == edges2)) |
588 |
+- return false; |
589 |
++ return 0; |
590 |
+ } |
591 |
+ |
592 |
+- return true; |
593 |
++ return 1; |
594 |
+ } |
595 |
+ |
596 |
+ |
597 |
+--- ./graph.hh.orig 2015-09-01 10:23:10.000000000 -0600 |
598 |
++++ ./graph.hh 2015-09-04 15:09:17.261182632 -0600 |
599 |
+@@ -159,7 +159,7 @@ public: |
600 |
+ * Check whether \a perm is an automorphism of this graph. |
601 |
+ * Unoptimized, mainly for debugging purposes. |
602 |
+ */ |
603 |
+- virtual bool is_automorphism(const std::vector<unsigned int>& perm) const; |
604 |
++ virtual bool is_automorphism(const std::vector<unsigned int>& perm) const = 0; |
605 |
+ |
606 |
+ |
607 |
+ /** Activate/deactivate failure recording. |
608 |
+@@ -211,8 +211,10 @@ public: |
609 |
+ * if you want to use the automorphism later, you have to take a copy of it. |
610 |
+ * Do not call any member functions in the hook. |
611 |
+ * The search statistics are copied in \a stats. |
612 |
++ * \return true if successful, false if insufficient memory to search or |
613 |
++ * other internal error. |
614 |
+ */ |
615 |
+- void find_automorphisms(Stats& stats, |
616 |
++ bool find_automorphisms(Stats& stats, |
617 |
+ void (*hook)(void* user_param, |
618 |
+ unsigned int n, |
619 |
+ const unsigned int* aut), |
620 |
+@@ -232,6 +234,8 @@ public: |
621 |
+ * Note that the computed canonical version may depend on the applied version |
622 |
+ * of bliss as well as on some other options (for instance, the splitting |
623 |
+ * heuristic selected with bliss::Graph::set_splitting_heuristic()). |
624 |
++ * This function returns NULL if there is insufficient memory, or another |
625 |
++ * internal error occurs. |
626 |
+ */ |
627 |
+ const unsigned int* canonical_form(Stats& stats, |
628 |
+ void (*hook)(void* user_param, |
629 |
+@@ -436,7 +440,7 @@ protected: |
630 |
+ void reset_permutation(unsigned int *perm); |
631 |
+ |
632 |
+ /* Mainly for debugging purposes */ |
633 |
+- virtual bool is_automorphism(unsigned int* const perm); |
634 |
++ virtual int is_automorphism(unsigned int* const perm) = 0; |
635 |
+ |
636 |
+ std::vector<unsigned int> certificate_current_path; |
637 |
+ std::vector<unsigned int> certificate_first_path; |
638 |
+@@ -450,7 +454,11 @@ protected: |
639 |
+ virtual Partition::Cell* find_next_cell_to_be_splitted(Partition::Cell *cell) = 0; |
640 |
+ |
641 |
+ |
642 |
+- void search(const bool canonical, Stats &stats); |
643 |
++ /** |
644 |
++ * \return true if successful, false if insufficient memory to complete or |
645 |
++ * other internal error |
646 |
++ */ |
647 |
++ bool search(const bool canonical, Stats &stats); |
648 |
+ |
649 |
+ |
650 |
+ void (*report_hook)(void *user_param, |
651 |
+@@ -634,7 +642,7 @@ protected: |
652 |
+ |
653 |
+ void initialize_certificate(); |
654 |
+ |
655 |
+- bool is_automorphism(unsigned int* const perm); |
656 |
++ int is_automorphism(unsigned int* const perm); |
657 |
+ |
658 |
+ |
659 |
+ bool nucr_find_first_component(const unsigned int level); |
660 |
+@@ -875,7 +883,7 @@ protected: |
661 |
+ |
662 |
+ void initialize_certificate(); |
663 |
+ |
664 |
+- bool is_automorphism(unsigned int* const perm); |
665 |
++ int is_automorphism(unsigned int* const perm); |
666 |
+ |
667 |
+ void sort_edges(); |
668 |
+ |
669 |
|
670 |
diff --git a/sci-libs/bliss/files/bliss-0.73-rehn.patch b/sci-libs/bliss/files/bliss-0.73-rehn.patch |
671 |
new file mode 100644 |
672 |
index 00000000..f37eedb |
673 |
--- /dev/null |
674 |
+++ b/sci-libs/bliss/files/bliss-0.73-rehn.patch |
675 |
@@ -0,0 +1,74 @@ |
676 |
+--- ./graph.cc.orig 2015-09-04 15:04:09.927604245 -0600 |
677 |
++++ ./graph.cc 2015-09-04 15:09:46.999819514 -0600 |
678 |
+@@ -597,16 +597,6 @@ public: |
679 |
+ }; |
680 |
+ |
681 |
+ |
682 |
+- |
683 |
+- |
684 |
+-typedef struct { |
685 |
+- unsigned int splitting_element; |
686 |
+- unsigned int certificate_index; |
687 |
+- unsigned int subcertificate_length; |
688 |
+- UintSeqHash eqref_hash; |
689 |
+-} PathInfo; |
690 |
+- |
691 |
+- |
692 |
+ bool |
693 |
+ AbstractGraph::search(const bool canonical, Stats& stats) |
694 |
+ { |
695 |
+@@ -753,7 +743,6 @@ AbstractGraph::search(const bool canonic |
696 |
+ initialize_certificate(); |
697 |
+ |
698 |
+ std::vector<TreeNode> search_stack; |
699 |
+- std::vector<PathInfo> first_path_info; |
700 |
+ std::vector<PathInfo> best_path_info; |
701 |
+ |
702 |
+ search_stack.clear(); |
703 |
+@@ -5477,7 +5466,7 @@ Graph::nucr_find_first_component(const u |
704 |
+ component.clear(); |
705 |
+ component_elements = 0; |
706 |
+ sh_return = 0; |
707 |
+- unsigned int sh_first = 0; |
708 |
++ unsigned int sh_first = 1 << 31; |
709 |
+ unsigned int sh_size = 0; |
710 |
+ unsigned int sh_nuconn = 0; |
711 |
+ |
712 |
+--- ./graph.hh.orig 2015-09-04 15:09:17.261182632 -0600 |
713 |
++++ ./graph.hh 2015-09-04 15:09:47.001819355 -0600 |
714 |
+@@ -109,9 +109,12 @@ public: |
715 |
+ unsigned long int get_max_level() const {return max_level;} |
716 |
+ }; |
717 |
+ |
718 |
+- |
719 |
+- |
720 |
+- |
721 |
++typedef struct { |
722 |
++ unsigned int splitting_element; |
723 |
++ unsigned int certificate_index; |
724 |
++ unsigned int subcertificate_length; |
725 |
++ UintSeqHash eqref_hash; |
726 |
++} PathInfo; |
727 |
+ |
728 |
+ |
729 |
+ /** |
730 |
+@@ -524,7 +527,7 @@ protected: |
731 |
+ */ |
732 |
+ unsigned int cr_component_elements; |
733 |
+ |
734 |
+- |
735 |
++ std::vector<PathInfo> first_path_info; |
736 |
+ |
737 |
+ |
738 |
+ }; |
739 |
+@@ -756,6 +759,10 @@ public: |
740 |
+ void set_splitting_heuristic(const SplittingHeuristic shs) {sh = shs; } |
741 |
+ |
742 |
+ |
743 |
++ /** |
744 |
++ * Get an information vector about the first path. |
745 |
++ */ |
746 |
++ std::vector<PathInfo> get_first_path_info() { return first_path_info; } |
747 |
+ }; |
748 |
+ |
749 |
+ |
750 |
|
751 |
diff --git a/sci-libs/bliss/files/bliss-0.73.1.in b/sci-libs/bliss/files/bliss-0.73.1.in |
752 |
new file mode 100644 |
753 |
index 00000000..f652c3d |
754 |
--- /dev/null |
755 |
+++ b/sci-libs/bliss/files/bliss-0.73.1.in |
756 |
@@ -0,0 +1,55 @@ |
757 |
+.TH "BLISS" "1" "@VERSION@" "Tommi Junttila & Petteri Kaski" "User Commands" |
758 |
+.SH "NAME" |
759 |
+bliss \- Compute automorphism groups and canonical labelings of graphs |
760 |
+.SH "SYNOPSIS" |
761 |
+.B bliss |
762 |
+[\fIOPTIONS\fR] [<\fIGRAPH FILE\fR>] |
763 |
+.SH "DESCRIPTION" |
764 |
+.PP |
765 |
+Bliss is an open source tool for computing automorphism groups and |
766 |
+canonical forms of graphs. The graphs are specified in DIMACS format. |
767 |
+.TP |
768 |
+\fB\-directed\fR |
769 |
+the input graph is directed |
770 |
+.TP |
771 |
+\fB\-can\fR |
772 |
+compute canonical form |
773 |
+.TP |
774 |
+\fB\-ocan\fR=\fIf\fR |
775 |
+compute canonical form and output it in file \fIf\fR |
776 |
+.TP |
777 |
+\fB\-v\fR=\fIN\fR |
778 |
+set verbosity level to N [N >= 0, default: 1] |
779 |
+.TP |
780 |
+\fB\-sh\fR=\fIX\fR |
781 |
+select splitting heuristics, where X is: |
782 |
+.TS |
783 |
+tab(;); |
784 |
+R L. |
785 |
+f;first non-singleton cell |
786 |
+fl;first largest non-singleton cell |
787 |
+fs;first smallest non-singleton cell |
788 |
+fm;first maximally non-trivially connected non-singleton cell |
789 |
+flm;first largest maximally non-trivially connected |
790 |
+;non-singleton cell |
791 |
+fsm;first smallest maximally non-trivially connected |
792 |
+;non-singleton cell (default) |
793 |
+.TE |
794 |
+.TP |
795 |
+\fB\-fr\fR=\fIX\fR |
796 |
+use failure recording? [X=y/n, default: y] |
797 |
+.TP |
798 |
+\fB\-cr\fR=\fIX\fR |
799 |
+use component recursion? [X=y/n, default: y] |
800 |
+.TP |
801 |
+\fB\-version\fR |
802 |
+print the version number and exit |
803 |
+.TP |
804 |
+\fB\-help\fR |
805 |
+print this help and exit |
806 |
+.SH "AUTHORS" |
807 |
+Bliss was written by Tommi Junttila <Tommi.Junttila@×××.fi> and |
808 |
+Petteri Kaski <petteri.kaski@×××××.fi>. |
809 |
+.PP |
810 |
+This man page was written by Jerry James <loganjerry@×××××.com>. |
811 |
+It is distributed under the same terms as bliss. |