Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FL-363: support boost and opencc flag in pyzy, with some bug fix.

  • Loading branch information...
commit ddb6d08defbed9d39e2d52303963b01a04c4fcf4 1 parent 89d43f8
@janzhou janzhou authored
View
2  app-i18n/ibus-pinyin/ibus-pinyin-1.3.99.20110706.ebuild
@@ -1,6 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-pinyin/ibus-pinyin-1.3.99.20110706.ebuild,v 1.4 2012/05/03 19:24:26 jdhore Exp $
EAPI=4
View
2  app-i18n/ibus-pinyin/ibus-pinyin-1.4.0.ebuild
@@ -1,6 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-pinyin/ibus-pinyin-1.4.0.ebuild,v 1.2 2012/05/03 19:24:26 jdhore Exp $
EAPI=4
View
17 app-i18n/ibus-pinyin/ibus-pinyin-1.5.0.ebuild
@@ -1,6 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-pinyin/ibus-pinyin-1.4.0.ebuild,v 1.2 2012/05/03 19:24:26 jdhore Exp $
EAPI=4
@@ -12,8 +10,7 @@ inherit python
PYDB_TAR="pinyin-database-1.2.99.tar.bz2"
DESCRIPTION="Chinese PinYin IMEngine for IBus Framework"
HOMEPAGE="http://code.google.com/p/ibus/"
-SRC_URI="http://ibus.googlecode.com/files/${P}.tar.gz
- http://ibus.googlecode.com/files/${PYDB_TAR}"
+SRC_URI="http://ibus.googlecode.com/files/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
@@ -29,20 +26,14 @@ RDEPEND=">=app-i18n/ibus-1.4
DEPEND="${RDEPEND}
virtual/pkgconfig
nls? ( >=sys-devel/gettext-0.16.1 )
- >=dev-libs/pyzy-0.1.0"
-
-DOCS="AUTHORS ChangeLog NEWS README"
+ boost? ( dev-libs/pyzy[boost] )
+ opencc? ( dev-libs/pyzy[opencc] )"
pkg_setup() {
python_set_active_version 2
python_pkg_setup
}
-#src_prepare() {
-# cp "${DISTDIR}"/${PYDB_TAR} data/db/open-phrase/ || die
-# >py-compile
-#}
-
src_configure() {
econf \
$(use_enable boost) \
@@ -50,7 +41,7 @@ src_configure() {
$(use_enable nls) \
$(use_enable opencc) \
--enable-db-open-phrase
- #--disable-db-android \
+ --disable-db-android \
#--disable-english-input-mode \
}
View
4 dev-libs/pyzy/files/pyzy-dont-download-dictionary-file.patch
@@ -5,7 +5,7 @@
$(DBTAR):
$(AM_V_GEN) \
- wget http://pyzy.googlecode.com/files/$(DBTAR) || \
-+ ln -s ${PORTDIR}/distfiles/$(DBTAR) || \
++ ln -s ${DISTDIR}/$(DBTAR) || \
( $(RM) $@; exit 1)
stamp-db: $(DBTAR)
@@ -16,7 +16,7 @@
@PYZY_BUILD_DB_OPEN_PHRASE_TRUE@$(DBTAR):
@PYZY_BUILD_DB_OPEN_PHRASE_TRUE@ $(AM_V_GEN) \
-@PYZY_BUILD_DB_OPEN_PHRASE_TRUE@ wget http://pyzy.googlecode.com/files/$(DBTAR) || \
-+@PYZY_BUILD_DB_OPEN_PHRASE_TRUE@ ln -s ${PORTDIR}/distfiles/$(DBTAR) || \
++@PYZY_BUILD_DB_OPEN_PHRASE_TRUE@ ln -s ${DISTDIR}/$(DBTAR) || \
@PYZY_BUILD_DB_OPEN_PHRASE_TRUE@ ( $(RM) $@; exit 1)
@PYZY_BUILD_DB_OPEN_PHRASE_TRUE@stamp-db: $(DBTAR)
View
13 dev-libs/pyzy/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cjk</herd>
+<longdescription lang="en">
+The Chinese PinYin and Bopomofo conversion library.
+</longdescription>
+<use>
+ <flag name="boost">Compile against <pkg>dev-libs/boost</pkg> libraries</flag>
+ <flag name="opencc">Enable support for <pkg>app-i18n/opencc</pkg></flag>
+</use>
+</pkgmetadata>
+
View
17 dev-libs/pyzy/pyzy-0.1.0.ebuild
@@ -5,21 +5,22 @@ inherit eutils
DESCRIPTION="The Chinese PinYin and Bopomofo conversion library."
HOMEPAGE="http://code.google.com/p/pyzy/"
-
-SRC_URI="http://pyzy.googlecode.com/files/pyzy-${PV}.tar.gz
+SRC_URI="http://pyzy.googlecode.com/files/${P}.tar.gz
http://pyzy.googlecode.com/files/pyzy-database-1.0.0.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 x86 arm"
-IUSE=""
+IUSE="boost opencc"
RDEPEND=">=dev-db/sqlite-3.6.18
- >=dev-libs/glib-2.24"
+ >=dev-libs/glib-2.24
+ boost? ( >=dev-libs/boost-1.39 )
+ opencc? ( app-i18n/opencc )"
DEPEND="${RDEPEND}
virtual/pkgconfig
>=sys-devel/gettext-0.16.1"
src_unpack() {
- unpack pyzy-${PV}.tar.gz
+ unpack ${P}.tar.gz
}
src_prepare() {
@@ -28,5 +29,9 @@ src_prepare() {
}
src_configure() {
- econf --enable-db-open-phrase --disable-db-android || die "configure failed"
+ econf \
+ $(use_enable boost) \
+ $(use_enable opencc) \
+ --enable-db-open-phrase \
+ --disable-db-android || die "configure failed"
}
Please sign in to comment.
Something went wrong with that request. Please try again.