diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-11 00:12:38 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-11 00:12:38 +0000 |
commit | 0ec1e1dd7867c3dedcbea76c9b6e847d6b388c03 (patch) | |
tree | 65f42b72245de9fb9fa9ea30e6221dfff7dda7c5 /app-text/chasen | |
parent | 3a81cede4783e464b7485722b2eaac0280dbc570 (diff) |
gentoo auto-resync : 11:02:2025 - 00:12:37
Diffstat (limited to 'app-text/chasen')
-rw-r--r-- | app-text/chasen/Manifest | 2 | ||||
-rw-r--r-- | app-text/chasen/chasen-2.4.5-r1.ebuild | 62 | ||||
-rw-r--r-- | app-text/chasen/files/chasen-2.4.5-c23.patch | 79 |
3 files changed, 143 insertions, 0 deletions
diff --git a/app-text/chasen/Manifest b/app-text/chasen/Manifest index 3124e32e0934..4d585195c175 100644 --- a/app-text/chasen/Manifest +++ b/app-text/chasen/Manifest @@ -1,4 +1,6 @@ +AUX chasen-2.4.5-c23.patch 2266 BLAKE2B 8a0c1c387931b6fa08c1e6422a0d05b386d3c4c60bfdd6d987ab92202eabd0ac7f33e48a65665ff25393e0d03d8e639e84040fc334dbb3d8993d59e35f392d56 SHA512 b3020e967f2dae12e98b9d413fa8bf782914ee7b38f6d692be36cda99e136882427fa294339dc66727e64583e8d507956bfd2b19526bed44afca12035d3413ab 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-r1.ebuild 1069 BLAKE2B 49970c860b289ee5bb07a6761b641cb9eb034554b612846cf86640111d2121fbf67c82c61bb8003deb08d46f4e2367e75a564e976ac6f0c8cd021b8cecf6d84c SHA512 d6bb974a485518b594de313e2f3cb96bc80623c1b257fa8846b1f798d3158b230217ec4e085328a0bad29bdfdccf81524e77f74b4492a0f9b07616e38e5e0670 EBUILD chasen-2.4.5.ebuild 1035 BLAKE2B ce080749437d81d28193905f2fa5e28c76c69e4fb91a83ec1632c349b54872c0f836632dbbf4e049521a9e06e22d602f50ed09c5c8c8060f6265647329ac557a SHA512 dcfcacd206133cccd1af8c19647c4777ebad18b404152bee3ab7f002dddd94c184d41c6ee214a0bf52285c44d7a0178c0aadbac6405f167896d37e72ffa1f687 MISC metadata.xml 311 BLAKE2B 7f255f34d1205f37b06d3a112dc093a502eafb688db85ba9d89aa0c9205fb7ad7c6d2f0296f5d12e8cdac234479e7406b95421b664ef5c8082303f1474537c2e SHA512 3298d36c0c8ffac2db7ca37729e3827d29982c90f8d2768484b67fad5f42c490b3694106018c5142bc7eaf20bb49fa8d9c2c4c42b1e3c00d5807138527ea5251 diff --git a/app-text/chasen/chasen-2.4.5-r1.ebuild b/app-text/chasen/chasen-2.4.5-r1.ebuild new file mode 100644 index 000000000000..13dc0315a598 --- /dev/null +++ b/app-text/chasen/chasen-2.4.5-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit perl-module + +DESCRIPTION="Japanese Morphological Analysis System, ChaSen" +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" +IUSE="perl static-libs" + +RDEPEND="virtual/libiconv" +DEPEND=">=dev-libs/darts-0.32" +PDEPEND=">=app-dicts/ipadic-2.7.0" + +PATCHES=( + "${FILESDIR}"/${PN}-uar.patch + "${FILESDIR}"/${P}-c23.patch +) + +src_configure() { + econf $(use_enable static-libs static) + + if use perl; then + cd "${S}"/perl || die + perl-module_src_configure + fi +} + +src_compile() { + default + + if use perl; then + cd "${S}"/perl || die + perl-module_src_compile + fi +} + +src_test() { + default + + if use perl; then + cd "${S}"/perl || die + perl-module_src_test + fi +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die + + if use perl; then + cd "${S}"/perl || die + perl-module_src_install + newdoc README README.perl + fi +} diff --git a/app-text/chasen/files/chasen-2.4.5-c23.patch b/app-text/chasen/files/chasen-2.4.5-c23.patch new file mode 100644 index 000000000000..d1804b1a906e --- /dev/null +++ b/app-text/chasen/files/chasen-2.4.5-c23.patch @@ -0,0 +1,79 @@ +Ports program to C23 and allows it to compile with GCC-15. +Fix function declarations with no arguments, delete dubious extern of +library function +Fix comparators for quicksort/binary search +https://bugs.gentoo.org/944011 +--- a/lib/connect.c ++++ b/lib/connect.c +@@ -45,9 +45,11 @@ + * rensetu table + */ + static int +-cmp_pair(rensetu_pair_t * pair1, rensetu_pair_t * pair2) ++cmp_pair(const void * pair1_void, const void * pair2_void) + { + int ret; ++ rensetu_pair_t *pair1 = (rensetu_pair_t *)pair1_void; ++ rensetu_pair_t *pair2 = (rensetu_pair_t *)pair2_void; + + /* + * 見出し語 surface form +@@ -166,9 +168,11 @@ + } + + static int +-find_table(lexicon_t * mrph, rensetu_pair_t * pair) ++find_table(const void * mrph_void, const void * pair_void) + { + int ret; ++ lexicon_t * mrph = (lexicon_t*)mrph_void; ++ rensetu_pair_t * pair = (rensetu_pair_t*)pair_void; + + /* + * 品詞分類 POS +@@ -202,12 +206,11 @@ + rensetu_pair_t *ret; + + if (rensetu_tbl[0].hinsi == 0) +- qsort(rensetu_tbl, tbl_num, sizeof(rensetu_pair_t), +- (int (*)()) cmp_pair); ++ qsort(rensetu_tbl, tbl_num, sizeof(rensetu_pair_t), cmp_pair); + + ret = (rensetu_pair_t *) + bsearch(mrph, rensetu_tbl, tbl_num_goi, +- sizeof(rensetu_pair_t), (int (*)()) find_table); ++ sizeof(rensetu_pair_t), find_table); + if (ret) { + mrph->con_tbl = ret->index; + return 1; +@@ -215,7 +218,7 @@ + + ret = (rensetu_pair_t *) + bsearch(mrph, rensetu_tbl + tbl_num_goi, tbl_num - tbl_num_goi, +- sizeof(rensetu_pair_t), (int (*)()) find_table); ++ sizeof(rensetu_pair_t), find_table); + if (ret) { + mrph->con_tbl = ret->index; + return 1; /* if no error, return 1 */ +--- a/lib/iotool.c ++++ b/lib/iotool.c +@@ -362,7 +362,7 @@ + cha_fopen_rcfile(void) + { + FILE *fp; +- char *home_dir, *rc_env, *getenv(); ++ char *home_dir, *rc_env; + + /* + * -R option (standard alone) +--- a/lib/print.c ++++ b/lib/print.c +@@ -47,7 +47,7 @@ + static int path_buffer[CHA_INPUT_SIZE]; + static int pos_end = 0; + +-static void (*cha_putc) (), (*cha_puts) (), (*cha_printf) (), (*cha_write) (); ++static void (*cha_putc) (int, char*), (*cha_puts) (char*, char*), (*cha_printf) (char*, char*, ...), (*cha_write) (void*, size_t, size_t, char*); + + void + cha_print_reset(void) |