parent
22ebc395c0
commit
b495c566ce
@ -1 +1,2 @@
|
||||
DIST free42-1.5.15.tgz 22683600 SHA256 2dda0558141cd26d4b04aa96608c85eadb0770c4f2b660889d4b2a6f3a880c21 SHA512 fc09fcb0efaa6502776517b22cd0015ea7ac7d128b80bd740f64272b6c7aa41f5509dd7e0166dc18043790b4bef725a37a6a7210308a67aeaed02622f9e6daef WHIRLPOOL 5f6f5b33ccb2c320515fbc4e67ee52c6bc6c25fdbc8cf24c05772a90be87fed03f48dfa363b195071c4bc722428fb116d246e9df2eaddba20742648891ad7769
|
||||
DIST free42-nologo-2.0.6.tgz 7348647 SHA256 862135da3066576d71dbfedc1e41e97230e656ef2f0db3a5b87ba96650c12b9a SHA512 078a79cc4dfa36ae7342be5b90350f4b7269f4e71777f2620c2043510d6313acbc1fa9415b75f8b01bebb2de747b9af8a26738f877c34a4d82a1fdd52c75a61d WHIRLPOOL 5740055edfbafc6f91ba9d3a8b1dc259511dc99b1e5d06a78cf03976b71928c5423d57cd023c9d878108394f3b0992a3bf532f06e69089b976a8ca789dcae9ed
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -Nuar a/gtk/build-intel-lib.sh b/gtk/build-intel-lib.sh
|
||||
--- a/gtk/build-intel-lib.sh 2017-04-01 20:02:45.000000000 +0200
|
||||
+++ b/gtk/build-intel-lib.sh 2017-04-04 13:55:43.719038089 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
cd IntelRDFPMathLib20U1
|
||||
patch -p0 <../intel-lib-linux.patch
|
||||
cd LIBRARY
|
||||
-make CC=gcc CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0
|
||||
+make A=a CC=gcc CALL_BY_REF=1 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=0
|
||||
mv libbid.a ../../gcc111libbid.a
|
||||
cd ../..
|
||||
( echo '#ifdef FREE42_FPTEST'; echo 'const char *readtest_lines[] = {'; tr -d '\r' < IntelRDFPMathLib20U1/TESTS/readtest.in | sed 's/^\(.*\)$/"\1",/'; echo '0 };'; echo '#endif' ) > readtest_lines.cc
|
@ -0,0 +1,58 @@
|
||||
diff -Nuar a/gtk/Makefile b/gtk/Makefile
|
||||
--- a/gtk/Makefile 2017-04-01 20:02:45.000000000 +0200
|
||||
+++ b/gtk/Makefile 2017-04-04 13:59:04.969034463 +0200
|
||||
@@ -15,11 +15,11 @@
|
||||
# along with this program; if not, see http://www.gnu.org/licenses/.
|
||||
###############################################################################
|
||||
|
||||
-CFLAGS = -MMD \
|
||||
+CFLAGS := -MMD \
|
||||
-Wall \
|
||||
-Wno-parentheses \
|
||||
-Wno-write-strings \
|
||||
- -g \
|
||||
+ -Wno-error=narrowing \
|
||||
-I/usr/X11R6/include \
|
||||
$(shell pkg-config --cflags gtk+-2.0) \
|
||||
-DVERSION="\"$(shell cat ../VERSION)\"" \
|
||||
@@ -27,21 +27,25 @@
|
||||
-DDECIMAL_GLOBAL_ROUNDING=1 \
|
||||
-DDECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS=1 \
|
||||
-DDECIMAL_GLOBAL_EXCEPTION_FLAGS=1 \
|
||||
- -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1
|
||||
+ -DDECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS=1 \
|
||||
+ ${CFLAGS}
|
||||
|
||||
-CXXFLAGS = $(CFLAGS) \
|
||||
+CXXFLAGS := $(CFLAGS) \
|
||||
-fno-exceptions \
|
||||
-fno-rtti \
|
||||
- -D_WCHAR_T_DEFINED
|
||||
+ -D_WCHAR_T_DEFINED \
|
||||
+ ${CXXFLAGS}
|
||||
|
||||
-LDFLAGS = -L/usr/X11R6/lib
|
||||
-LIBS = gcc111libbid.a -lXmu $(shell pkg-config --libs gtk+-2.0)
|
||||
+MYLDFLAGS = -L/usr/X11R6/lib
|
||||
+LIBS = gcc111libbid.a -lX11 -ldl -lXmu $(shell pkg-config --libs gtk+-2.0)
|
||||
|
||||
ifeq "$(shell uname -s)" "Linux"
|
||||
-LDFLAGS += -Wl,--hash-style=both
|
||||
+MYLDFLAGS += -Wl,--hash-style=both
|
||||
LIBS += -lpthread
|
||||
endif
|
||||
|
||||
+MYLDFLAGS += ${LDFLAGS}
|
||||
+
|
||||
SRCS = shell_main.cc shell_skin.cc skins.cc keymap.cc shell_loadimage.cc \
|
||||
shell_spool.cc core_main.cc core_commands1.cc core_commands2.cc \
|
||||
core_commands3.cc core_commands4.cc core_commands5.cc \
|
||||
@@ -83,7 +87,7 @@
|
||||
endif
|
||||
|
||||
$(EXE): $(OBJS)
|
||||
- $(CXX) -o $(EXE) $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
+ $(CXX) -o $(EXE) $(MYLDFLAGS) $(OBJS) $(LIBS)
|
||||
|
||||
$(SRCS) skin2cc.cc keymap2cc.cc skin2cc.conf: symlinks
|
||||
|
@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
MY_PV="${PN}-nologo-${PV}"
|
||||
|
||||
DESCRIPTION="An HP-42S Calculator Simulator"
|
||||
HOMEPAGE="http://thomasokken.com/free42/"
|
||||
SRC_URI="http://thomasokken.com/free42/upstream/${MY_PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="alsa"
|
||||
|
||||
DEPEND="dev-libs/atk
|
||||
x11-libs/cairo
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/pango
|
||||
alsa? ( media-libs/alsa-lib )"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
x11-libs/libX11
|
||||
x11-libs/libXmu"
|
||||
|
||||
S="${WORKDIR}/${MY_PV}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e 's/print_gif_name\[FILENAMELEN\]/print_gif_name\[1000\]/' \
|
||||
"${S}/gtk/shell_main.cc" || die
|
||||
epatch "${FILESDIR}"/${P}-fix-makefile.patch
|
||||
epatch "${FILESDIR}"/${P}-fix-build-intel-lib.patch
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local myconf
|
||||
use alsa && myconf="AUDIO_ALSA=yes"
|
||||
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" BCD_MATH=1 ${myconf} -C "${S}/gtk"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc CREDITS HISTORY README TODO
|
||||
dobin gtk/free42dec
|
||||
}
|
@ -1,10 +1,13 @@
|
||||
DIST fcitx-mozc-2.16.2037.102.2.patch 140421 SHA256 ff175f3e0301c33f750780765ea264887827d00bc7a59fc8b55ae514ba449a1e SHA512 22b885859588bb8e0efd354d153da461a654203729c723156a419bf33fae473e3f7165964aa3cb3b5c969f97c2727f9d87b0d587330e4eeab67f07d4458542a3 WHIRLPOOL cd9534c8904a7c9f866a8ddd41ab4c57b3ad8b5650fda4cf9ccc1e544c8e0da25c749870606687ee66e4252f224babdbe10415e035038ced654812bad8d299dc
|
||||
DIST fcitx-mozc-2.18.2612.102.1.patch 140722 SHA256 0ec5dc2e9798ce7a6dbcbe847cf016b0b49be1851008143d167c13333a15ed27 SHA512 725c464727f230707b90975705ef1565f1178f9144e66c5a688696a4ef520a6fec1d11f7aa68ee05f82aa9417060b1cccf49a155e30734871a525eaa4c76addb WHIRLPOOL 25d0efd313175f6648504b989302c73ab6d82a0cf4eecf332b68347331e1feff2df6251edd49c3d4e9251a2c7e01df56eb8de54ebbbc31582f7c2b89d1da53c1
|
||||
DIST gmock-1.6.0.zip 2053682 SHA256 341ad07c31c619ba32c88c2265bc23693da1df062f47f146a7ed340f646d82b7 SHA512 7adff00bb6ff81a6ffb704be71d0747636d69e24b4a8b709e1fb8c177a9a47f6dea8d14fde73034ebfb1529c291c7212a944ad92a34f88abdfe23c2d0b11b6f7 WHIRLPOOL 1a03ff8f2d96287f5deb24f970688f20f3480e77a4a71089ef1399a87f28f616bf0feaedc217e7ac1ca8ca1246e53f5d882f350704be111ae547961949939530
|
||||
DIST gtest-1.6.0.zip 1121697 SHA256 5ec97df8e75b4ee796604e74716d1b50582beba22c5502edd055a7e67a3965d8 SHA512 f4718dfbfa3339bb9449c3f14e5b44ae405ea7df64c10a0957a6300985b71c4642981d069a1382e27ae041a4e2873527a9e442aff978447e795a190f99fac115 WHIRLPOOL 745a49020d4353ed2fa38adfc80bbd777358c831719bbe3b7c90d243f84256615222ba5f04d48d98b9e1a803bb40766799b3aedd575024c19d853d9239a12f8a
|
||||
DIST gyp-20140602.tar.bz2 432422 SHA256 f67be748f4dc36aa1619f43d4624c746728cf268af7f4ebf78dab3fa6d43d973 SHA512 e3a59daac57ddafc5804384c01cf51d4b90cd119d263afd83ec6eef9239c38bc7715736f70e20e44fae04fd8be1b86aa5323908a92d574372aa298f3355ce15f WHIRLPOOL 17e4630dcd7592e8ee197b4130d6147d9fd63404938f62e08ad10a204bd4bddcfc7d394abf3572a337e3dea46d4a7361dbc0cccc02e07ab99ed8f90e80830451
|
||||
DIST japanese-usage-dictionary-10.tar.bz2 56142 SHA256 8c22284c97fdfad854790517f9200c439453c033db8f6a9d25aa5d95266b2384 SHA512 f299cf9183b9ec219d80c1fa745f351765d246d601f3c4091d1705e3c8b5ef66a32288d4c162e7bbc456b6d49ee90f1e5bf33721e1229165f3ee069daddd3198 WHIRLPOOL d2f690335cf271b0780c969f56616ece9d28f3dbe990548053a252c855db18a4a31d21e6bd8c34160c0893c21fab4543e5ff3cecb48c7f6ecfd5c84465d314a6
|
||||
DIST japanese-usage-dictionary-20120416091336.tar.gz 71051 SHA256 0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1 SHA512 b7e997a979b6d50e49b9af5dc830ea4df0532f6ab1321b9ef14983f65bb54f1b2967375c82e07957ae7693ebbf43c9b56ecea6bfea8dd1fdaee444bd549d83a7 WHIRLPOOL 1c4324a6408cfc0b2e1df33a32583384ccf10374bc1a8f49f574e681a72174f7bee7e8500c93d714ee6459c087f7cd408e57cb52b8506ec50292249e50045cd2
|
||||
DIST jsoncpp-src-0.6.0-rc2.tar.gz 117661 SHA256 d4d193d163f520b08b9155cba978615892ca1359d77e3fb261fce2f86d09b283 SHA512 5d44e766aa2d7657bc68cf16173130febaa6744d5fca0c6df5465617a3f306023a17cbeb07a62ad1a34c2d183d916401b4be48f37c2416c895db4ad5d9481b3d WHIRLPOOL bfa7e70e14f3ed0911c5127da0d2099ca8b9159a900a5bc5147d1e50b5a9f9d5be69a8d46a761d277ca1edabaab8d0d3b9f81417572e4664ed8239fd83c953e6
|
||||
DIST mozc-1.10.1390.102.tar.bz2 57879881 SHA256 72a8ed6657daa1c03b1efe50c262a69be2ab66d45747a47df6e54996b6d5ee39 SHA512 4482e822f8a14bffd02cb1eaa5d14ba0a213266b2f0dd6402c42b9b357bf0d8c4dd572cef79f1d400bd68b7bd6cb4367933574f8f5967f68738249a300e3cfb9 WHIRLPOOL 90518e621ef784b438fcf677e211fdb6753719f3d78d14ce866ccea22d6d87f8d64e334bc568eebe93cb2850d3d545eb0b73d6f6de820eaf1d43f16bfdef4100
|
||||
DIST mozc-1.13.1651.102.tar.bz2 31635636 SHA256 a275accc726d55d696adf235fa40822ae099f0a02d3dc9f8d0257ba191a1bc49 SHA512 caa75e60704e904a72fd06e315a219ff304a54adaeee70a8ab75d413f7801960add103b9aae1c19ee92f6d10c4c408fd840cf78c5dde0cc21c605feac59deaf4 WHIRLPOOL 72a870cc1bc5bc63227bba61c73183f69160aa5c58c9b89e75fa65bf16bbdc2c2b873b7407d0543b3847bc046866392d9bbe6d771d7b4b7eb3f6be759f1a63b4
|
||||
DIST mozc-2.16.2037.102.tar.bz2 41172838 SHA256 4b78769b36366f056282267935a859e587f77e9aaf17132687d0e4d0c4da5cd0 SHA512 ff114a93054b43109407c44bc7c75de79fa2b028f9dba5c2ecc1776c5cbb032f184a91155b6b31bc17f0183dd70b0150ce13e80f59e26810daf4b65ba7e52be1 WHIRLPOOL 625c5a28da164ee96cdf523af32a7101357254cea1d57cd7f272bdf86ba8344d3e39bf2b2bfb0a79640d7961fd46c183eabc4002c8d86215ecffe183e4e0d193
|
||||
DIST mozc-2.20.2673.102.tar.gz 48623065 SHA256 794ec312e9a5567d2097059beb25718ddb1636cd8dd99b880ec97e26824276ea SHA512 409d406fdb21d55c93a4287cd3757a164c65c1c309918b4e905aec422d9c86bc6e51ae67c23ad0db2c87ab968443bd62f5a58684a0bf5d52751988a5ec5b0bd5 WHIRLPOOL 022029c7828502907f3c3e6fd39cfa059a947f75538b6958ec81528caec0a1be0cce48a3e94ff67303021f2003fcd1a966cdf3a4bbbf113968e454ba3e84295c
|
||||
DIST protobuf-2.5.0.tar.bz2 1866763 SHA256 13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 SHA512 5994b3669808b82fef5c860ecad36358c0767f84acac877e7bfcf722e59d972835a955714149bdd4158fbd1328a51d01397a563991d26475351ee72be48142ee WHIRLPOOL 7e6786e1f20bf253d0e386a95c2bbfe1b443f484d492f97552cadcea62c24461436aa88130e3ff20b4dc9f352c101458cb8c03686f1cc4e6e2133b6e78f5b70d
|
||||
|
@ -0,0 +1,133 @@
|
||||
--- /src/net/jsoncpp.gyp
|
||||
+++ /src/net/jsoncpp.gyp
|
||||
@@ -31,31 +31,25 @@
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'jsoncpp',
|
||||
- 'type': 'static_library',
|
||||
+ 'type': 'none',
|
||||
'variables': {
|
||||
- 'jsoncpp_root': '<(third_party_dir)/jsoncpp',
|
||||
- 'jsoncpp_srcs': [
|
||||
- '<(jsoncpp_root)/src/lib_json/json_reader.cpp',
|
||||
- '<(jsoncpp_root)/src/lib_json/json_value.cpp',
|
||||
- '<(jsoncpp_root)/src/lib_json/json_writer.cpp',
|
||||
- ],
|
||||
- 'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'],
|
||||
'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
|
||||
},
|
||||
- 'defines': [
|
||||
- '<@(jsoncpp_additional_macros)',
|
||||
- ],
|
||||
- 'sources': [
|
||||
- '<@(jsoncpp_srcs)',
|
||||
- 'jsoncpp.h',
|
||||
- ],
|
||||
- 'include_dirs': [
|
||||
- '<@(jsoncpp_include_dirs)',
|
||||
- ],
|
||||
'all_dependent_settings': {
|
||||
'defines': [
|
||||
'<@(jsoncpp_additional_macros)',
|
||||
],
|
||||
+ 'cflags': [
|
||||
+ '<!@(pkg-config --cflags jsoncpp)',
|
||||
+ ],
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '<!@(pkg-config --libs-only-l jsoncpp)',
|
||||
+ ],
|
||||
+ 'ldflags': [
|
||||
+ '<!@(pkg-config --libs-only-L jsoncpp)',
|
||||
+ ],
|
||||
+ }
|
||||
},
|
||||
},
|
||||
],
|
||||
--- /src/net/jsoncpp.h
|
||||
+++ /src/net/jsoncpp.h
|
||||
@@ -35,7 +35,7 @@
|
||||
// Mozc basically disables C++ exception.
|
||||
#define JSON_USE_EXCEPTION 0
|
||||
#endif // !JSON_USE_EXCEPTION
|
||||
-#include "third_party/jsoncpp/include/json/json.h"
|
||||
+#include <json/json.h>
|
||||
#define MOZC_JSONCPP_JSON_H_INCLUDED
|
||||
#endif // !MOZC_JSONCPP_JSON_H_INCLUDED
|
||||
|
||||
--- /src/testing/testing.gyp
|
||||
+++ /src/testing/testing.gyp
|
||||
@@ -53,14 +53,12 @@
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'testing',
|
||||
- 'type': 'static_library',
|
||||
+ 'type': 'none',
|
||||
'variables': {
|
||||
'gtest_defines': [
|
||||
'GTEST_LANG_CXX11=1',
|
||||
'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple.
|
||||
],
|
||||
- 'gtest_dir': '<(third_party_dir)/gtest/googletest',
|
||||
- 'gmock_dir': '<(third_party_dir)/gtest/googlemock',
|
||||
'conditions': [
|
||||
['_toolset=="target" and target_platform=="Android"', {
|
||||
'gtest_defines': [
|
||||
@@ -75,53 +73,15 @@
|
||||
}],
|
||||
],
|
||||
},
|
||||
- 'sources': [
|
||||
- '<(gmock_dir)/src/gmock-cardinalities.cc',
|
||||
- '<(gmock_dir)/src/gmock-internal-utils.cc',
|
||||
- '<(gmock_dir)/src/gmock-matchers.cc',
|
||||
- '<(gmock_dir)/src/gmock-spec-builders.cc',
|
||||
- '<(gmock_dir)/src/gmock.cc',
|
||||
- '<(gtest_dir)/src/gtest-death-test.cc',
|
||||
- '<(gtest_dir)/src/gtest-filepath.cc',
|
||||
- '<(gtest_dir)/src/gtest-port.cc',
|
||||
- '<(gtest_dir)/src/gtest-printers.cc',
|
||||
- '<(gtest_dir)/src/gtest-test-part.cc',
|
||||
- '<(gtest_dir)/src/gtest-typed-test.cc',
|
||||
- '<(gtest_dir)/src/gtest.cc',
|
||||
- ],
|
||||
- 'include_dirs': [
|
||||
- '<(gmock_dir)',
|
||||
- '<(gmock_dir)/include',
|
||||
- '<(gtest_dir)',
|
||||
- '<(gtest_dir)/include',
|
||||
- ],
|
||||
- 'defines': [
|
||||
- '<@(gtest_defines)',
|
||||
- ],
|
||||
'all_dependent_settings': {
|
||||
'defines': [
|
||||
'<@(gtest_defines)',
|
||||
],
|
||||
- 'include_dirs': [
|
||||
- '<(gmock_dir)/include',
|
||||
- '<(gtest_dir)/include',
|
||||
- ],
|
||||
- },
|
||||
- 'conditions': [
|
||||
- ['(_toolset=="target" and compiler_target=="clang") or '
|
||||
- '(_toolset=="host" and compiler_host=="clang")', {
|
||||
- 'cflags': [
|
||||
- '-Wno-missing-field-initializers',
|
||||
- '-Wno-unused-private-field',
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-lgmock -lgtest',
|
||||
],
|
||||
- }],
|
||||
- ],
|
||||
- 'xcode_settings': {
|
||||
- # Remove the force included file. This is not necessary for third
|
||||
- # party libraries, and it causes a build error.
|
||||
- 'OTHER_CFLAGS!' : [
|
||||
- '-include base/namespace.h',
|
||||
- ],
|
||||
+ },
|
||||
},
|
||||
},
|
||||
{
|
@ -0,0 +1,27 @@
|
||||
--- /src/net/json_util_test.cc
|
||||
+++ /src/net/json_util_test.cc
|
||||
@@ -784,13 +784,13 @@
|
||||
for (size_t i = 0; i < arraysize(kNumS32ValueKeys); ++i) {
|
||||
{
|
||||
Json::Value json_value;
|
||||
- json_value[kNumS32ValueKeys[i]] = -2147483649ll;
|
||||
+ json_value[kNumS32ValueKeys[i]] = static_cast<Json::Value::Int64>(-2147483649ll);
|
||||
TestMsg msg;
|
||||
EXPECT_FALSE(JsonUtil::JsonValueToProtobufMessage(json_value, &msg));
|
||||
}
|
||||
{
|
||||
Json::Value json_value;
|
||||
- json_value[kNumS32ValueKeys[i]] = 2147483648ull;
|
||||
+ json_value[kNumS32ValueKeys[i]] = static_cast<Json::Value::UInt64>(2147483648ull);
|
||||
TestMsg msg;
|
||||
EXPECT_FALSE(JsonUtil::JsonValueToProtobufMessage(json_value, &msg));
|
||||
}
|
||||
@@ -805,7 +805,7 @@
|
||||
}
|
||||
{
|
||||
Json::Value json_value;
|
||||
- json_value[kNumU32ValueKeys[i]] = 4294967296ull;
|
||||
+ json_value[kNumU32ValueKeys[i]] = static_cast<Json::Value::UInt64>(4294967296ull);
|
||||
TestMsg msg;
|
||||
EXPECT_FALSE(JsonUtil::JsonValueToProtobufMessage(json_value, &msg));
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
Disable test leaving mozc_server orphan process.
|
||||
|
||||
--- /src/unix/ibus/mozc_engine_test.cc
|
||||
+++ /src/unix/ibus/mozc_engine_test.cc
|
||||
@@ -41,65 +41,5 @@
|
||||
namespace mozc {
|
||||
namespace ibus {
|
||||
|
||||
-class LaunchToolTest : public testing::Test {
|
||||
- public:
|
||||
- LaunchToolTest() {
|
||||
- g_type_init();
|
||||
- }
|
||||
-
|
||||
- protected:
|
||||
- virtual void SetUp() {
|
||||
- mozc_engine_.reset(new MozcEngine());
|
||||
-
|
||||
- mock_ = new client::ClientMock();
|
||||
- mock_->ClearFunctionCounter();
|
||||
- mozc_engine_->client_.reset(mock_);
|
||||
- }
|
||||
-
|
||||
- virtual void TearDown() {
|
||||
- mozc_engine_.reset();
|
||||
- }
|
||||
-
|
||||
- client::ClientMock* mock_;
|
||||
- unique_ptr<MozcEngine> mozc_engine_;
|
||||
-
|
||||
- private:
|
||||
- DISALLOW_COPY_AND_ASSIGN(LaunchToolTest);
|
||||
-};
|
||||
-
|
||||
-TEST_F(LaunchToolTest, LaunchToolTest) {
|
||||
- commands::Output output;
|
||||
-
|
||||
- // Launch config dialog
|
||||
- mock_->ClearFunctionCounter();
|
||||
- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", true);
|
||||
- output.set_launch_tool_mode(commands::Output::CONFIG_DIALOG);
|
||||
- EXPECT_TRUE(mozc_engine_->LaunchTool(output));
|
||||
-
|
||||
- // Launch dictionary tool
|
||||
- mock_->ClearFunctionCounter();
|
||||
- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", true);
|
||||
- output.set_launch_tool_mode(commands::Output::DICTIONARY_TOOL);
|
||||
- EXPECT_TRUE(mozc_engine_->LaunchTool(output));
|
||||
-
|
||||
- // Launch word register dialog
|
||||
- mock_->ClearFunctionCounter();
|
||||
- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", true);
|
||||
- output.set_launch_tool_mode(commands::Output::WORD_REGISTER_DIALOG);
|
||||
- EXPECT_TRUE(mozc_engine_->LaunchTool(output));
|
||||
-
|
||||
- // Launch no tool(means do nothing)
|
||||
- mock_->ClearFunctionCounter();
|
||||
- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", false);
|
||||
- output.set_launch_tool_mode(commands::Output::NO_TOOL);
|
||||
- EXPECT_FALSE(mozc_engine_->LaunchTool(output));
|
||||
-
|
||||
- // Something occurring in client::Client::LaunchTool
|
||||
- mock_->ClearFunctionCounter();
|
||||
- mock_->SetBoolFunctionReturn("LaunchToolWithProtoBuf", false);
|
||||
- output.set_launch_tool_mode(commands::Output::CONFIG_DIALOG);
|
||||
- EXPECT_FALSE(mozc_engine_->LaunchTool(output));
|
||||
-}
|
||||
-
|
||||
} // namespace ibus
|
||||
} // namespace mozc
|
@ -0,0 +1,309 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
PYTHON_COMPAT=(python2_7)
|
||||
|
||||
inherit elisp-common multiprocessing python-any-r1 toolchain-funcs
|
||||
|
||||
if [[ "${PV}" == "9999" ]]; then
|
||||
inherit git-r3
|
||||
|
||||
EGIT_REPO_URI="https://github.com/google/mozc"
|
||||
EGIT_SUBMODULES=(src/third_party/japanese_usage_dictionary)
|
||||
else
|
||||
MOZC_GIT_REVISION="280e38fe3d9db4df52f0713acf2ca65898cd697a"
|
||||
JAPANESE_USAGE_DICTIONARY_GIT_REVISION="e5b3425575734c323e1d947009dd74709437b684"
|
||||
JAPANESE_USAGE_DICTIONARY_DATE="20120416091336"
|
||||
fi
|
||||
|
||||
FCITX_PATCH_VERSION="2.18.2612.102.1"
|
||||
|
||||
DESCRIPTION="Mozc - Japanese input method editor"
|
||||
HOMEPAGE="https://github.com/google/mozc"
|
||||
if [[ "${PV}" == "9999" ]]; then
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="https://github.com/google/${PN}/archive/${MOZC_GIT_REVISION}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}.tar.gz -> japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz"
|
||||
fi
|
||||
SRC_URI+=" fcitx4? ( https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-${FCITX_PATCH_VERSION}.patch )"
|
||||
|
||||
# Mozc: BSD
|
||||
# src/data/dictionary_oss: ipadic, public-domain
|
||||
# src/data/unicode: unicode
|
||||
# japanese-usage-dictionary: BSD-2
|
||||
LICENSE="BSD BSD-2 ipadic public-domain unicode"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug emacs fcitx4 +gui +handwriting-tegaki handwriting-tomoe ibus renderer test"
|
||||
REQUIRED_USE="|| ( emacs fcitx4 ibus ) gui? ( ^^ ( handwriting-tegaki handwriting-tomoe ) ) !gui? ( !handwriting-tegaki !handwriting-tomoe )"
|
||||
|
||||
RDEPEND="dev-libs/protobuf:=
|
||||
emacs? ( virtual/emacs )
|
||||
fcitx4? ( app-i18n/fcitx:4 )
|
||||
gui? (
|
||||
app-i18n/zinnia
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
handwriting-tegaki? ( app-i18n/tegaki-zinnia-japanese )
|
||||
handwriting-tomoe? ( app-i18n/zinnia-tomoe )
|
||||
)
|
||||
ibus? (
|
||||
>=app-i18n/ibus-1.4.1
|
||||
dev-libs/glib:2
|
||||
x11-libs/libxcb
|
||||
)
|
||||
renderer? (
|
||||
dev-libs/glib:2
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/pango
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
dev-util/gyp
|
||||
dev-util/ninja
|
||||
virtual/pkgconfig
|
||||
test? (
|
||||
>=dev-cpp/gtest-1.8.0
|
||||
dev-libs/jsoncpp
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/${P}/src"
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
execute() {
|
||||
einfo "$@"
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ "${PV}" == "9999" ]]; then
|
||||
git-r3_src_unpack
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
mv mozc-${MOZC_GIT_REVISION} ${P} || die
|
||||
|
||||
unpack japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz
|
||||
cp -p japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}/usage_dict.txt ${P}/src/third_party/japanese_usage_dictionary || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-system_libraries.patch"
|
||||
eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_build.patch"
|
||||
eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_skipping.patch"
|
||||
|
||||
if use fcitx4; then
|
||||
eapply -p2 "${DISTDIR}/fcitx-mozc-${FCITX_PATCH_VERSION}.patch"
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
sed \
|
||||
-e "s/def GypMain(options, unused_args):/def GypMain(options, gyp_args):/" \
|
||||
-e "s/RunOrDie(gyp_command + gyp_options)/RunOrDie(gyp_command + gyp_options + gyp_args)/" \
|
||||
-e "s/RunOrDie(\[ninja/&, '-j$(makeopts_jobs)', '-l$(makeopts_loadavg "${MAKEOPTS}" 0)', '-v'/" \
|
||||
-i build_mozc.py || die
|
||||
|
||||
sed \
|
||||
-e "s/'release_extra_cflags%': \['-O2'\]/'release_extra_cflags%': []/" \
|
||||
-e "s/'debug_extra_cflags%': \['-O0', '-g'\]/'debug_extra_cflags%': []/" \
|
||||
-i gyp/common.gypi || die
|
||||
|
||||
local ar=($(tc-getAR))
|
||||
local cc=($(tc-getCC))
|
||||
local cxx=($(tc-getCXX))
|
||||
local ld=($(tc-getLD))
|
||||
local nm=($(tc-getNM))
|
||||
local readelf=($(tc-getPROG READELF readelf))
|
||||
|
||||
# Use absolute paths. Non-absolute paths are mishandled by GYP.
|
||||
ar[0]=$(type -P ${ar[0]})
|
||||
cc[0]=$(type -P ${cc[0]})
|
||||
cxx[0]=$(type -P ${cxx[0]})
|
||||
ld[0]=$(type -P ${ld[0]})
|
||||
nm[0]=$(type -P ${nm[0]})
|
||||
readelf[0]=$(type -P ${readelf[0]})
|
||||
|
||||
sed \
|
||||
-e "s:<!(which ar):${ar[@]}:" \
|
||||
-e "s:<!(which clang):${cc[@]}:" \
|
||||
-e "s:<!(which clang++):${cxx[@]}:" \
|
||||
-e "s:<!(which ld):${ld[@]}:" \
|
||||
-e "s:<!(which nm):${nm[@]}:" \
|
||||
-e "s:<!(which readelf):${readelf[@]}:" \
|
||||
-i gyp/common.gypi || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use debug; then
|
||||
BUILD_TYPE="Debug"
|
||||
else
|
||||
BUILD_TYPE="Release"
|
||||
fi
|
||||
|
||||
local gyp_arguments=()
|
||||
|
||||
if tc-is-gcc; then
|
||||
gyp_arguments+=(-D compiler_host=gcc -D compiler_target=gcc)
|
||||
elif tc-is-clang; then
|
||||
gyp_arguments+=(-D compiler_host=clang -D compiler_target=clang)
|
||||
else
|
||||
gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown)
|
||||
fi
|
||||
|
||||
gyp_arguments+=(-D use_libibus=$(usex ibus 1 0))
|
||||
gyp_arguments+=(-D use_libprotobuf=1)
|
||||
gyp_arguments+=(-D use_libzinnia=1)
|
||||
gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0))
|
||||
|
||||
gyp_arguments+=(-D server_dir="${EPREFIX}/usr/libexec/mozc")
|
||||
gyp_arguments+=(-D document_dir="${EPREFIX}/usr/libexec/mozc/documents")
|
||||
|
||||
if use handwriting-tegaki; then
|
||||
gyp_arguments+=(-D zinnia_model_file="${EPREFIX}/usr/share/tegaki/models/zinnia/handwriting-ja.model")
|
||||
elif use handwriting-tomoe; then
|
||||
gyp_arguments+=(-D zinnia_model_file="${EPREFIX}/usr/$(get_libdir)/zinnia/model/tomoe/handwriting-ja.model")
|
||||
fi
|
||||
|
||||
if use ibus; then
|
||||
gyp_arguments+=(-D ibus_mozc_path="${EPREFIX}/usr/libexec/ibus-engine-mozc")
|
||||
gyp_arguments+=(-D ibus_mozc_icon_path="${EPREFIX}/usr/share/ibus-mozc/product_icon.png")
|
||||
fi
|
||||
|
||||
unset AR CC CXX LD NM READELF
|
||||
|
||||
execute "${PYTHON}" build_mozc.py gyp \
|
||||
--gypdir="${EPREFIX}/usr/bin" \
|
||||
--server_dir="${EPREFIX}/usr/libexec/mozc" \
|
||||
--verbose \
|
||||
$(usex gui "" --noqt) \
|
||||
-- "${gyp_arguments[@]}" || die "Configuration failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local targets=(server/server.gyp:mozc_server)
|
||||
if use emacs; then
|
||||
targets+=(unix/emacs/emacs.gyp:mozc_emacs_helper)
|
||||
fi
|
||||
if use fcitx4; then
|
||||
targets+=(unix/fcitx/fcitx.gyp:fcitx-mozc)
|
||||
fi
|
||||
if use gui; then
|
||||
targets+=(gui/gui.gyp:mozc_tool)
|
||||
fi
|
||||
if use ibus; then
|
||||
targets+=(unix/ibus/ibus.gyp:ibus_mozc)
|
||||
fi
|
||||
if use renderer; then
|
||||
targets+=(renderer/renderer.gyp:mozc_renderer)
|
||||
fi
|
||||
if use test; then
|
||||
targets+=(gyp/tests.gyp:unittests)
|
||||
fi
|
||||
|
||||
execute "${PYTHON}" build_mozc.py build -c ${BUILD_TYPE} -v "${targets[@]}" || die "Building failed"
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile unix/emacs/*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
execute "${PYTHON}" build_mozc.py runtests -c ${BUILD_TYPE} --test_jobs 1 || die "Testing failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto /usr/libexec/mozc
|
||||
doexe out_linux/${BUILD_TYPE}/mozc_server
|
||||
|
||||
if use gui; then
|
||||
doexe out_linux/${BUILD_TYPE}/mozc_tool
|
||||
fi
|
||||
|
||||
if use renderer; then
|
||||
doexe out_linux/${BUILD_TYPE}/mozc_renderer
|
||||
fi
|
||||
|
||||
insinto /usr/libexec/mozc/documents
|
||||
doins data/installer/credits_en.html
|
||||
|
||||
if use emacs; then
|
||||
dobin out_linux/${BUILD_TYPE}/mozc_emacs_helper
|
||||
elisp-install ${PN} unix/emacs/*.{el,elc}
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN}
|
||||
fi
|
||||
|
||||
if use fcitx4; then
|
||||
exeinto /usr/$(get_libdir)/fcitx
|
||||
doexe out_linux/${BUILD_TYPE}/fcitx-mozc.so
|
||||
|
||||
insinto /usr/share/fcitx/addon
|
||||
doins unix/fcitx/fcitx-mozc.conf
|
||||
|
||||
insinto /usr/share/fcitx/inputmethod
|
||||
doins unix/fcitx/mozc.conf
|
||||
|
||||
insinto /usr/share/fcitx/mozc/icon
|
||||
newins data/images/product_icon_32bpp-128.png mozc.png
|
||||
local image
|
||||
for image in data/images/unix/ui-*.png; do
|
||||
newins "${image}" "mozc-${image#data/images/unix/ui-}"
|
||||
done
|
||||
|
||||
local locale mo_file
|
||||
for mo_file in out_linux/${BUILD_TYPE}/gen/unix/fcitx/po/*.mo; do
|
||||
locale="${mo_file##*/}"
|
||||
locale="${locale%.mo}"
|
||||
insinto /usr/share/locale/${locale}/LC_MESSAGES
|
||||
newins "${mo_file}" fcitx-mozc.mo
|
||||
done
|
||||
fi
|
||||
|
||||
if use ibus; then
|
||||
exeinto /usr/libexec
|
||||
newexe out_linux/${BUILD_TYPE}/ibus_mozc ibus-engine-mozc
|
||||
|
||||
insinto /usr/share/ibus/component
|
||||
doins out_linux/${BUILD_TYPE}/gen/unix/ibus/mozc.xml
|
||||
|
||||
insinto /usr/share/ibus-mozc
|
||||
newins data/images/unix/ime_product_icon_opensource-32.png product_icon.png
|
||||
local image
|
||||
for image in data/images/unix/ui-*.png; do
|
||||
newins "${image}" "${image#data/images/unix/ui-}"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
|
||||
elog "USAGE IN EMACS"
|
||||
elog
|
||||
elog "mozc-mode is minor mode to input Japanese text using Mozc server."
|
||||
elog "mozc-mode can be used via LEIM (Library of Emacs Input Method)."
|
||||
elog
|
||||
elog "In order to use mozc-mode by default, the following settings should be added to"
|
||||
elog "Emacs init file (~/.emacs.d/init.el or ~/.emacs):"
|
||||
elog
|
||||
elog " (require 'mozc)"
|
||||
elog " (set-language-environment \"Japanese\")"
|
||||
elog " (setq default-input-method \"japanese-mozc\")"
|
||||
elog
|
||||
elog "With the above settings, typing C-\\ (which is bound to \"toggle-input-method\""
|
||||
elog "by default) will enable mozc-mode."
|
||||
elog
|
||||
elog "Alternatively, at run time, after loading mozc.el, mozc-mode can be activated by"
|
||||
elog "calling \"set-input-method\" and entering \"japanese-mozc\"."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -0,0 +1,309 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
PYTHON_COMPAT=(python2_7)
|
||||
|
||||
inherit elisp-common multiprocessing python-any-r1 toolchain-funcs
|
||||
|
||||
if [[ "${PV}" == "9999" ]]; then
|
||||
inherit git-r3
|
||||
|
||||
EGIT_REPO_URI="https://github.com/google/mozc"
|
||||
EGIT_SUBMODULES=(src/third_party/japanese_usage_dictionary)
|
||||
else
|
||||
MOZC_GIT_REVISION=""
|
||||
JAPANESE_USAGE_DICTIONARY_GIT_REVISION=""
|
||||
JAPANESE_USAGE_DICTIONARY_DATE=""
|
||||
fi
|
||||
|
||||
FCITX_PATCH_VERSION="2.18.2612.102.1"
|
||||
|
||||
DESCRIPTION="Mozc - Japanese input method editor"
|
||||
HOMEPAGE="https://github.com/google/mozc"
|
||||
if [[ "${PV}" == "9999" ]]; then
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="https://github.com/google/${PN}/archive/${MOZC_GIT_REVISION}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}.tar.gz -> japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz"
|
||||
fi
|
||||
SRC_URI+=" fcitx4? ( https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-${FCITX_PATCH_VERSION}.patch )"
|
||||
|
||||
# Mozc: BSD
|
||||
# src/data/dictionary_oss: ipadic, public-domain
|
||||
# src/data/unicode: unicode
|
||||
# japanese-usage-dictionary: BSD-2
|
||||
LICENSE="BSD BSD-2 ipadic public-domain unicode"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="debug emacs fcitx4 +gui +handwriting-tegaki handwriting-tomoe ibus renderer test"
|
||||
REQUIRED_USE="|| ( emacs fcitx4 ibus ) gui? ( ^^ ( handwriting-tegaki handwriting-tomoe ) ) !gui? ( !handwriting-tegaki !handwriting-tomoe )"
|
||||
|
||||
RDEPEND="dev-libs/protobuf:=
|
||||
emacs? ( virtual/emacs )
|
||||
fcitx4? ( app-i18n/fcitx:4 )
|
||||
gui? (
|
||||
app-i18n/zinnia
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtwidgets:5
|
||||
handwriting-tegaki? ( app-i18n/tegaki-zinnia-japanese )
|
||||
handwriting-tomoe? ( app-i18n/zinnia-tomoe )
|
||||
)
|
||||
ibus? (
|
||||
>=app-i18n/ibus-1.4.1
|
||||
dev-libs/glib:2
|
||||
x11-libs/libxcb
|
||||
)
|
||||
renderer? (
|
||||
dev-libs/glib:2
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/pango
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
dev-util/gyp
|
||||
dev-util/ninja
|
||||
virtual/pkgconfig
|
||||
test? (
|
||||
>=dev-cpp/gtest-1.8.0
|
||||
dev-libs/jsoncpp
|
||||
)"
|
||||
|
||||
S="${WORKDIR}/${P}/src"
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
execute() {
|
||||
einfo "$@"
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ "${PV}" == "9999" ]]; then
|
||||
git-r3_src_unpack
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
mv mozc-${MOZC_GIT_REVISION} ${P} || die
|
||||
|
||||
unpack japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_DATE}.tar.gz
|
||||
cp -p japanese-usage-dictionary-${JAPANESE_USAGE_DICTIONARY_GIT_REVISION}/usage_dict.txt ${P}/src/third_party/japanese_usage_dictionary || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-system_libraries.patch"
|
||||
eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_build.patch"
|
||||
eapply -p2 "${FILESDIR}/${PN}-2.20.2673.102-tests_skipping.patch"
|
||||
|
||||
if use fcitx4; then
|
||||
eapply -p2 "${DISTDIR}/fcitx-mozc-${FCITX_PATCH_VERSION}.patch"
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
sed \
|
||||
-e "s/def GypMain(options, unused_args):/def GypMain(options, gyp_args):/" \
|
||||
-e "s/RunOrDie(gyp_command + gyp_options)/RunOrDie(gyp_command + gyp_options + gyp_args)/" \
|
||||
-e "s/RunOrDie(\[ninja/&, '-j$(makeopts_jobs)', '-l$(makeopts_loadavg "${MAKEOPTS}" 0)', '-v'/" \
|
||||
-i build_mozc.py || die
|
||||
|
||||
sed \
|
||||
-e "s/'release_extra_cflags%': \['-O2'\]/'release_extra_cflags%': []/" \
|
||||
-e "s/'debug_extra_cflags%': \['-O0', '-g'\]/'debug_extra_cflags%': []/" \
|
||||
-i gyp/common.gypi || die
|
||||
|
||||
local ar=($(tc-getAR))
|
||||
local cc=($(tc-getCC))
|
||||
local cxx=($(tc-getCXX))
|
||||
local ld=($(tc-getLD))
|
||||
local nm=($(tc-getNM))
|
||||
local readelf=($(tc-getPROG READELF readelf))
|
||||
|
||||
# Use absolute paths. Non-absolute paths are mishandled by GYP.
|
||||
ar[0]=$(type -P ${ar[0]})
|
||||
cc[0]=$(type -P ${cc[0]})
|
||||
cxx[0]=$(type -P ${cxx[0]})
|
||||
ld[0]=$(type -P ${ld[0]})
|
||||
nm[0]=$(type -P ${nm[0]})
|
||||
readelf[0]=$(type -P ${readelf[0]})
|
||||
|
||||
sed \
|
||||
-e "s:<!(which ar):${ar[@]}:" \
|
||||
-e "s:<!(which clang):${cc[@]}:" \
|
||||
-e "s:<!(which clang++):${cxx[@]}:" \
|
||||
-e "s:<!(which ld):${ld[@]}:" \
|
||||
-e "s:<!(which nm):${nm[@]}:" \
|
||||
-e "s:<!(which readelf):${readelf[@]}:" \
|
||||
-i gyp/common.gypi || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use debug; then
|
||||
BUILD_TYPE="Debug"
|
||||
else
|
||||
BUILD_TYPE="Release"
|
||||
fi
|
||||
|
||||
local gyp_arguments=()
|
||||
|
||||
if tc-is-gcc; then
|
||||
gyp_arguments+=(-D compiler_host=gcc -D compiler_target=gcc)
|
||||
elif tc-is-clang; then
|
||||
gyp_arguments+=(-D compiler_host=clang -D compiler_target=clang)
|
||||
else
|
||||
gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown)
|
||||
fi
|
||||
|
||||
gyp_arguments+=(-D use_libibus=$(usex ibus 1 0))
|
||||
gyp_arguments+=(-D use_libprotobuf=1)
|
||||
gyp_arguments+=(-D use_libzinnia=1)
|
||||
gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0))
|
||||
|
||||
gyp_arguments+=(-D server_dir="${EPREFIX}/usr/libexec/mozc")
|
||||
gyp_arguments+=(-D document_dir="${EPREFIX}/usr/libexec/mozc/documents")
|
||||
|
||||
if use handwriting-tegaki; then
|
||||
gyp_arguments+=(-D zinnia_model_file="${EPREFIX}/usr/share/tegaki/models/zinnia/handwriting-ja.model")
|
||||
elif use handwriting-tomoe; then
|
||||
gyp_arguments+=(-D zinnia_model_file="${EPREFIX}/usr/$(get_libdir)/zinnia/model/tomoe/handwriting-ja.model")
|
||||
fi
|
||||
|
||||
if use ibus; then
|
||||
gyp_arguments+=(-D ibus_mozc_path="${EPREFIX}/usr/libexec/ibus-engine-mozc")
|
||||
gyp_arguments+=(-D ibus_mozc_icon_path="${EPREFIX}/usr/share/ibus-mozc/product_icon.png")
|
||||
fi
|
||||
|
||||
unset AR CC CXX LD NM READELF
|
||||
|
||||
execute "${PYTHON}" build_mozc.py gyp \
|
||||
--gypdir="${EPREFIX}/usr/bin" \
|
||||
--server_dir="${EPREFIX}/usr/libexec/mozc" \
|
||||
--verbose \
|
||||
$(usex gui "" --noqt) \
|
||||
-- "${gyp_arguments[@]}" || die "Configuration failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local targets=(server/server.gyp:mozc_server)
|
||||
if use emacs; then
|
||||
targets+=(unix/emacs/emacs.gyp:mozc_emacs_helper)
|
||||
fi
|
||||
if use fcitx4; then
|
||||
targets+=(unix/fcitx/fcitx.gyp:fcitx-mozc)
|
||||
fi
|
||||
if use gui; then
|
||||
targets+=(gui/gui.gyp:mozc_tool)
|
||||
fi
|
||||
if use ibus; then
|
||||
targets+=(unix/ibus/ibus.gyp:ibus_mozc)
|
||||
fi
|
||||
if use renderer; then
|
||||
targets+=(renderer/renderer.gyp:mozc_renderer)
|
||||
fi
|
||||
if use test; then
|
||||
targets+=(gyp/tests.gyp:unittests)
|
||||
fi
|
||||
|
||||
execute "${PYTHON}" build_mozc.py build -c ${BUILD_TYPE} -v "${targets[@]}" || die "Building failed"
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile unix/emacs/*.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
execute "${PYTHON}" build_mozc.py runtests -c ${BUILD_TYPE} --test_jobs 1 || die "Testing failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto /usr/libexec/mozc
|
||||
doexe out_linux/${BUILD_TYPE}/mozc_server
|
||||
|
||||
if use gui; then
|
||||
doexe out_linux/${BUILD_TYPE}/mozc_tool
|
||||
fi
|
||||
|
||||
if use renderer; then
|
||||
doexe out_linux/${BUILD_TYPE}/mozc_renderer
|
||||
fi
|
||||
|
||||
insinto /usr/libexec/mozc/documents
|
||||
doins data/installer/credits_en.html
|
||||
|
||||
if use emacs; then
|
||||
dobin out_linux/${BUILD_TYPE}/mozc_emacs_helper
|
||||
elisp-install ${PN} unix/emacs/*.{el,elc}
|
||||
elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${PN}
|
||||
fi
|
||||
|
||||
if use fcitx4; then
|
||||
exeinto /usr/$(get_libdir)/fcitx
|
||||
doexe out_linux/${BUILD_TYPE}/fcitx-mozc.so
|
||||
|
||||
insinto /usr/share/fcitx/addon
|
||||
doins unix/fcitx/fcitx-mozc.conf
|
||||
|
||||
insinto /usr/share/fcitx/inputmethod
|
||||
doins unix/fcitx/mozc.conf
|
||||
|
||||
insinto /usr/share/fcitx/mozc/icon
|
||||
newins data/images/product_icon_32bpp-128.png mozc.png
|
||||
local image
|
||||
for image in data/images/unix/ui-*.png; do
|
||||
newins "${image}" "mozc-${image#data/images/unix/ui-}"
|
||||
done
|
||||
|
||||
local locale mo_file
|
||||
for mo_file in out_linux/${BUILD_TYPE}/gen/unix/fcitx/po/*.mo; do
|
||||
locale="${mo_file##*/}"
|
||||
locale="${locale%.mo}"
|
||||
insinto /usr/share/locale/${locale}/LC_MESSAGES
|
||||
newins "${mo_file}" fcitx-mozc.mo
|
||||
done
|
||||
fi
|
||||
|
||||
if use ibus; then
|
||||
exeinto /usr/libexec
|
||||
newexe out_linux/${BUILD_TYPE}/ibus_mozc ibus-engine-mozc
|
||||
|
||||
insinto /usr/share/ibus/component
|
||||
doins out_linux/${BUILD_TYPE}/gen/unix/ibus/mozc.xml
|
||||
|
||||
insinto /usr/share/ibus-mozc
|
||||
newins data/images/unix/ime_product_icon_opensource-32.png product_icon.png
|
||||
local image
|
||||
for image in data/images/unix/ui-*.png; do
|
||||
newins "${image}" "${image#data/images/unix/ui-}"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use emacs; then
|
||||
elisp-site-regen
|
||||
|
||||
elog "USAGE IN EMACS"
|
||||
elog
|
||||
elog "mozc-mode is minor mode to input Japanese text using Mozc server."
|
||||
elog "mozc-mode can be used via LEIM (Library of Emacs Input Method)."
|
||||
elog
|
||||
elog "In order to use mozc-mode by default, the following settings should be added to"
|
||||
elog "Emacs init file (~/.emacs.d/init.el or ~/.emacs):"
|
||||
elog
|
||||
elog " (require 'mozc)"
|
||||
elog " (set-language-environment \"Japanese\")"
|
||||
elog " (setq default-input-method \"japanese-mozc\")"
|
||||
elog
|
||||
elog "With the above settings, typing C-\\ (which is bound to \"toggle-input-method\""
|
||||
elog "by default) will enable mozc-mode."
|
||||
elog
|
||||
elog "Alternatively, at run time, after loading mozc.el, mozc-mode can be activated by"
|
||||
elog "calling \"set-input-method\" and entering \"japanese-mozc\"."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST goldendict-1.0.1-src.tar.bz2 2705932 SHA256 b3fb0405a5edb38f02ef881b48c36e46e2eacf641b0caf8d99403f595a4be9a6 SHA512 6c35f804063e14ffc9fe9fbd86e710582c550d10fcabb83e7fb0f65ccad1e18eaa31578a96f0aea67276453239b8035f5a694c7d081f9a6f7a822d2b75ebce55 WHIRLPOOL f642692c5ac921d031e89a4512ac63eb665d5b3d02f2a4aea911566131188f877c173d4624eef073e3580e30d8291c1f0196d870738daf2be469783838305c4c
|
||||
DIST goldendict-1.5.0_rc2.tar.gz 19413751 SHA256 bccee0a3d3902f8fa31e439e220a405065fff774e5f8c581be2b0743d3f83fde SHA512 b88067a90df42b07d926231f624be8796f031b872443a45f9744ceeea27f39325bc665090f773528a26ad8391ae2423a29c602068bf2cc4ed5870a07646d2362 WHIRLPOOL f385a8536360b9401a67284d95be65d98d5f6b57d5af73852f5ec1af95c4ce36c9903e9ed04dbd67e7bf035b5b6745378344cc5efbb4923ce4ea31988f95f6ff
|
||||
|
@ -1,66 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
PLOCALES="ar_SA bg_BG cs_CZ de_DE el_GR it_IT lt_LT ru_RU uk_UA vi_VN zh_CN"
|
||||
|
||||
inherit l10n qt4-r2
|
||||
|
||||
DESCRIPTION="Feature-rich dictionary lookup program"
|
||||
HOMEPAGE="http://goldendict.org/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="debug"
|
||||
|
||||
RDEPEND="
|
||||
>=app-text/hunspell-1.2
|
||||
media-libs/libogg
|
||||
media-libs/libvorbis
|
||||
media-libs/phonon[qt4]
|
||||
sys-libs/zlib
|
||||
x11-libs/libX11
|
||||
x11-libs/libXtst
|
||||
>=dev-qt/qtcore-4.5:4[exceptions,qt3support]
|
||||
>=dev-qt/qtgui-4.5:4[exceptions,qt3support]
|
||||
>=dev-qt/qtwebkit-4.5:4[exceptions]
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-gcc-4.7.patch" )
|
||||
|
||||
src_prepare() {
|
||||
qt4-r2_src_prepare
|
||||
|
||||
l10n_for_each_disabled_locale_do editpro
|
||||
|
||||
# do not install duplicates
|
||||
sed -e '/[icon,desktop]s2/d' -i ${PN}.pro || die
|
||||
|
||||
# fix desktop file
|
||||
sed -e '/^Categories=/s/;Applications$/;/' -i redist/${PN}.desktop || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
PREFIX="${EPREFIX}"/usr eqmake4
|
||||
}
|
||||
|
||||
src_install() {
|
||||
qt4-r2_src_install
|
||||
l10n_for_each_locale_do insqm
|
||||
}
|
||||
|
||||
editpro() {
|
||||
sed -e "s;locale/${1}.ts;;" -i ${PN}.pro || die
|
||||
}
|
||||
|
||||
insqm() {
|
||||
insinto /usr/share/apps/${PN}/locale
|
||||
doins locale/${1}.qm
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue