diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-06 18:54:07 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-06 18:54:07 +0000 |
commit | cf7a256641d0729742707e68efe5e5ee3895b6c9 (patch) | |
tree | 10acbc3170c4b685aea3df6a9e96bb418a586725 /dev-libs | |
parent | 56330f065f2b903d9e1b2dffc63719fef5897a45 (diff) |
gentoo auto-resync : 06:01:2024 - 18:54:07
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/Manifest.gz | bin | 97192 -> 97196 bytes | |||
-rw-r--r-- | dev-libs/foma/Manifest | 5 | ||||
-rw-r--r-- | dev-libs/foma/files/foma-0.10-0-fix-BOM_codes-initializer.patch | 41 | ||||
-rw-r--r-- | dev-libs/foma/files/foma-0.10.0-gcc-13-fixes.patch | 149 | ||||
-rw-r--r-- | dev-libs/foma/foma-0.10.0_p20220612-r1.ebuild | 37 | ||||
-rw-r--r-- | dev-libs/foma/metadata.xml | 3 |
6 files changed, 234 insertions, 1 deletions
diff --git a/dev-libs/Manifest.gz b/dev-libs/Manifest.gz Binary files differindex d92108441c08..93a8a3339779 100644 --- a/dev-libs/Manifest.gz +++ b/dev-libs/Manifest.gz diff --git a/dev-libs/foma/Manifest b/dev-libs/foma/Manifest index 31e028041436..5076fede93d4 100644 --- a/dev-libs/foma/Manifest +++ b/dev-libs/foma/Manifest @@ -1,3 +1,6 @@ +AUX foma-0.10-0-fix-BOM_codes-initializer.patch 1428 BLAKE2B a1e8d95419b111e36bb9209727b2a88be8844bb21a7b24393fbae603e5fd9b8dbf75c7ba8addec0e041c43540e622a5e9119763c4ba6fca013fcb5d5fd182972 SHA512 28fff7e59c899c44a75da0731d6ac400250f8cc2ea179e41c0c9fce640c826aae5c3a09bc0366472a1fbb260b7cc4b7f4ead386a44982d09e3f123476b884a4b +AUX foma-0.10.0-gcc-13-fixes.patch 5887 BLAKE2B 95efb20aef3c440248a98cee4e9cb43ecf35480aa1509386841748c791d9f922ca9b2970d69fc6ac67e6a32e62c7a87ca86e578506a28bda51f73773a2cbe8b9 SHA512 b944104e1e971d79bfbbb682042db7acdcb147380fc94c5e1cd33b6b88ae6b2a2e1b3e44168b73f9fb6277c88dda2063daa64654e95acea3efe76de1246be3ce DIST foma-0.10.0_p20220612.tar.gz 179778 BLAKE2B f96bf46404ead44725b609953a01a3966506af98d82e925e981cef65b3f0dc7ae3414ad96df911e380f1f565f9c11ea3f85e93fa5962cc52db5e451d2f39d37c SHA512 4539c937bd20f74dee5274126cc3a950873a87364d0fcbf02e674eca5ef049badb1b2774c2975ec7969f7f24ccffb7dd17842840e3a818b1503957374ceff048 +EBUILD foma-0.10.0_p20220612-r1.ebuild 869 BLAKE2B cbec67eede50713e9f0cca81e965f800e9504bca0ab8bb1e1f5853ccd6b1e1e9562611800140b337d5f072d5f3b63c9d555693b2cd2f7b806a50ef767c81f208 SHA512 48febb89e4dc04b737abd847926c59689458f57147474f5c722974599aca34f9c709edde9ce142781efbd5d2cf3187da99f008c51e2227be1ba9ad977289d79a EBUILD foma-0.10.0_p20220612.ebuild 662 BLAKE2B c3f567d4e713b4a34390b956dcd1d8e4cdf2d07f685a988e21132324661c8e8f247d99ab70113fb056e6b42d252575251aa3153f8c6a38e5e603c9e542e99143 SHA512 01c53216f2fb10852a88cef8d597bcff87dff5d5cb538433ed1fb89cdab550d647d2763cfd12858ba333d4d2455da5178c11d25cacb832d013877d38239c289d -MISC metadata.xml 255 BLAKE2B 6fe10a1f843a8b2494606052a69206e32fdd5edf3ca6bdfb661cf6f8e39c0e16fb652acb8697d339770f3559c56a4ba964a0e959b3e0bb456d09ee7570f0d9e9 SHA512 235170971553178916cc484a07e1c665c94cd0a7ec442d2190d3608f7a3441dd2fe08fea666ca23d151077c10c908bc1da0e57355fab43be02711be35531b362 +MISC metadata.xml 336 BLAKE2B 5f93087668fbab915127e19c39476f28eb04b03bf8be79693ce1eedff87591f4d1777f6c55df02c41db5531935c83579186cbe7ba3c0fa209cc049466f05d7e2 SHA512 001ef85af17a4171febd0fbc62e1ae1a3dfb352c0da141ddd2636af713f0e21159832695c72cfb3a87ff86ffd29057377b8fe33a211eb90a38a3c78840a913cd diff --git a/dev-libs/foma/files/foma-0.10-0-fix-BOM_codes-initializer.patch b/dev-libs/foma/files/foma-0.10-0-fix-BOM_codes-initializer.patch new file mode 100644 index 000000000000..0aeb26ea9ef3 --- /dev/null +++ b/dev-libs/foma/files/foma-0.10-0-fix-BOM_codes-initializer.patch @@ -0,0 +1,41 @@ +From 9a99d2d41809422080606bb49531b38ce1e2111a Mon Sep 17 00:00:00 2001 +From: Florian Weimer <fweimer@redhat.com> +Date: Thu, 4 Jan 2024 17:15:27 +0100 +Subject: [PATCH] Fix BOM_codes initializer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Future compilers will reject the current initializer: + +io.c:1002:7: error: initialization of ‘char’ from ‘void *’ makes integer from pointer without a cast + 1002 | { NULL, 0, NULL }, + | ^~~~ +io.c:1002:16: error: initialization of ‘char’ from ‘void *’ makes integer from pointer without a cast + 1002 | { NULL, 0, NULL }, + | ^~~~ +io.c:996:26: warning: missing braces around initializer [-Wmissing-braces] + 996 | static BOM BOM_codes[] = { + | ^ +io.c:996:26: warning: missing braces around initializer [-Wmissing-braces] + + +The reason is that NULL is usually a pointer constant, which is not +a valid expression for a character. +--- + foma/io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/foma/io.c b/foma/io.c +index b7bf69b..da1c57a 100644 +--- a/foma/io.c ++++ b/foma/io.c +@@ -999,7 +999,7 @@ static BOM BOM_codes[] = { + { { 0x00, 0x00, 0xFE, 0xFF }, 4, "UTF-32BE" }, + { { 0xFF, 0xFE }, 2, "UTF16-LE" }, + { { 0xFE, 0xFF }, 2, "UTF16-BE" }, +- { NULL, 0, NULL }, ++ { { 0, } , 0, NULL }, + }; + + BOM *check_BOM(char *buffer) { diff --git a/dev-libs/foma/files/foma-0.10.0-gcc-13-fixes.patch b/dev-libs/foma/files/foma-0.10.0-gcc-13-fixes.patch new file mode 100644 index 000000000000..32a33cdc6af4 --- /dev/null +++ b/dev-libs/foma/files/foma-0.10.0-gcc-13-fixes.patch @@ -0,0 +1,149 @@ +From 24fa34e5f3731e2e6995fba25e31a2dbb9df8bb4 Mon Sep 17 00:00:00 2001 +From: Tino Didriksen <mail@tinodidriksen.com> +Date: Thu, 15 Jun 2023 08:44:54 +0000 +Subject: [PATCH] Fixes for GCC 13 (see https://bugs.debian.org/1037663) and + Visual Studio + +--- + foma/cgflookup.c | 2 +- + foma/constructions.c | 2 +- + foma/flookup.c | 2 +- + foma/foma.h | 2 +- + foma/fomalib.h | 2 +- + foma/iface.c | 4 ++-- + foma/regex.l | 2 +- + foma/regex.y | 7 +++++-- + foma/spelling.c | 2 +- + 9 files changed, 14 insertions(+), 11 deletions(-) + +diff --git a/foma/cgflookup.c b/foma/cgflookup.c +index 1cc11be..1bdfddb 100644 +--- a/foma/cgflookup.c ++++ b/foma/cgflookup.c +@@ -71,7 +71,7 @@ static FILE *INFILE; + static struct lookup_chain *chain_head, *chain_tail, *chain_new, *chain_pos; + static fsm_read_binary_handle fsrh; + +-static char *(*applyer)() = &apply_up; /* Default apply direction = up */ ++static char *(*applyer)(struct apply_handle *h, char *word) = &apply_up; /* Default apply direction = up */ + static void handle_line(char *s); + static void app_print(char *result); + static char *get_next_line(); +diff --git a/foma/constructions.c b/foma/constructions.c +index dec4087..ca66db4 100644 +--- a/foma/constructions.c ++++ b/foma/constructions.c +@@ -41,7 +41,7 @@ int sort_cmp(const void *a, const void *b) { + return (((const struct fsm_state *)a)->state_no - ((const struct fsm_state *)b)->state_no); + } + +-INLINE int add_fsm_arc(struct fsm_state *fsm, int offset, int state_no, int in, int out, int target, int final_state, int start_state); ++int add_fsm_arc(struct fsm_state *fsm, int offset, int state_no, int in, int out, int target, int final_state, int start_state); + + struct fsm *fsm_kleene_closure(struct fsm *net, int optionality); + +diff --git a/foma/flookup.c b/foma/flookup.c +index 971549d..ecd3db3 100644 +--- a/foma/flookup.c ++++ b/foma/flookup.c +@@ -77,7 +77,7 @@ static FILE *INFILE; + static struct lookup_chain *chain_head, *chain_tail, *chain_new, *chain_pos; + static fsm_read_binary_handle fsrh; + +-static char *(*applyer)() = &apply_up; /* Default apply direction = up */ ++static char *(*applyer)(struct apply_handle *h, char *word) = &apply_up; /* Default apply direction = up */ + static void handle_line(char *s); + static void app_print(char *result); + static char *get_next_line(); +diff --git a/foma/foma.h b/foma/foma.h +index 06cb9f7..f5a5bfb 100644 +--- a/foma/foma.h ++++ b/foma/foma.h +@@ -113,7 +113,7 @@ void iface_print_shortest_string(); + void iface_print_shortest_string_size(); + void iface_print_name(void); + void iface_quit(void); +-void iface_apply_random(char *(*applyer)(), int limit); ++void iface_apply_random(char *(*applyer)(struct apply_handle *h), int limit); + void iface_random_lower(int limit); + void iface_random_upper(int limit); + void iface_random_words(int limit); +diff --git a/foma/fomalib.h b/foma/fomalib.h +index 6f0218a..d937d15 100644 +--- a/foma/fomalib.h ++++ b/foma/fomalib.h +@@ -307,7 +307,7 @@ FEXPORT struct fsm *flag_eliminate(struct fsm *net, char *name); + FEXPORT struct fsm *flag_twosided(struct fsm *net); + + /* Compile a rewrite rule */ +-FEXPORT struct fsm *fsm_rewrite(); ++FEXPORT struct fsm *fsm_rewrite(struct rewrite_set *all_rules); + + /* Boolean tests */ + FEXPORT int fsm_isempty(struct fsm *net); +diff --git a/foma/iface.c b/foma/iface.c +index f41e3ce..7ebd569 100644 +--- a/foma/iface.c ++++ b/foma/iface.c +@@ -790,7 +790,7 @@ void iface_random_words(int limit) { + iface_apply_random(&apply_random_words, limit); + } + +-void iface_apply_random(char *(*applyer)(), int limit) { ++void iface_apply_random(char *(*applyer)(struct apply_handle *h), int limit) { + char *result; + struct apply_handle *ah; + int i; +@@ -1230,7 +1230,7 @@ void iface_words_file(char *filename, int type) { + /* type 0 (words), 1 (upper-words), 2 (lower-words) */ + FILE *outfile; + char *result; +- static char *(*applyer)() = &apply_words; ++ static char *(*applyer)(struct apply_handle *h) = &apply_words; + struct apply_handle *ah; + + if (type == 1) { +diff --git a/foma/regex.l b/foma/regex.l +index c303a40..8e3f1e5 100644 +--- a/foma/regex.l ++++ b/foma/regex.l +@@ -49,7 +49,7 @@ struct parser_vars { + struct parser_vars parservarstack[MAX_PARSE_DEPTH]; + int g_parse_depth = 0; + +-extern int yyparse(); ++extern int yyparse(void *scanner, struct defined_networks *defined_nets, struct defined_functions *defined_funcs); + extern int get_iface_lineno(void); + extern int rewrite, rule_direction, substituting; + extern struct fsmcontexts *contexts; +diff --git a/foma/regex.y b/foma/regex.y +index eb00e5e..60ab2a4 100644 +--- a/foma/regex.y ++++ b/foma/regex.y +@@ -21,8 +21,11 @@ + #include <string.h> + #include "foma.h" + #define MAX_F_RECURSION 100 +-extern int yyerror(); +-extern int yylex(); ++typedef void* yyscan_t; ++typedef struct YYLTYPE YYLTYPE; ++typedef union YYSTYPE YYSTYPE; ++extern int yyerror(YYLTYPE* yylloc, yyscan_t scanner, struct defined_networks *defined_nets, struct defined_functions *defined_funcs, char *msg); ++extern int yylex(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); + extern int my_yyparse(char *my_string, int lineno, struct defined_networks *defined_nets, struct defined_functions *defined_funcs); + struct fsm *current_parse; + int rewrite, rule_direction; +diff --git a/foma/spelling.c b/foma/spelling.c +index ab11e98..ac92bd0 100644 +--- a/foma/spelling.c ++++ b/foma/spelling.c +@@ -37,7 +37,7 @@ + #define min_(X, Y) ((X) < (Y) ? (X) : (Y)) + + static int calculate_h(struct apply_med_handle *medh, int *intword, int currpos, int state); +-static struct astarnode *node_delete_min(); ++static struct astarnode *node_delete_min(struct apply_med_handle *medh); + int node_insert(struct apply_med_handle *medh, int wordpos, int fsmstate, int g, int h, int in, int out, int parent); + + char *print_sym(int sym, struct sigma *sigma) { diff --git a/dev-libs/foma/foma-0.10.0_p20220612-r1.ebuild b/dev-libs/foma/foma-0.10.0_p20220612-r1.ebuild new file mode 100644 index 000000000000..c6e37a343f7b --- /dev/null +++ b/dev-libs/foma/foma-0.10.0_p20220612-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +MY_COMMIT="9e8c3df573015a26c84e113ba710ef3d57c8e777" + +DESCRIPTION="Multi-purpose finite-state toolkit" +HOMEPAGE="https://fomafst.github.io/ https://github.com/mhulden/foma" +SRC_URI="https://github.com/mhulden/foma/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/0.10" +KEYWORDS="~amd64 ~x86" + +BDEPEND="sys-devel/bison + sys-devel/flex" +DEPEND="sys-libs/readline:= + sys-libs/zlib" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/foma-${MY_COMMIT}/foma" + +src_prepare() { + cmake_src_prepare + + cd "${WORKDIR}/foma-${MY_COMMIT}" || die + eapply "${FILESDIR}"/foma-0.10.0-gcc-13-fixes.patch + eapply "${FILESDIR}"/foma-0.10-0-fix-BOM_codes-initializer.patch +} + +src_install() { + cmake_src_install + find "${D}" -name '*.a' -delete || die +} diff --git a/dev-libs/foma/metadata.xml b/dev-libs/foma/metadata.xml index a1fbf3c0c993..88d2163e2a86 100644 --- a/dev-libs/foma/metadata.xml +++ b/dev-libs/foma/metadata.xml @@ -5,4 +5,7 @@ <email>juippis@gentoo.org</email> <name>Joonas Niilola</name> </maintainer> + <upstream> + <remote-id type="github">mhulden/foma</remote-id> + </upstream> </pkgmetadata> |