summaryrefslogtreecommitdiff
path: root/app-text/mecab
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /app-text/mecab
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'app-text/mecab')
-rw-r--r--app-text/mecab/Manifest1
-rw-r--r--app-text/mecab/files/0001-configure-remove-terrible-horrible-code-that-resets-.patch33
-rw-r--r--app-text/mecab/files/mecab-0.98-iconv.patch10
-rw-r--r--app-text/mecab/files/mecab-0.996-clang-16-binary_function.patch16
-rw-r--r--app-text/mecab/files/mecab-0.996-clang-16-register.patch89
-rw-r--r--app-text/mecab/mecab-0.996-r1.ebuild61
-rw-r--r--app-text/mecab/mecab-0.996-r2.ebuild62
-rw-r--r--app-text/mecab/metadata.xml9
8 files changed, 281 insertions, 0 deletions
diff --git a/app-text/mecab/Manifest b/app-text/mecab/Manifest
new file mode 100644
index 000000000000..89ed12e73a53
--- /dev/null
+++ b/app-text/mecab/Manifest
@@ -0,0 +1 @@
+DIST mecab-0.996.tar.gz 1398663 BLAKE2B 97ea18a00c6f2284c994681631b84a572d244b741c8e30b5fdf5404b2bf80fdd4c724c803999955e36ee252e59e6644716dbdca55a6ffb2e4de52193d7f777bd SHA512 aca6d16f411b9ba9b6687242246aeb28ede6d6c6a9122d4a32da9d8e76e79b5f4af2c8e3b13ad9462b34e9d2994cbd9bbbedebac45609684db9b703da999577f
diff --git a/app-text/mecab/files/0001-configure-remove-terrible-horrible-code-that-resets-.patch b/app-text/mecab/files/0001-configure-remove-terrible-horrible-code-that-resets-.patch
new file mode 100644
index 000000000000..a5cc60335209
--- /dev/null
+++ b/app-text/mecab/files/0001-configure-remove-terrible-horrible-code-that-resets-.patch
@@ -0,0 +1,33 @@
+From 8ddfa1e8c274759f287c9ee73d4d1625028c3bb8 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Thu, 29 Feb 2024 16:44:27 -0500
+Subject: [PATCH] configure: remove terrible horrible code that resets CFLAGS
+ to "-O3"
+
+... and totally ignores all user defined flags.
+---
+ configure.in | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index a5e2a5e..4ac75c1 100644
+--- a/configure.in
++++ b/configure.in
+@@ -85,14 +85,6 @@ else
+ fi
+ fi
+
+-dnl
+-dnl check gcc
+-dnl
+-if test -n "$GCC"; then
+- CFLAGS="-O3 -Wall "
+- CXXFLAGS="-O3 -Wall "
+-fi
+-
+ dnl
+ dnl check Char Code
+ dnl
+--
+2.43.0
+
diff --git a/app-text/mecab/files/mecab-0.98-iconv.patch b/app-text/mecab/files/mecab-0.98-iconv.patch
new file mode 100644
index 000000000000..2becb05d8356
--- /dev/null
+++ b/app-text/mecab/files/mecab-0.98-iconv.patch
@@ -0,0 +1,10 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -17,6 +17,7 @@
+ feature_index.cpp feature_index.h lbfgs.cpp \
+ lbfgs.h learner_tagger.cpp learner_tagger.h learner.cpp \
+ learner_node.h libmecab.cpp
++libmecab_la_LIBADD = $(LTLIBICONV)
+
+ include_HEADERS = mecab.h
+ bin_PROGRAMS = mecab
diff --git a/app-text/mecab/files/mecab-0.996-clang-16-binary_function.patch b/app-text/mecab/files/mecab-0.996-clang-16-binary_function.patch
new file mode 100644
index 000000000000..5776cf5b2aa5
--- /dev/null
+++ b/app-text/mecab/files/mecab-0.996-clang-16-binary_function.patch
@@ -0,0 +1,16 @@
+Dropping usage of binary_function
+--- a/src/dictionary.cpp
++++ b/src/dictionary.cpp
+@@ -65,7 +65,11 @@ int progress_bar_darts(size_t current, size_t total) {
+ }
+
+ template <typename T1, typename T2>
+-struct pair_1st_cmp: public std::binary_function<bool, T1, T2> {
++struct pair_1st_cmp {
++ public:
++ using first_argument_type = bool;
++ using second_argument_type = T1;
++ using result_type = T2;
+ bool operator()(const std::pair<T1, T2> &x1,
+ const std::pair<T1, T2> &x2) {
+ return x1.first < x2.first;
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
new file mode 100644
index 000000000000..f81a563e1978
--- /dev/null
+++ b/app-text/mecab/mecab-0.996-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Yet Another Part-of-Speech and Morphological Analyzer"
+HOMEPAGE="https://taku910.github.io/mecab/"
+SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${P}.tar.gz"
+
+LICENSE="|| ( BSD LGPL-2.1 GPL-2 )"
+KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~s390 ~sparc x86"
+SLOT="0"
+IUSE="static-libs unicode"
+
+BDEPEND="
+ dev-lang/perl
+ sys-devel/gettext
+"
+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
+ "${FILESDIR}"/0001-configure-remove-terrible-horrible-code-that-resets-.patch
+)
+
+HTML_DOCS=( doc/. )
+
+src_prepare() {
+ default
+ sed -i "s:/lib:/$(get_libdir):" ${PN}rc.in
+
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ # -Werror=odr -Werror=lto-type-mismatch
+ # https://bugs.gentoo.org/924569
+ # https://github.com/taku910/mecab/issues/75
+ filter-lto
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with unicode charset UTF-8)
+}
+
+src_install() {
+ default
+ find "${ED}" -name 'Makefile*' -delete || die
+ use static-libs || find "${ED}" -name '*.la' -delete || die
+}
diff --git a/app-text/mecab/mecab-0.996-r2.ebuild b/app-text/mecab/mecab-0.996-r2.ebuild
new file mode 100644
index 000000000000..ff1d6d17db89
--- /dev/null
+++ b/app-text/mecab/mecab-0.996-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Yet Another Part-of-Speech and Morphological Analyzer"
+HOMEPAGE="https://taku910.github.io/mecab/"
+SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${P}.tar.gz"
+
+LICENSE="|| ( BSD LGPL-2.1 GPL-2 )"
+KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~s390 ~sparc x86"
+SLOT="0"
+IUSE="static-libs unicode"
+
+BDEPEND="
+ dev-lang/perl
+ sys-devel/gettext
+"
+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
+ "${FILESDIR}"/${PN}-0.996-clang-16-binary_function.patch
+ "${FILESDIR}"/0001-configure-remove-terrible-horrible-code-that-resets-.patch
+)
+
+HTML_DOCS=( doc/. )
+
+src_prepare() {
+ default
+ sed -i "s:/lib:/$(get_libdir):" ${PN}rc.in
+
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ # -Werror=odr -Werror=lto-type-mismatch
+ # https://bugs.gentoo.org/924569
+ # https://github.com/taku910/mecab/issues/75
+ filter-lto
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with unicode charset UTF-8)
+}
+
+src_install() {
+ default
+ find "${ED}" -name 'Makefile*' -delete || die
+ use static-libs || find "${ED}" -name '*.la' -delete || die
+}
diff --git a/app-text/mecab/metadata.xml b/app-text/mecab/metadata.xml
new file mode 100644
index 000000000000..2da59c0c2284
--- /dev/null
+++ b/app-text/mecab/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>