summaryrefslogtreecommitdiff
path: root/dev-libs/link-grammar
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-07 23:37:50 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-07 23:37:50 +0100
commit8dfbaa8100b5c51e1de0e4e476ef5513e3ed1bdd (patch)
tree6514153552d2daad7d178ee75d47332710e2979e /dev-libs/link-grammar
parent2fe5661a32d6ec0ba1d6b37cc8ae67e3f81459ec (diff)
gentoo auto-resync : 07:05:2023 - 23:37:50
Diffstat (limited to 'dev-libs/link-grammar')
-rw-r--r--dev-libs/link-grammar/Manifest3
-rw-r--r--dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch35
-rw-r--r--dev-libs/link-grammar/link-grammar-5.12.3.ebuild5
3 files changed, 42 insertions, 1 deletions
diff --git a/dev-libs/link-grammar/Manifest b/dev-libs/link-grammar/Manifest
index be4f483542ab..dd20f729552d 100644
--- a/dev-libs/link-grammar/Manifest
+++ b/dev-libs/link-grammar/Manifest
@@ -1,3 +1,4 @@
+AUX link-grammar-5.12.3-Wimplicit-function-declaration.patch 1295 BLAKE2B 90ece06844dee100de78b45d172bc2a3bef9b2625f47dfb4f1d5a832f010defb28b9e7d8442d8c4e7f0ea01c246200b41629976891a761217624413c80ff2c41 SHA512 b878d6e64e45c40470b61aa31f3c7ceeef3946e1fd15a0f473a131c0cc11e44f1ac7bbfc602362c05659416e40c706d25f1be7e01204b5b9b7b58f71902de2e1
DIST link-grammar-5.12.3.tar.gz 4704751 BLAKE2B a7f0fe39c51ed26ea764d583b38b21cfce6e596c6cd94db6ba47b3606a2b6cd9e56bd6fedeb104dbb345baedae3e144af96999739dda9daa9a9e5886bd98d2f4 SHA512 e0fdb78ec03042119011afea005a62829317fd0bc20afcd94e3f234c9c5252ed9c57d717b75368ac4a63dd8493bd86f551870299925f3b9b95b11915f48d8abe
-EBUILD link-grammar-5.12.3.ebuild 2750 BLAKE2B 6db8fdcda2f2b952f3491916d1ec6a684f71c9809334b9b34dc01e10e978e3d91b96722cd841c5983af5c6acbd9fc15f07463408f8b19bd9338632fecebc2fed SHA512 355bbb988ae81651bcccb73b12fb36cffb12b263e473ba43aa62d598c33f84dbcde6eb046c2d185f2d94beaa213f748a6eb816e7e2790654e357dc4de076d59c
+EBUILD link-grammar-5.12.3.ebuild 2886 BLAKE2B 9e2e466afdd2e782517ffa04c6edefbfb2206feacac6ba4b0d00a34bc6703602a5cec27667965804c15d55db8b2c54498b2f176a80bbe657001fb0b0e817934b SHA512 df46f8e27d9426fa42c125fb92c1a47ec57e1ae956fc8b9f90bd896e57de002964e80af0a9f31fbd5abef38b1b381d6d283d0d673d2385d5f1fa5c34352d3105
MISC metadata.xml 1197 BLAKE2B fac6dd40856d97100ee06cdcd340e660bb2ffe527df31983165beec9d194839336dfddb54be33561560ac2c79d8bad12809eef53abd4059b7c74b7494d728354 SHA512 dcb16b8afa977639e3fe8633762fc7a26d8ab095da15d630bedc6ba65e4c82ec5f0bedbd564b6ad0490790723c0a04065a5cab536aff93cdcf8eab5f1a2d503e
diff --git a/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch b/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch
new file mode 100644
index 000000000000..55ca89c09b94
--- /dev/null
+++ b/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch
@@ -0,0 +1,35 @@
+From 3cbc9ddfd4c3a3e407338619fa383d24da05b23d Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sun, 7 May 2023 16:02:23 +0200
+Subject: [PATCH] Use correct guard macro for glibc heap functions
+
+* `__GNUC__` == Compiling with `-std=gnu*`
+* `__GLIBC__` == Compiling against glibc
+
+Bug: https://bugs.gentoo.org/903749
+---
+ link-grammar/parse/extract-links.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/link-grammar/parse/extract-links.c b/link-grammar/parse/extract-links.c
+index a6129ac7a..e2ce266bc 100644
+--- a/link-grammar/parse/extract-links.c
++++ b/link-grammar/parse/extract-links.c
+@@ -278,7 +278,7 @@ void free_extractor(extractor_t * pex)
+ pex->x_table_size = 0;
+ pex->x_table = NULL;
+
+-#if defined __GNUC__
++#if defined __GLIBC__
+ // MST parsing can result in pathological cases, with almost a
+ // billion elts in the Parse_choice_pool. This blows up the
+ // resident-set size (RSS) over time. Avoid this issue by trimming.
+@@ -294,7 +294,7 @@ void free_extractor(extractor_t * pex)
+
+ xfree((void *) pex, sizeof(extractor_t));
+
+-#if defined __GNUC__
++#if defined __GLIBC__
+ // malloc_trim() is a gnu extension. An alternative would be
+ // to call madvise(MADV_DONTNEED) but this is more complicated.
+ if (trim) malloc_trim(0);
diff --git a/dev-libs/link-grammar/link-grammar-5.12.3.ebuild b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild
index 8aa2ad28347d..ad2d6ce3d75f 100644
--- a/dev-libs/link-grammar/link-grammar-5.12.3.ebuild
+++ b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild
@@ -31,6 +31,11 @@ BDEPEND="
sys-devel/autoconf-archive
virtual/pkgconfig"
+PATCHES=(
+ # upstreamed (https://github.com/opencog/link-grammar/pull/1471)
+ "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch
+)
+
pkg_setup() {
if use aspell && use hunspell; then
ewarn "You have enabled 'aspell' and 'hunspell' support, but both cannot coexist,"