[packages/pyzy] - new URLs, updated to 1.1

qboosh qboosh at pld-linux.org
Fri Jul 19 07:28:35 CEST 2024


commit 98e1f3c5ed0a84f4cd3baa2ad73d827eff89f0e5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 19 06:04:11 2024 +0200

    - new URLs, updated to 1.1

 pyzy-opencc-1.patch | 56 -----------------------------------------------------
 pyzy.spec           | 20 +++++++++----------
 2 files changed, 9 insertions(+), 67 deletions(-)
---
diff --git a/pyzy.spec b/pyzy.spec
index 8cb2acc..fbd6e22 100644
--- a/pyzy.spec
+++ b/pyzy.spec
@@ -5,20 +5,18 @@
 Summary:	The Chinese PinYin and Bopomofo conversion library
 Summary(pl.UTF-8):	Biblioteka konwersji pisma chińskiego PinYin i Bopomofo
 Name:		pyzy
-Version:	0.1.0
-Release:	4
+Version:	1.1
+Release:	1
 License:	LGPL v2.1+
 Group:		Libraries
-#Source0Download: http://code.google.com/p/pyzy/downloads/list
-Source0:	http://pyzy.googlecode.com/files/%{name}-%{version}.tar.gz
-# Source0-md5:	73afc3c20808af2fee5f9fca47c64630
+#Source0Download: https://github.com/openSUSE/pyzy/releases
+Source0:	https://github.com/openSUSE/pyzy/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	266a2d22e63b2df102b5f9f45d86d37f
 Source1:	http://pyzy.googlecode.com/files/%{name}-database-1.0.0.tar.bz2
 # Source1-md5:	d0951b8daa7f56a2cbd3b6b4e42532e0
 Source2:	https://raw.githubusercontent.com/tsuna/boost.m4/3d67ee84e9149f6279a8df2113f5a86f0a83bd0d/build-aux/boost.m4
 # Source2-md5:	86092bd75ae3e9109891646b21cc433e
-# https://github.com/hillwoodroc/pyzy/commit/344872231b95ce7c2808288101cc563dcd011940.patch
-Patch0:		%{name}-opencc-1.patch
-URL:		https://github.com/pyzy/pyzy
+URL:		https://github.com/openSUSE/pyzy
 BuildRequires:	autoconf >= 2.62
 BuildRequires:	automake >= 1:1.11
 BuildRequires:	boost-devel >= 1.39
@@ -28,6 +26,7 @@ BuildRequires:	libtool >= 2:1.5
 BuildRequires:	libuuid-devel
 BuildRequires:	opencc-devel >= 1.0.2
 BuildRequires:	pkgconfig
+BuildRequires:	python3 >= 1:3
 BuildRequires:	sqlite3-devel
 Requires:	glib2 >= 1:2.24.0
 Suggests:	%{name}-db = %{version}-%{release}
@@ -109,12 +108,11 @@ Baza danych fraz dla pyzy pochodząca z projektu android.
 
 %prep
 %setup -q
-%patch0 -p1
 
-cp -f %{SOURCE1} data/db/open-phrase
+cp -pf %{SOURCE1} data/db/open-phrase
 
 # update to support newer compilers
-cp -f %{SOURCE2} m4/boost.m4
+cp -pf %{SOURCE2} m4/boost.m4
 
 %build
 %{__libtoolize}
diff --git a/pyzy-opencc-1.patch b/pyzy-opencc-1.patch
deleted file mode 100644
index 2075b07..0000000
--- a/pyzy-opencc-1.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 344872231b95ce7c2808288101cc563dcd011940 Mon Sep 17 00:00:00 2001
-From: Hillwood Yang <hillwoodroc at gmail.com>
-Date: Thu, 26 Feb 2015 11:04:29 +0800
-Subject: [PATCH] Update SimpTradConverter.cc
-
-Use opencc 1.0.2
----
- src/SimpTradConverter.cc | 42 +++++++++++++---------------------------
- 1 file changed, 13 insertions(+), 29 deletions(-)
-
-diff --git a/src/SimpTradConverter.cc b/src/SimpTradConverter.cc
-index 6fe9123..7be0749 100644
---- a/src/SimpTradConverter.cc
-+++ b/src/SimpTradConverter.cc
-@@ -40,7 +41,6 @@ namespace PyZy {
- #ifdef HAVE_OPENCC
- 
- class opencc {
--    static const int BUFFER_SIZE = 64;
- public:
-     opencc (void)
-     {
-@@ -55,29 +55,13 @@ class opencc {
- 
-     void convert (const char *in, String &out)
-     {
--        long n_char;
--        unichar *in_ucs4 = g_utf8_to_ucs4_fast (in, -1, &n_char);
--
--        ucs4_t *pinbuf = (ucs4_t *)in_ucs4;
--        size_t inbuf_left = n_char;
--        while (inbuf_left != 0) {
--            ucs4_t *poutbuf = (ucs4_t *)m_buffer;
--            size_t outbuf_left = BUFFER_SIZE;
--            size_t retval = opencc_convert(m_od, &pinbuf, &inbuf_left, &poutbuf, &outbuf_left);
--            if (retval == (size_t) -1) {
--                /* append left chars in pinbuf */
--                g_warning ("opencc_convert return failed");
--                out << (unichar *) pinbuf;
--                break;
--            }
--            *poutbuf = L'\0';
--            out << m_buffer;
--        }
--        g_free (in_ucs4);
-+        char * converted = opencc_convert_utf8 (m_od, in, -1);
-+        g_assert (converted != NULL);
-+        out = converted;
-+        opencc_convert_utf8_free (converted);
-     }
- private:
-     opencc_t m_od;
--    unichar m_buffer[BUFFER_SIZE + 1];
- };
- 
- void
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pyzy.git/commitdiff/98e1f3c5ed0a84f4cd3baa2ad73d827eff89f0e5



More information about the pld-cvs-commit mailing list