From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B430D138330 for ; Tue, 11 Oct 2016 21:56:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9C378E0D1E; Tue, 11 Oct 2016 21:56:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 68AC7E0D1E for ; Tue, 11 Oct 2016 21:56:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ACBF9341494 for ; Tue, 11 Oct 2016 21:56:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 32B1A2F2 for ; Tue, 11 Oct 2016 21:56:06 +0000 (UTC) From: "Yixun Lan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Yixun Lan" Message-ID: <1476222964.e056277175e3d4033840c60ca6f5ca437f75ffb7.dlan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/sunpinyin/, app-i18n/sunpinyin/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-i18n/sunpinyin/files/sunpinyin-2.0.4_pre20130108-gcc6-use-float.patch app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108-r1.ebuild X-VCS-Directories: app-i18n/sunpinyin/ app-i18n/sunpinyin/files/ X-VCS-Committer: dlan X-VCS-Committer-Name: Yixun Lan X-VCS-Revision: e056277175e3d4033840c60ca6f5ca437f75ffb7 X-VCS-Branch: master Date: Tue, 11 Oct 2016 21:56:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3387a8f0-18a8-42cc-8f72-78c4c432a5df X-Archives-Hash: ca23b9a01a9758caa87b29f51daf75a4 commit: e056277175e3d4033840c60ca6f5ca437f75ffb7 Author: Yixun Lan gentoo org> AuthorDate: Tue Oct 11 21:53:54 2016 +0000 Commit: Yixun Lan gentoo org> CommitDate: Tue Oct 11 21:56:04 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0562771 app-i18n/sunpinyin: fix gcc-6 build err thanks Peter Levine for creating the patch Gentoo-Bug: 594380 Package-Manager: portage-2.3.1 ...unpinyin-2.0.4_pre20130108-gcc6-use-float.patch | 17 ++++++++ .../sunpinyin-2.0.4_pre20130108-r1.ebuild | 48 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/app-i18n/sunpinyin/files/sunpinyin-2.0.4_pre20130108-gcc6-use-float.patch b/app-i18n/sunpinyin/files/sunpinyin-2.0.4_pre20130108-gcc6-use-float.patch new file mode 100644 index 00000000..77fe283 --- /dev/null +++ b/app-i18n/sunpinyin/files/sunpinyin-2.0.4_pre20130108-gcc6-use-float.patch @@ -0,0 +1,17 @@ +--- sunpinyin-2.0.4_pre20130108/src/slm/tslmpack/common.h.old 2016-09-20 02:54:15.046257131 -0400 ++++ sunpinyin-2.0.4_pre20130108/src/slm/tslmpack/common.h 2016-09-20 02:55:48.041124978 -0400 +@@ -53,10 +53,10 @@ + typedef std::map RealIndexMap; // map real values to their indices + typedef std::map TLexicon; // map word to wid + +-#define EffectivePr(a) (float((usingLogPr) ? ((a) / log(2.0)) : (-log2((a))))) +-#define OriginalPr(b) (float((usingLogPr) ? ((b) * log(2.0)) : (exp2(-(b))))) +-#define EffectiveBow(a) (float((usingLogPr) ? (exp(-(a))) : ((a)))) +-#define OriginalBow(b) (float((usingLogPr) ? (-log((b))) : ((b)))) ++#define EffectivePr(a) (float((usingLogPr) ? ((a) / logf(2.0f)) : (-log2f((a))))) ++#define OriginalPr(b) (float((usingLogPr) ? ((b) * logf(2.0f)) : (exp2f(-(b))))) ++#define EffectiveBow(a) (float((usingLogPr) ? (expf(-(a))) : ((a)))) ++#define OriginalBow(b) (float((usingLogPr) ? (-logf((b))) : ((b)))) + + #endif //_SLM_PACK_COMMON_H + diff --git a/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108-r1.ebuild b/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108-r1.ebuild new file mode 100644 index 00000000..7a97afb --- /dev/null +++ b/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2016 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://github.com/sunpinyin/sunpinyin" +SRC_URI="https://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 "${FILESDIR}"/${PN}-2.0.4-pod2man.patch + epatch "${FILESDIR}"/${P}-gcc6-use-float.patch + epatch_user +} + +src_configure() { + tc-export CXX + myesconsargs=( + --prefix="${EPREFIX}"/usr + --libdir="${EPREFIX}"/usr/$(get_libdir) + ) +} + +src_compile() { + escons +} + +src_install() { + escons --install-sandbox="${D}" install + rm -rf "${D}"/usr/share/doc/${PN} || die + dodoc doc/{README,SLM-inst.mk,SLM-train.mk} +}