diff --git a/skf-2.10.16-c23-function-proto.patch b/skf-2.10.16-c23-function-proto.patch new file mode 100644 index 0000000..18c5911 --- /dev/null +++ b/skf-2.10.16-c23-function-proto.patch @@ -0,0 +1,94 @@ +diff --git a/skf-2.10/dyn_table.c b/skf-2.10/dyn_table.c +index f4fd2c4..e1b0bfb 100644 +--- a/skf-2.10/dyn_table.c ++++ b/skf-2.10/dyn_table.c +@@ -102,9 +102,9 @@ void emoticon_table_gen(); + void emoti_ntt_otbl_gen(); + void emoti_sb_otbl_gen(); + void emoti_au_otbl_gen(); +-void emoticon_otbl_gen(); ++void emoticon_otbl_gen P_((int)); + void nyukan_otbl_gen(); +-void set_out_table(); ++void set_out_table P_((long, long)); + void aribsjis_table_gen(); + void aribjis_table_gen(); + void aribaltmb_table_gen(); +@@ -117,7 +117,7 @@ void aribbmp_table_gen(); + void tscii_tbl_gen(); + #else + void emoticon_table_gen(); +-void emoticon_otbl_gen(); ++void emoticon_otbl_gen P_((int)); + #endif + + void iso2022ms_table_gen(); +diff --git a/skf-2.10/skf.c b/skf-2.10/skf.c +index 8315806..bea2666 100644 +--- a/skf-2.10/skf.c ++++ b/skf-2.10/skf.c +@@ -237,7 +237,7 @@ int **arib_macro_tbl = NULL; /* arib macro area */ + + /* converters */ + static int argeval P_((int,char **,int)); +-int skf_in_converter(); ++int skf_in_converter P_((skfFILE *)); + static int skf_kanaconv_parser P_((int)); + + #ifndef SWIG_EXT +diff --git a/skf-2.10/skf.h b/skf-2.10/skf.h +index 5c2d3c0..a422c1a 100644 +--- a/skf-2.10/skf.h ++++ b/skf-2.10/skf.h +@@ -2270,7 +2270,6 @@ extern skf_ucode **arib_macro_tbl; + + /* --- SWIG-EXTENSION related fixes ---------------------------- */ + extern void fold_value_setup(); +-extern int skf_in_converter(); + + #ifdef SWIG_EXT + extern int swig_state; +diff --git a/skf-2.10/skf_convert.i b/skf-2.10/skf_convert.i +index bc365bb..d8c68e6 100644 +--- a/skf-2.10/skf_convert.i ++++ b/skf-2.10/skf_convert.i +@@ -1164,7 +1164,7 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen, + + /* --- conversion loop ------------------------------------------- */ + if ((errc = setjmp(skf_errbuf)) == 0) { +- sy = skf_in_converter((FILE *)0); ++ sy = skf_in_converter(0); + } else { + #if defined(SKF_PYTHON3) && defined(SWIGPYTHON) + if (errc == 1) PyErr_NoMemory(); +diff --git a/skf-2.10/skf_fileio.h b/skf-2.10/skf_fileio.h +index b551898..74dcc6c 100644 +--- a/skf-2.10/skf_fileio.h ++++ b/skf-2.10/skf_fileio.h +@@ -53,8 +53,6 @@ extern const char *skf_outmode; + /* encoding controls */ + /* -------------------------------------------------------------- */ + +-extern int decode_hook(); +- + #define sEOF (-1) + #define sOCD (-2) + #define sKAN (-3) +@@ -144,7 +142,7 @@ typedef int skfFILE; /* file type */ + + extern unsigned char stdobuf[O_BUFSIZ]; /* output buffer */ + +-extern int skf_fillbuf(); ++extern int skf_fillbuf P_((int *)); + extern /*@-retalias@*/ skfFILE *skf_fopen P_((char *, const char *)); + extern size_t skf_strlen P_((char *,int)); + +@@ -253,6 +251,8 @@ extern skfoFILE *fout; + #endif + + extern void skf_setvbuf P_ ((FILE *,char *,size_t)); ++extern int skf_in_converter P_((skfFILE *)); ++extern int decode_hook P_((skfFILE*, int)); + + /* -------------------------------------------------------------- */ + /* exception handling */ diff --git a/skf-2.10.16-rubyext-ptr-conversion.patch b/skf-2.10.16-rubyext-ptr-conversion.patch new file mode 100644 index 0000000..610b821 --- /dev/null +++ b/skf-2.10.16-rubyext-ptr-conversion.patch @@ -0,0 +1,29 @@ +--- skf-2.10.16/skf_convert.i.rubyptr 2024-01-05 10:20:35.562486946 +0900 ++++ skf-2.10.16/skf_convert.i 2024-01-05 11:17:18.687481582 +0900 +@@ -1238,7 +1238,7 @@ SKFSTRINGS *convert(SKFSTRINGS *optstr, + + #if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2) || defined(SKF_RUBY3)) + lwlstr = cstr; +- ibuflen = get_rstr_len(cstr); ++ ibuflen = lwlstr->length; + #elif defined(SWIGPYTHON) + lwlstr = skf_pystring2skfstring(cstr,1); + ibuflen = lwlstr->length; +@@ -1365,7 +1365,7 @@ SKFSTRINGS *quickconvert(SKFSTRINGS *opt + + #if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2) || defined(SKF_RUBY3)) + lwlstr = cstr; +- ibuflen = get_rstr_len(cstr); ++ ibuflen = lwlstr->length; + #elif defined(SWIGPYTHON) && defined(SKF_PYTHON3) + lwlstr = skf_pystring2skfstring(cstr,1); + ibuflen = lwlstr->length; +@@ -1468,7 +1468,7 @@ SKFSTRINGS *guess(SKFSTRINGS *optstr, SK + + #if defined(SKF_RUBY19) || defined(SKF_RUBY2) || defined(SKF_RUBY3) + lwlstr = cstr; +- ibuflen = get_rstr_len(cstr); ++ ibuflen = lwlstr->length; + #elif defined(SWIGPYTHON) && defined(SKF_PYTHON3) + lwlstr = skf_pystring2skfstring(cstr,1); + ibuflen = lwlstr->length; diff --git a/skf-2.10.16-rubyext-ptr-typecheck.patch b/skf-2.10.16-rubyext-ptr-typecheck.patch new file mode 100644 index 0000000..3a53b64 --- /dev/null +++ b/skf-2.10.16-rubyext-ptr-typecheck.patch @@ -0,0 +1,10 @@ +--- skf-2.10/skf_convert.i.rubycheck 2024-01-05 13:48:57.143063331 +0900 ++++ skf-2.10/skf_convert.i 2024-01-05 17:30:28.938429890 +0900 +@@ -526,6 +526,7 @@ struct Skf_localestring *skf_rbstring2sk + if ((sstrdef = calloc(1,sizeof(struct Skf_localestring))) == NULL) { + skferr(SKF_MALLOCERR,24,2); + } else { ++ if (TYPE(rstr) != T_STRING) {rb_raise(rb_eArgError, "wrong type for arguments"); skferr(SKF_NOTABLE, 0, 0); } + sstrdef->sstr = (unsigned char *)RSTRING_PTR(rstr); + sstrdef->length = RSTRING_LEN(rstr); + sstrdef->codeset = diff --git a/skf.spec b/skf.spec index 1fdee7e..4f293d3 100644 --- a/skf.spec +++ b/skf.spec @@ -13,7 +13,7 @@ %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 2 +%global baserelease 18 %undefine _changelog_trimtime @@ -22,13 +22,20 @@ Version: %{mainver} Release: %{?betaver:0.}%{baserelease}%{?betaver:.%betarel}%{?dist} Summary: Utility binary files in Simple Kanji Filter -License: BSD and MIT and UCD +License: LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-UCD URL: http://osdn.jp/projects/skf -Source0: https://ja.osdn.net/frs/redir.php?f=skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz +Source0: https://ftp.iij.ad.jp/pub/osdn.jp/skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz Source1: skf-basic-test.sh Source2: create-skf-tarball-from-scm.sh # https://osdn.net/projects/skf/ticket/39882 Source11: https://ymu.dl.osdn.jp/ticket/g/s/sk/skf/39882/5733/pythontest +# rubyext: remove unneeded ptr -> VALUE conversion +# ref: https://bugzilla.redhat.com/show_bug.cgi?id=2256789 +Patch0: skf-2.10.16-rubyext-ptr-conversion.patch +# rubyext: type check for argument (ref: bug 2256789) +Patch1: skf-2.10.16-rubyext-ptr-typecheck.patch +# Support C23 strict prototype +Patch2: skf-2.10.16-c23-function-proto.patch # common BR BuildRequires: gcc @@ -113,6 +120,10 @@ cp -p %SOURCE1 . pushd main +%patch -P0 -p1 -b .rubyptr +%patch -P1 -p1 -b .rubycheck +%patch -P2 -p2 -b .c23 + %if 0%{?usescm} >= 1 autoconf @@ -134,6 +145,12 @@ sed -i configure.ac configure \ -e '\@^RUBY=.*false@d' \ %{nil} +# Support ruby4 +sed -i.ruby4 \ + skf_convert.i config.h.in \ + -e 's@|| defined(SKF_RUBY3)@|| defined(SKF_RUBY3) || defined(SKF_RUBY4)@' \ + %{nil} + ## configure option, etc # change optflags, don't strip # believe upstream @@ -348,6 +365,54 @@ sh %{SOURCE1} %{perl_vendorarch}/auto/skf/ %changelog +* Thu Jan 08 2026 Mamoru TASAKA - 2.10.16-18 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 + +* Mon Nov 17 2025 Mamoru TASAKA - 2.10.16-17 +- Support ruby4 + +* Fri Sep 19 2025 Python Maint - 2.10.16-16 +- Rebuilt for Python 3.14.0rc3 bytecode + +* Fri Aug 15 2025 Python Maint - 2.10.16-15 +- Rebuilt for Python 3.14.0rc2 bytecode + +* Fri Jul 25 2025 Fedora Release Engineering - 2.10.16-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Jul 07 2025 Jitka Plesnikova - 2.10.16-13 +- Perl 5.42 rebuild + +* Mon Jun 02 2025 Python Maint - 2.10.16-12 +- Rebuilt for Python 3.14 + +* Fri Jan 17 2025 Mamoru TASAKA - 2.10.16-11 +- Support C23 strict prototype + +* Wed Jan 08 2025 Mamoru TASAKA - 2.10.16-10 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 + +* Sat Jul 20 2024 Fedora Release Engineering - 2.10.16-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jun 12 2024 Jitka Plesnikova - 2.10.16-8 +- Perl 5.40 rebuild + +* Fri Jun 07 2024 Python Maint - 2.10.16-7 +- Rebuilt for Python 3.13 + +* Sat Jan 27 2024 Fedora Release Engineering - 2.10.16-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 5 2024 Mamoru TASAKA - 2.10.16-5 +- rubyext: type check for argument (ref: bug 2256789) + +* Fri Jan 5 2024 Mamoru TASAKA - 2.10.16-4 +- rubyext: remove unneeded ptr -> VALUE conversion (ref: bug 2256789) + +* Wed Jan 03 2024 Mamoru TASAKA - 2.10.16-3 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 + * Sat Jul 22 2023 Mamoru TASAKA - 2.10.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild