Browse files

FL-346: Patching dev-libs/pyzy/pyzy-0.1.0.ebuild. Don't download data…

…base file on make phrase.
  • Loading branch information...
1 parent 88a5ece commit 2bb09ae026bf78a82bb23cf3ec49de50a363c476 @janzhou janzhou committed Jan 20, 2013
View
1 dev-libs/pyzy/Manifest
@@ -1 +1,2 @@
DIST pyzy-0.1.0.tar.gz 2069573 SHA256 5c1d8fa2ff695b0dff89fa6f62b8d1bb368d92f78db038324ba9aabdf223f363 SHA512 c9ffbfa8a9a5c577a0211ed05b917e26ba0046dd21107a721bc824105f3064351ea82ba135c103f00433b24ff76c27fce86ca6d0f70b1969e547885152eaea63 WHIRLPOOL c59ca395dc706946ffe222a03d93df7bdfe76c558f2b0482c3cfbd459e487a3e33e830b3f783e5e0a43aaf35da9add469ae2d38eb99aa7ad4c1dba4e98437423
+DIST pyzy-database-1.0.0.tar.bz2 9977983 SHA256 32c7d07b9f41e1dfc0f9008f54eca8e6cb367e7f2b19ac94c49754442694c321 SHA512 5a7248870407f7f92c418ada49a275062325f2eb33a7eb4b91492e4b706ae70ba931b04377a758ce429fa64cd22e8bee2ac4279d4f205bbce406248eda1decf7 WHIRLPOOL 07043adf9d83eb40b1a53409a31b3711f041e2b4dd5cf3f8c2034c129c31270fd37f2e53ecf2da5503562cf103ccb0a4487fa606928ac38a8775e90ff376ce3a
View
22 dev-libs/pyzy/files/pyzy-dont-download-dictionary-file.patch
@@ -0,0 +1,22 @@
+--- pyzy-0.1.0.orig/data/db/open-phrase/Makefile.am 2013-01-20 16:26:27.643846902 +0800
++++ pyzy-0.1.0/data/db/open-phrase/Makefile.am 2013-01-20 16:27:04.921846433 +0800
+@@ -31,7 +31,7 @@
+
+ $(DBTAR):
+ $(AM_V_GEN) \
+- wget http://pyzy.googlecode.com/files/$(DBTAR) || \
++ ln -s ${PORTDIR}/distfiles/$(DBTAR) || \
+ ( $(RM) $@; exit 1)
+
+ stamp-db: $(DBTAR)
+--- pyzy-0.1.0.orig/data/db/open-phrase/Makefile.in 2013-01-20 16:35:16.609840253 +0800
++++ pyzy-0.1.0/data/db/open-phrase/Makefile.in 2013-01-20 16:36:30.448839325 +0800
+@@ -492,7 +492,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@ ( $(RM) $@; exit 1)
+
+ @PYZY_BUILD_DB_OPEN_PHRASE_TRUE@stamp-db: $(DBTAR)
View
15 dev-libs/pyzy/pyzy-0.1.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2013 Funtoo Linux. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
@@ -7,8 +7,8 @@ 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"
-# http://pyzy.googlecode.com/files/pyzy-database-1.0.0.tar.bz2
+SRC_URI="http://pyzy.googlecode.com/files/pyzy-${PV}.tar.gz
+ http://pyzy.googlecode.com/files/pyzy-database-1.0.0.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 x86 arm"
@@ -19,6 +19,15 @@ DEPEND="${RDEPEND}
dev-util/pkgconfig
>=sys-devel/gettext-0.16.1"
+src_unpack() {
+ unpack pyzy-${PV}.tar.gz
+}
+
+src_prepare() {
+ # Using open-phrase database downloaded by this ebuild script.
+ epatch "${FILESDIR}"/pyzy-dont-download-dictionary-file.patch || die
+}
+
src_configure() {
econf --enable-db-open-phrase --disable-db-android || die "configure failed"
}

0 comments on commit 2bb09ae

Please sign in to comment.