diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-i18n/pyzy |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-i18n/pyzy')
-rw-r--r-- | app-i18n/pyzy/Manifest | 9 | ||||
-rw-r--r-- | app-i18n/pyzy/files/pyzy-boost.patch | 15 | ||||
-rw-r--r-- | app-i18n/pyzy/files/pyzy-db.patch | 17 | ||||
-rw-r--r-- | app-i18n/pyzy/files/pyzy-opencc-1.0.0.patch | 56 | ||||
-rw-r--r-- | app-i18n/pyzy/metadata.xml | 20 | ||||
-rw-r--r-- | app-i18n/pyzy/pyzy-0.1.0-r2.ebuild | 59 |
6 files changed, 176 insertions, 0 deletions
diff --git a/app-i18n/pyzy/Manifest b/app-i18n/pyzy/Manifest new file mode 100644 index 000000000000..865bd85b73b7 --- /dev/null +++ b/app-i18n/pyzy/Manifest @@ -0,0 +1,9 @@ +AUX pyzy-boost.patch 411 SHA256 e8a104014e2e7a69766b52570ffde9ed6e3f57a8e7c56308a57b1a63846d6499 SHA512 3cb8a0cf43f1fc53949fc8a69c95fcd04b49121d676530da39da6aa70a4916a2f0a6974056b1ee461d2804a28fdb7bb6a9780e5f5e217a4ffa8716b6f2060882 WHIRLPOOL df94f75421d2fecc849a5d9dc6d52aadd11f2d64e65e6714b0b3bbdcc111ca6c085d8106f9b4980d7283e9421790216d6503a7fe12e02438b361f70791e785df +AUX pyzy-db.patch 359 SHA256 3e7272a5f63a67f2a2f6139a5f1f4baecc374e52a207ff4f77a94a212dae497f SHA512 794366e0304e92b55bca70eb11a4373eb29e272c2db27db3259b5ca84e8164427ffaacb1fdb15fc0d2a4c6c9d36408f0bf8b35ee5ccba9a9746ae13c7032cfdb WHIRLPOOL 77d705b64292bab7e57a4aafa5606237f1d186e4e13fa91475aa481197b1d12df06fcb434f73a91d717ba46435d2310d5882bbac9b818737c462c63bd0a4c9b5 +AUX pyzy-opencc-1.0.0.patch 1712 SHA256 3cb6e1fcb0fa260d717813e727ae2e2c888cfee8dd183cc4c5c9e16becbc195a SHA512 4455229fb9c271e5f2a08292b34daf0cb2969a21af52cf116fadb15764cc82a4e557a9672d253af9a3968a8e907c92d8fd4542e2225a2f09fafe9592c58e7713 WHIRLPOOL 383889be8821df170627a546a1e0996f210f1e6471dd8ca39d8ce99b8acfbc40e2ab6cd554f33482b5f9d108d2c70a1ce79791ac9d33f42cf9a6366779f27688 +DIST pyzy-0.1.0.tar.gz 1571946 SHA256 fe468a4372473d85a56f05d55b14f0e0201fde6f9336a1a2322cf79421c84d9a SHA512 42477152ffd6a2f7ce0e8f920d98e9dc9c7fc32fe9e93a2a4de75c791e70d0f08c30eca0244dc2b87981f6bfc4e635234d62720aa19358c8f80a84e0c371c662 WHIRLPOOL 8cba6d647ee9f4e4f3ee22922245fc9b67fab779ea4381793eece9171d6f0cb4d0f325cc2ac1c4ce7ff6f47d383f6c02d0b866dcfbdc841b6f84ee6dff6fe0fe +DIST pyzy-database-1.0.0.tar.bz2 9977983 SHA256 32c7d07b9f41e1dfc0f9008f54eca8e6cb367e7f2b19ac94c49754442694c321 SHA512 5a7248870407f7f92c418ada49a275062325f2eb33a7eb4b91492e4b706ae70ba931b04377a758ce429fa64cd22e8bee2ac4279d4f205bbce406248eda1decf7 WHIRLPOOL 07043adf9d83eb40b1a53409a31b3711f041e2b4dd5cf3f8c2034c129c31270fd37f2e53ecf2da5503562cf103ccb0a4487fa606928ac38a8775e90ff376ce3a +EBUILD pyzy-0.1.0-r2.ebuild 1272 SHA256 e72e11595bec2aebad5345b163fb429774c70416360ee54e55578916a5830faf SHA512 28c9aecc4ce1d935d84188195ec5cbf59d73b4fd42421d5d8adc54f28f85e83d050c5a91419a03e05b5e7f3f9654e2ba01e97b946d8e1c43d20e54bdc11715a4 WHIRLPOOL 8deb78259563361d7f416d0a44a2d8a17e9d36d29bcfbf96f79b3c4dd7909b5e4a57a24cdfb9aef07b2bfa16ad1b69c83c090290cf5e0c31cd9093eb941591b9 +MISC ChangeLog 3329 SHA256 20ee34c91382ab1ecf67c2518aa986f797673e76be58d759c48ab67b226628e2 SHA512 067d6babe25acd3d26c1d7db146ae916a68867692b31fba2e382f3490fe6b5bb43903b98f17a6d647fa5f49a9849d3e7a14df9c6dbcd4b1d706e51763d0539ed WHIRLPOOL a6e9bb62dc905452b58f94715be7726593f0050a6b86fc0ac2b57f3c945cfdcdd34f632bb4e30d188432bf49013e68ac2de5807aacaa7313cc1e00ca87007495 +MISC ChangeLog-2015 1164 SHA256 ebb3fc41cdf20c16a079f2776093b5c420691c7f8c7887d9d198b99691ffe23a SHA512 65b1bd160c701c618a03d72a5916530be595f2c3e5724863f63579cda2107a4941a4a08293a32c75f86239ec047f703fa87d3e465886261398983adf713bad19 WHIRLPOOL 95e7cb8049cd244aad5d0070821bc71931e68ca15b849879cc4c4da6dad5423b67599f6925864664f70b5d7d24a4acc5eac8cf915841d5481ccfcb4daff915f2 +MISC metadata.xml 649 SHA256 a413abd5a0277dcbe120fd8e570e770b1ef264a1bb0a1e985b66d7edf6ca5abd SHA512 46c86fc066ea686db8497ff7dc76361a865a24215b49d2924521235c5bf88f9b029c25597f1bd19399f965052c6b324ded0a2d287cdd29518a2f46cc6614c4a4 WHIRLPOOL 39bb3a63bdcd717cf8dfc5e92608a9ff0e9cd67248df047e3103a1da10be080f3d1db059ea001fa0dfa8905c3e0c6120ff13ef7eada7b6503f2533540a1f27ce diff --git a/app-i18n/pyzy/files/pyzy-boost.patch b/app-i18n/pyzy/files/pyzy-boost.patch new file mode 100644 index 000000000000..34acacfbc9ba --- /dev/null +++ b/app-i18n/pyzy/files/pyzy-boost.patch @@ -0,0 +1,15 @@ +--- 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 new file mode 100644 index 000000000000..44d0ac6bf456 --- /dev/null +++ b/app-i18n/pyzy/files/pyzy-db.patch @@ -0,0 +1,17 @@ +--- 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 new file mode 100644 index 000000000000..1e23e8b6e5db --- /dev/null +++ b/app-i18n/pyzy/files/pyzy-opencc-1.0.0.patch @@ -0,0 +1,56 @@ +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/metadata.xml b/app-i18n/pyzy/metadata.xml new file mode 100644 index 000000000000..f6afd400fc25 --- /dev/null +++ b/app-i18n/pyzy/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <maintainer type="project"> + <email>cjk@gentoo.org</email> + <name>Cjk</name> + </maintainer> + <use> + <flag name="boost">Enable support for <pkg>dev-libs/boost</pkg></flag> + <flag name="doc">Generate API documentation</flag> + <flag name="opencc">Enable support for <pkg>app-i18n/opencc</pkg></flag> + </use> + <upstream> + <remote-id type="github">pyzy/pyzy</remote-id> + </upstream> +</pkgmetadata> 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 000000000000..2c736e2414ad --- /dev/null +++ b/app-i18n/pyzy/pyzy-0.1.0-r2.ebuild @@ -0,0 +1,59 @@ +# 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 +} |