summaryrefslogtreecommitdiff
path: root/app-text/mecab
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-15 01:59:31 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-15 01:59:31 +0000
commit7b744169f910185aacfd39dbd71d58b58a2e1d2f (patch)
tree1a81b82134de57caaca49c598db383ff87721640 /app-text/mecab
parent330454de22a51b01089472bf131acd28ea0c64ec (diff)
gentoo auto-resync : 15:02:2023 - 01:59:31
Diffstat (limited to 'app-text/mecab')
-rw-r--r--app-text/mecab/Manifest3
-rw-r--r--app-text/mecab/files/mecab-0.996-clang-16-register.patch89
-rw-r--r--app-text/mecab/mecab-0.996-r1.ebuild24
3 files changed, 107 insertions, 9 deletions
diff --git a/app-text/mecab/Manifest b/app-text/mecab/Manifest
index 33e806971e14..1ee152db798f 100644
--- a/app-text/mecab/Manifest
+++ b/app-text/mecab/Manifest
@@ -1,4 +1,5 @@
AUX mecab-0.98-iconv.patch 302 BLAKE2B 3644a66b1bdf9099ff0258a057c930c1b2e065836b0e6332211e4d04efbbf39da1de2788d90143826a1c9d887fcb63042e533864e746b7c385baea485cb93490 SHA512 c0dcaa8637f1c16a33bd4dd4007225a4f1ed3f0eebcda28dc7d92ec0a66ea16b5bdd956fb3a904af8070ce0ac2d6c9090b602b4705e73fac1100a845b3a756ce
+AUX mecab-0.996-clang-16-register.patch 3285 BLAKE2B ce5fc8bb953c617ad614216949e96961e264b588a34269495082bc44fe89c23bef06cc42c39579ca02004fa923621c32b859e481c7b09d87a065df49a539f662 SHA512 e79c294bf29c1bf5cf356aa70461000f0ed999c43d0069ae95716bb4fea5280f2415f911828b7510b114ad7952247dd68bbffacfec65dcbd77b22f8fc2a2d662
DIST mecab-0.996.tar.gz 1398663 BLAKE2B 97ea18a00c6f2284c994681631b84a572d244b741c8e30b5fdf5404b2bf80fdd4c724c803999955e36ee252e59e6644716dbdca55a6ffb2e4de52193d7f777bd SHA512 aca6d16f411b9ba9b6687242246aeb28ede6d6c6a9122d4a32da9d8e76e79b5f4af2c8e3b13ad9462b34e9d2994cbd9bbbedebac45609684db9b703da999577f
-EBUILD mecab-0.996-r1.ebuild 1191 BLAKE2B 42b7c8b06642e154d9af8ad0ce5522a66f488ea8913108bddfab0a23524938fc0d89a349e129da292ba6d526249a7c9a2d0aef51e610addf605e467e10462b6d SHA512 9e938a917e6ea9a6ec272fb1713fa6f07f9b58427289674c6e591f0ebcc7df39001c76faddec912a96b62fca4be513f3202040324152f1bc51ad928deda4be5d
+EBUILD mecab-0.996-r1.ebuild 1266 BLAKE2B 9fd202ec8988294d00cefb3cf5a17f45aacb306c8ac308f4c3f775a2ef2c33c64107993784481c545f829110e00c6f1aecf4ca69d746c519d166de634dbac1a1 SHA512 909e9336e764789c9aa9a8bb6d51095b0719e8c7b240529539615be3836e350133450eb6934815cf20d00fb30ec2cbf8f867c20cba3c5145fef3834ea7bc3598
MISC metadata.xml 413 BLAKE2B e30f9d8b15a3ab4419d79cdafa6615e9d7d353b62732b4e5bb819396f22ad951d485317b1da5d36f7e471fed9037d6efc9753e7e0f26e0c6b73b4501f50e1fc9 SHA512 99d12f9ea78a09e7b4230b8520a18d3d8c8d8d99cf77703c8a0bdcf7df63f3de64e8cdf30df7d046f5e5f98d2113abcca9c25de7671edda51da1a4e6fbc530bd
diff --git a/app-text/mecab/files/mecab-0.996-clang-16-register.patch b/app-text/mecab/files/mecab-0.996-clang-16-register.patch
new file mode 100644
index 000000000000..5e782e61fb0c
--- /dev/null
+++ b/app-text/mecab/files/mecab-0.996-clang-16-register.patch
@@ -0,0 +1,89 @@
+https://bugs.gentoo.org/894362
+https://github.com/taku910/mecab/pull/66
+
+From 731d738f33dcf62dc9da93104ca1dd6f4c7c9c5f Mon Sep 17 00:00:00 2001
+From: Yuriy Chernyshov <thegeorg@yandex-team.ru>
+Date: Fri, 11 Feb 2022 12:31:33 +0300
+Subject: [PATCH 1/2] Remove register storage specifier
+
+register does not work in modern C / C++.
+--- a/src/char_property.h
++++ b/src/char_property.h
+@@ -37,7 +37,7 @@ class CharProperty {
+ inline const char *seekToOtherType(const char *begin, const char *end,
+ CharInfo c, CharInfo *fail,
+ size_t *mblen, size_t *clen) const {
+- register const char *p = begin;
++ const char *p = begin;
+ *clen = 0;
+ while (p != end && c.isKindOf(*fail = getCharInfo(p, end, mblen))) {
+ p += *mblen;
+
+From 82fd6424fde64c77f49695883a18f368ba96850e Mon Sep 17 00:00:00 2001
+From: Yuriy Chernyshov <thegeorg@yandex-team.ru>
+Date: Sat, 12 Feb 2022 14:31:03 +0300
+Subject: [PATCH 2/2] More fixes
+
+--- a/src/darts.h
++++ b/src/darts.h
+@@ -404,10 +404,10 @@ class DoubleArrayImpl {
+ T result;
+ set_result(result, -1, 0);
+
+- register array_type_ b = array_[node_pos].base;
+- register array_u_type_ p;
++ array_type_ b = array_[node_pos].base;
++ array_u_type_ p;
+
+- for (register size_t i = 0; i < len; ++i) {
++ for (size_t i = 0; i < len; ++i) {
+ p = b +(node_u_type_)(key[i]) + 1;
+ if (static_cast<array_u_type_>(b) == array_[p].check)
+ b = array_[p].base;
+@@ -431,12 +431,12 @@ class DoubleArrayImpl {
+ size_t node_pos = 0) const {
+ if (!len) len = length_func_()(key);
+
+- register array_type_ b = array_[node_pos].base;
+- register size_t num = 0;
+- register array_type_ n;
+- register array_u_type_ p;
++ array_type_ b = array_[node_pos].base;
++ size_t num = 0;
++ array_type_ n;
++ array_u_type_ p;
+
+- for (register size_t i = 0; i < len; ++i) {
++ for (size_t i = 0; i < len; ++i) {
+ p = b; // + 0;
+ n = array_[p].base;
+ if ((array_u_type_) b == array_[p].check && n < 0) {
+@@ -469,8 +469,8 @@ class DoubleArrayImpl {
+ size_t len = 0) const {
+ if (!len) len = length_func_()(key);
+
+- register array_type_ b = array_[node_pos].base;
+- register array_u_type_ p;
++ array_type_ b = array_[node_pos].base;
++ array_u_type_ p;
+
+ for (; key_pos < len; ++key_pos) {
+ p = b +(node_u_type_)(key[key_pos]) + 1;
+--- a/src/viterbi.cpp
++++ b/src/viterbi.cpp
+@@ -318,11 +318,11 @@ template <bool IsAllPath> bool connect(size_t pos, Node *rnode,
+ const Connector *connector,
+ Allocator<Node, Path> *allocator) {
+ for (;rnode; rnode = rnode->bnext) {
+- register long best_cost = 2147483647;
++ long best_cost = 2147483647;
+ Node* best_node = 0;
+ for (Node *lnode = end_node_list[pos]; lnode; lnode = lnode->enext) {
+- register int lcost = connector->cost(lnode, rnode); // local cost
+- register long cost = lnode->cost + lcost;
++ int lcost = connector->cost(lnode, rnode); // local cost
++ long cost = lnode->cost + lcost;
+
+ if (cost < best_cost) {
+ best_node = lnode;
+
diff --git a/app-text/mecab/mecab-0.996-r1.ebuild b/app-text/mecab/mecab-0.996-r1.ebuild
index cc47b0f8bc48..9eb02cee3b92 100644
--- a/app-text/mecab/mecab-0.996-r1.ebuild
+++ b/app-text/mecab/mecab-0.996-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=8
inherit autotools
@@ -14,16 +14,24 @@ KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
SLOT="0"
IUSE="static-libs unicode"
-DEPEND="dev-lang/perl
+BDEPEND="
+ dev-lang/perl
sys-devel/gettext
- virtual/libiconv"
-RDEPEND=""
-PDEPEND="|| (
+"
+DEPEND="virtual/libiconv"
+RDEPEND="${DEPEND}"
+PDEPEND="
+ || (
app-dicts/mecab-ipadic[unicode=]
app-dicts/mecab-naist-jdic[unicode=]
- )"
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.98-iconv.patch
+ "${FILESDIR}"/${PN}-0.996-clang-16-register.patch
+)
-PATCHES=( "${FILESDIR}"/${PN}-0.98-iconv.patch )
HTML_DOCS=( doc/. )
src_prepare() {