diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-10-25 04:04:27 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-10-25 04:04:27 +0100 |
commit | b11a5614cb96e70e116581c98abf286c2cf694ca (patch) | |
tree | b602f03c26a8da259d67174441f0630d3fbbfa5d /sci-mathematics | |
parent | e7daa1f959ba2c720f36a6984f588098e68b15cd (diff) |
gentoo auto-resync : 25:10:2024 - 04:04:26
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/Manifest.gz | bin | 19342 -> 19339 bytes | |||
-rw-r--r-- | sci-mathematics/glpk/Manifest | 3 | ||||
-rw-r--r-- | sci-mathematics/glpk/files/glpk-5.0-aliasing.patch | 89 | ||||
-rw-r--r-- | sci-mathematics/glpk/glpk-5.0-r3.ebuild (renamed from sci-mathematics/glpk/glpk-5.0-r2.ebuild) | 10 |
4 files changed, 92 insertions, 10 deletions
diff --git a/sci-mathematics/Manifest.gz b/sci-mathematics/Manifest.gz Binary files differindex 2e260f2128d7..7d676d340b70 100644 --- a/sci-mathematics/Manifest.gz +++ b/sci-mathematics/Manifest.gz diff --git a/sci-mathematics/glpk/Manifest b/sci-mathematics/glpk/Manifest index 55e19035dfbb..391e1b92fa60 100644 --- a/sci-mathematics/glpk/Manifest +++ b/sci-mathematics/glpk/Manifest @@ -1,6 +1,7 @@ AUX glpk-4.65-debundle-system-libs.patch 1930 BLAKE2B 0c265afe9338e75bb3d6536e9e0b2f473e15b4b524b29244bd6bce44a1f77e48c122a463a3800a246435b47d240e799fd16a21ef5c66eb00643759774c47ef73 SHA512 940c2d3dc12efd8df90c17277630a60ea6682eff0323ea82eeb8b81377db612103c29fb44bbe8ff936d96a436548be3e4c772f55f8412adaad546a6381be6333 AUX glpk-4.65-fix-mysql-include-prefix.patch 1837 BLAKE2B ecd90024e07f29e8ebb6af80b520c8f192cfea21c90d8c247001389f2ccfcf24ad487981a0cc719d1ca99e266dd2a9d66f6416d4f2d5e7c80bdf807b9bb7b74e SHA512 c74281bf3e03e136d183b562b8f682a3e1957019a36ec0c6a048049f0d5f55361107a62e36eaa9e3306a1f13df10adf55c2f54f096b6e353108856e05d9ce799 +AUX glpk-5.0-aliasing.patch 2997 BLAKE2B 8d67fd1a4eba4af91281d7858e2ae0faed74bce92be981f842ff4b7e2cc84ec465fa82acc0f605fc0cd6310881b5c90baae3001a474b71b2ce2d4d2c689fb46d SHA512 392bfcb2c7319899abdc414b59e7f95beeefc4cabad7603d79734eeca8665a6a99e373a97c0e88a5bce923090d2c3ae8cae0845c2222c389090d3b9009e02e92 DIST glpk-5.0.tar.gz 4132649 BLAKE2B f8204f66a97af950c13ee72ee9541f305745741d1231325670ede14663cb6c28ec6fbc44b3625973f1924ca078183d1d43f494ad43a7b48b45be131882b00001 SHA512 4e92195fa058c707146f2690f3a38b46c33add948c852f67659ca005a6aa980bbf97be96528b0f8391690facb880ac2126cd60198c6c175e7f3f06cca7e29f9d EBUILD glpk-5.0-r1.ebuild 2573 BLAKE2B 86b24b612643deb53ad466534cb640831549eb1412cf379bae02307a9957c693716050cb35770ec891d50d91ffbf3fa218ec7fc43400d9234c49637ae6a4064f SHA512 c20ba1c1eb265a9667979cdf286bb69e9e032454ffdfade04d5700806c6473313efe428c6321ee9db43751a19ff11520315aae7b4e9b41ab921c0fabe1c08355 -EBUILD glpk-5.0-r2.ebuild 2620 BLAKE2B b65947de1a0a49f93c07f0bcf2d339f54ef49e8d346a165c12f4c50664e327e0c552d80bedc27e069c3bc17b417c6879dec41d06c041aed180a6b7b70671124e SHA512 fff33967acc1bfecee4bcd76fd7b8d99dc8aec984b06f7732df64db87957abb478e089b7c6ab67e88f239e81254e35fa77aae21a1c33890cd6ebac781200ade9 +EBUILD glpk-5.0-r3.ebuild 2418 BLAKE2B 11802a3c7b2a4ae6a688bf2283ac44fb499241487b2da3a5c48ae226fe6f538e2ba4cd78f9695be4dace47b2da80fd2d36998991d3c8a9819f41dc04d139977e SHA512 8199dc20067ab872778b6b2f3dc375ecac1a6a369897feeeef91324720e67c7a71883cf1ead8a826d74d8b3bca7656ab496a6f12c1c05ea177b35645f8025ca4 MISC metadata.xml 1104 BLAKE2B f22121178a0e7f3ab097558b05cb084a7dc787cc1530859d6182aea61abee220e135ad695f517419053bb805cecef9c3555fcdb2688d6b6d17cdd8b3ce2dbb21 SHA512 965c2c6c322c488736cb9743f1e076fdf2733976502b2b2668717534f7a1505f36b84f453f23f4ff5972f7a25883d253e345caef727bab8abed4c638f5a0dc5a diff --git a/sci-mathematics/glpk/files/glpk-5.0-aliasing.patch b/sci-mathematics/glpk/files/glpk-5.0-aliasing.patch new file mode 100644 index 000000000000..91ca8b189bb6 --- /dev/null +++ b/sci-mathematics/glpk/files/glpk-5.0-aliasing.patch @@ -0,0 +1,89 @@ +Stolen from Fedora: + + https://src.fedoraproject.org/rpms/glpk/raw/rawhide/f/glpk-4.65-alias.patch + +diff -urN glpk-4.65.orig/src/minisat/minisat.c glpk-4.65/src/minisat/minisat.c +--- glpk-4.65.orig/src/minisat/minisat.c 2018-02-16 00:00:00.000000000 -0700 ++++ glpk-4.65/src/minisat/minisat.c 2018-05-20 18:54:25.106624859 -0600 +@@ -135,11 +135,11 @@ struct clause_t + + #define clause_learnt(c) ((c)->size_learnt & 1) + +-#define clause_activity(c) \ +- (*((float*)&(c)->lits[(c)->size_learnt>>1])) ++#define clause_activity(c, a) \ ++ memcpy(&(a), &(c)->lits[(c)->size_learnt>>1], sizeof(float)) + + #define clause_setactivity(c, a) \ +- (void)(*((float*)&(c)->lits[(c)->size_learnt>>1]) = (a)) ++ memcpy(&(c)->lits[(c)->size_learnt>>1], &(a), sizeof(float)) + + /*====================================================================*/ + /* Encode literals in clause pointers: */ +@@ -313,14 +313,18 @@ static inline void act_clause_rescale(so + clause** cs = (clause**)vecp_begin(&s->learnts); + int i; + for (i = 0; i < vecp_size(&s->learnts); i++){ +- float a = clause_activity(cs[i]); +- clause_setactivity(cs[i], a * (float)1e-20); ++ float a; ++ clause_activity(cs[i], a); ++ a *= (float)1e-20; ++ clause_setactivity(cs[i], a); + } + s->cla_inc *= (float)1e-20; + } + + static inline void act_clause_bump(solver* s, clause *c) { +- float a = clause_activity(c) + s->cla_inc; ++ float a; ++ clause_activity(c, a); ++ a += s->cla_inc; + clause_setactivity(c,a); + if (a > 1e20) act_clause_rescale(s); + } +@@ -356,7 +360,7 @@ static clause* clause_new(solver* s, lit + c->lits[i] = begin[i]; + + if (learnt) +- *((float*)&c->lits[size]) = 0.0; ++ memset(&c->lits[size], 0, sizeof(float)); + + assert(begin[0] >= 0); + assert(begin[0] < s->size*2); +@@ -850,10 +854,17 @@ clause* solver_propagate(solver* s) + } + + static inline int clause_cmp (const void* x, const void* y) { +- return clause_size((clause*)x) > 2 +- && (clause_size((clause*)y) == 2 +- || clause_activity((clause*)x) +- < clause_activity((clause*)y)) ? -1 : 1; } ++ clause *cx = (clause *)x; ++ clause *cy = (clause *)y; ++ float fx, fy; ++ if (clause_size(cx) <= 2) ++ return 1; ++ if (clause_size(cy) == 2) ++ return -1; ++ clause_activity(cx, fx); ++ clause_activity(cy, fy); ++ return fx < fy ? -1 : 1; ++} + + void solver_reducedb(solver* s) + { +@@ -874,10 +885,12 @@ void solver_reducedb(solver* s) + learnts[j++] = learnts[i]; + } + for (; i < vecp_size(&s->learnts); i++){ ++ float f; ++ clause_activity(learnts[i], f); + if (clause_size(learnts[i]) > 2 + && reasons[lit_var(*clause_begin(learnts[i]))] + != learnts[i] +- && clause_activity(learnts[i]) < extra_lim) ++ && f < extra_lim) + clause_remove(s,learnts[i]); + else + learnts[j++] = learnts[i]; diff --git a/sci-mathematics/glpk/glpk-5.0-r2.ebuild b/sci-mathematics/glpk/glpk-5.0-r3.ebuild index ec74e25882a4..477d3016240a 100644 --- a/sci-mathematics/glpk/glpk-5.0-r2.ebuild +++ b/sci-mathematics/glpk/glpk-5.0-r3.ebuild @@ -36,6 +36,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}"/${PN}-4.65-fix-mysql-include-prefix.patch "${FILESDIR}"/${PN}-4.65-debundle-system-libs.patch + "${FILESDIR}"/${PN}-5.0-aliasing.patch ) src_prepare() { @@ -53,15 +54,6 @@ src_prepare() { } src_configure() { - # -Werror=strict-aliasing - # https://bugs.gentoo.org/863047 - # https://lists.gnu.org/archive/html/bug-glpk/2022-08/msg00000.html - # No upstream response... - # - # Do not trust it to LTO either. - append-flags -fno-strict-aliasing - filter-lto - local myconf if use mysql || use odbc; then myconf="--enable-dl" |