summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-i18n/sunpinyin
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-i18n/sunpinyin')
-rw-r--r--app-i18n/sunpinyin/Manifest4
-rw-r--r--app-i18n/sunpinyin/files/sunpinyin-2.0.3-force-switch.patch30
-rw-r--r--app-i18n/sunpinyin/files/sunpinyin-2.0.3-gcc-4.7.patch49
-rw-r--r--app-i18n/sunpinyin/metadata.xml8
-rw-r--r--app-i18n/sunpinyin/sunpinyin-2.0.3-r1.ebuild65
-rw-r--r--app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108.ebuild46
6 files changed, 202 insertions, 0 deletions
diff --git a/app-i18n/sunpinyin/Manifest b/app-i18n/sunpinyin/Manifest
new file mode 100644
index 000000000000..8ea93a2261f5
--- /dev/null
+++ b/app-i18n/sunpinyin/Manifest
@@ -0,0 +1,4 @@
+DIST dict.utf8.tar.bz2 1598995 SHA256 d8261f6b0bfcdd40a9c4f366228f86b017e06c9d7d64d6ddec1c2c3511eea805 SHA512 04ec55e4af4b58d29b1141a824b5c3de5dbaaab0133d88e477d9183db738fc63543b4004bf071e611c6ea0d4b4c161b73849a64ab75f4df5bb5116d7f52d8e34 WHIRLPOOL c1ead1556dbcbe0811551cff2b84367ce9827a06733a3f5a6c2a229882ecd9b83069455146d6ea507d235ef3ad979cd10d373cfc806e150ad0fae9bd91330925
+DIST lm_sc.t3g.arpa.tar.bz2 25098718 SHA256 c80093a8b43561e64158de4139967eef39b851432a2660e8050429d7560907cd SHA512 1e5e577c92df2f230b6b5962298ef7c215f6069b53e8e2dd4c5ad3eb54f999fc239b0924b4ab031af59c3194da15d6317ea2860f158e805b5cf0126666eaad98 WHIRLPOOL 294b668ca6bcb765392f882bd9b0f16e403c8709eb2d7ae129e4c4aba3372b8b6d9b6a78df67b811a742136e4d1b203b5da7e7f7554296c6986a6fcba361b50b
+DIST sunpinyin-2.0.3.tar.gz 169394 SHA256 4ab776e7563f69f8dbda8fac7cfaa42bd0db1ea68bab15f756094ce5398d83d1 SHA512 25f1fc4b8f550663861f2c7426832924676f83e1f201689fde51b04ca78704b46dbbf2b92736234d5e1a729ba1bb23bd1f3a0394f6b8b54cb0df57b9bb7ece1d WHIRLPOOL 71a4efedcbe4ec1dda9ecb1b94256a0e5e8ca570a234a8b378f85af68bf3da9f3b9220aee98c2f3ce509daa33996fea8b554e81594c299281ede58167cf633e8
+DIST sunpinyin-2.0.4_pre20130108.tar.xz 964764 SHA256 e650957aced55075448b7f02298d0c5cf59a8b8e041e9c7d92d24cb5170de93f SHA512 7c1dd7db8b800e9d436746a560a16de2c6777576868f2e7e28f6dcb767b91ccd62b974f9d4ce6bd6ce80d30e1ee83887c3ee03c227e7e9fa59c01db4867465b2 WHIRLPOOL 82535dcde38c2fce17877e465db7ebeaed14a7f305ad96ca451c5b35ae04244a94e9bde9ce51092a390964c557e39ab43742d2370342f9b72722b24f916c55d6
diff --git a/app-i18n/sunpinyin/files/sunpinyin-2.0.3-force-switch.patch b/app-i18n/sunpinyin/files/sunpinyin-2.0.3-force-switch.patch
new file mode 100644
index 000000000000..f2f6b389ba09
--- /dev/null
+++ b/app-i18n/sunpinyin/files/sunpinyin-2.0.3-force-switch.patch
@@ -0,0 +1,30 @@
+diff --git a/SConstruct b/SConstruct
+index 68cd365..9bb6ebc 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -180,12 +180,6 @@ libdir = env['LIBDIR']
+ libdatadir = env['LIBDATADIR'] + '/sunpinyin/data'
+ headersdir = env['PREFIX'] + '/include/sunpinyin-2.0'
+
+-if GetOS() != 'Darwin':
+- env.Append(LINKFLAGS=['-Wl,-soname=libsunpinyin.so.%d' % abi_major])
+-
+-if GetOption('rpath') is not None and GetOS() != 'Darwin':
+- env.Append(LINKFLAGS='-Wl,-R -Wl,%s' % GetOption('rpath'))
+-
+ # pass through environmental variables
+ envvar = [('CC', 'CC'),
+ ('CXX', 'CXX'),
+@@ -202,6 +196,12 @@ extra_cflags=' -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR=\'"%s"\'' % libdatadir
+ env.Append(CFLAGS=extra_cflags)
+ env.Append(CXXFLAGS=extra_cflags)
+
++if GetOS() != 'Darwin':
++ env.Append(LINKFLAGS=' -Wl,-soname=libsunpinyin.so.%d' % abi_major)
++
++if GetOption('rpath') is not None and GetOS() != 'Darwin':
++ env.Append(LINKFLAGS=' -Wl,-R -Wl,%s' % GetOption('rpath'))
++
+ #
+ #==============================configure================================
+ #
diff --git a/app-i18n/sunpinyin/files/sunpinyin-2.0.3-gcc-4.7.patch b/app-i18n/sunpinyin/files/sunpinyin-2.0.3-gcc-4.7.patch
new file mode 100644
index 000000000000..c523449ef514
--- /dev/null
+++ b/app-i18n/sunpinyin/files/sunpinyin-2.0.3-gcc-4.7.patch
@@ -0,0 +1,49 @@
+From 3d35aa0370d9c7bd455098caa9ba22ebe1f82968 Mon Sep 17 00:00:00 2001
+From: Yong Sun <mail@yongsun.me>
+Date: Wed, 4 Apr 2012 18:41:39 +0800
+Subject: [PATCH] Integrated patch from YunQiang Su, fixed FTBFS with gcc-4.7
+
+---
+ SConstruct | 3 ++-
+ src/portability.h | 5 ++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 97abf47..354fd19 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -313,7 +313,8 @@ def DoConfigure():
+ conf.CheckCHeader('sys/param.h')
+ conf.CheckCHeader('sys/stat.h')
+ conf.CheckCHeader('sys/types.h')
+- conf.CheckCHeader('unistd.h')
++ if conf.CheckCHeader('unistd.h'):
++ conf.Define('DHAVE_UNISTD_H', 1)
+ conf.CheckCHeader('wchar.h')
+
+ # add essential package requirements
+diff --git a/src/portability.h b/src/portability.h
+index 949d4f2..cf43bd0 100644
+--- a/src/portability.h
++++ b/src/portability.h
+@@ -44,15 +44,14 @@
+ #include <string>
+ #include <cstring>
+
+-#if defined(sun)
++#if defined(HAVE_UNISTD_H)
+ #include <unistd.h>
+ #ifdef __cplusplus
+ #include <algorithm>
+ #else
+ #include <sys/ddi.h>
+ #endif //__cpluscplus
+-#endif //defined(sun)
+-
++#endif //defined(HAVE_UNISTD_H)
+
+ #ifndef HOST_OS_GNUC_2
+ #if defined(DEBUG) && !defined(NDEBUG)
+--
+1.7.8.5
+
diff --git a/app-i18n/sunpinyin/metadata.xml b/app-i18n/sunpinyin/metadata.xml
new file mode 100644
index 000000000000..adc59fd218e2
--- /dev/null
+++ b/app-i18n/sunpinyin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cjk</herd>
+ <upstream>
+ <remote-id type="google-code">sunpinyin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-i18n/sunpinyin/sunpinyin-2.0.3-r1.ebuild b/app-i18n/sunpinyin/sunpinyin-2.0.3-r1.ebuild
new file mode 100644
index 000000000000..6ccaa4809a4f
--- /dev/null
+++ b/app-i18n/sunpinyin/sunpinyin-2.0.3-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils multilib scons-utils toolchain-funcs
+
+DESCRIPTION="SunPinyin is a SLM (Statistical Language Model) based IME"
+HOMEPAGE="http://sunpinyin.googlecode.com"
+SRC_URI="${HOMEPAGE}/files/${P}.tar.gz
+ http://open-gram.googlecode.com/files/dict.utf8.tar.bz2
+ http://open-gram.googlecode.com/files/lm_sc.t3g.arpa.tar.bz2"
+
+LICENSE="LGPL-2.1 CDDL"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND="dev-db/sqlite:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_unpack() {
+ unpack "${P}.tar.gz"
+ ln -s "${DISTDIR}/dict.utf8.tar.bz2" "${S}/raw/" || die "dict file not found"
+ ln -s "${DISTDIR}/lm_sc.t3g.arpa.tar.bz2" "${S}/raw/" || die "dict file not found"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-force-switch.patch"
+ epatch "${FILESDIR}/${P}-gcc-4.7.patch"
+}
+
+src_configure() {
+ tc-export CXX
+ myesconsargs=(
+ --prefix="${EPREFIX}"/usr
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --libdatadir="${EPREFIX}"/usr/lib
+ )
+}
+
+src_compile() {
+ escons || die
+}
+
+src_install() {
+ escons --install-sandbox="${ED}" install || die
+}
+
+pkg_postinst() {
+ elog ""
+ elog "If you have already installed former version of ${PN}"
+ elog "and any wrapper, please remerge the wrapper to make it work with"
+ elog "the new version."
+ elog ""
+ elog "To use any wrapper for ${PN}, please merge any of the following"
+ elog "packages: "
+ elog "emerge app-i18n/fcitx-sunpinyin"
+ elog "emerge app-i18n/ibus-sunpinyin"
+ elog "emerge app-i18n/scim-sunpinyin"
+ elog "emerge app-i18n/xsunpinyin"
+ elog ""
+}
diff --git a/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108.ebuild b/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108.ebuild
new file mode 100644
index 000000000000..b69de43b0569
--- /dev/null
+++ b/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit eutils multilib python-any-r1 scons-utils toolchain-funcs
+
+DESCRIPTION="A Statistical Language Model based Chinese input method library"
+HOMEPAGE="https://sunpinyin.googlecode.com/"
+SRC_URI="http://dev.gentoo.org/~yngwin/distfiles/${P}.tar.xz"
+
+LICENSE="LGPL-2.1 CDDL"
+SLOT="0/1"
+KEYWORDS="amd64 ~ppc ppc64 ~x86"
+IUSE=""
+
+RDEPEND="dev-db/sqlite:3"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+PDEPEND="app-i18n/sunpinyin-data"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ tc-export CXX
+ myesconsargs=(
+ --prefix="${EPREFIX}"/usr
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ )
+}
+
+src_compile() {
+ escons
+}
+
+src_install() {
+ escons --install-sandbox="${ED}" install
+ rm -rf "${D}"/usr/share/doc/${PN} || die
+ dodoc doc/{README,SLM-inst.mk,SLM-train.mk}
+}