Compare commits

..

40 commits

Author SHA1 Message Date
Mamoru TASAKA
f4539cf4c3 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 2026-01-08 20:55:30 +09:00
Mamoru TASAKA
5da9c6795e Support ruby4 2025-11-17 23:00:09 +09:00
Python Maint
e2a70a5b30 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:56:49 +02:00
Python Maint
ce265f09fb Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 15:18:05 +02:00
Fedora Release Engineering
109108f682 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 18:23:19 +00:00
Jitka Plesnikova
7676f5ebc7 Perl 5.42 rebuild 2025-07-07 16:38:25 +02:00
Python Maint
be68a89e6b Rebuilt for Python 3.14 2025-06-02 20:42:31 +02:00
Mamoru TASAKA
a68ddb7067 Support C23 strict prototype 2025-01-17 12:03:40 +09:00
Mamoru TASAKA
7890dfee4f Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 2025-01-08 10:32:15 +09:00
Miroslav Suchý
ed5453eaed Migrate to SPDX license (temporary ids)
BSD and MIT needs to be identified under SPDX - both have more options
for UCD see https://gitlab.com/fedora/legal/fedora-license-data/-/issues/30

This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4

Note that this is an SPDX identifier, but it still needs to be migrated to the proper identifiers in the fedora-license-data set.

If there will be no comments in two weeks, I will merge this.
2024-09-11 05:58:00 +00:00
Fedora Release Engineering
730cca7889 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 05:46:48 +00:00
Jitka Plesnikova
d000258881 Perl 5.40 rebuild 2024-06-12 13:07:58 +02:00
Python Maint
76671a31d8 Rebuilt for Python 3.13 2024-06-07 09:04:42 +02:00
Fedora Release Engineering
fda8a1a299 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 03:27:54 +00:00
Mamoru TASAKA
c3aba0cf1f rubyext: type check for argument (ref: bug 2256789) 2024-01-05 17:42:27 +09:00
Mamoru TASAKA
3c497991d5 change URL 2024-01-05 13:58:25 +09:00
Mamoru TASAKA
f8d272996a rubyext: remove unneeded ptr -> VALUE conversion (ref: bug 2256789) 2024-01-05 13:53:20 +09:00
Mamoru TASAKA
3e43cd7f31 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 2024-01-03 21:16:34 +09:00
Mamoru TASAKA
4145a5afee Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild 2023-07-22 23:40:57 +09:00
Jitka Plesnikova
6c7df3e7e1 Perl 5.38 rebuild 2023-07-11 14:47:39 +02:00
Python Maint
78fc1d741b Rebuilt for Python 3.12 2023-06-14 00:19:43 +02:00
Mamoru TASAKA
1d3024a619 2.10.16 2023-01-27 16:53:28 +09:00
Fedora Release Engineering
48ad504d39 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 03:26:37 +00:00
Jitka Plesnikova
281bbb4aca Remove perl(MODULE_COMPAT), it will be replaced by generators 2023-01-13 21:14:01 +01:00
Mamoru TASAKA
c2a996bbe0 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 2023-01-04 15:38:31 +09:00
Mamoru TASAKA
c28a6a38c2 Proposal patch for supporting PEP623 in python3.12 2023-01-02 15:32:16 +09:00
Mamoru TASAKA
a06758af7a remove unreferenced patch 2022-11-18 00:25:58 +09:00
Mamoru TASAKA
7f624b3ac3 2.10.15 2022-11-18 00:18:41 +09:00
Fedora Release Engineering
eedfa51550 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 08:47:23 +00:00
Python Maint
250e6d482a Rebuilt for Python 3.11 2022-06-13 15:24:11 +02:00
Jitka Plesnikova
b7856cbb38 Perl 5.36 rebuild 2022-05-30 20:16:28 +02:00
Mamoru TASAKA
440f125832 F-36: rebuild against ruby31 2022-01-27 14:41:33 +09:00
Fedora Release Engineering
325b992064 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 01:04:27 +00:00
Fedora Release Engineering
53eba74acf - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 17:43:51 +00:00
Mamoru TASAKA
98eae27f7d BR: glibc-all-langpacks for iconv for Japanese locale 2021-06-21 19:11:39 +09:00
Python Maint
df1aa1abb1 Rebuilt for Python 3.10 2021-06-04 21:14:59 +02:00
Jitka Plesnikova
077415eb1a Perl 5.34 rebuild 2021-05-21 12:31:20 +02:00
Fedora Release Engineering
afe254a8be - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 20:32:59 +00:00
Mamoru TASAKA
de8dbbb1f7 F-34: build for ruby 3.0
Some fix to support ruby 3.0
2021-01-07 15:54:57 +09:00
Mamoru TASAKA
d803c5aaab Enable python3 binding 2020-12-21 11:27:31 +09:00
9 changed files with 369 additions and 175 deletions

40
.gitignore vendored
View file

@ -1,39 +1 @@
skf_1.97.1.tar.gz
skf_1.97.2.tar.gz
/skf_1.97.3.tar.gz
/skf_1.97.4.tar.gz
/skf_1.99a1g.tar.gz
/skf_1.99.0.tar.gz
/skf_1.99.1.tar.gz
/skf_1.99.2-cvs20130327T1317.tar.gz
/skf_1.99.3.tar.gz
/skf_1.99.4.tar.gz
/skf_1.99.5.tar.gz
/skf_1.99.6.tar.gz
/skf_1.99.7.tar.gz
/skf_1.99.8.tar.gz
/skf_1.99.9.tar.gz
/skf_1.99.10.tar.gz
/skf-2.00b0-0.tar.gz
/skf_2.00b1-0.tar.gz
/skf_2.00b2a-1.tar.gz
/skf_2.00b2a-2.tar.gz
/skf_2.00.tar.gz
/skf_2.00.1.tar.gz
/skf_2.00.2.tar.xz
/skf_2.00.3.tar.xz
/skf_2.00.4.tar.xz
/skf_2.00.6.tar.xz
/skf_2.10-rc1.tar.xz
/skf_2.10.tar.xz
/skf_2.10.1.tar.xz
/skf_2.10.2.tar.xz
/skf_2.10.4.tar.xz
/skf_2.10.5.tar.xz
/skf_2.10.7.1.tar.xz
/skf_2.10.8.2.tar.xz
/skf_2.10.9.tar.xz
/skf_2.10.10.tar.xz
/skf_2.10.11.tar.xz
/skf_2.10.12.tar.xz
/skf_2.10.14.tar.xz
/skf_*.tar.xz

57
pythontest Normal file
View file

@ -0,0 +1,57 @@
#!/usr/bin/python3 -
import skf
# euc-jp binary string
strobj=b'\xa5\xc6\xa5\xb9\xa5\xc8'
# convert binary to binarray
resbin1=skf.convert("-s",strobj)
print (resbin1)
# convert binarray to binarray
resbin2=skf.convert("-s",resbin1)
print (resbin2)
# convert binary to utf8
# after PEP 393, the following line convert to UCS1 string
resobj2=skf.convert("-z",strobj)
print (resobj2)
# forced to binarray
resbin3=skf.convert("-z --py-out-binary",strobj)
print (resbin3)
# convert binary to utf16
resobj3=skf.convert("-q ",strobj)
print (resobj3)
# forced to binarray
resbin4=skf.convert("-q --py-out-binary",strobj)
print (resbin4)
# switch back from utf16 to binarray
resobj4=skf.convert("-s",resobj3)
print (resobj4)
resobj5=skf.convert("-e",resobj3)
print (resobj5)
#utf-8 binary to back to sjis
resobj6=skf.convert("-s",resobj2)
print (resobj6)
# utf32, 16 endian variants
resobja=skf.convert("--oc=utf32be",resobj4)
print (resobja)
resobj7=skf.convert("--oc=utf16be",resobj4)
print (resobj7)
resobj8=skf.convert("--oc=utf16le",resobj4)
print (resobj8)
resobj9=skf.convert("--oc=utf32le",resobj4)
print (resobj9)
# code detect result
resguess=skf.convert("--inquiry",strobj)
print (resguess)
resguess=skf.convert("--inquiry",resobj3)
print (resguess)
nbmpobj=b'020010:\xf0\xa0\x80\x93\x20'
print (nbmpobj)
nbmpres0=skf.convert("--oc=utf16be -Z",nbmpobj)
print (nbmpres0)
nbmpres1=skf.convert("--oc=utf-7 ",strobj)
print (nbmpres1)
nbmpres2=skf.convert("--oc=utf16be -Z --encode=mimeb",nbmpobj)
print (nbmpres2)
nbmpres3=skf.convert("--oc=utf16be -Z --encode=ace",strobj)
print (nbmpres3)
nbmpres4=skf.convert("--oc=jis --encode=mimeb",strobj)
print (nbmpres4)

View file

@ -1,60 +0,0 @@
From 475b315a7a3bf140dccabd0a2ce6b77d3d3b0125 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Fri, 4 Dec 2020 13:56:53 +0900
Subject: [PATCH] skf_convert.i: avoid double free for rubyext
With skf-2.10.14 and ruby 2.7.2p137, the following simple code:
`ruby -I. -e 'require "skf" ; Skf.convert("-s", [164, 162].pack("C*"))'`
causes double free, which does not occur on skf-2.10.12.
With skf-2.10.14, in *convert(@SKFCSTRINGS@ *optstr, @SKFSTRINGS@ *cstr),
the local value lwlstr is changed to be cleaned up by free() when returning
from the function.
On the other hand, with rubyext the input argument cstr is to be free'ed()
in the same function (as same as in 2.10.12). But as with rubyext lwlstr points
to cstr, this causes double free. Note that with perl or python extension,
lwlstr is newly generated (allocated) using the original cstr.
To avoid double free and to make rubyext behavior consistent with other
extensions, lwlstr in convert() (and quickconvert, guess) must be newly allocated.
---
skf_convert.i | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/skf_convert.i b/skf_convert.i
index 113e845..1ff2522 100644
--- skf-2.10.14-a/skf_convert.i
+++ skf-2.10.14-b/skf_convert.i
@@ -1224,7 +1224,8 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen,
skf_script_init(); swig_state = 1;
#if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2))
- lwlstr = cstr;
+ lwlstr = malloc(sizeof *lwlstr);
+ memcpy(lwlstr, cstr, sizeof *lwlstr);
ibuflen = get_rstr_len(cstr);
#elif defined(SWIGPYTHON)
lwlstr = skf_pystring2skfstring(cstr,1);
@@ -1349,7 +1350,8 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen,
debug_opt = 0;
#if defined(SWIGRUBY) && (defined(SKF_RUBY19) || defined(SKF_RUBY2))
- lwlstr = cstr;
+ lwlstr = malloc(sizeof *lwlstr);
+ memcpy(lwlstr, cstr, sizeof *lwlstr);
ibuflen = get_rstr_len(cstr);
#elif defined(SWIGPYTHON) && defined(SKF_PYTHON3)
lwlstr = skf_pystring2skfstring(cstr,1);
@@ -1452,7 +1454,8 @@ static void r_skf_convert(struct Skf_localestring *lstr, long ibuflen,
in_saved_codeset = -1;
#if defined(SKF_RUBY19) || defined(SKF_RUBY2)
- lwlstr = cstr;
+ lwlstr = malloc(sizeof *lwlstr);
+ memcpy(lwlstr, cstr, sizeof *lwlstr);
ibuflen = get_rstr_len(cstr);
#elif defined(SWIGPYTHON) && defined(SKF_PYTHON3)
lwlstr = skf_pystring2skfstring(cstr,1);
--
2.28.0

View file

@ -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 */

View file

@ -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;

View file

@ -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 =

View file

@ -4,6 +4,8 @@ set -x
a_utf8=$(echo -e '\xe3\x81\x82')
a_eucjp=$(echo -e '\xa4\xa2')
# FIXME
a_eucjp_escaped='\xa4\xa2'
# Binary
echo "Checking Binary"
@ -29,16 +31,25 @@ fi
# python3
# skip this for now
if ( which python3 && false ) ; then
if ( which python3 ) ; then
# Not check for now
echo "Checking python3"
export PYTHONPATH=$python3PATH
#FIXME
#FIXME
#The following 3 lines need fixing
a_from_shift_jis=$(python3 -c "import skf ; print (skf.convert('-s', \"$a_eucjp\"))" | iconv -f shift-jis -t utf-8)
a_from_iso=$(python3 -c "import skf ; print (skf.convert('--oc=iso-2022-jp', \"$a_eucjp\"))" | iconv -f iso-2022-jp -t utf-8)
a_from_utf8=$(python3 -c "import skf ; print (skf.convert('-z', \"$a_eucjp\"))")
#a_from_shift_jis=$(python3 -c "import skf ; print (skf.convert('-s', b\"$a_eucjp_escaped\"))" | iconv -f shift-jis -t utf-8)
a_from_shift_jis=$(python3 -c "import skf ; print (skf.convert('-s', b\"$a_eucjp_escaped\"))")
a_from_shift_jis=$(echo "${a_from_shift_jis}" | sed -n -e "s@^.*bytearray(b'\(.*\)')@\1@p")
a_from_shift_jis=$(echo -e $a_from_shift_jis | iconv -f shift-jis -t utf-8)
a_from_iso=$(python3 -c "import skf ; print (skf.convert('--oc=iso-2022-jp', b\"$a_eucjp_escaped\"))")
a_from_iso=$(echo "${a_from_iso}" | sed -n -e "s@^.*bytearray(b'\(.*\)')@\1@p")
a_from_iso=$(echo -e $a_from_iso | iconv -f iso-2022-jp -t utf-8)
a_from_utf8=$(python3 -c "import skf ; print (skf.convert('-z', b\"$a_eucjp_escaped\"))")
a_from_utf8=$(echo "${a_from_utf8}" | sed -n -e "s@^.*bytearray(b'\(.*\)')@\1@p")
a_from_utf8=$(echo -e $a_from_utf8)
if [ "$a_from_shift_jis" != "$a_utf8" ] ; then exit 1 ; fi
if [ "$a_from_iso" != "$a_utf8" ] ; then exit 1 ; fi

233
skf.spec
View file

@ -5,42 +5,44 @@
#%%define usescm 1
%undefine usescm
%global repoid 73963
%global repoid 78199
%global mainver 2.10.14
%global mainver 2.10.16
%global prever 2.10.10
#%%define betaver -rc1
%undefine betaver
%define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||')
%global fedoraver 1
%global enable_python3 0
%if 0%{?fedora} >= 13
# Disable python3 support for now, how to handle NON-utf8 string
# in python3 with skf...
%global enable_python3 0
%endif
%global baserelease 18
%undefine _changelog_trimtime
Name: skf
Version: %{mainver}
Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist}
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: http://dl.osdn.jp/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
# Reported: https://osdn.net/projects/skf/ticket/41024
Patch1: skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch
# 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
BuildRequires: make
BuildRequires: gettext
# For iconv for Japanese locale
BuildRequires: glibc-all-langpacks
# BR for extenstions
BuildRequires: swig
BuildRequires: ruby-devel
@ -48,12 +50,12 @@ BuildRequires: rubygems-devel
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::Embed)
%if %enable_python3
BuildRequires: python3-devel
%endif
%if 0%{?usescm} >= 1
BuildRequires: autoconf
%endif
# Patch0 needs autoconf anyway
BuildRequires: autoconf
Requires: %{name}-common = %{version}-%{release}
Obsoletes: python2-skf < %{prever}.99
@ -73,29 +75,13 @@ Requires: ruby(abi) = %{rubyabi}
%endif
Provides: ruby(skf) = %{version}-%{release}
%if 0%{?fedora} >= 27
%package -n python2-skf
%{?python_provide:%python_provide python2-skf}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
%else
%package python
%endif
Summary: Python extension module for %{name}
Requires: %{name}-common = %{version}-%{release}
%if %enable_python3
%package python3
%package -n python3-skf
Summary: Python3 extension module for %{name}
Requires: %{name}-common = %{version}-%{release}
%endif
%package perl
Summary: Perl extension module for %{name}
Requires: %{name}-common = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
This package contains utility binary files in skf.
@ -120,17 +106,8 @@ packages.
%description ruby
This package contains Ruby extension module for skf.
%if 0%{?fedora} >= 27
%description -n python2-skf
%else
%description python
%endif
This package contains Python extension module for skf.
%if %enable_python3
%description python3
%description -n python3-skf
This package contains Python3 extension module for skf.
%endif
%description perl
This package contains Perl extension module for skf.
@ -142,7 +119,10 @@ ln -sf %{name}-* main
cp -p %SOURCE1 .
pushd main
%patch1 -p1 -b .rubyext
%patch -P0 -p1 -b .rubyptr
%patch -P1 -p1 -b .rubycheck
%patch -P2 -p2 -b .c23
%if 0%{?usescm} >= 1
autoconf
@ -155,11 +135,21 @@ find . -type d -name CVS | sort -r | xargs rm -rf
## Fixing build error
# Fix pythonext build error on F-14+
%if 0%{?fedora} >= 26
sed -i -e '/python_version=.*substr/s|)-2|)-3|' configure
%else
sed -i -e '/python_version=.*substr/s|7,-3|7,3|' configure
%endif
# Fix for ruby 3
sed -i.ruby3 skf_convert.h \
-e 's@^#if defined.SKF_RUBY3.*$@#if 0@'
sed -i configure.ac configure \
-e '\@^[ \t][ \t]*ruby_19_preferred="yes"@i ruby_21_preferred="yes";@' \
-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
@ -177,10 +167,8 @@ popd # from main
# Okay, duplicate main directory
for ext in \
%if %enable_python3
python3 \
%endif
ruby perl python
ruby perl
do
mkdir -p $ext
cp -pr main/* $ext
@ -199,11 +187,10 @@ OPTS="$OPTS --enable-debug"
OPTS="$OPTS --disable-strip"
OPTS="$OPTS --with-ruby_sitearch_dir=%{ruby_vendorarchdir}"
PYTHONOPTS="$OPTS --enable-python2 --with-python_sitearch_dir=%{python2_sitearch}"
%if %enable_python3
PYTHON3OPTS="$OPTS --enable-python3 --with-python_sitearch_dir=%{python3_sitearch}"
%endif
# Workaround for ruby 3
export RUBY=ruby
# A. main
pushd main
@ -222,8 +209,7 @@ do
export CFLAGS="%optflags $(pkg-config --cflags ruby)"
fi
sed -i.py configure -e '\@enable_python3="yes"@d'
%configure $OPTS $PYTHONOPTS
%configure $OPTS
unset CFLAGS
make -j1 ${ext}ext
@ -242,7 +228,6 @@ do
done
# python3
%if %enable_python3
pushd python3
export PYTHON=python3
%configure $OPTS $PYTHON3OPTS
@ -251,7 +236,6 @@ unset CFLAGS
make -j1 pythonext
unset PYTHON
popd
%endif
# tweak find-debuginfo.sh
%global debuginfo_subdir %{name}-%{version}-%{release}.%{?_arch}
@ -317,9 +301,7 @@ do
eval make -C $ext ${OPTS} ${ext}ext_install
done
## python3
%if %enable_python3
( eval make -C python3 ${OPTS} pythonext_install )
%endif
## perl
pushd perl
@ -337,16 +319,17 @@ popd
export PATH=%{buildroot}%{_bindir}:$PATH
export PERL5LIB=%{buildroot}%{perl_vendorarch}
export python2PATH=%{buildroot}%{python2_sitearch}
%if %enable_python3
export python3PATH=%{buildroot}%{python3_sitearch}
%endif
export RUBYLIB=%{buildroot}%{ruby_vendorarchdir}
export CHECK_PYTHON2=no
# SOURCE1
sh skf-basic-test.sh
sh %{SOURCE1}
(
export PYTHONPATH=${python3PATH}
python3 %{SOURCE11}
)
%files
%defattr(-,root,root,-)
@ -357,9 +340,9 @@ sh skf-basic-test.sh
%files common -f %{name}.lang
%defattr(-,root,root,-)
%lang(ja) %doc main/CHANGES_ja.txt
%lang(ja) %doc main/debian/changelog
%doc main/README.txt
%doc main/copyright
%license main/copyright
%if 0%{?usescm} < 1
%lang(ja) %doc main/doc/
%endif
@ -370,12 +353,11 @@ sh skf-basic-test.sh
%defattr(-,root,root,-)
%{ruby_vendorarchdir}/skf.so
%if %enable_python3
%files python3
%files -n python3-skf
%defattr(-,root,root,-)
%{python3_sitearch}/_skf.so
%{python3_sitearch}/skf.py*
%endif
%{python3_sitearch}/__pycache__/skf.*
%files perl
%defattr(-,root,root,-)
@ -383,6 +365,115 @@ sh skf-basic-test.sh
%{perl_vendorarch}/auto/skf/
%changelog
* Thu Jan 08 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-18
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0
* Mon Nov 17 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-17
- Support ruby4
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2.10.16-16
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2.10.16-15
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.16-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jul 07 2025 Jitka Plesnikova <jplesnik@redhat.com> - 2.10.16-13
- Perl 5.42 rebuild
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 2.10.16-12
- Rebuilt for Python 3.14
* Fri Jan 17 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-11
- Support C23 strict prototype
* Wed Jan 08 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-10
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.16-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jun 12 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.10.16-8
- Perl 5.40 rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 2.10.16-7
- Rebuilt for Python 3.13
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.16-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 5 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-5
- rubyext: type check for argument (ref: bug 2256789)
* Fri Jan 5 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-4
- rubyext: remove unneeded ptr -> VALUE conversion (ref: bug 2256789)
* Wed Jan 03 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-3
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3
* Sat Jul 22 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.10.16-1.2
- Perl 5.38 rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.10.16-1.1
- Rebuilt for Python 3.12
* Fri Jan 27 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.16-1
- 2.10.16
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.15-2.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 04 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.15-2.1
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
* Mon Jan 2 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.15-2
- Proposal patch for supporting PEP623 in python3.12
* Thu Nov 17 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.15-1
- 2.10.15
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.14-4.6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.10.14-4.5
- Rebuilt for Python 3.11
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.10.14-4.4
- Perl 5.36 rebuild
* Thu Jan 27 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.14-4.3
- F-36: rebuild against ruby31
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.14-4.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.14-4.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 21 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.14-4
- BR: glibc-all-langpacks for iconv for Japanese locale
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.10.14-3.3
- Rebuilt for Python 3.10
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.10.14-3.2
- Perl 5.34 rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.14-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Jan 7 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.14-3
- F-34: build for ruby 3.0
- Some fix to support ruby 3.0
* Mon Dec 21 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.14-2
- Enable python3 binding
* Fri Dec 4 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.14-1
- 2.10.14

View file

@ -1 +1 @@
SHA512 (skf_2.10.14.tar.xz) = 52fa539d76ba3624b08e2c723c74298be94b6b5c962acfb39326d47013c73b8331ebdd374da0a1a2c3b961268dde3b5a1a1715359abb3e7a8a4b7df64d855658
SHA512 (skf_2.10.16.tar.xz) = 9d7db9f88c25a780c3dea0a5989cd287bc161b69662d80f9d33cf512039405fd903a668e96df644484ef5a871768c91975a1a78d350bbe9cd61553ae69b34baf