Compare commits
47 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4539cf4c3 | ||
|
|
5da9c6795e | ||
|
|
e2a70a5b30 | ||
|
|
ce265f09fb | ||
|
|
109108f682 | ||
|
|
7676f5ebc7 | ||
|
|
be68a89e6b | ||
|
|
a68ddb7067 | ||
|
|
7890dfee4f | ||
|
|
ed5453eaed | ||
|
|
730cca7889 | ||
|
|
d000258881 | ||
|
|
76671a31d8 | ||
|
|
fda8a1a299 | ||
|
|
c3aba0cf1f | ||
|
|
3c497991d5 | ||
|
|
f8d272996a | ||
|
|
3e43cd7f31 | ||
|
|
4145a5afee | ||
|
|
6c7df3e7e1 | ||
|
|
78fc1d741b | ||
|
|
1d3024a619 | ||
|
|
48ad504d39 | ||
|
|
281bbb4aca | ||
|
|
c2a996bbe0 | ||
|
|
c28a6a38c2 | ||
|
|
a06758af7a | ||
|
|
7f624b3ac3 | ||
|
|
eedfa51550 | ||
|
|
250e6d482a | ||
|
|
b7856cbb38 | ||
|
|
440f125832 | ||
|
|
325b992064 | ||
|
|
53eba74acf | ||
|
|
98eae27f7d | ||
|
|
df1aa1abb1 | ||
|
|
077415eb1a | ||
|
|
afe254a8be | ||
|
|
de8dbbb1f7 | ||
|
|
d803c5aaab | ||
|
|
97aa985447 | ||
|
|
f94fb5e258 | ||
|
|
3f02ffb843 | ||
|
|
34c699c45a | ||
|
|
5e741db5cb | ||
|
|
1d6eeb1d82 | ||
|
|
ba3bc36c78 |
8 changed files with 389 additions and 154 deletions
39
.gitignore
vendored
39
.gitignore
vendored
|
|
@ -1,38 +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_*.tar.xz
|
||||
|
|
|
|||
57
pythontest
Normal file
57
pythontest
Normal 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)
|
||||
94
skf-2.10.16-c23-function-proto.patch
Normal file
94
skf-2.10.16-c23-function-proto.patch
Normal 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 */
|
||||
29
skf-2.10.16-rubyext-ptr-conversion.patch
Normal file
29
skf-2.10.16-rubyext-ptr-conversion.patch
Normal 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;
|
||||
10
skf-2.10.16-rubyext-ptr-typecheck.patch
Normal file
10
skf-2.10.16-rubyext-ptr-typecheck.patch
Normal 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 =
|
||||
|
|
@ -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
|
||||
|
|
|
|||
293
skf.spec
293
skf.spec
|
|
@ -5,70 +5,61 @@
|
|||
#%%define usescm 1
|
||||
%undefine usescm
|
||||
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%global repoid 78199
|
||||
|
||||
%global repoid 72126
|
||||
|
||||
%global mainver 2.10.12
|
||||
%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_python2 1
|
||||
%if 0%{?fedora} >= 32
|
||||
%global enable_python2 0
|
||||
%endif
|
||||
%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
|
||||
# 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
|
||||
BuildRequires: rubygems-devel
|
||||
%if 0%{?fedora} < 19
|
||||
BuildRequires: ruby(abi) = %{rubyabi}
|
||||
%endif
|
||||
BuildRequires: perl-devel
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl(ExtUtils::Embed)
|
||||
%if %{enable_python2}
|
||||
BuildRequires: python2-devel
|
||||
%endif
|
||||
%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}
|
||||
%if ! %{enable_python2}
|
||||
Obsoletes: python2-skf < %{prever}.99
|
||||
Obsoletes: skf-python < %{prever}.99
|
||||
%endif
|
||||
|
||||
|
||||
%package common
|
||||
|
|
@ -84,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.
|
||||
|
|
@ -131,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.
|
||||
|
|
@ -154,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
|
||||
|
||||
|
|
@ -165,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
|
||||
|
|
@ -187,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
|
||||
|
|
@ -209,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
|
||||
|
|
@ -224,11 +201,7 @@ popd
|
|||
# B. extensions
|
||||
for ext in \
|
||||
ruby perl \
|
||||
%if %{enable_python2}
|
||||
python
|
||||
%else
|
||||
%{nil}
|
||||
%endif
|
||||
do
|
||||
pushd $ext
|
||||
|
||||
|
|
@ -236,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
|
||||
|
||||
|
|
@ -256,7 +228,6 @@ do
|
|||
done
|
||||
|
||||
# python3
|
||||
%if %enable_python3
|
||||
pushd python3
|
||||
export PYTHON=python3
|
||||
%configure $OPTS $PYTHON3OPTS
|
||||
|
|
@ -265,14 +236,9 @@ unset CFLAGS
|
|||
make -j1 pythonext
|
||||
unset PYTHON
|
||||
popd
|
||||
%endif
|
||||
|
||||
# tweak find-debuginfo.sh
|
||||
%if 0%{?fedora} >= 27
|
||||
%global debuginfo_subdir %{name}-%{version}-%{release}.%{?_arch}
|
||||
%else
|
||||
%global debuginfo_subdir %{?buildsubdir}
|
||||
%endif
|
||||
%global __debug_install_post_old %__debug_install_post
|
||||
%global __debug_install_post \
|
||||
\
|
||||
|
|
@ -330,18 +296,12 @@ rm -rf %{buildroot}%{_defaultdocdir}
|
|||
|
||||
# B. extentions
|
||||
for ext in ruby \
|
||||
%if %{enable_python2}
|
||||
python
|
||||
%else
|
||||
%{nil}
|
||||
%endif
|
||||
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
|
||||
|
|
@ -351,9 +311,6 @@ install -cpm 0755 skf.so %{buildroot}%{perl_vendorarch}/auto/skf/skf.so
|
|||
popd
|
||||
|
||||
## Cleanup
|
||||
%if %{enable_python2}
|
||||
chmod 0644 %{buildroot}%{python2_sitearch}/skf.py
|
||||
%endif
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
|
|
@ -362,18 +319,17 @@ chmod 0644 %{buildroot}%{python2_sitearch}/skf.py
|
|||
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}
|
||||
|
||||
%if ! %{enable_python2}
|
||||
export CHECK_PYTHON2=no
|
||||
%endif
|
||||
|
||||
# SOURCE1
|
||||
sh skf-basic-test.sh
|
||||
sh %{SOURCE1}
|
||||
(
|
||||
export PYTHONPATH=${python3PATH}
|
||||
python3 %{SOURCE11}
|
||||
)
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
|
@ -384,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
|
||||
|
|
@ -397,23 +353,11 @@ sh skf-basic-test.sh
|
|||
%defattr(-,root,root,-)
|
||||
%{ruby_vendorarchdir}/skf.so
|
||||
|
||||
%if %{enable_python2}
|
||||
%if 0%{?fedora} >= 27
|
||||
%files -n python2-skf
|
||||
%else
|
||||
%files python
|
||||
%endif
|
||||
%defattr(-,root,root,-)
|
||||
%{python2_sitearch}/_skf.so
|
||||
%{python2_sitearch}/skf.py*
|
||||
%endif
|
||||
|
||||
%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,-)
|
||||
|
|
@ -421,6 +365,133 @@ 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
|
||||
|
||||
* Mon Aug 3 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.12-2
|
||||
- Remove no longer used macros
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.12-1.4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.10.12-1.3
|
||||
- Perl 5.32 rebuild
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.12-1.2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jan 17 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.12-1.1
|
||||
- F-32: rebuild against ruby27
|
||||
|
||||
* Wed Jan 1 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.10.12-1
|
||||
- 2.10.12
|
||||
|
||||
|
|
@ -531,7 +602,7 @@ sh skf-basic-test.sh
|
|||
* Sun Dec 06 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.00.2-1
|
||||
- 2.00.2
|
||||
|
||||
* Mon Jun 23 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.00.1-1
|
||||
* Tue Jun 23 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.00.1-1
|
||||
- 2.00.1
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.00-1.2
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (skf_2.10.12.tar.xz) = 2df4423aea7dbc4b8d1c324b692af9ab934739450af3d493f1b4a1e0cf9c2f7d51a33eab34e7f1b1123d622c42c96434c8504e40228ddc26ad364e3f7045fa98
|
||||
SHA512 (skf_2.10.16.tar.xz) = 9d7db9f88c25a780c3dea0a5989cd287bc161b69662d80f9d33cf512039405fd903a668e96df644484ef5a871768c91975a1a78d350bbe9cd61553ae69b34baf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue