From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-i18n/sunpinyin/Manifest | 14 +++++ .../files/sunpinyin-2.0.3-force-switch.patch | 30 ++++++++++ .../sunpinyin/files/sunpinyin-2.0.3-gcc-4.7.patch | 49 +++++++++++++++++ .../sunpinyin/files/sunpinyin-2.0.4-pod2man.patch | 17 ++++++ ...unpinyin-2.0.4_pre20130108-gcc6-use-float.patch | 17 ++++++ app-i18n/sunpinyin/metadata.xml | 11 ++++ app-i18n/sunpinyin/sunpinyin-2.0.3-r1.ebuild | 64 ++++++++++++++++++++++ .../sunpinyin-2.0.4_pre20130108-r1.ebuild | 47 ++++++++++++++++ .../sunpinyin/sunpinyin-2.0.4_pre20130108.ebuild | 46 ++++++++++++++++ 9 files changed, 295 insertions(+) create mode 100644 app-i18n/sunpinyin/Manifest create mode 100644 app-i18n/sunpinyin/files/sunpinyin-2.0.3-force-switch.patch create mode 100644 app-i18n/sunpinyin/files/sunpinyin-2.0.3-gcc-4.7.patch create mode 100644 app-i18n/sunpinyin/files/sunpinyin-2.0.4-pod2man.patch create mode 100644 app-i18n/sunpinyin/files/sunpinyin-2.0.4_pre20130108-gcc6-use-float.patch create mode 100644 app-i18n/sunpinyin/metadata.xml create mode 100644 app-i18n/sunpinyin/sunpinyin-2.0.3-r1.ebuild create mode 100644 app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108-r1.ebuild create mode 100644 app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108.ebuild (limited to 'app-i18n/sunpinyin') diff --git a/app-i18n/sunpinyin/Manifest b/app-i18n/sunpinyin/Manifest new file mode 100644 index 000000000000..3473b8e733d7 --- /dev/null +++ b/app-i18n/sunpinyin/Manifest @@ -0,0 +1,14 @@ +AUX sunpinyin-2.0.3-force-switch.patch 1046 SHA256 ddb9fe9f219ae1e6d8754fb03187dba913ac9d731836da15e93d155a9c287bbf SHA512 abae0d760ecb93c6317483f3b14ee21670f1a42799ffc15a5dcfcf7f0838f0809731953bf6377a52a9647ace8172025bff5049859ac55db989d9f61904fa38ae WHIRLPOOL ae78c316cc9517299280ec0fed5c11c94ff874fb44931a49ca074ddf201bf6c2964e952b0261adad3bec50ff950db6d8f47d0f7f48fa10efd10eae0c8759bc15 +AUX sunpinyin-2.0.3-gcc-4.7.patch 1275 SHA256 0d01a61d663a9b316dbd368ba6df23a55e741daf0e6a56a249c279b0522d4a60 SHA512 48d7e5ab52395467f3b282b73bb3ca5b2cd27c76ac1b454c0e248a9cfb13d8d628fbdf93b82a57404109d288c46d70456bb4aaf4f2899e3dd6e047140cdfc7c0 WHIRLPOOL 13ba61171cabac01e1d48bed2fcd9832e486eceb3a8b0488e98dfbefdf5a125a749d3845aa16c854be8ed608a24f8723d287ee655e765cbaa014a4e5ff864d08 +AUX sunpinyin-2.0.4-pod2man.patch 469 SHA256 ef232fff1eeb9d041e657719bba02f703118d3a3fbb63f6d0c08f5da3b0bb81d SHA512 1cc36f21dd11c802365fd770e7eefb324a3200e6570d7b585179778c8385dc694b214ad1339ac266f0adfa9d1f1ebca87b7847544069e25cfb563b0cb5bd8172 WHIRLPOOL 6c1aed93d9c2d06088e664394eb1d20d4e6d1e98ca6d727e85d1d2a09207f05eb5238f8944aaa52cb2d63229cb5f2c13a9bfba4b29f9c3268902e83d2ffca814 +AUX sunpinyin-2.0.4_pre20130108-gcc6-use-float.patch 1010 SHA256 f27b1599666141b375b48032e79b7e606e07752d543c94f68f1c25387c958fa0 SHA512 8aaba439c49fac48c9523471bdbbac52feb594f61da6e3ba3747e3e6a08498817f06a8af8bcaa35d6b25ce0d31af3faac24faa57e15e3cae446f37dac5a30337 WHIRLPOOL 98f1a650445fb7874e7a8326d7a74ef125a3f954ff2b13dd9f1525dfa0fe65302bfd223843040a06c13bceedff995b2293e652f5155d7b4620125346fcb04cd6 +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 +EBUILD sunpinyin-2.0.3-r1.ebuild 1617 SHA256 c5eddf6b1868e5e05e46c88a145551111fe9633cf97ed0fa71843bc1ceba2f7c SHA512 285f5aed247330d819dea7299230def6cabe23d12b1658bfc5c24004e78f95a38bb9862463ee533a540a32e8780ac78a01966d2f70dd71563a58b7bc22325bae WHIRLPOOL cb2da32c6c9302ec58ba258b52921f8a5d3367d3b7a37e40d8d32e519102e1882fee40f0f2eda09d25218ef881e3c2bf3085fd829af1ea02d20c2eb24a5889e0 +EBUILD sunpinyin-2.0.4_pre20130108-r1.ebuild 1059 SHA256 ab532383b8f58193ba46017a790419ae22dfb3894def6b272f78291de4964b6b SHA512 e76f53355cbeb3aa82d0a0344bd72d2571773292fb9165431cbfbd86179bfb72e10d59485a95fe4f34444d1218c0ace5b874f98024bb2ef32fd12e7ba357c0db WHIRLPOOL 6619f9e033c9d83f604f314da2f8f17a32ce9f4989b4191143b6d873b08821b3bbd1ef354f7c7935f0f3b166512bd75e88e6c1dfcaea2ce90199c47a05280ccf +EBUILD sunpinyin-2.0.4_pre20130108.ebuild 1011 SHA256 0152bb0cc8c8404767151ad883ea737099151b6146ca59f49690eedd33c2f059 SHA512 68a82c30e991444fcddba1b27cfd1637b7dd07f599ff6152599b488cc100fafe8d9f02675332733a406af6670f254a55cb0774d6b1048e8aeaa727f835fbcb28 WHIRLPOOL c896a2611e9e685f365ed71b664117ccdfb36eef764ec9aca95fa221f83940a4d68e6bc1466c8f7aa0d5d791487b768fd58dd10723f3d03e918196c66ec96ea3 +MISC ChangeLog 3463 SHA256 bcd93ab07bf8a5a245eda401780d01978eddd06d511689424911fa65980bd196 SHA512 9fa7ebe4e935e33fc4b7dd932877287223f93993df5451220229e3f65175472ef5c6d5fa3c14d199f99afb515962147bb4ee3ae3abc675d64a6d2641fc52fe4a WHIRLPOOL 759ad97189825adb8de6d21a025d3d90031442d0cc73cce51590cf6199c6a7933ec51a18919618fee0b79f3e88ad7df882af664fd59d4f95acd8087c92e69117 +MISC ChangeLog-2015 3001 SHA256 e31d7745175660fb756dd46882d0942c329b96db2be582126144ab44dafd6274 SHA512 c455286568062737730ede3b5dc55f7c7330aa08ea8f3e897063f6514d8904c870c8be765699f2d7a8dfa0b641a499c01478b3ed4201ed74d264ade3b1e82c60 WHIRLPOOL 4883106b612c18a9723c026090e7bd269521b9adc2103340cdd13c6b2533bda4fa895e6dca0e46be47e2e96e552e19eb0633ad77c028ce2c69f090ca6699efc5 +MISC metadata.xml 328 SHA256 28e1068608e622ed813bc6cd681a3f6d035b2550a6f884ab0b8b8250a33dae17 SHA512 c67333df77b03f92845334d6b738c172cc2e1935b5df4cad2d7bc983c08cda59f1427588ab8d054cd40b7fdc52c0adcb516d74c7de4bb320f85979a6a3297628 WHIRLPOOL 1293bb8bd16e7a829cb0099f40b9c6c45f8d4d17d9cd608ea5adddb61dd8d5888cb50802e7c110e03f84597a94bb8f0917908a8b8576de0e031ad3305703c72b 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 +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 + #include + +-#if defined(sun) ++#if defined(HAVE_UNISTD_H) + #include + #ifdef __cplusplus + #include + #else + #include + #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/files/sunpinyin-2.0.4-pod2man.patch b/app-i18n/sunpinyin/files/sunpinyin-2.0.4-pod2man.patch new file mode 100644 index 000000000000..54831df21220 --- /dev/null +++ b/app-i18n/sunpinyin/files/sunpinyin-2.0.4-pod2man.patch @@ -0,0 +1,17 @@ +From: Guo Yixuan +Bug: https://code.google.com/archive/p/sunpinyin/issues/327 +Gentoo-Bug: 553796 + +diff --git a/man/SConscript b/man/SConscript +index f3ebd03..e1551eb 100644 +--- a/man/SConscript ++++ b/man/SConscript +@@ -1,7 +1,7 @@ + import os + Import('env') + +-pod2man = Builder(action = 'pod2man < $SOURCE > $TARGET') ++pod2man = Builder(action = 'pod2man $SOURCE $TARGET') + env.Append(BUILDERS = {'Man': pod2man}) + + env.Man('mmseg.1', 'mmseg.pod') 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 000000000000..77fe2831c7d8 --- /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/metadata.xml b/app-i18n/sunpinyin/metadata.xml new file mode 100644 index 000000000000..da2c1e97edca --- /dev/null +++ b/app-i18n/sunpinyin/metadata.xml @@ -0,0 +1,11 @@ + + + + + cjk@gentoo.org + Cjk + + + sunpinyin/sunpinyin + + 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..c0dea27daf5c --- /dev/null +++ b/app-i18n/sunpinyin/sunpinyin-2.0.3-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" + +inherit eutils multilib scons-utils toolchain-funcs + +DESCRIPTION="SunPinyin is a SLM (Statistical Language Model) based IME" +HOMEPAGE="https://sunpinyin.googlecode.com" +SRC_URI="${HOMEPAGE}/files/${P}.tar.gz + https://open-gram.googlecode.com/files/dict.utf8.tar.bz2 + https://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-r1.ebuild b/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108-r1.ebuild new file mode 100644 index 000000000000..c57e4b545664 --- /dev/null +++ b/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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} +} 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..afa03b36a59b --- /dev/null +++ b/app-i18n/sunpinyin/sunpinyin-2.0.4_pre20130108.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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_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} +} -- cgit v1.2.3