diff --git a/.gitignore b/.gitignore index 3b713ce..3ee82b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,39 @@ -/skf_*.tar.xz +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 diff --git a/pythontest b/pythontest deleted file mode 100644 index 722e6d3..0000000 --- a/pythontest +++ /dev/null @@ -1,57 +0,0 @@ -#!/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) diff --git a/skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch b/skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch new file mode 100644 index 0000000..5803fad --- /dev/null +++ b/skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.patch @@ -0,0 +1,60 @@ +From 475b315a7a3bf140dccabd0a2ce6b77d3d3b0125 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +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 + diff --git a/skf-2.10.16-c23-function-proto.patch b/skf-2.10.16-c23-function-proto.patch deleted file mode 100644 index 18c5911..0000000 --- a/skf-2.10.16-c23-function-proto.patch +++ /dev/null @@ -1,94 +0,0 @@ -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 deleted file mode 100644 index 610b821..0000000 --- a/skf-2.10.16-rubyext-ptr-conversion.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- 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 deleted file mode 100644 index 3a53b64..0000000 --- a/skf-2.10.16-rubyext-ptr-typecheck.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- 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-basic-test.sh b/skf-basic-test.sh index c093c60..fb6c63e 100644 --- a/skf-basic-test.sh +++ b/skf-basic-test.sh @@ -4,8 +4,6 @@ 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" @@ -31,25 +29,16 @@ fi # python3 # skip this for now -if ( which python3 ) ; then +if ( which python3 && false ) ; 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', 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) + 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\"))") if [ "$a_from_shift_jis" != "$a_utf8" ] ; then exit 1 ; fi if [ "$a_from_iso" != "$a_utf8" ] ; then exit 1 ; fi diff --git a/skf.spec b/skf.spec index 4f293d3..d52df3d 100644 --- a/skf.spec +++ b/skf.spec @@ -5,44 +5,42 @@ #%%define usescm 1 %undefine usescm -%global repoid 78199 +%global repoid 73963 -%global mainver 2.10.16 +%global mainver 2.10.14 %global prever 2.10.10 #%%define betaver -rc1 %undefine betaver %define betarel %(echo %betaver | sed -e 's|-|_|' | sed -e 's|^_||') -%global baserelease 18 +%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 %undefine _changelog_trimtime Name: skf Version: %{mainver} -Release: %{?betaver:0.}%{baserelease}%{?betaver:.%betarel}%{?dist} +Release: %{?betaver:0.}%{fedoraver}%{?betaver:.%betarel}%{?dist} Summary: Utility binary files in Simple Kanji Filter -License: LicenseRef-Callaway-BSD AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-UCD +License: BSD and MIT and UCD URL: http://osdn.jp/projects/skf -Source0: https://ftp.iij.ad.jp/pub/osdn.jp/skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.xz +Source0: http://dl.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 +# Reported: https://osdn.net/projects/skf/ticket/41024 +Patch1: skf-2.10.14-0001-skf_convert.i-avoid-double-free-for-rubyext.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 @@ -50,12 +48,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 @@ -75,13 +73,29 @@ Requires: ruby(abi) = %{rubyabi} %endif Provides: ruby(skf) = %{version}-%{release} -%package -n python3-skf +%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 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. @@ -106,8 +120,17 @@ packages. %description ruby This package contains Ruby extension module for skf. -%description -n python3-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 This package contains Python3 extension module for skf. +%endif %description perl This package contains Perl extension module for skf. @@ -119,10 +142,7 @@ ln -sf %{name}-* main cp -p %SOURCE1 . pushd main - -%patch -P0 -p1 -b .rubyptr -%patch -P1 -p1 -b .rubycheck -%patch -P2 -p2 -b .c23 +%patch1 -p1 -b .rubyext %if 0%{?usescm} >= 1 autoconf @@ -135,21 +155,11 @@ 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 - -# 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} +%else +sed -i -e '/python_version=.*substr/s|7,-3|7,3|' configure +%endif ## configure option, etc # change optflags, don't strip @@ -167,8 +177,10 @@ popd # from main # Okay, duplicate main directory for ext in \ +%if %enable_python3 python3 \ - ruby perl +%endif + ruby perl python do mkdir -p $ext cp -pr main/* $ext @@ -187,10 +199,11 @@ OPTS="$OPTS --enable-debug" OPTS="$OPTS --disable-strip" OPTS="$OPTS --with-ruby_sitearch_dir=%{ruby_vendorarchdir}" -PYTHON3OPTS="$OPTS --enable-python3 --with-python_sitearch_dir=%{python3_sitearch}" -# Workaround for ruby 3 -export RUBY=ruby +PYTHONOPTS="$OPTS --enable-python2 --with-python_sitearch_dir=%{python2_sitearch}" +%if %enable_python3 +PYTHON3OPTS="$OPTS --enable-python3 --with-python_sitearch_dir=%{python3_sitearch}" +%endif # A. main pushd main @@ -209,7 +222,8 @@ do export CFLAGS="%optflags $(pkg-config --cflags ruby)" fi - %configure $OPTS + sed -i.py configure -e '\@enable_python3="yes"@d' + %configure $OPTS $PYTHONOPTS unset CFLAGS make -j1 ${ext}ext @@ -228,6 +242,7 @@ do done # python3 +%if %enable_python3 pushd python3 export PYTHON=python3 %configure $OPTS $PYTHON3OPTS @@ -236,6 +251,7 @@ unset CFLAGS make -j1 pythonext unset PYTHON popd +%endif # tweak find-debuginfo.sh %global debuginfo_subdir %{name}-%{version}-%{release}.%{?_arch} @@ -301,7 +317,9 @@ 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 @@ -319,17 +337,16 @@ 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 %{SOURCE1} -( - export PYTHONPATH=${python3PATH} - python3 %{SOURCE11} -) +sh skf-basic-test.sh %files %defattr(-,root,root,-) @@ -340,9 +357,9 @@ sh %{SOURCE1} %files common -f %{name}.lang %defattr(-,root,root,-) -%lang(ja) %doc main/debian/changelog +%lang(ja) %doc main/CHANGES_ja.txt %doc main/README.txt -%license main/copyright +%doc main/copyright %if 0%{?usescm} < 1 %lang(ja) %doc main/doc/ %endif @@ -353,11 +370,12 @@ sh %{SOURCE1} %defattr(-,root,root,-) %{ruby_vendorarchdir}/skf.so -%files -n python3-skf +%if %enable_python3 +%files python3 %defattr(-,root,root,-) %{python3_sitearch}/_skf.so %{python3_sitearch}/skf.py* -%{python3_sitearch}/__pycache__/skf.* +%endif %files perl %defattr(-,root,root,-) @@ -365,115 +383,6 @@ 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 - -* Tue Jul 11 2023 Jitka Plesnikova - 2.10.16-1.2 -- Perl 5.38 rebuild - -* Tue Jun 13 2023 Python Maint - 2.10.16-1.1 -- Rebuilt for Python 3.12 - -* Fri Jan 27 2023 Mamoru TASAKA - 2.10.16-1 -- 2.10.16 - -* Sat Jan 21 2023 Fedora Release Engineering - 2.10.15-2.2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Jan 04 2023 Mamoru TASAKA - 2.10.15-2.1 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 - -* Mon Jan 2 2023 Mamoru TASAKA - 2.10.15-2 -- Proposal patch for supporting PEP623 in python3.12 - -* Thu Nov 17 2022 Mamoru TASAKA - 2.10.15-1 -- 2.10.15 - -* Sat Jul 23 2022 Fedora Release Engineering - 2.10.14-4.6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 2.10.14-4.5 -- Rebuilt for Python 3.11 - -* Mon May 30 2022 Jitka Plesnikova - 2.10.14-4.4 -- Perl 5.36 rebuild - -* Thu Jan 27 2022 Mamoru TASAKA - 2.10.14-4.3 -- F-36: rebuild against ruby31 - -* Sat Jan 22 2022 Fedora Release Engineering - 2.10.14-4.2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 2.10.14-4.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Jun 21 2021 Mamoru TASAKA - 2.10.14-4 -- BR: glibc-all-langpacks for iconv for Japanese locale - -* Fri Jun 04 2021 Python Maint - 2.10.14-3.3 -- Rebuilt for Python 3.10 - -* Fri May 21 2021 Jitka Plesnikova - 2.10.14-3.2 -- Perl 5.34 rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 2.10.14-3.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Thu Jan 7 2021 Mamoru TASAKA - 2.10.14-3 -- F-34: build for ruby 3.0 -- Some fix to support ruby 3.0 - -* Mon Dec 21 2020 Mamoru TASAKA - 2.10.14-2 -- Enable python3 binding - * Fri Dec 4 2020 Mamoru TASAKA - 2.10.14-1 - 2.10.14 diff --git a/sources b/sources index 8ba66a9..5181553 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (skf_2.10.16.tar.xz) = 9d7db9f88c25a780c3dea0a5989cd287bc161b69662d80f9d33cf512039405fd903a668e96df644484ef5a871768c91975a1a78d350bbe9cd61553ae69b34baf +SHA512 (skf_2.10.14.tar.xz) = 52fa539d76ba3624b08e2c723c74298be94b6b5c962acfb39326d47013c73b8331ebdd374da0a1a2c3b961268dde3b5a1a1715359abb3e7a8a4b7df64d855658