* [gentoo-commits] repo/gentoo:master commit in: app-i18n/pyzy/files/, app-i18n/pyzy/
@ 2016-05-27 10:22 Yixun Lan
0 siblings, 0 replies; 2+ messages in thread
From: Yixun Lan @ 2016-05-27 10:22 UTC (permalink / raw
To: gentoo-commits
commit: c128d1b74954557d0e6d9df085b0a822450bb6e3
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri May 27 10:00:33 2016 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri May 27 10:20:30 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c128d1b7
app-i18n/pyzy: support opencc-1.0.4
Gentoo-Bug: 580782
Package-Manager: portage-2.2.28
.../pyzy/files/pyzy-support-opencc-1.0.0.patch | 49 ++++++++++++++++++++
app-i18n/pyzy/pyzy-0.1.0-r2.ebuild | 54 ++++++++++++++++++++++
2 files changed, 103 insertions(+)
diff --git a/app-i18n/pyzy/files/pyzy-support-opencc-1.0.0.patch b/app-i18n/pyzy/files/pyzy-support-opencc-1.0.0.patch
new file mode 100644
index 0000000..055aad1
--- /dev/null
+++ b/app-i18n/pyzy/files/pyzy-support-opencc-1.0.0.patch
@@ -0,0 +1,49 @@
+commit 344872231b95ce7c2808288101cc563dcd011940
+Author: Hillwood Yang <hillwoodroc@gmail.com>
+Date: Thu Feb 26 11:04:29 2015 +0800
+
+diff -urN a/src/SimpTradConverter.cc b/src/SimpTradConverter.cc
+--- 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 @@ public:
+
+ 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
diff --git a/app-i18n/pyzy/pyzy-0.1.0-r2.ebuild b/app-i18n/pyzy/pyzy-0.1.0-r2.ebuild
new file mode 100644
index 0000000..22cbf96
--- /dev/null
+++ b/app-i18n/pyzy/pyzy-0.1.0-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-any-r1 autotools
+
+PY_DATABASE=${PN}-database-1.0.0
+DESCRIPTION="The Chinese PinYin and Bopomofo conversion library"
+HOMEPAGE="https://github.com/pyzy/pyzy"
+SRC_URI="https://pyzy.googlecode.com/files/${P}.tar.gz
+ https://pyzy.googlecode.com/files/${PY_DATABASE}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="boost doc opencc test"
+
+RDEPEND="dev-libs/glib:2
+ dev-db/sqlite:3
+ sys-apps/util-linux
+ boost? ( dev-libs/boost )
+ opencc? ( app-i18n/opencc )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ doc? ( app-doc/doxygen )"
+
+# Currently it fails to build test code
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-dont-download-dictionary-file.patch
+ epatch "${FILESDIR}"/${PN}-support-opencc-1.0.0.patch
+
+ mv ../db ./data/db/open-phrase/ || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-db-open-phrase \
+ --enable-db-android \
+ $(use_enable boost) \
+ $(use_enable opencc) \
+ $(use_enable test tests)
+}
+
+src_install() {
+ default
+ use doc && dohtml -r docs/html/*
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-i18n/pyzy/files/, app-i18n/pyzy/
@ 2020-09-09 6:29 Yixun Lan
0 siblings, 0 replies; 2+ messages in thread
From: Yixun Lan @ 2020-09-09 6:29 UTC (permalink / raw
To: gentoo-commits
commit: eb6937943308ea5216fd00a3918e515a014b3d84
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 9 06:25:43 2020 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Sep 9 06:25:43 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb693794
app-i18n/pyzy: drop old version
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
app-i18n/pyzy/Manifest | 1 -
app-i18n/pyzy/files/pyzy-boost.patch | 15 --------
app-i18n/pyzy/files/pyzy-db.patch | 17 ---------
app-i18n/pyzy/files/pyzy-opencc-1.0.0.patch | 56 ---------------------------
app-i18n/pyzy/pyzy-0.1.0-r2.ebuild | 59 -----------------------------
5 files changed, 148 deletions(-)
diff --git a/app-i18n/pyzy/Manifest b/app-i18n/pyzy/Manifest
index 2e896413356..9b6ca2a57bd 100644
--- a/app-i18n/pyzy/Manifest
+++ b/app-i18n/pyzy/Manifest
@@ -1,4 +1,3 @@
DIST pyzy-0.1.0-patches.tar.xz 5288 BLAKE2B 9a6c86aeedd496ae8372bb0640cb1e03386408a0b00a4c51a6223c4fba23f59631267eb0b7c707a11662025ded410609d17ba39327e0ca5011f48bea3422cd79 SHA512 3a3b9fc317f1c5f59bbe83f3ce58fc76a50bcee798118d66571ba31d504e73fbe7a6976f03ae28f9712c0ba641386ac69390a86185464371728782a62b98291f
-DIST pyzy-0.1.0.tar.gz 1571946 BLAKE2B 2a09dab87ddc9ca9a1e2c7b71dd66fb8d75a9a0932fd87d94392e64bc6a940ce8d3d89ed09f9b3ae0da1a76275ec580033c745c7cfb85724be1f7732cb52d3b9 SHA512 42477152ffd6a2f7ce0e8f920d98e9dc9c7fc32fe9e93a2a4de75c791e70d0f08c30eca0244dc2b87981f6bfc4e635234d62720aa19358c8f80a84e0c371c662
DIST pyzy-0.1.0.tar.xz 752248 BLAKE2B 5f927cfea31f8cd67cb3e7af9b48c6f48a7707e8324b6b211c3baea0e07683df1da3c8683a5f9aa5073277229ee4d712174f95a764b4dcc5dc5f40330791561e SHA512 18d78bc70229caad44fdba4b7971014979da0aeb35841cea9577d05e5eca871dfe40d285a926ac05a247c8a0b8ab34fd721dcd34517200c5cc75b6b1ed545b35
DIST pyzy-database-1.0.0.tar.bz2 9977983 BLAKE2B 86f9ee48d584f33ada1ee5380efdaefd85750290caada320c4c9a21206b8fb50fe6a43b931fb41a8c3bc24853bb7843e23d1778b40e6eae68fa4ec383f2b4dcc SHA512 5a7248870407f7f92c418ada49a275062325f2eb33a7eb4b91492e4b706ae70ba931b04377a758ce429fa64cd22e8bee2ac4279d4f205bbce406248eda1decf7
diff --git a/app-i18n/pyzy/files/pyzy-boost.patch b/app-i18n/pyzy/files/pyzy-boost.patch
deleted file mode 100644
index 34acacfbc9b..00000000000
--- a/app-i18n/pyzy/files/pyzy-boost.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -143,9 +143,9 @@
- )
- if test x"$enable_boost" = x"yes"; then
- # check boost
-- BOOST_REQUIRE([1.39])
-- BOOST_FIND_HEADER([boost/bind.hpp])
-- BOOST_FIND_HEADER([boost/signals2.hpp])
-+ AX_BOOST_BASE([1.39])
-+ AC_CHECK_HEADERS([boost/bind.hpp])
-+ AC_CHECK_HEADERS([boost/signals2.hpp])
- fi
- AM_CONDITIONAL(HAVE_BOOST, test x"$enable_boost" = x"yes")
-
diff --git a/app-i18n/pyzy/files/pyzy-db.patch b/app-i18n/pyzy/files/pyzy-db.patch
deleted file mode 100644
index 44d0ac6bf45..00000000000
--- a/app-i18n/pyzy/files/pyzy-db.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/data/db/open-phrase/Makefile.am
-+++ b/data/db/open-phrase/Makefile.am
-@@ -30,13 +30,10 @@
- DBTAR = pyzy-database-$(DBVER).tar.bz2
-
- $(DBTAR):
-- $(AM_V_GEN) \
-- wget http://pyzy.googlecode.com/files/$(DBTAR) || \
-- ( $(RM) $@; exit 1)
-+ touch $@
-
- stamp-db: $(DBTAR)
- $(AM_V_GEN) \
-- tar jxfm $(DBTAR); \
- mv db/main.db db/$(db_file); \
- touch $@
-
diff --git a/app-i18n/pyzy/files/pyzy-opencc-1.0.0.patch b/app-i18n/pyzy/files/pyzy-opencc-1.0.0.patch
deleted file mode 100644
index 1e23e8b6e5d..00000000000
--- a/app-i18n/pyzy/files/pyzy-opencc-1.0.0.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-https://github.com/pyzy/pyzy/pull/1
-
-Author: Hillwood Yang <hillwood@opensuse.org>
-
---- a/src/SimpTradConverter.cc
-+++ b/src/SimpTradConverter.cc
-@@ -4,6 +4,7 @@
- *
- * Copyright (c) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
- * Copyright (c) 2010 BYVoid <byvoid1@gmail.com>
-+ * Copyright (c) 2015 Hillwood Yang <hillwood@opensuse.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
-@@ -40,7 +41,6 @@ namespace PyZy {
- #ifdef HAVE_OPENCC
-
- class opencc {
-- static const int BUFFER_SIZE = 64;
- public:
- opencc (void)
- {
-@@ -55,29 +55,13 @@ public:
-
- 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
diff --git a/app-i18n/pyzy/pyzy-0.1.0-r2.ebuild b/app-i18n/pyzy/pyzy-0.1.0-r2.ebuild
deleted file mode 100644
index 2c736e2414a..00000000000
--- a/app-i18n/pyzy/pyzy-0.1.0-r2.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools ltprune python-any-r1
-
-PYZY_DB="${PN}-database-1.0.0"
-
-DESCRIPTION="The Chinese PinYin and Bopomofo conversion library"
-HOMEPAGE="https://github.com/pyzy/pyzy"
-SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${P}.tar.gz
- https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/${PN}/${PYZY_DB}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="boost doc opencc"
-
-RDEPEND="dev-db/sqlite:3
- dev-libs/glib:2
- sys-apps/util-linux
- boost? ( dev-libs/boost )
- opencc? ( app-i18n/opencc:= )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- sys-devel/autoconf-archive
- doc? ( app-doc/doxygen )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-boost.patch
- "${FILESDIR}"/${PN}-db.patch
- "${FILESDIR}"/${PN}-opencc-1.0.0.patch
-)
-
-src_prepare() {
- mv "${WORKDIR}"/db data/db/open-phrase || die
-
- default
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable boost) \
- $(use_enable opencc) \
- --enable-db-open-phrase \
- DOXYGEN=$(usex doc doxygen true)
-}
-
-src_install() {
- if use doc; then
- HTML_DOCS=( docs/html/. )
- fi
-
- default
- prune_libtool_files
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-09 6:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27 10:22 [gentoo-commits] repo/gentoo:master commit in: app-i18n/pyzy/files/, app-i18n/pyzy/ Yixun Lan
-- strict thread matches above, loose matches on Subject: below --
2020-09-09 6:29 Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox