summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-i18n/sunpinyin-data/Manifest3
-rw-r--r--app-i18n/sunpinyin-data/files/SLM-inst.mk62
-rw-r--r--app-i18n/sunpinyin-data/metadata.xml8
-rw-r--r--app-i18n/sunpinyin-data/sunpinyin-data-20121025.ebuild38
4 files changed, 110 insertions, 1 deletions
diff --git a/app-i18n/sunpinyin-data/Manifest b/app-i18n/sunpinyin-data/Manifest
index 2085d01a77c3..58ec55cbb110 100644
--- a/app-i18n/sunpinyin-data/Manifest
+++ b/app-i18n/sunpinyin-data/Manifest
@@ -1,5 +1,6 @@
AUX SLM-inst.mk 1847 SHA256 a9ed61d69afe2cd704c9d5145e680c79814599428b7e7109a92dcf14aa5aef43 SHA512 fcbc2e7f18d02dc7ae13ceb9926018d8e83ff955eacae69d664842a84cc4aac2c6f9070e1a33ca6b9b68b4d3ca3ef1ec2e8863f82a8eea1183e7b02d5b665470 WHIRLPOOL 5d57d5e42c71f408c0828bda0bd8c3518820b9022c9820ffeab60feac5b34dcdfcbe253071fec6f355a457e6b8d52121b9b3f905efd2b7bb959f2504f41fec37
DIST dict.utf8-20120830.tar.bz2 652472 SHA256 f39bedd2fba009445a947ee522e5db0b25016937ee50d30de1872089b020f077 SHA512 4400bc2a54cbf828e1d34f8240d8915a29171d6def125fecf4aa13b442dc2442d9ea591e4451cf030d22d974fbdba09adde4112c08acae9ae023823311ae8535 WHIRLPOOL 8a725fe8dc78bcf5da8760f54e3c97727606371db864c32e1e9f355519182c6053d2ef1da51764c84bdafc29ce3a51f386eb1fa66aaab2180d5643e9df7a10c4
DIST lm_sc.t3g.arpa-20121025.tar.bz2 36262281 SHA256 3d5b0a841a53af404ca4e88b76957e4486c90e3943bb7a774a1719337163593d SHA512 3159dd3700382cfa617ba025ce542660580f3057e0dd6bbb92947902495db08e4454c1d09d01a55c90653444513d125dd034e944b060a9d8e009c3633b106d97 WHIRLPOOL 0e6a2e80f83753397fe5401421d163c8ece92a9f1343d1d398d809dec09c6f641b1e1d66705d729f2a163c8496c892a44dcc7d3f545bcf3d91921621a1a7d15a
-EBUILD sunpinyin-data-20121025.ebuild 909 SHA256 dd9067af1d7eca03229d2b2cb1ed8b54579b2fa484f4e6a864998a03afc2d3a0 SHA512 6f1c1341e5ccb70da7d37cdc3239377768b7d4055ee956e2b50851361321eab1e02c840d755cac406b0259bba20995b663c22231a048fca9ee8409ed5cb87b37 WHIRLPOOL 295c15d1a5dbb74bc4b287e00ec06ea0782e6627eb7e69ebd8cd495776bc0dcb3f7ace6efaa3c389f0adcefec113baf0d168f503c431d820e46b989442ee8a30
+EBUILD sunpinyin-data-20121025.ebuild 1025 SHA256 431781c2c675ff3ca59d74abce30b9204438b7a5fe302ca7eb3a226e0ac10c43 SHA512 f2a81985a0c8544946bf80de2e814d0ddb24c1a3542c24d144c823ec04193e2dbe4abc8ec438a7f389531249af77892e076b577df16af55ee87bee20a5a7228a WHIRLPOOL f4e59d8b1522b2c1ebeebc3283c0920858e3710b63459797380575b2dc77ad8a8cf3027755a9c91fa405309104e4d3451125f2b91a83da53d69f1ba2b09e5df0
+MISC ChangeLog 487 SHA256 34ec45f00214f906f7c7133ef9498bfe93cb3a04a4bc8d213c6dc39743fd5ae1 SHA512 d7d527aecfd3285a31837f1e63932d81f6711d36724e2045d54b8acd1f5d214a8aef7d62bf4f55fd5017a9d6a9ad2b877c66935734ee9be770c9c2da6902ee9e WHIRLPOOL 0a653a8f1b9138ae2fb2f1d793bfd70c5dbc5baf266cfcc8321996abe1072f54cfe8ac220cfb31a9610efd8df709c5222634f13e36a3faf4d73f460b9a7f0692
MISC metadata.xml 241 SHA256 97aaa5d95fd431ea817b425efddf01e0c6b0e94c321c4bf0f7b4a115241f3252 SHA512 f80c4a581950904a2e051fa5e50ab6cc558990e0d832f7ed32adc1aef32c42cd726c2c62eccb9a1c765644fcc3f71554914946a842d296d1a4ce8da8d0b91e06 WHIRLPOOL 1405bbc1a15098e5e503be74514b14c48f870f28cdc6889e050383c80bd7f9aa5f3f6b585e804db87f137c992b337896fcf95d1c96cf64f4168bf4a336581aac
diff --git a/app-i18n/sunpinyin-data/files/SLM-inst.mk b/app-i18n/sunpinyin-data/files/SLM-inst.mk
new file mode 100644
index 000000000000..9216a941ad1c
--- /dev/null
+++ b/app-i18n/sunpinyin-data/files/SLM-inst.mk
@@ -0,0 +1,62 @@
+#!/usr/bin/make -f
+# -*- mode: makefile; indent-tabs-mode: t -*- vim:noet:ts=4
+# Sample Makefile for lexicon generation and installation.
+
+# Little endian platforms: alpha amd64 arm hurd-i386 i386 ia64 mipsel sh3 sh4
+# Big endian platforms: hppa m68k mips powerpc ppc64 sparc s390
+ifndef ENDIANNESS
+ ENDIANNESS = le
+endif
+
+DICT_FILE = dict.utf8
+
+SLM_TARGET = lm_sc
+TSLM2_TEXT_FILE = ${SLM_TARGET}.t2g.arpa
+TSLM2_ORIG_FILE = ${SLM_TARGET}.t2g.orig
+TSLM2_DIST_FILE = ${SLM_TARGET}.t2g
+TSLM3_TEXT_FILE = ${SLM_TARGET}.t3g.arpa
+TSLM3_ORIG_FILE = ${SLM_TARGET}.t3g.orig
+TSLM3_DIST_FILE = ${SLM_TARGET}.t3g
+
+PYTRIE_FILE = pydict_sc.bin
+PYTRIE_LOG_FILE = pydict_sc.log
+
+SYSTEM_DATA_DIR = ${DESTDIR}/usr/share/sunpinyin
+
+all: slm3_dist
+install: slm3_install
+
+tslm2_orig: ${TSLM2_ORIG_FILE}
+${TSLM2_ORIG_FILE}: ${DICT_FILE} ${TSLM2_TEXT_FILE}
+ tslmpack ${TSLM2_TEXT_FILE} ${DICT_FILE} $@
+
+tslm2_dist: ${TSLM2_DIST_FILE}
+${TSLM2_DIST_FILE}: ${TSLM2_ORIG_FILE}
+ tslmendian -e ${ENDIANNESS} -i $^ -o $@
+
+lexicon2: ${DICT_FILE} ${TSLM2_ORIG_FILE}
+ genpyt -e ${ENDIANNESS} -i ${DICT_FILE} -s ${TSLM2_ORIG_FILE} \
+ -l ${PYTRIE_LOG_FILE} -o ${PYTRIE_FILE}
+
+tslm3_orig: ${TSLM3_ORIG_FILE}
+${TSLM3_ORIG_FILE}: ${DICT_FILE} ${TSLM3_TEXT_FILE}
+ tslmpack ${TSLM3_TEXT_FILE} ${DICT_FILE} $@
+
+tslm3_dist: ${TSLM3_DIST_FILE}
+${TSLM3_DIST_FILE}: ${TSLM3_ORIG_FILE}
+ tslmendian -e ${ENDIANNESS} -i $^ -o $@
+
+lexicon3: ${DICT_FILE} ${TSLM3_ORIG_FILE}
+ genpyt -e ${ENDIANNESS} -i ${DICT_FILE} -s ${TSLM3_ORIG_FILE} \
+ -l ${PYTRIE_LOG_FILE} -o ${PYTRIE_FILE}
+
+slm2_dist: ${TSLM2_DIST_FILE} lexicon2
+slm2_install: ${TSLM2_DIST_FILE} ${PYTRIE_FILE}
+ install -d ${SYSTEM_DATA_DIR}
+ install -Dm644 $^ ${SYSTEM_DATA_DIR}
+
+slm3_dist: ${TSLM3_DIST_FILE} lexicon3
+slm3_install: ${TSLM3_DIST_FILE} ${PYTRIE_FILE}
+ install -d ${SYSTEM_DATA_DIR}
+ install -Dm644 $^ ${SYSTEM_DATA_DIR}
+
diff --git a/app-i18n/sunpinyin-data/metadata.xml b/app-i18n/sunpinyin-data/metadata.xml
new file mode 100644
index 000000000000..adc59fd218e2
--- /dev/null
+++ b/app-i18n/sunpinyin-data/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-data/sunpinyin-data-20121025.ebuild b/app-i18n/sunpinyin-data/sunpinyin-data-20121025.ebuild
new file mode 100644
index 000000000000..d31772ca7737
--- /dev/null
+++ b/app-i18n/sunpinyin-data/sunpinyin-data-20121025.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/sunpinyin-data/sunpinyin-data-20121025.ebuild,v 1.1 2013/01/30 13:33:55 yngwin Exp $
+
+EAPI=5
+
+DICT_VERSION="20120830"
+LM_VERSION="${PV}"
+
+DESCRIPTION="Data sets for Sunpinyin"
+HOMEPAGE="https://open-gram.googlecode.com/"
+SRC_URI="http://open-gram.googlecode.com/files/dict.utf8-${DICT_VERSION}.tar.bz2
+ http://open-gram.googlecode.com/files/lm_sc.t3g.arpa-${LM_VERSION}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=app-i18n/sunpinyin-2.0.4_pre20130108"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ default
+ mkdir "${S}" || die
+ mv "${WORKDIR}"/dict.utf8 "${S}" || die
+ mv "${WORKDIR}"/lm_sc.t3g.arpa "${S}" || die
+ cp "${FILESDIR}"/SLM-inst.mk "${S}"/Makefile || die
+}
+
+src_compile() {
+ # we don't have any big-endian architectures keyworded yet, so hardcode
+ emake ENDIANNESS=le
+}
+
+src_install() {
+ emake ENDIANNESS=le DESTDIR="${D}" install
+}