summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2020-09-02 12:20:58 +0800
committerYixun Lan <dlan@gentoo.org>2020-09-02 12:21:24 +0800
commit176439da32d696dc88e2df887bcc9bf7f1b92c28 (patch)
tree712f9c80a73562d8742013b4c039f9ab89fd12ae /app-i18n/pyzy
parentapp-emacs/vterm: keyword ~arm64 (diff)
downloadgentoo-176439da32d696dc88e2df887bcc9bf7f1b92c28.tar.gz
gentoo-176439da32d696dc88e2df887bcc9bf7f1b92c28.tar.bz2
gentoo-176439da32d696dc88e2df887bcc9bf7f1b92c28.zip
app-i18n/pyzy: add python3 support
Closes: https://bugs.gentoo.org/695008 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'app-i18n/pyzy')
-rw-r--r--app-i18n/pyzy/Manifest2
-rw-r--r--app-i18n/pyzy/pyzy-0.1.0-r3.ebuild56
2 files changed, 58 insertions, 0 deletions
diff --git a/app-i18n/pyzy/Manifest b/app-i18n/pyzy/Manifest
index 70408887a48e..2e8964133562 100644
--- a/app-i18n/pyzy/Manifest
+++ b/app-i18n/pyzy/Manifest
@@ -1,2 +1,4 @@
+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/pyzy-0.1.0-r3.ebuild b/app-i18n/pyzy/pyzy-0.1.0-r3.ebuild
new file mode 100644
index 000000000000..d73898c2b194
--- /dev/null
+++ b/app-i18n/pyzy/pyzy-0.1.0-r3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit autotools 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://dev.gentoo.org/~dlan/distfiles/${P}.tar.xz
+ https://dev.gentoo.org/~dlan/distfiles/${P}-patches.tar.xz
+ 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 )"
+
+src_prepare() {
+ mv "${WORKDIR}"/db data/db/open-phrase || die
+
+ eapply "${WORKDIR}"/patches
+
+ 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
+ find "${ED}" -name '*.la' -delete || die
+}