summaryrefslogtreecommitdiff
path: root/dev-libs/libtompoly
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-19 07:57:57 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-19 07:57:57 +0100
commit27f7ac2204449d9fc2137f442522b4fb10327d90 (patch)
treee0fa5de044037be9ff62dcb6bcc8dbeca087767d /dev-libs/libtompoly
parent84a400be40cf32d9e536ae34ebf14ad06ad6b8d6 (diff)
gentoo auto-resync : 19:10:2022 - 07:57:56
Diffstat (limited to 'dev-libs/libtompoly')
-rw-r--r--dev-libs/libtompoly/Manifest3
-rw-r--r--dev-libs/libtompoly/files/libtompoly-0.04-Fix-Wimplicit-function-declaration.patch117
-rw-r--r--dev-libs/libtompoly/libtompoly-0.04-r1.ebuild8
3 files changed, 125 insertions, 3 deletions
diff --git a/dev-libs/libtompoly/Manifest b/dev-libs/libtompoly/Manifest
index dbac262f5f43..512d43e32d0c 100644
--- a/dev-libs/libtompoly/Manifest
+++ b/dev-libs/libtompoly/Manifest
@@ -1,3 +1,4 @@
+AUX libtompoly-0.04-Fix-Wimplicit-function-declaration.patch 3113 BLAKE2B 77f58e605cb897f2ec6ada6edbdbaf582f62c0d54cdcf2456f89cfd6ab8e0dd47e6a622511973b2b926b1a611478d7e8a09c0e337afc1e2f70a3f14764f0fe36 SHA512 599f1bd7c434abf5c68195b54ab569311ebbcc39dbb63ecec7c966d55c3a6ba76b78559be6e667ee15dfa085f83c5860002bfc26f37eb391abb636609c64e460
DIST ltp-0.04.tar.bz2 171966 BLAKE2B 748fd04d55bd3dcdcd9510de1e34e2b9d96c38fc4f48c14137676f60c6d89751e8a095e07687d368d9a46e49ed056484cf8971e96fc400cde15b254a7374c38c SHA512 64a0b25eb058fc2475e6c645138729796099081ad7e926b58d2e83468d988048607e26716b4b669f0e923ea74d4d9705ff5a0466eb41cbe160488d0173447234
-EBUILD libtompoly-0.04-r1.ebuild 686 BLAKE2B f6276e6bc9d7b22b4a0b7bd7251505a7c57e1eeffd09b42cfc2d0455a58d08ba83fcc8b20e04cb596cd657c4c22702c2ff61ffb7f6532660f776ad8d3dda0fbe SHA512 6f1cfa6866ac2470764ffca882936ea6c58e3582fdfb81281c7710e46c91ea942f6c6fe30335b07d27a595d6a36913b2c8225c47e28a9255a91291af66c6ed30
+EBUILD libtompoly-0.04-r1.ebuild 787 BLAKE2B 50bd5523b80be11db62f4928a6c8af5098d130c51bc9bc163eafd166e45093887ed484db7f94d6c6fc84fd942c8c8310c1dcc2ef37cc1a3d990bdf00722742b3 SHA512 86ffacdf939609bac18fa29c277244a09502920d142af78f51820d6fd50c9ed0105dfc54ee63a3823b013b67dc45d29d1fbe05d36e1919d08c62baeee865b17f
MISC metadata.xml 910 BLAKE2B cd74dfeebe4cf884027b6ec410f5e01e79ef59fadac951939a14e6a2483a785ac90e164e14558a8042eb711defe309fd15fcecd7dd97b5f059d11bff477dc883 SHA512 9dfc6fc5a3deb7c91c7cab20915a52003531ba43aa49bad37da9c52a378c94b301b0b3a93bd02542a9a4bb78c83837649ce4347ecdc897eacfdbe52f65eaaa1d
diff --git a/dev-libs/libtompoly/files/libtompoly-0.04-Fix-Wimplicit-function-declaration.patch b/dev-libs/libtompoly/files/libtompoly-0.04-Fix-Wimplicit-function-declaration.patch
new file mode 100644
index 000000000000..49a005d44b1e
--- /dev/null
+++ b/dev-libs/libtompoly/files/libtompoly-0.04-Fix-Wimplicit-function-declaration.patch
@@ -0,0 +1,117 @@
+https://github.com/libtom/libtompoly/pull/4
+
+From 62f0b57e577cb3ec371042e60eb82ffcd0ae6bd0 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 19 Oct 2022 02:21:00 +0100
+Subject: [PATCH] Fix -Wimplicit-function-declaration
+
+Causes build failures with Clang 16.
+
+Bug: https://bugs.gentoo.org/875527
+--- a/pb_add.c
++++ b/pb_add.c
+@@ -10,6 +10,7 @@
+ * Tom St Denis, tomstdenis@iahu.ca, http://poly.libtomcrypt.org
+ */
+ #include <tompoly.h>
++#include <math.h>
+
+ int pb_add(pb_poly *a, pb_poly *b, pb_poly *c)
+ {
+@@ -17,7 +18,7 @@ int pb_add(pb_poly *a, pb_poly *b, pb_poly *c)
+ pb_poly *tmp;
+
+ /* grow c to be the max size */
+- y = MAX(a->used, b->used);
++ y = fmax(a->used, b->used);
+ if (c->alloc < y) {
+ if ((err = pb_grow(c, y)) != MP_OKAY) {
+ return err;
+@@ -28,7 +29,7 @@ int pb_add(pb_poly *a, pb_poly *b, pb_poly *c)
+ characteristic = mp_iszero(&(c->characteristic));
+
+ /* add the terms */
+- z = MIN(a->used, b->used);
++ z = fmin(a->used, b->used);
+ for (x = 0; x < z; x++) {
+ if ((err = mp_add(&(a->terms[x]), &(b->terms[x]), &(c->terms[x]))) != MP_OKAY) {
+ return err;
+--- a/pb_clear.c
++++ b/pb_clear.c
+@@ -10,6 +10,7 @@
+ * Tom St Denis, tomstdenis@iahu.ca, http://poly.libtomcrypt.org
+ */
+ #include <tompoly.h>
++#include <stdlib.h>
+
+ void pb_clear(pb_poly *a)
+ {
+--- a/pb_grow.c
++++ b/pb_grow.c
+@@ -10,6 +10,8 @@
+ * Tom St Denis, tomstdenis@iahu.ca, http://poly.libtomcrypt.org
+ */
+ #include <tompoly.h>
++#include <stdlib.h>
++#include <string.h>
+
+ int pb_grow(pb_poly *a, int size)
+ {
+--- a/pb_init.c
++++ b/pb_init.c
+@@ -10,6 +10,7 @@
+ * Tom St Denis, tomstdenis@iahu.ca, http://poly.libtomcrypt.org
+ */
+ #include <tompoly.h>
++#include <stdlib.h>
+
+ /* initialize a */
+ int pb_init(pb_poly *a, mp_int *characteristic)
+--- a/pb_init_size.c
++++ b/pb_init_size.c
+@@ -10,6 +10,7 @@
+ * Tom St Denis, tomstdenis@iahu.ca, http://poly.libtomcrypt.org
+ */
+ #include <tompoly.h>
++#include <stdlib.h>
+
+ /* initialize a */
+ int pb_init_size(pb_poly *a, mp_int *characteristic, int size)
+--- a/pb_shrink.c
++++ b/pb_shrink.c
+@@ -10,6 +10,7 @@
+ * Tom St Denis, tomstdenis@iahu.ca, http://poly.libtomcrypt.org
+ */
+ #include <tompoly.h>
++#include <stdlib.h>
+
+ int pb_shrink(pb_poly *a)
+ {
+--- a/pb_sub.c
++++ b/pb_sub.c
+@@ -10,6 +10,7 @@
+ * Tom St Denis, tomstdenis@iahu.ca, http://poly.libtomcrypt.org
+ */
+ #include <tompoly.h>
++#include <math.h>
+
+ int pb_sub(pb_poly *a, pb_poly *b, pb_poly *c)
+ {
+@@ -17,7 +18,7 @@ int pb_sub(pb_poly *a, pb_poly *b, pb_poly *c)
+ pb_poly *tmp;
+
+ /* grow c to be the max size */
+- y = MAX(a->used, b->used);
++ y = fmax(a->used, b->used);
+ if (c->alloc < y) {
+ if ((err = pb_grow(c, y)) != MP_OKAY) {
+ return err;
+@@ -28,7 +29,7 @@ int pb_sub(pb_poly *a, pb_poly *b, pb_poly *c)
+ characteristic = mp_iszero(&(c->characteristic));
+
+ /* sub the terms */
+- z = MIN(a->used, b->used);
++ z = fmin(a->used, b->used);
+ for (x = 0; x < z; x++) {
+ if ((err = mp_sub(&(a->terms[x]), &(b->terms[x]), &(c->terms[x]))) != MP_OKAY) {
+ return err;
diff --git a/dev-libs/libtompoly/libtompoly-0.04-r1.ebuild b/dev-libs/libtompoly/libtompoly-0.04-r1.ebuild
index b21e94a8c54f..b8fd20681358 100644
--- a/dev-libs/libtompoly/libtompoly-0.04-r1.ebuild
+++ b/dev-libs/libtompoly/libtompoly-0.04-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,13 +9,17 @@ DESCRIPTION="portable ISO C library for polynomial basis arithmetic"
HOMEPAGE="https://www.libtom.net/"
SRC_URI="https://github.com/libtom/libtompoly/releases/download/${PV}/ltp-${PV}.tar.bz2"
-LICENSE="WTFPL-2"
+LICENSE="|| ( public-domain WTFPL-2 )"
SLOT="0"
KEYWORDS="amd64 ppc x86"
DEPEND="dev-libs/libtommath"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.04-Fix-Wimplicit-function-declaration.patch
+)
+
src_prepare() {
default
sed -i \