summaryrefslogtreecommitdiff
path: root/app-text/chasen
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /app-text/chasen
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'app-text/chasen')
-rw-r--r--app-text/chasen/Manifest6
-rw-r--r--app-text/chasen/chasen-2.4.5.ebuild (renamed from app-text/chasen/chasen-2.4.4-r3.ebuild)31
-rw-r--r--app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch21
-rw-r--r--app-text/chasen/files/chasen-uar.patch44
4 files changed, 62 insertions, 40 deletions
diff --git a/app-text/chasen/Manifest b/app-text/chasen/Manifest
index 1597ddd017d0..337bcb12bce3 100644
--- a/app-text/chasen/Manifest
+++ b/app-text/chasen/Manifest
@@ -1,4 +1,4 @@
-AUX chasen-2.4.4-cve-2011-4000.patch 559 BLAKE2B ee5085a642c1b04ab5cefeaedd09690f988e5cb600953d0ffecd479fe8ddc207e67a27980ebb3df2fbf31dab1f9cc55d597ea09d25dd0c0b29b8fe1d0eddc6c6 SHA512 308a82dfcba13fc33733df853f0abf9979f2d8ff18e1c3f552ac7cd3b6c844dd40e125790fa62844a326ef7e546d0b24fc01c801f3e6cee0aa8b7b2a08474623
-DIST chasen-2.4.4.tar.gz 845720 BLAKE2B ae18e71d78588c108f747abc6f28835f90d0a2c84616a01d87acea2ae5e0e54ef6ff296ebb9dbdce9047a223bd34203cf2763e9b3d4fb28522a4add7bc823860 SHA512 4551d28be6c0de7a585decf03cf5b56def3d181cfdfd975565ac7236e2c3e8cc0bcf5331f1ae309a914f95c6715e13ba3e9d80ebbd6e86c2316a43b7ed831075
-EBUILD chasen-2.4.4-r3.ebuild 1108 BLAKE2B 3a0a37c2eebba2f1459a58625ac7cf9db6f9fe689d74cbf890a091803bf3f2a9a2f4fd765d051bd2f20409f31a58b4e5f9845090ccfa5202095b92a0696efd63 SHA512 03f3d1380761cc8338587c89ebc404ae0939fb99357295e705b6a723c477b91c653e04f8080042dd911735d1e89eb5b5ca740903177e22e20962903094d9e82d
+AUX chasen-uar.patch 1128 BLAKE2B eeff8e6a76fe8e1888c437b54ffe277658f13e2078ba3ce4d6f89a7e5aef44f5bf76c327dc5c98e82fc02d1930356d9c93e32034f3f4079df1499fa4473f7c90 SHA512 a78c21cc62464f8c03f09e032117682d4bc6f69d0287098933385210d2c186a249ece6715cccef0f520e1e56c1e7c6bfe11caacc51e8a8e484c6359c8567e56c
+DIST chasen-2.4.5.tar.xz 671064 BLAKE2B 3b9867f794a54c4b0552807c54694e9f52082d9712c9e64aa55840b70f3a3800a514d1cd36260ee7397d1e98f28909e9b3e1f5c14d64f28f666b876e130aeb3e SHA512 7a17fe9d534cdc07c147fd7d9350aba381390943f4cfd899393076efe8e6a80aae029a8d4833e91ffa945b3e52d6598c16db257c9cc8d7792b7a1f90b7a1948e
+EBUILD chasen-2.4.5.ebuild 1050 BLAKE2B 0a1236b30655f47cb3e0b854ac70c4e7e73d95251c3fda673f3be270795810dd47cf51de5021feb6532edea936951b87df75e8c901d67ec7a6997634301bddd1 SHA512 4b19d43273842b93b1d4cc95ec40fddb417adfb713d6d5ad633b26d9df0a057dfe9887095caca0122c576ae53e4376d800a4ad032053acd6b7c5b0eb877523c3
MISC metadata.xml 321 BLAKE2B 427e444d7c653146a829db223342ada561683932af8c28d2152aff0f9313b44364719c7ea0d83c771a727f066ff0f58fc2c7acfab5d63ddb0d8845d724b4ac15 SHA512 8c3caf1d5200da6288340c2272e5848311be344afab663c1aaaaf909a425e49a60b810d6b21196fd119c13bb776a09b142c9516f64dfb0414c2fd4ce58fb16cf
diff --git a/app-text/chasen/chasen-2.4.4-r3.ebuild b/app-text/chasen/chasen-2.4.5.ebuild
index 179bcc124bed..d7433b71a1f0 100644
--- a/app-text/chasen/chasen-2.4.4-r3.ebuild
+++ b/app-text/chasen/chasen-2.4.5.ebuild
@@ -1,39 +1,38 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI="8"
-inherit epatch perl-module
+inherit perl-module
DESCRIPTION="Japanese Morphological Analysis System, ChaSen"
-HOMEPAGE="http://chasen-legacy.sourceforge.jp/"
-SRC_URI="mirror://sourceforge.jp/chasen-legacy/32224/${P}.tar.gz"
+HOMEPAGE="https://chasen-legacy.osdn.jp/"
+SRC_URI="mirror://sourceforge.jp/${PN}-legacy/56305/${P}.tar.xz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ppc ~ppc64 ~riscv x86 ~sparc-solaris"
IUSE="perl static-libs"
+RDEPEND="virtual/libiconv"
DEPEND=">=dev-libs/darts-0.32"
-RDEPEND="${DEPEND}
- perl? ( !dev-perl/Text-ChaSen )"
PDEPEND=">=app-dicts/ipadic-2.7.0"
-src_prepare() {
- epatch "${FILESDIR}"/${P}-cve-2011-4000.patch
-}
+PATCHES=( "${FILESDIR}"/${PN}-uar.patch )
src_configure() {
econf $(use_enable static-libs static)
- if use perl ; then
- cd "${S}"/perl
+
+ if use perl; then
+ cd "${S}"/perl || die
perl-module_src_configure
fi
}
src_compile() {
default
- if use perl ; then
+
+ if use perl; then
cd "${S}"/perl || die
perl-module_src_compile
fi
@@ -41,7 +40,8 @@ src_compile() {
src_test() {
default
- if use perl ; then
+
+ if use perl; then
cd "${S}"/perl || die
perl-module_src_test
fi
@@ -49,12 +49,11 @@ src_test() {
src_install() {
default
+ find "${ED}" -name '*.la' -delete || die
- if use perl ; then
+ if use perl; then
cd "${S}"/perl || die
perl-module_src_install
newdoc README README.perl
fi
-
- find "${ED}" -name '*.la' -delete || die
}
diff --git a/app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch b/app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch
deleted file mode 100644
index 61480622e40a..000000000000
--- a/app-text/chasen/files/chasen-2.4.4-cve-2011-4000.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/lib/chalib.c b/lib/chalib.c
-index 5d79e13..cddf51b 100644
---- a/lib/chalib.c
-+++ b/lib/chalib.c
-@@ -306,9 +306,14 @@ chasen_sparse_main(char *input, FILE *output)
- */
- while (*input) {
- int c = 0, len, cursor;
-- if ((crlf = strpbrk(input, "\r\n")) == NULL)
-+ if ((crlf = strpbrk(input, "\r\n")) == NULL) {
- len = strlen(input);
-- else {
-+ if (len >= CHA_INPUT_SIZE) {
-+ len = CHA_INPUT_SIZE - 1;
-+ crlf = input + CHA_INPUT_SIZE - 2;
-+ c = 0;
-+ }
-+ } else {
- len = crlf - input;
- c = *crlf;
- *crlf = '\0';
diff --git a/app-text/chasen/files/chasen-uar.patch b/app-text/chasen/files/chasen-uar.patch
new file mode 100644
index 000000000000..631e0890f751
--- /dev/null
+++ b/app-text/chasen/files/chasen-uar.patch
@@ -0,0 +1,44 @@
+--- a/lib/print.c
++++ b/lib/print.c
+@@ -997,20 +997,20 @@
+ static int
+ get_compound(mrph_data_t *data, char *headword, darts_t *da, long index)
+ {
+- mrph_t mrph;
++ mrph_t *mrph = data->mrph;
+ int has_next, hw_len;
+ char *base = da_get_lex_base(da) + index;
+
+ hw_len = ((short *)base)[0];
+ has_next = ((short *)base)[1];
+ base += sizeof(short) * 2;
+- memcpy(&mrph, base, sizeof(da_lex_t));
+- mrph.headword = headword;
+- mrph.headword_len = hw_len;
+- mrph.is_undef = 0;
+- mrph.darts = da;
++ memcpy(mrph, base, sizeof(da_lex_t));
++ mrph->headword = headword;
++ mrph->headword_len = hw_len;
++ mrph->is_undef = 0;
++ mrph->darts = da;
+
+- get_mrph_data(&mrph, data);
++ get_mrph_data(mrph, data);
+
+ return has_next;
+ }
+@@ -1028,10 +1028,13 @@
+ cha_printf_mrph(lat, path_num, mdata, format);
+ } else {
+ mrph_data_t data;
++ mrph_t m;
+ long index = mdata->compound;
+ int has_next = 1;
+ char *headword = mrph->headword;
+
++ data.mrph = &m;
++
+ while (has_next) {
+ has_next = get_compound(&data, headword, mrph->darts, index);
+ if (!has_next) {