summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2011-01-08 06:13:50 +0000
committerMu Qiao <qiaomuf@gentoo.org>2011-01-08 06:13:50 +0000
commit6a4dddbbbb45d626791874d13d927c4eaae42f63 (patch)
treed0d2d20b093c7dca3fb63619b878f8a0d8e79696 /app-i18n
parentInitial import. (diff)
downloadgentoo-2-6a4dddbbbb45d626791874d13d927c4eaae42f63.tar.gz
gentoo-2-6a4dddbbbb45d626791874d13d927c4eaae42f63.tar.bz2
gentoo-2-6a4dddbbbb45d626791874d13d927c4eaae42f63.zip
Fix ldflags wrt bug #351017
(Portage version: 2.1.9.30/cvs/Linux x86_64)
Diffstat (limited to 'app-i18n')
-rw-r--r--app-i18n/sunpinyin/ChangeLog10
-rw-r--r--app-i18n/sunpinyin/files/sunpinyin-2.0.2-ldflags.patch55
-rw-r--r--app-i18n/sunpinyin/sunpinyin-2.0.2-r1.ebuild51
3 files changed, 114 insertions, 2 deletions
diff --git a/app-i18n/sunpinyin/ChangeLog b/app-i18n/sunpinyin/ChangeLog
index e774cf213b2c..f87ec97c0c39 100644
--- a/app-i18n/sunpinyin/ChangeLog
+++ b/app-i18n/sunpinyin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-i18n/sunpinyin
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/sunpinyin/ChangeLog,v 1.3 2010/12/02 07:03:49 qiaomuf Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/sunpinyin/ChangeLog,v 1.4 2011/01/08 06:13:50 qiaomuf Exp $
+
+*sunpinyin-2.0.2-r1 (08 Jan 2011)
+
+ 08 Jan 2011; Mu Qiao <qiaomuf@gentoo.org> +sunpinyin-2.0.2-r1.ebuild,
+ +files/sunpinyin-2.0.2-ldflags.patch:
+ Fix ldflags wrt bug #351017
*sunpinyin-2.0.2 (02 Dec 2010)
diff --git a/app-i18n/sunpinyin/files/sunpinyin-2.0.2-ldflags.patch b/app-i18n/sunpinyin/files/sunpinyin-2.0.2-ldflags.patch
new file mode 100644
index 000000000000..decffa287730
--- /dev/null
+++ b/app-i18n/sunpinyin/files/sunpinyin-2.0.2-ldflags.patch
@@ -0,0 +1,55 @@
+diff -urN sunpinyin/SConstruct sunpinyin-patched/SConstruct
+--- sunpinyin/SConstruct 2010-08-15 13:32:48.000000000 +0800
++++ sunpinyin-patched/SConstruct 2011-01-08 13:54:44.588000007 +0800
+@@ -193,6 +193,10 @@
+ conf = Configure(env, custom_tests={'CheckPKGConfig' : CheckPKGConfig,
+ 'CheckPKG' : CheckPKG})
+
++if 'LDFLAGS' in os.environ:
++ import SCons
++ conf.env.Append(LINKFLAGS = SCons.Util.CLVar(os.environ['LDFLAGS']))
++
+ config_h_content = ''
+
+ def AddConfigItem(macro_name, res):
+diff -urN sunpinyin/wrapper/gtk_standalone/SConstruct sunpinyin-patched/wrapper/gtk_standalone/SConstruct
+--- sunpinyin/wrapper/gtk_standalone/SConstruct 2010-08-15 13:32:49.000000000 +0800
++++ sunpinyin-patched/wrapper/gtk_standalone/SConstruct 2011-01-08 13:55:27.696000007 +0800
+@@ -1,6 +1,10 @@
+ import os
+
+ env=Environment(ENV=os.environ, CFLAGS='-g', CXXFLAGS='-g')
++if 'LDFLAGS' in os.environ:
++ import SCons
++ env.Append(LINKFLAGS = SCons.Util.CLVar(os.environ['LDFLAGS']))
++
+ env.ParseConfig('pkg-config gtk+-2.0 sunpinyin-2.0 sqlite3 --cflags --libs')
+
+ env.Program('sunpinyin', source=['imi_gtkwin.cpp', 'sunpinyin.cpp'])
+diff -urN sunpinyin/wrapper/ibus/SConstruct sunpinyin-patched/wrapper/ibus/SConstruct
+--- sunpinyin/wrapper/ibus/SConstruct 2010-08-15 13:32:49.000000000 +0800
++++ sunpinyin-patched/wrapper/ibus/SConstruct 2011-01-08 13:55:02.292000012 +0800
+@@ -71,6 +71,9 @@
+
+ conf = Configure(env, custom_tests={'CheckPKGConfig' : CheckPKGConfig,
+ 'CheckPKG' : CheckPKG })
++if 'LDFLAGS' in os.environ:
++ import SCons
++ conf.env.Append(LINKFLAGS = SCons.Util.CLVar(os.environ['LDFLAGS']))
+
+ def DoConfigure():
+ if GetOption('clean'):
+diff -urN sunpinyin/wrapper/xim/SConstruct sunpinyin-patched/wrapper/xim/SConstruct
+--- sunpinyin/wrapper/xim/SConstruct 2010-08-15 13:32:49.000000000 +0800
++++ sunpinyin-patched/wrapper/xim/SConstruct 2011-01-08 13:55:12.036000010 +0800
+@@ -81,6 +81,10 @@
+
+ conf = Configure(env, custom_tests={'CheckPKGConfig' : CheckPKGConfig,
+ 'CheckPKG' : CheckPKG })
++if 'LDFLAGS' in os.environ:
++ import SCons
++ conf.env.Append(LINKFLAGS = SCons.Util.CLVar(os.environ['LDFLAGS']))
++
+ def DoConfigure():
+ if GetOption('clean'):
+ return
diff --git a/app-i18n/sunpinyin/sunpinyin-2.0.2-r1.ebuild b/app-i18n/sunpinyin/sunpinyin-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..33ad07d38528
--- /dev/null
+++ b/app-i18n/sunpinyin/sunpinyin-2.0.2-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/sunpinyin/sunpinyin-2.0.2-r1.ebuild,v 1.1 2011/01/08 06:13:50 qiaomuf Exp $
+
+EAPI="1"
+PYTHON_DEPEND="ibus? 2:2.5"
+inherit eutils python scons-utils
+
+DESCRIPTION="SunPinyin is a SLM (Statistical Language Model) based IME"
+HOMEPAGE="http://sunpinyin.googlecode.com"
+SRC_URI="${HOMEPAGE}/files/${P}.tar.gz"
+
+LICENSE="LGPL-2.1 CDDL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ibus +xim"
+
+RDEPEND="dev-db/sqlite:3
+ ibus? (
+ >=app-i18n/ibus-1.1
+ !app-i18n/ibus-sunpinyin
+ sys-devel/gettext
+ )
+ xim? (
+ >=x11-libs/gtk+-2.10:2
+ x11-libs/libX11
+ )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ xim? ( x11-proto/xproto )"
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}/${P}-ldflags.patch"
+}
+
+src_compile() {
+ escons --prefix="/usr"
+}
+
+src_install() {
+ escons --prefix="/usr" --install-sandbox="${D}" install
+ if use ibus; then
+ cd "${S}/wrapper/ibus"
+ escons --prefix="/usr" --install-sandbox="${D}" install
+ elif use xim; then
+ cd "${S}/wrapper/xim"
+ escons --prefix="/usr" --install-sandbox="${D}" install
+ fi
+}