diff options
| author | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-01-17 23:35:33 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-01-17 23:35:33 +0000 |
| commit | 8e8120eabdd28020aa69c7a60505cce2edd20adc (patch) | |
| tree | 061bf0acdc672720e0bc3a2d575f67d25aedb2d8 /app-i18n | |
| parent | c16790af2c9b4cbc38e565d4311252193ff85484 (diff) | |
| download | baldeagleos-repo-21.1.2.tar.gz baldeagleos-repo-21.1.2.tar.xz baldeagleos-repo-21.1.2.zip | |
Updating liguros repo21.1.2
Diffstat (limited to 'app-i18n')
57 files changed, 2700 insertions, 279 deletions
diff --git a/app-i18n/canna/canna-3.7_p3-r1.ebuild b/app-i18n/canna/canna-3.7_p3-r1.ebuild index c940523c1714..b94786fa20a9 100644 --- a/app-i18n/canna/canna-3.7_p3-r1.ebuild +++ b/app-i18n/canna/canna-3.7_p3-r1.ebuild @@ -13,7 +13,7 @@ SRC_URI="mirror://sourceforge.jp/canna/9565/${MY_P}.tar.bz2" LICENSE="MIT GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm64 hppa ~ia64 ppc ppc64 sparc x86" +KEYWORDS="~alpha amd64 arm64 ~hppa ~ia64 ppc ppc64 sparc x86" IUSE="" DEPEND="x11-misc/gccmakedep diff --git a/app-i18n/enca/enca-1.19-r2.ebuild b/app-i18n/enca/enca-1.19-r2.ebuild index b810849245fc..631cb8be1eec 100644 --- a/app-i18n/enca/enca-1.19-r2.ebuild +++ b/app-i18n/enca/enca-1.19-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -11,7 +11,7 @@ SRC_URI="https://dl.cihar.com/${PN}/${P}.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris" IUSE="doc +iconv recode static-libs" RDEPEND=" diff --git a/app-i18n/enca/enca-1.19-r3.ebuild b/app-i18n/enca/enca-1.19-r3.ebuild new file mode 100644 index 000000000000..a818121498e4 --- /dev/null +++ b/app-i18n/enca/enca-1.19-r3.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools toolchain-funcs + +DESCRIPTION="Detect and convert encoding of text files" +HOMEPAGE="https://cihar.com/software/enca/" +SRC_URI="https://dl.cihar.com/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris" +IUSE="doc +iconv recode" + +BDEPEND="doc? ( dev-util/gtk-doc )" +RDEPEND=" + iconv? ( virtual/libiconv ) + recode? ( app-text/recode:= ) +" +DEPEND=" + ${RDEPEND} + sys-devel/gettext +" + +pkg_pretend() { + if tc-is-cross-compiler && use iconv; then + die "${PN} can't be cross built with iconv USE enabled. See Gentoo bug 593220." + fi +} + +src_prepare() { + default + + # Disable unconditional documentation build. + sed -i -e '/SUBDIRS/s/ devel-docs//g' Makefile.am || die + + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-external + --disable-static + $(use_enable doc gtk-doc) + $(use_with iconv libiconv-prefix "${EPREFIX}/usr") + $(use_with recode librecode "${EPREFIX}/usr") + ) + + # Workaround automagic virtual/libiconv dependency. + use iconv || export am_cv_func_iconv=no + + econf "${myeconfargs[@]}" +} + +src_compile() { + # Workaround cross compilation issues. See Gentoo bug 424473. + tc-is-cross-compiler && tc-env_build emake -e -C tools + + emake + use doc && emake -C devel-docs docs +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake -C devel-docs DESTDIR="${D}" install + + find "${ED}" -name '*.la' -delete || die +} diff --git a/app-i18n/enca/metadata.xml b/app-i18n/enca/metadata.xml index 444eb3f185f1..f238a6872400 100644 --- a/app-i18n/enca/metadata.xml +++ b/app-i18n/enca/metadata.xml @@ -1,10 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>maksbotan@gentoo.org</email> - <name>Maxim Koltsov</name> - </maintainer> + <!-- maintainer-needed --> <upstream> <remote-id type="github">nijel/enca</remote-id> </upstream> diff --git a/app-i18n/fcitx/fcitx-4.2.9.8.ebuild b/app-i18n/fcitx/fcitx-4.2.9.8.ebuild index b2c346af0251..d60ef0326480 100644 --- a/app-i18n/fcitx/fcitx-4.2.9.8.ebuild +++ b/app-i18n/fcitx/fcitx-4.2.9.8.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="7" -LUA_COMPAT=(lua{5-1,5-2,5-3,5-4}) +LUA_COMPAT=( lua5-{1..4} luajit ) inherit cmake gnome2-utils lua-single xdg-utils diff --git a/app-i18n/fcitx/fcitx-4.9999.ebuild b/app-i18n/fcitx/fcitx-4.9999.ebuild index 76f6bdd6c634..d09120d55d37 100644 --- a/app-i18n/fcitx/fcitx-4.9999.ebuild +++ b/app-i18n/fcitx/fcitx-4.9999.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="7" -LUA_COMPAT=(lua{5-1,5-2,5-3,5-4}) +LUA_COMPAT=( lua5-{1..4} luajit ) inherit cmake gnome2-utils lua-single xdg-utils diff --git a/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild b/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild index a5bd2a75eafc..f165c11b1255 100644 --- a/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild +++ b/app-i18n/freewnn/freewnn-1.1.1_alpha22.ebuild @@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge.jp/${PN}/59257/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm64 hppa ~ia64 ppc ppc64 sparc x86" +KEYWORDS="~alpha amd64 arm64 ~hppa ~ia64 ppc ppc64 sparc x86" IUSE="ipv6" S="${WORKDIR}/${MY_P}" diff --git a/app-i18n/ibus-libpinyin/ibus-libpinyin-1.11.92-r1.ebuild b/app-i18n/ibus-libpinyin/ibus-libpinyin-1.11.92-r1.ebuild index f9ceae0b592e..fc7d6e47170a 100644 --- a/app-i18n/ibus-libpinyin/ibus-libpinyin-1.11.92-r1.ebuild +++ b/app-i18n/ibus-libpinyin/ibus-libpinyin-1.11.92-r1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="7" -LUA_COMPAT=(lua{5-1,5-2,5-3}) +LUA_COMPAT=( lua5-{1..4} luajit ) PYTHON_COMPAT=( python3_{6,7,8,9,10} ) inherit autotools gnome2-utils lua-single python-single-r1 diff --git a/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild b/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild index 5b4df9406818..42c7379b6bb0 100644 --- a/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild +++ b/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -LUA_COMPAT=(lua5-1) +LUA_COMPAT=( lua5-{1..4} luajit ) PYTHON_COMPAT=( python3_{6,7,8,9,10} ) inherit autotools lua-single python-single-r1 diff --git a/app-i18n/ibus-rime/Manifest b/app-i18n/ibus-rime/Manifest index 7ed6b926e48f..a548f02baa01 100644 --- a/app-i18n/ibus-rime/Manifest +++ b/app-i18n/ibus-rime/Manifest @@ -1,3 +1 @@ -DIST ibus-rime-1.2.tar.gz 33396 BLAKE2B 39930ea31d40e622cd69d6f5a218729f460161dd9681e49bc35a1eb9b3875b6f5acbdaf36f7cf8200440bc27ed84a2f23ec1578b19a1fe6abbbc54c7078be11c SHA512 e1851781a6d069a79d04890b5b0aa2a706e611c08df3fcb99f883eeedd4dc4eefcac207f35b5cf1d856a41f0153ec3fbb040b4e6f610727384baa19b52a64155 -DIST ibus-rime-1.3.0.tar.gz 33930 BLAKE2B 14e086382d89c990ca9f07401b68dbe26d58da061a3e8154232809ff29d766b630dcd06723bb0a8e18ebd089a640b7ab6787f8c70a6405dfa82472c1abfe5d4e SHA512 f0991184805bfe19931e297779179661f98bdfea952e310b2d8618550002cfa5bb08df05d1c5e31b535ad9959a919fdc98fa771a90d4d82b9c50e2f592cb7dfd DIST ibus-rime-1.4.0.tar.gz 34176 BLAKE2B 69d0392adc78b2b8935f2239c4567d001d3636d0e8ff59aca0b04b3189751a3edd0350eea9e2262b3ae3e639dbd9715c157e44727cc48ba9521801161a1508f4 SHA512 3fc24f4ce390e27d37e41775e4c075c7465cd3e90a9ab61d13ec47c2ca1c2afaafb322f327e18be573aa254a43b8cf6426415500a5d817b835bf4e0615ab9145 diff --git a/app-i18n/ibus-rime/files/ibus-rime-1.4.0-fno-common.patch b/app-i18n/ibus-rime/files/ibus-rime-1.4.0-fno-common.patch new file mode 100644 index 000000000000..f935a18ef8c3 --- /dev/null +++ b/app-i18n/ibus-rime/files/ibus-rime-1.4.0-fno-common.patch @@ -0,0 +1,11 @@ +--- a/rime_settings.h ++++ b/rime_settings.h +@@ -20,7 +20,7 @@ struct IBusRimeSettings { + struct ColorSchemeDefinition* color_scheme; + }; + +-struct IBusRimeSettings g_ibus_rime_settings; ++extern struct IBusRimeSettings g_ibus_rime_settings; + + void + ibus_rime_load_settings(); diff --git a/app-i18n/ibus-rime/ibus-rime-1.2.ebuild b/app-i18n/ibus-rime/ibus-rime-1.2.ebuild deleted file mode 100644 index c8c71e6b73ad..000000000000 --- a/app-i18n/ibus-rime/ibus-rime-1.2.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="Chinese Rime Input Method Engine for IBus" -HOMEPAGE="https://rime.im/ https://github.com/rime/ibus-rime" -SRC_URI="http://dl.bintray.com/lotem/rime/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -CDEPEND="app-i18n/ibus - app-i18n/librime - x11-libs/libnotify" -RDEPEND="${CDEPEND} - app-i18n/rime-data" -DEPEND="${CDEPEND} - dev-util/cmake - virtual/pkgconfig" -S="${WORKDIR}/${PN}" - -src_prepare() { - sed -i \ - -e "/^libexecdir/s:/lib:/libexec:" \ - -e "/^[[:space:]]*PREFIX/s:/usr:${EPREFIX}/usr:" \ - -e "s/ make/ \$(MAKE)/" \ - Makefile - sed -i "/exec>/s:/usr/lib:${EPREFIX}/usr/libexec:" rime.xml - - default -} diff --git a/app-i18n/ibus-rime/ibus-rime-1.3.0.ebuild b/app-i18n/ibus-rime/ibus-rime-1.3.0.ebuild deleted file mode 100644 index 5facdd653741..000000000000 --- a/app-i18n/ibus-rime/ibus-rime-1.3.0.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -DESCRIPTION="Chinese Rime Input Method Engine for IBus" -HOMEPAGE="https://rime.im/ https://github.com/rime/ibus-rime" -SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -CDEPEND="app-i18n/ibus - app-i18n/librime - x11-libs/libnotify" -RDEPEND="${CDEPEND} - app-i18n/rime-data" -DEPEND="${CDEPEND} - dev-util/cmake - virtual/pkgconfig" - -src_prepare() { - sed -i \ - -e "/^libexecdir/s:/lib:/libexec:" \ - -e "/^[[:space:]]*PREFIX/s:/usr:${EPREFIX}/usr:" \ - -e "s/ make/ \$(MAKE)/" \ - Makefile - sed -i "/exec>/s:/usr/lib:${EPREFIX}/usr/libexec:" rime.xml - - default -} diff --git a/app-i18n/ibus-rime/ibus-rime-1.4.0.ebuild b/app-i18n/ibus-rime/ibus-rime-1.4.0.ebuild index c5d297d74fec..1a7bb058a4c0 100644 --- a/app-i18n/ibus-rime/ibus-rime-1.4.0.ebuild +++ b/app-i18n/ibus-rime/ibus-rime-1.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,24 +10,25 @@ SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="" -CDEPEND="app-i18n/ibus +RDEPEND=" + app-i18n/ibus app-i18n/librime + app-i18n/rime-data x11-libs/libnotify" -RDEPEND="${CDEPEND} - app-i18n/rime-data" -DEPEND="${CDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" dev-util/cmake virtual/pkgconfig" +PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) + src_prepare() { sed -i \ -e "/^libexecdir/s:/lib:/libexec:" \ -e "/^[[:space:]]*PREFIX/s:/usr:${EPREFIX}/usr:" \ - -e "s/ make/ \$(MAKE)/" \ - Makefile - sed -i "/exec>/s:/usr/lib:${EPREFIX}/usr/libexec:" rime.xml + -e "s/ make/ \$(MAKE)/" Makefile || die + sed -i -e "/exec>/s:/usr/lib:${EPREFIX}/usr/libexec:" rime.xml || die default } diff --git a/app-i18n/ibus-typing-booster/Manifest b/app-i18n/ibus-typing-booster/Manifest index 6754bdb51a04..2feabea9c749 100644 --- a/app-i18n/ibus-typing-booster/Manifest +++ b/app-i18n/ibus-typing-booster/Manifest @@ -1,2 +1,2 @@ DIST ibus-typing-booster-2.10.1.tar.gz 9449495 BLAKE2B 36e52d3e6349a89a1202429f7068221dc75dc0072d9e49424cf410ab12c2e732b9ea9fc54a2bbbfe386f2687535b9e0d46e5567f1572c42cf7fe98243c234a38 SHA512 d4262d7bec0b65919f5d25c97b319a48808d1257ea0697163bcaae238870d57640ed8fb44d423abb844416e1c99c130b1d6d5813a0edfa849afc762929e61f66 -DIST ibus-typing-booster-2.9.7.tar.gz 8833452 BLAKE2B 4c4f33bcff2fa9e20afeccf242bec1a6e11fca0b5cb515b2c2dce7ef2401c092a7197a6637e2ca72d4c1bacd694860c07ae645a313e41cd879d6bde8c1736d12 SHA512 984beacdd6b853e074127372a912442ba1dbc536ecf194a34d03025277b9d6277e967e63a9bdcd1620f5094965a191297ccae9adbff2d54d1cd474437a1ec16b +DIST ibus-typing-booster-2.10.2.tar.gz 9433317 BLAKE2B 883639c6f6551b0e27e9ae45ba38320b465aeab9e43c6d848acff42fe74c670a6c0ea119256503267e5da7d94de2fbb8710b2d5c5de3a169aff095e0aa3570de SHA512 168ff2528e9b57120936dc69b6d8f32d495508de7e5a0cec9782b1b108b4acca9ba42c9a2f680f2b56c4ec01eae805b22cc5ba34e1a59c449715f589be51c542 diff --git a/app-i18n/ibus-typing-booster/ibus-typing-booster-2.10.1.ebuild b/app-i18n/ibus-typing-booster/ibus-typing-booster-2.10.1.ebuild index 77bac65b8a9f..d4bc5e8a8fa0 100644 --- a/app-i18n/ibus-typing-booster/ibus-typing-booster-2.10.1.ebuild +++ b/app-i18n/ibus-typing-booster/ibus-typing-booster-2.10.1.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://github.com/mike-fabian/${PN}/releases/download/${PV}/${P}.tar.g LICENSE="GPL-3+" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="" RESTRICT="test" REQUIRED_USE="${PYTHON_REQUIRED_USE}" diff --git a/app-i18n/ibus-typing-booster/ibus-typing-booster-2.9.7.ebuild b/app-i18n/ibus-typing-booster/ibus-typing-booster-2.10.2.ebuild index d4bc5e8a8fa0..77bac65b8a9f 100644 --- a/app-i18n/ibus-typing-booster/ibus-typing-booster-2.9.7.ebuild +++ b/app-i18n/ibus-typing-booster/ibus-typing-booster-2.10.2.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://github.com/mike-fabian/${PN}/releases/download/${PV}/${P}.tar.g LICENSE="GPL-3+" SLOT="0" -KEYWORDS="amd64 x86" +KEYWORDS="~amd64 ~x86" IUSE="" RESTRICT="test" REQUIRED_USE="${PYTHON_REQUIRED_USE}" diff --git a/app-i18n/imsettings/files/imsettings-1.7.2-fno-common.patch b/app-i18n/imsettings/files/imsettings-1.7.2-fno-common.patch new file mode 100644 index 000000000000..0845bd31820a --- /dev/null +++ b/app-i18n/imsettings/files/imsettings-1.7.2-fno-common.patch @@ -0,0 +1,11 @@ +--- a/imsettings-daemon/imsettings-server.c ++++ b/imsettings-daemon/imsettings-server.c +@@ -93,7 +93,7 @@ GDBusInterfaceVTable __iface_vtable = { + NULL, + NULL, + }; +-guint signals[LAST_SIGNAL]; ++extern guint signals[LAST_SIGNAL]; + + G_DEFINE_TYPE (IMSettingsServer, imsettings_server, G_TYPE_OBJECT); + G_LOCK_DEFINE_STATIC (logger); diff --git a/app-i18n/imsettings/imsettings-1.7.2.ebuild b/app-i18n/imsettings/imsettings-1.7.2.ebuild index f2f473de2fa8..789cc72bb3e2 100644 --- a/app-i18n/imsettings/imsettings-1.7.2.ebuild +++ b/app-i18n/imsettings/imsettings-1.7.2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 -inherit autotools xdg-utils +inherit autotools DESCRIPTION="Delivery framework for general Input Method configuration" HOMEPAGE="https://tagoh.bitbucket.io/imsettings" @@ -12,7 +12,7 @@ SRC_URI="https://bitbucket.org/tagoh/${PN}/downloads/${P}.tar.bz2" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="amd64 ~x86" -IUSE="gconf gtk2 qt5 +introspection static-libs xfconf" +IUSE="gconf gtk2 qt5 +introspection xfconf" RESTRICT="test" RDEPEND="dev-libs/glib:2 @@ -26,7 +26,8 @@ RDEPEND="dev-libs/glib:2 !gtk2? ( x11-libs/gtk+:3 ) introspection? ( dev-libs/gobject-introspection ) xfconf? ( xfce-base/xfconf )" -DEPEND="${RDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" dev-util/glib-utils dev-util/intltool sys-devel/autoconf-archive @@ -35,6 +36,8 @@ DEPEND="${RDEPEND} MY_XINPUTSH="90-xinput" +PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) + src_prepare() { sed -i \ -e "/PKG_CHECK_MODULES/s/\(gconf-2\.0\)/$(usex gconf '\1' _)/" \ @@ -49,18 +52,17 @@ src_prepare() { default eautoreconf - xdg_environment_reset } src_configure() { econf \ - $(use_enable static-libs static) \ + --disable-static \ --with-xinputsh=${MY_XINPUTSH} } src_install() { default - find "${D}" -name '*.la' -delete || die + find "${ED}" -name '*.la' -delete || die fperms 0755 /etc/X11/xinit/xinitrc.d/${MY_XINPUTSH} } diff --git a/app-i18n/kakasi/kakasi-2.3.4-r2.ebuild b/app-i18n/kakasi/kakasi-2.3.4-r2.ebuild index f84d64c42129..0a32f1d51f08 100644 --- a/app-i18n/kakasi/kakasi-2.3.4-r2.ebuild +++ b/app-i18n/kakasi/kakasi-2.3.4-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -11,7 +11,7 @@ SRC_URI="http://${PN}.namazu.org/stable/${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris" +KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris" IUSE="static-libs" DOCS=( AUTHORS ChangeLog {,O}NEWS README{,-ja} THANKS TODO doc/{ChangeLog.lib,JISYO,README.lib} ) diff --git a/app-i18n/kakasi/kakasi-2.3.6.ebuild b/app-i18n/kakasi/kakasi-2.3.6.ebuild index ab66a1207adc..afa28919e6b1 100644 --- a/app-i18n/kakasi/kakasi-2.3.6.ebuild +++ b/app-i18n/kakasi/kakasi-2.3.6.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -9,7 +9,7 @@ SRC_URI="http://${PN}.namazu.org/stable/${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris" IUSE="l10n_ja static-libs" DOCS=( AUTHORS ChangeLog {,O}NEWS README{,-ja} THANKS TODO doc/{ChangeLog.lib,JISYO,README.lib} ) diff --git a/app-i18n/librime-lua/Manifest b/app-i18n/librime-lua/Manifest new file mode 100644 index 000000000000..63cef86cfde2 --- /dev/null +++ b/app-i18n/librime-lua/Manifest @@ -0,0 +1 @@ +DIST librime-lua-20201011103348.tar.gz 21600 BLAKE2B f7046d1eb23391ca70543aa64c52092081cef51a69ac3a282f2f1392eaf760515186f063e9d469c5c41ac9f495ace814ab741a0821d1a635b9ad1f4faa7a3912 SHA512 2a3d3b49d53066fe96dd008e8064718082225e6bf185574a25b8e98175d9936abcfa1fdc56e48f9c72a2deb46f8157d6132fd119ff8e0a3d52fbe9e2ea21386c diff --git a/app-i18n/librime-lua/librime-lua-20201011103348.ebuild b/app-i18n/librime-lua/librime-lua-20201011103348.ebuild new file mode 100644 index 000000000000..afc57a1ca4e1 --- /dev/null +++ b/app-i18n/librime-lua/librime-lua-20201011103348.ebuild @@ -0,0 +1,53 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +LUA_COMPAT=( lua5-{1..4} luajit ) + +inherit cmake lua-single + +if [[ "${PV}" == "99999999999999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/hchunhui/librime-lua" +else + LIBRIME_LUA_GIT_REVISION="d45a41af2f9d731e3c1516a191cc3160e3cb8377" +fi + +DESCRIPTION="Lua support for RIME" +HOMEPAGE="https://github.com/hchunhui/librime-lua" +if [[ "${PV}" == "99999999999999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/hchunhui/${PN}/archive/${LIBRIME_LUA_GIT_REVISION}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +BDEPEND="" +RDEPEND=">=app-i18n/librime-1.6:0= + ${LUA_DEPS}" +DEPEND="${RDEPEND} + dev-libs/boost:0" + +if [[ "${PV}" != "99999999999999" ]]; then + S="${WORKDIR}/${PN}-${LIBRIME_LUA_GIT_REVISION}" +fi + +src_prepare() { + sed \ + -e "1icmake_minimum_required(VERSION 3.0)\nproject(${PN})\n" \ + -e "s/ PARENT_SCOPE//" \ + -e "\$a\\\n" \ + -e "\$aadd_library(\${plugin_modules} MODULE \${plugin_objs})" \ + -e "\$aset_target_properties(\${plugin_modules} PROPERTIES PREFIX \"\")" \ + -e "\$atarget_link_libraries(\${plugin_modules} rime \${plugin_deps})" \ + -e "\$ainstall(TARGETS \${plugin_modules} DESTINATION $(get_libdir)/rime-plugins)" \ + -i CMakeLists.txt || die + + cmake_src_prepare +} diff --git a/app-i18n/librime-lua/librime-lua-99999999999999.ebuild b/app-i18n/librime-lua/librime-lua-99999999999999.ebuild new file mode 100644 index 000000000000..b223e9247251 --- /dev/null +++ b/app-i18n/librime-lua/librime-lua-99999999999999.ebuild @@ -0,0 +1,53 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +LUA_COMPAT=( lua5-{1..4} luajit ) + +inherit cmake lua-single + +if [[ "${PV}" == "99999999999999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/hchunhui/librime-lua" +else + LIBRIME_LUA_GIT_REVISION="d45a41af2f9d731e3c1516a191cc3160e3cb8377" +fi + +DESCRIPTION="Lua support for RIME" +HOMEPAGE="https://github.com/hchunhui/librime-lua" +if [[ "${PV}" == "99999999999999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/hchunhui/${PN}/archive/${LIBRIME_LUA_GIT_REVISION}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD MIT" +SLOT="0" +KEYWORDS="" +IUSE="" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +BDEPEND="" +RDEPEND=">=app-i18n/librime-1.6:0= + ${LUA_DEPS}" +DEPEND="${RDEPEND} + dev-libs/boost:0" + +if [[ "${PV}" != "99999999999999" ]]; then + S="${WORKDIR}/${PN}-${LIBRIME_LUA_GIT_REVISION}" +fi + +src_prepare() { + sed \ + -e "1icmake_minimum_required(VERSION 3.0)\nproject(${PN})\n" \ + -e "s/ PARENT_SCOPE//" \ + -e "\$a\\\n" \ + -e "\$aadd_library(\${plugin_modules} MODULE \${plugin_objs})" \ + -e "\$aset_target_properties(\${plugin_modules} PROPERTIES PREFIX \"\")" \ + -e "\$atarget_link_libraries(\${plugin_modules} rime \${plugin_deps})" \ + -e "\$ainstall(TARGETS \${plugin_modules} DESTINATION $(get_libdir)/rime-plugins)" \ + -i CMakeLists.txt || die + + cmake_src_prepare +} diff --git a/app-i18n/librime-lua/metadata.xml b/app-i18n/librime-lua/metadata.xml new file mode 100644 index 000000000000..be5e189964f5 --- /dev/null +++ b/app-i18n/librime-lua/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>arfrever.fta@gmail.com</email> + <name>Arfrever Frehtes Taifersar Arahesis</name> + </maintainer> + <maintainer type="project"> + <email>cjk@gentoo.org</email> + <name>Cjk</name> + </maintainer> + <upstream> + <remote-id type="github">hchunhui/librime-lua</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-i18n/librime/Manifest b/app-i18n/librime/Manifest index 540a26bb8fe5..6dc19f5257a5 100644 --- a/app-i18n/librime/Manifest +++ b/app-i18n/librime/Manifest @@ -1 +1,3 @@ DIST librime-1.5.3.tar.gz 2847083 BLAKE2B 4ffb2c5ddaf52f9c9227fa4ea019ef2965e61139f678798c08ef37dc52b863763651b63ed820caad0de1b06f48ab5c1a7a2682653340d2ae7f5f9eec3cec80b2 SHA512 4d7f6ec43bd5728f59f0b3581bcd8a46128651430b6873017d80659942b8f6aa1a2f25f439ba8fba461fe22acbf701c2da7a786104a2e4852a70a89cdc0452d3 +DIST librime-1.6.0.tar.gz 2856645 BLAKE2B de6d843a5028f6b0308c3432ada7dd00c08a71e73fe799b157fd71a4054c757a00d3b0fdc7743d94d6e87b03f256e822ee29c16c86f96f5d24c7d864266c4f78 SHA512 4aeace0f1628293d4b607483ab976841093a1ff03df8bf63d545715af00254d1f0b1bdcd120795ea688d152287069881e0740372f40e2174a14ae6f53b7f950b +DIST librime-1.6.1.tar.gz 2856751 BLAKE2B c6b01342dcc9e8ee571cb14a36b851a50bf7b191211197421647ab05e6fa64c676f8936920870dcc335d06c635e354fed706832e41192bccd0a17aff02df1a43 SHA512 944361e9459662bb97b97ce9e2651acf0beb368b3769d1b9576cf4e5c2779302cae470fa39f5bc262cabb6a0e8590bcb77d32ffc87d7385b9465869fe7d5bcb3 diff --git a/app-i18n/librime/files/librime-1.6.0-plugins.patch b/app-i18n/librime/files/librime-1.6.0-plugins.patch new file mode 100644 index 000000000000..c79072f31cbb --- /dev/null +++ b/app-i18n/librime/files/librime-1.6.0-plugins.patch @@ -0,0 +1,247 @@ +https://github.com/rime/librime/issues/431 + +--- /CMakeLists.txt ++++ /CMakeLists.txt +@@ -11,6 +11,14 @@ + + include(GNUInstallDirs) + ++if(NOT DEFINED BIN_INSTALL_DIR) ++ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) ++endif() ++ ++if(NOT DEFINED LIB_INSTALL_DIR) ++ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) ++endif() ++ + option(BUILD_SHARED_LIBS "Build Rime as shared library" ON) + option(BUILD_MERGED_PLUGINS "Merge plugins into one Rime library" ON) + option(BUILD_STATIC "Build with dependencies as static libraries" OFF) +@@ -22,8 +30,11 @@ + option(BOOST_USE_CXX11 "Boost has been built with C++11 support" OFF) + option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON) + option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF) ++option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF) ++option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF) + +-set(rime_data_dir "/share/rime-data" CACHE STRING "Target directory for Rime data") ++set(RIME_DATA_DIR "share/rime-data" CACHE STRING "Target directory for Rime data") ++set(RIME_PLUGINS_DIR "${LIB_INSTALL_DIR}/rime-plugins" CACHE STRING "Target directory for externally built Rime plugins") + + if(WIN32) + set(ext ".exe") +@@ -61,7 +72,7 @@ + set(BOOST_COMPONENTS filesystem regex system) + + if(BOOST_USE_SIGNALS2) +- add_definitions("-DBOOST_SIGNALS2") ++ set(RIME_BOOST_SIGNALS2 1) + else() + set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals) + endif() +@@ -89,7 +100,7 @@ + add_definitions(-DGOOGLE_GLOG_DLL_DECL=) + endif() + +- add_definitions(-DRIME_ENABLE_LOGGING) ++ set(RIME_ENABLE_LOGGING 1) + + endif() + +@@ -134,6 +145,11 @@ + message(WARNING "X11/keysym.h not found.") + endif() + ++configure_file( ++ "${PROJECT_SOURCE_DIR}/src/rime/build_config.h.in" ++ "${PROJECT_BINARY_DIR}/src/rime/build_config.h") ++ ++include_directories(${PROJECT_BINARY_DIR}/src) + include_directories(${PROJECT_SOURCE_DIR}/src) + include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include) + link_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib) +@@ -154,14 +170,6 @@ + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + endif() + +-if(NOT DEFINED LIB_INSTALL_DIR) +- set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) +-endif() +- +-if(NOT DEFINED BIN_INSTALL_DIR) +- set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) +-endif() +- + # uninstall target + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" +@@ -175,7 +183,8 @@ + set(exec_prefix "${CMAKE_INSTALL_PREFIX}") + set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}") + set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}") +- set(pkgdatadir "${prefix}${rime_data_dir}") ++ set(pkgdatadir "${prefix}/${RIME_DATA_DIR}") ++ set(pluginsdir "${exec_prefix}/${RIME_PLUGINS_DIR}") + set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") + configure_file( + ${PROJECT_SOURCE_DIR}/rime.pc.in +@@ -189,11 +198,19 @@ + + file(GLOB rime_public_header_files ${PROJECT_SOURCE_DIR}/src/*.h) + install(FILES ${rime_public_header_files} DESTINATION include) ++if(INSTALL_PRIVATE_HEADERS) ++ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/*.h ${PROJECT_BINARY_DIR}/src/rime/*.h) ++ install(FILES ${rime_private_header_files} DESTINATION include/rime) ++ foreach(rime_private_header_files_dir algo config dict gear lever) ++ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/${rime_private_header_files_dir}/*.h) ++ install(FILES ${rime_private_header_files} DESTINATION include/rime/${rime_private_header_files_dir}) ++ endforeach() ++endif() + + if(BUILD_DATA) + file(GLOB rime_preset_data_files ${PROJECT_SOURCE_DIR}/data/preset/*.yaml) + install(FILES ${rime_preset_data_files} +- DESTINATION ${CMAKE_INSTALL_PREFIX}${rime_data_dir}) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/${RIME_DATA_DIR}) + endif() + + if(BUILD_SHARED_LIBS) +@@ -223,6 +240,11 @@ + set(rime_plugins_library rime-plugins) + endif() + ++add_definitions("-DRIME_PLUGINS_DIR=\"${CMAKE_INSTALL_PREFIX}/${RIME_PLUGINS_DIR}\"") ++if(ENABLE_EXTERNAL_PLUGINS) ++ add_definitions(-DRIME_ENABLE_EXTERNAL_PLUGINS) ++endif() ++ + add_subdirectory(src) + + if(BUILD_SHARED_LIBS) +--- /rime.pc.in ++++ /rime.pc.in +@@ -2,6 +2,8 @@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ ++pkgdatadir=@pkgdatadir@ ++pluginsdir=@pluginsdir@ + + Name: Rime + Description: Rime Input Method Engine +--- /src/CMakeLists.txt ++++ /src/CMakeLists.txt +@@ -36,6 +36,9 @@ + if(Gflags_FOUND) + set(rime_optional_deps ${rime_optional_deps} ${Gflags_LIBRARY}) + endif() ++if(ENABLE_EXTERNAL_PLUGINS) ++ set(rime_optional_deps ${rime_optional_deps} dl) ++endif() + + set(rime_core_deps + ${Boost_LIBRARIES} +--- /src/rime/build_config.h.in ++++ /src/rime/build_config.h.in +@@ -0,0 +1,11 @@ ++// ++// Copyright RIME Developers ++// Distributed under the BSD License ++// ++#ifndef RIME_BUILD_CONFIG_H_ ++#define RIME_BUILD_CONFIG_H_ ++ ++#cmakedefine RIME_BOOST_SIGNALS2 ++#cmakedefine RIME_ENABLE_LOGGING ++ ++#endif // RIME_BUILD_CONFIG_H_ +--- /src/rime/common.h ++++ /src/rime/common.h +@@ -7,6 +7,8 @@ + #ifndef RIME_COMMON_H_ + #define RIME_COMMON_H_ + ++#include <rime/build_config.h> ++ + #include <functional> + #include <list> + #include <map> +@@ -20,7 +22,7 @@ + #include <vector> + #include <boost/optional.hpp> + #define BOOST_BIND_NO_PLACEHOLDERS +-#ifdef BOOST_SIGNALS2 ++#ifdef RIME_BOOST_SIGNALS2 + #include <boost/signals2/connection.hpp> + #include <boost/signals2/signal.hpp> + #else +@@ -79,7 +81,7 @@ + return std::make_shared<T>(std::forward<Args>(args)...); + } + +-#ifdef BOOST_SIGNALS2 ++#ifdef RIME_BOOST_SIGNALS2 + using boost::signals2::connection; + using boost::signals2::signal; + #else +--- /src/rime/lever/deployment_tasks.cc ++++ /src/rime/lever/deployment_tasks.cc +@@ -4,6 +4,9 @@ + // + // 2011-12-10 GONG Chen <chen.sst@gmail.com> + // ++ ++#include <rime/build_config.h> ++ + #include <algorithm> + #include <boost/algorithm/string.hpp> + #include <boost/filesystem.hpp> +--- /src/rime/setup.cc ++++ /src/rime/setup.cc +@@ -5,6 +5,13 @@ + // 2011-10-02 GONG Chen <chen.sst@gmail.com> + // + ++#include <rime/build_config.h> ++ ++#ifdef RIME_ENABLE_EXTERNAL_PLUGINS ++#include <dlfcn.h> ++#include <glob.h> ++#endif // RIME_ENABLE_EXTERNAL_PLUGINS ++ + #ifdef RIME_ENABLE_LOGGING + #include <glog/logging.h> + #endif // RIME_ENABLE_LOGGING +@@ -33,6 +40,32 @@ + mm.LoadModule(module); + } + } ++ ++#ifdef RIME_ENABLE_EXTERNAL_PLUGINS ++ fs::path plugins_dir = fs::path(RIME_PLUGINS_DIR); ++ fs::path plugins_files = plugins_dir / "*.so"; ++ glob_t glob_buffer; ++ if (glob(plugins_files.string().c_str(), 0, NULL, &glob_buffer) == 0) { ++ for (size_t i = 0; i < glob_buffer.gl_pathc; i++) { ++ fs::path plugin_file(glob_buffer.gl_pathv[i]); ++ fs::path plugin_name = plugin_file.stem(); ++ fs::file_status plugin_file_status = fs::status(plugin_file); ++ if (fs::is_regular_file(plugin_file) && ++ plugin_file_status.permissions() & (fs::owner_exe | fs::group_exe | fs::others_exe)) { ++ void* handle = dlopen(plugin_file.string().c_str(), RTLD_LAZY); ++ if (handle) { ++ if (RimeModule* module = mm.Find(plugin_name.string())) { ++ mm.LoadModule(module); ++ } ++ } ++ else { ++ LOG(ERROR) << "dlopen error: " << dlerror(); ++ } ++ } ++ } ++ globfree(&glob_buffer); ++ } ++#endif + } + + // assume member is a non-null pointer in struct *p. diff --git a/app-i18n/librime/files/librime-1.6.1-plugins.patch b/app-i18n/librime/files/librime-1.6.1-plugins.patch new file mode 100644 index 000000000000..68099d618693 --- /dev/null +++ b/app-i18n/librime/files/librime-1.6.1-plugins.patch @@ -0,0 +1,247 @@ +https://github.com/rime/librime/issues/431 + +--- /CMakeLists.txt ++++ /CMakeLists.txt +@@ -11,6 +11,14 @@ + + include(GNUInstallDirs) + ++if(NOT DEFINED BIN_INSTALL_DIR) ++ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) ++endif() ++ ++if(NOT DEFINED LIB_INSTALL_DIR) ++ set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) ++endif() ++ + option(BUILD_SHARED_LIBS "Build Rime as shared library" ON) + option(BUILD_MERGED_PLUGINS "Merge plugins into one Rime library" ON) + option(BUILD_STATIC "Build with dependencies as static libraries" OFF) +@@ -22,8 +30,11 @@ + option(BOOST_USE_CXX11 "Boost has been built with C++11 support" OFF) + option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON) + option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF) ++option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF) ++option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF) + +-set(rime_data_dir "/share/rime-data" CACHE STRING "Target directory for Rime data") ++set(RIME_DATA_DIR "share/rime-data" CACHE STRING "Target directory for Rime data") ++set(RIME_PLUGINS_DIR "${LIB_INSTALL_DIR}/rime-plugins" CACHE STRING "Target directory for externally built Rime plugins") + + if(WIN32) + set(ext ".exe") +@@ -61,7 +72,7 @@ + set(BOOST_COMPONENTS filesystem regex system) + + if(BOOST_USE_SIGNALS2) +- add_definitions("-DBOOST_SIGNALS2") ++ set(RIME_BOOST_SIGNALS2 1) + else() + set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals) + endif() +@@ -89,7 +100,7 @@ + add_definitions(-DGOOGLE_GLOG_DLL_DECL=) + endif() + +- add_definitions(-DRIME_ENABLE_LOGGING) ++ set(RIME_ENABLE_LOGGING 1) + + endif() + +@@ -134,6 +145,11 @@ + message(WARNING "X11/keysym.h not found.") + endif() + ++configure_file( ++ "${PROJECT_SOURCE_DIR}/src/rime/build_config.h.in" ++ "${PROJECT_BINARY_DIR}/src/rime/build_config.h") ++ ++include_directories(${PROJECT_BINARY_DIR}/src) + include_directories(${PROJECT_SOURCE_DIR}/src) + include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include) + link_directories(${PROJECT_SOURCE_DIR}/thirdparty/lib) +@@ -154,14 +170,6 @@ + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + endif() + +-if(NOT DEFINED LIB_INSTALL_DIR) +- set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) +-endif() +- +-if(NOT DEFINED BIN_INSTALL_DIR) +- set(BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}) +-endif() +- + # uninstall target + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" +@@ -175,7 +183,8 @@ + set(exec_prefix "${CMAKE_INSTALL_PREFIX}") + set(bindir "${exec_prefix}/${BIN_INSTALL_DIR}") + set(libdir "${exec_prefix}/${LIB_INSTALL_DIR}") +- set(pkgdatadir "${prefix}${rime_data_dir}") ++ set(pkgdatadir "${prefix}/${RIME_DATA_DIR}") ++ set(pluginsdir "${exec_prefix}/${RIME_PLUGINS_DIR}") + set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") + configure_file( + ${PROJECT_SOURCE_DIR}/rime.pc.in +@@ -189,11 +198,19 @@ + + file(GLOB rime_public_header_files ${PROJECT_SOURCE_DIR}/src/*.h) + install(FILES ${rime_public_header_files} DESTINATION include) ++if(INSTALL_PRIVATE_HEADERS) ++ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/*.h ${PROJECT_BINARY_DIR}/src/rime/*.h) ++ install(FILES ${rime_private_header_files} DESTINATION include/rime) ++ foreach(rime_private_header_files_dir algo config dict gear lever) ++ file(GLOB rime_private_header_files ${PROJECT_SOURCE_DIR}/src/rime/${rime_private_header_files_dir}/*.h) ++ install(FILES ${rime_private_header_files} DESTINATION include/rime/${rime_private_header_files_dir}) ++ endforeach() ++endif() + + if(BUILD_DATA) + file(GLOB rime_preset_data_files ${PROJECT_SOURCE_DIR}/data/preset/*.yaml) + install(FILES ${rime_preset_data_files} +- DESTINATION ${CMAKE_INSTALL_PREFIX}${rime_data_dir}) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/${RIME_DATA_DIR}) + endif() + + if(BUILD_SHARED_LIBS) +@@ -223,6 +240,11 @@ + set(rime_plugins_library rime-plugins) + endif() + ++add_definitions("-DRIME_PLUGINS_DIR=\"${CMAKE_INSTALL_PREFIX}/${RIME_PLUGINS_DIR}\"") ++if(ENABLE_EXTERNAL_PLUGINS) ++ add_definitions(-DRIME_ENABLE_EXTERNAL_PLUGINS) ++endif() ++ + add_subdirectory(src) + + if(BUILD_SHARED_LIBS) +--- /rime.pc.in ++++ /rime.pc.in +@@ -2,6 +2,8 @@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ ++pkgdatadir=@pkgdatadir@ ++pluginsdir=@pluginsdir@ + + Name: Rime + Description: Rime Input Method Engine +--- /src/CMakeLists.txt ++++ /src/CMakeLists.txt +@@ -36,6 +36,9 @@ + if(Gflags_FOUND) + set(rime_optional_deps ${rime_optional_deps} ${Gflags_LIBRARY}) + endif() ++if(ENABLE_EXTERNAL_PLUGINS) ++ set(rime_optional_deps ${rime_optional_deps} dl) ++endif() + + set(rime_core_deps + ${Boost_LIBRARIES} +--- /src/rime/build_config.h.in ++++ /src/rime/build_config.h.in +@@ -0,0 +1,11 @@ ++// ++// Copyright RIME Developers ++// Distributed under the BSD License ++// ++#ifndef RIME_BUILD_CONFIG_H_ ++#define RIME_BUILD_CONFIG_H_ ++ ++#cmakedefine RIME_BOOST_SIGNALS2 ++#cmakedefine RIME_ENABLE_LOGGING ++ ++#endif // RIME_BUILD_CONFIG_H_ +--- /src/rime/common.h ++++ /src/rime/common.h +@@ -7,6 +7,8 @@ + #ifndef RIME_COMMON_H_ + #define RIME_COMMON_H_ + ++#include <rime/build_config.h> ++ + #include <functional> + #include <list> + #include <map> +@@ -20,7 +22,7 @@ + #include <vector> + #include <boost/optional.hpp> + #define BOOST_BIND_NO_PLACEHOLDERS +-#ifdef BOOST_SIGNALS2 ++#ifdef RIME_BOOST_SIGNALS2 + #include <boost/signals2/connection.hpp> + #include <boost/signals2/signal.hpp> + #else +@@ -79,7 +81,7 @@ + return std::make_shared<T>(std::forward<Args>(args)...); + } + +-#ifdef BOOST_SIGNALS2 ++#ifdef RIME_BOOST_SIGNALS2 + using boost::signals2::connection; + using boost::signals2::signal; + #else +--- /src/rime/lever/deployment_tasks.cc ++++ /src/rime/lever/deployment_tasks.cc +@@ -4,6 +4,9 @@ + // + // 2011-12-10 GONG Chen <chen.sst@gmail.com> + // ++ ++#include <rime/build_config.h> ++ + #include <algorithm> + #include <boost/algorithm/string.hpp> + #include <boost/filesystem.hpp> +--- /src/rime/setup.cc ++++ /src/rime/setup.cc +@@ -5,6 +5,13 @@ + // 2011-10-02 GONG Chen <chen.sst@gmail.com> + // + ++#include <rime/build_config.h> ++ ++#ifdef RIME_ENABLE_EXTERNAL_PLUGINS ++#include <dlfcn.h> ++#include <glob.h> ++#endif // RIME_ENABLE_EXTERNAL_PLUGINS ++ + #ifdef RIME_ENABLE_LOGGING + #include <glog/logging.h> + #endif // RIME_ENABLE_LOGGING +@@ -36,6 +43,32 @@ + mm.LoadModule(module); + } + } ++ ++#ifdef RIME_ENABLE_EXTERNAL_PLUGINS ++ fs::path plugins_dir = fs::path(RIME_PLUGINS_DIR); ++ fs::path plugins_files = plugins_dir / "*.so"; ++ glob_t glob_buffer; ++ if (glob(plugins_files.string().c_str(), 0, NULL, &glob_buffer) == 0) { ++ for (size_t i = 0; i < glob_buffer.gl_pathc; i++) { ++ fs::path plugin_file(glob_buffer.gl_pathv[i]); ++ fs::path plugin_name = plugin_file.stem(); ++ fs::file_status plugin_file_status = fs::status(plugin_file); ++ if (fs::is_regular_file(plugin_file) && ++ plugin_file_status.permissions() & (fs::owner_exe | fs::group_exe | fs::others_exe)) { ++ void* handle = dlopen(plugin_file.string().c_str(), RTLD_LAZY); ++ if (handle) { ++ if (RimeModule* module = mm.Find(plugin_name.string())) { ++ mm.LoadModule(module); ++ } ++ } ++ else { ++ LOG(ERROR) << "dlopen error: " << dlerror(); ++ } ++ } ++ } ++ globfree(&glob_buffer); ++ } ++#endif + } + + // assume member is a non-null pointer in struct *p. diff --git a/app-i18n/librime/librime-1.6.0.ebuild b/app-i18n/librime/librime-1.6.0.ebuild new file mode 100644 index 000000000000..eef1faa5bd5f --- /dev/null +++ b/app-i18n/librime/librime-1.6.0.ebuild @@ -0,0 +1,73 @@ +# Copyright 2012-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit cmake + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/rime/librime" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="RIME (Rime Input Method Engine) core library" +HOMEPAGE="https://rime.im/ https://github.com/rime/librime" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/1-${PV}" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug test" +RESTRICT="!test? ( test )" + +BDEPEND="dev-libs/capnproto:0" +RDEPEND="app-i18n/opencc:0= + >=dev-cpp/glog-0.3.5:0= + dev-cpp/yaml-cpp:0= + dev-libs/boost:0=[threads] + dev-libs/capnproto:0= + dev-libs/leveldb:0= + dev-libs/marisa:0=" +DEPEND="${RDEPEND} + dev-libs/darts + dev-libs/utfcpp + x11-base/xorg-proto + test? ( dev-cpp/gtest )" + +DOCS=(CHANGELOG.md README.md) + +src_prepare() { + eapply "${FILESDIR}/${PN}-1.6.0-plugins.patch" + + # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. + sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die + rm -r thirdparty || die + + cmake_src_prepare +} + +src_configure() { + local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" + + if use debug; then + CXXFLAGS+=" -DDCHECK_ALWAYS_ON" + else + CXXFLAGS+=" -DNDEBUG" + fi + + local mycmakeargs=( + -DBOOST_USE_CXX11=ON + -DBUILD_TEST=$(usex test ON OFF) + -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON + -DENABLE_EXTERNAL_PLUGINS=ON + -DINSTALL_PRIVATE_HEADERS=ON + ) + + cmake_src_configure +} diff --git a/app-i18n/librime/librime-1.6.1.ebuild b/app-i18n/librime/librime-1.6.1.ebuild new file mode 100644 index 000000000000..91cdfdf161d4 --- /dev/null +++ b/app-i18n/librime/librime-1.6.1.ebuild @@ -0,0 +1,73 @@ +# Copyright 2012-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit cmake + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/rime/librime" + EGIT_SUBMODULES=() +fi + +DESCRIPTION="RIME (Rime Input Method Engine) core library" +HOMEPAGE="https://rime.im/ https://github.com/rime/librime" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="BSD" +SLOT="0/1-${PV}" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug test" +RESTRICT="!test? ( test )" + +BDEPEND="dev-libs/capnproto:0" +RDEPEND="app-i18n/opencc:0= + >=dev-cpp/glog-0.3.5:0= + dev-cpp/yaml-cpp:0= + dev-libs/boost:0=[threads] + dev-libs/capnproto:0= + dev-libs/leveldb:0= + dev-libs/marisa:0=" +DEPEND="${RDEPEND} + dev-libs/darts + dev-libs/utfcpp + x11-base/xorg-proto + test? ( dev-cpp/gtest )" + +DOCS=(CHANGELOG.md README.md) + +src_prepare() { + eapply "${FILESDIR}/${PN}-1.6.1-plugins.patch" + + # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto. + sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die + rm -r thirdparty || die + + cmake_src_prepare +} + +src_configure() { + local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp" + + if use debug; then + CXXFLAGS+=" -DDCHECK_ALWAYS_ON" + else + CXXFLAGS+=" -DNDEBUG" + fi + + local mycmakeargs=( + -DBOOST_USE_CXX11=ON + -DBUILD_TEST=$(usex test ON OFF) + -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON + -DENABLE_EXTERNAL_PLUGINS=ON + -DINSTALL_PRIVATE_HEADERS=ON + ) + + cmake_src_configure +} diff --git a/app-i18n/librime/metadata.xml b/app-i18n/librime/metadata.xml index 8418d25a5953..c3da5f446e4d 100644 --- a/app-i18n/librime/metadata.xml +++ b/app-i18n/librime/metadata.xml @@ -1,23 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>dlan@gentoo.org</email> - <name>Yixun Lan</name> - </maintainer> - <maintainer type="project"> - <email>cjk@gentoo.org</email> - <name>Cjk</name> - </maintainer> - <use> - <flag name="debug">Enable debugging (including logging of input of RIME input methods)</flag> - </use> - <upstream> - <maintainer> - <email>chen.sst@gmail.com</email> - <name>Gong Chen</name> - </maintainer> - <remote-id type="github">rime/librime</remote-id> - </upstream> + <maintainer type="person"> + <email>arfrever.fta@gmail.com</email> + <name>Arfrever Frehtes Taifersar Arahesis</name> + </maintainer> + <maintainer type="person"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <maintainer type="project"> + <email>cjk@gentoo.org</email> + <name>Cjk</name> + </maintainer> + <use> + <flag name="debug">Enable debugging (including logging of input of RIME input methods)</flag> + </use> + <upstream> + <maintainer> + <email>chen.sst@gmail.com</email> + <name>弓辰 (Gōng Chén)</name> + </maintainer> + <remote-id type="github">rime/librime</remote-id> + </upstream> <origin>gentoo-staging</origin> </pkgmetadata> diff --git a/app-i18n/man-pages-ru/Manifest b/app-i18n/man-pages-ru/Manifest index 8eda79518d96..c309976de105 100644 --- a/app-i18n/man-pages-ru/Manifest +++ b/app-i18n/man-pages-ru/Manifest @@ -1,2 +1 @@ -DIST man-pages-ru_4.16-2383-2383-20180422.tar.bz2 1682388 BLAKE2B 3707d972313ca1f96c3d5be3f8f74dd3e88322f3e9504799d49fb57c06f99d62f0cb88d545c90c4b47795b9aee92d1f89d55c777b0970070120b1496be0b3426 SHA512 df358c917ba55360b86e075097316c2eeb29eb9f9938ad7ee1ae6679690f1d736f448cee36643f2645c40a964274e1a3d0948f91ec0f99d81b4a29009704f009 DIST man-pages-ru_5.03-2390-2390-20191017.tar.bz2 1725818 BLAKE2B 8ab0e5e6c0b7a0bda8e80e99202a9de38298a743ea7b356abb7f50840f222c5ef5397c96e490bfb1b37858fbaf50704e38cae7b2df5f81e0890efd7f73d3a909 SHA512 959ea5f206674b1bfbdac944a391a8d183b02d67ac26a9f33abb11637157cff6c60fd89f87669e2561eaa1c6c0bc2565deceb6f7e72e381d202a93773251fe7d diff --git a/app-i18n/man-pages-ru/man-pages-ru-4.16.2383.2383.20180422.ebuild b/app-i18n/man-pages-ru/man-pages-ru-4.16.2383.2383.20180422.ebuild deleted file mode 100644 index 168736f7ca57..000000000000 --- a/app-i18n/man-pages-ru/man-pages-ru-4.16.2383.2383.20180422.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit versionator - -MY_PV="$(replace_version_separator 1 . $(replace_all_version_separators -))" - -DESCRIPTION="A collection of Russian translations of Linux manual pages" -HOMEPAGE="https://sourceforge.net/projects/man-pages-ru/" -SRC_URI="mirror://sourceforge/${PN}/${PN}_${MY_PV}.tar.bz2" - -LICENSE="FDL-1.3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux" - -DEPEND="" -RDEPEND="virtual/man" - -S="${WORKDIR}/${PN}_${MY_PV}" - -src_install() { - insinto /usr/share/man/ru - doins -r man* - dodoc README -} diff --git a/app-i18n/man-pages-ru/man-pages-ru-5.03.2390.2390.20191017.ebuild b/app-i18n/man-pages-ru/man-pages-ru-5.03.2390.2390.20191017.ebuild index 5488486c6593..639dccdb2973 100644 --- a/app-i18n/man-pages-ru/man-pages-ru-5.03.2390.2390.20191017.ebuild +++ b/app-i18n/man-pages-ru/man-pages-ru-5.03.2390.2390.20191017.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,7 +11,7 @@ SRC_URI="https://download.sourceforge.net/${PN}/source-tar/${PN}_${MY_PV}.tar.bz LICENSE="FDL-1.3" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux" RDEPEND="virtual/man" diff --git a/app-i18n/mozc/Manifest b/app-i18n/mozc/Manifest index 72d8dc73f386..c9793aee241a 100644 --- a/app-i18n/mozc/Manifest +++ b/app-i18n/mozc/Manifest @@ -1,4 +1,7 @@ DIST fcitx-mozc-2.23.2815.102.1.patch 295112 BLAKE2B 709b84f6eaed16da38a173f40ae7cccff362fd167e6deb4090ae8a9ec522ac8e11ccff3c9ef6433907249af8c9eb4b7be12d2c05564cabd45c25e26764286ed3 SHA512 e0d4645df919838f0fe31a97bf6dd759c222a696f68133f7584d2c771f70734ea634a25bebb03a756221000d3552423207ee5163d75778dbf480b6e267ba4cd0 +DIST fcitx-mozc-2.26.4220-20201219202429.tar.gz 37174759 BLAKE2B 3f320523103ee7a35a763f6613889e282e8a654db8ef11b5a1168db12611387e300621f015977875ffec3c10c055e36b3cb525a1e8559013f3ac42bc5b0cc296 SHA512 823e64267aa69e4d30dd7408f946a54072994f9a2d68691a3d393b216a15e70fd28bcb24705f9d9f483a2291517c48c5a1aeda893d2315f9a1d9cd352fb3feb2 DIST japanese-usage-dictionary-20120416091336.tar.gz 71051 BLAKE2B 08eecf0aa021e27a2813f58c2d37f1cec760448f6ae086ae7468b8a11575c6ef9f72f656cb4d53e0179b8a7b00f2d91ff51a0ad7825e078dcbac0810f1d8b3e1 SHA512 b7e997a979b6d50e49b9af5dc830ea4df0532f6ab1321b9ef14983f65bb54f1b2967375c82e07957ae7693ebbf43c9b56ecea6bfea8dd1fdaee444bd549d83a7 +DIST japanese-usage-dictionary-20180701040110.tar.gz 71285 BLAKE2B dfad056a1d5061b6764f583da15b9ad60a3c4421cee0430c4665d1c2779a64f9b31473c1746a3e2b9bda5167349432e51dcf7d4d48f75fde9543e9c16ff74c0d SHA512 68b4d3f52dd6cd4f00a8012a870b4f5929519cd69815b1729f3881d1f964802308f4aa101e236824b4c0f832183a9e8097437ed620403f2a652f126e7cdc1eb3 DIST mozc-2.23.2815.102-protobuf_generated_classes_no_inheritance.patch 40296 BLAKE2B 982f43fa68031eb0f779ec4d034fef838a4fce7834291db889c9edffba3df4acd5bfdf187dd4a52ee8fd0714de943f9d5112070cd69502e1449dab4dbf8543b2 SHA512 6e05b2f22663ddbfb24a8344928ec24c0b4cf523728c1623367970b8f263142af95c056c82d0827414833d5b9f26c3a024a04a688851021601a5cbcc1474e754 DIST mozc-2.23.2815.102.tar.gz 47739041 BLAKE2B 045a8a4a07e09cf923b67824111cdf672febc30256a6aef951ae779a3f582b3860042750d766120e376898c63be5b4baea870798a192cee34b0d48647e1ec5e6 SHA512 a3face616ca89990bca52371dcc8003604ebe0e9633116a64550add070152b1bc4d9b21e9f102c5afa6f8b1aa11d8dbc4bafbcebfaf4a12a934f085f245d548f +DIST mozc-2.26.4220-20201212102434.tar.gz 37106063 BLAKE2B 7d3c236809c8feb017f35e3f7a9b024ac34204f483c69913a2d1ae6b771054548f7f81afde35ed3a6887c9f7503584cee0fc646653fc7cde6fd015158de9c3d3 SHA512 9d87947b9b9256a3cc66cb23ab6caf4b6974142090b0d315c101bdc700fd289c259d09cb7f02f5f9e7462f48d652cd2d5b4822a645751fdcaed88b939520c429 diff --git a/app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.patch b/app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.patch new file mode 100644 index 000000000000..dccdff76f15d --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.26.4220-environmental_variables.patch @@ -0,0 +1,89 @@ +https://github.com/google/mozc/issues/470 + +--- /src/base/system_util.cc ++++ /src/base/system_util.cc +@@ -226,6 +226,11 @@ + + std::string UserProfileDirectoryImpl::GetUserProfileDirectory() const { + #if defined(OS_CHROMEOS) ++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY"); ++ if (configuration_directory_env) { ++ return configuration_directory_env; ++ } ++ + // TODO(toka): Must use passed in user profile dir which passed in. If mojo + // platform the user profile is determined on runtime. + // It's hack, the user profile dir should be passed in. Although the value in +@@ -245,13 +250,23 @@ + #elif defined(OS_IOS) + // OS_IOS block must be placed before __APPLE__ because both macros are + // currently defined on iOS. +- // ++ ++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY"); ++ if (configuration_directory_env) { ++ return configuration_directory_env; ++ } ++ + // On iOS, use Caches directory instead of Application Spport directory + // because the support directory doesn't exist by default. Also, it is backed + // up by iTunes and iCloud. + return FileUtil::JoinPath({MacUtil::GetCachesDirectory(), kProductPrefix}); + + #elif defined(OS_WIN) ++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY"); ++ if (configuration_directory_env) { ++ return configuration_directory_env; ++ } ++ + DCHECK(SUCCEEDED(Singleton<LocalAppDataDirectoryCache>::get()->result())); + std::string dir = Singleton<LocalAppDataDirectoryCache>::get()->path(); + +@@ -263,6 +278,11 @@ + + + #elif defined(__APPLE__) ++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY"); ++ if (configuration_directory_env) { ++ return configuration_directory_env; ++ } ++ + std::string dir = MacUtil::GetApplicationSupportDirectory(); + # ifdef GOOGLE_JAPANESE_INPUT_BUILD + dir = FileUtil::JoinPath(dir, "Google"); +@@ -276,6 +296,11 @@ + + + #elif defined(OS_LINUX) ++ const char *configuration_directory_env = Environ::GetEnv("MOZC_CONFIGURATION_DIRECTORY"); ++ if (configuration_directory_env) { ++ return configuration_directory_env; ++ } ++ + // 1. If "$HOME/.mozc" already exists, + // use "$HOME/.mozc" for backward compatibility. + // 2. If $XDG_CONFIG_HOME is defined +@@ -395,6 +420,11 @@ + #endif // OS_WIN + + std::string SystemUtil::GetServerDirectory() { ++ const char *server_directory_env = Environ::GetEnv("MOZC_SERVER_DIRECTORY"); ++ if (server_directory_env) { ++ return server_directory_env; ++ } ++ + #ifdef OS_WIN + DCHECK(SUCCEEDED(Singleton<ProgramFilesX86Cache>::get()->result())); + # if defined(GOOGLE_JAPANESE_INPUT_BUILD) +@@ -453,6 +483,11 @@ + } + + std::string SystemUtil::GetDocumentDirectory() { ++ const char *documents_directory_env = Environ::GetEnv("MOZC_DOCUMENTS_DIRECTORY"); ++ if (documents_directory_env) { ++ return documents_directory_env; ++ } ++ + #if defined(__APPLE__) + return GetServerDirectory(); + #elif defined(MOZC_DOCUMENT_DIRECTORY) diff --git a/app-i18n/mozc/files/mozc-2.26.4220-server_path_check.patch b/app-i18n/mozc/files/mozc-2.26.4220-server_path_check.patch new file mode 100644 index 000000000000..8dbabeac0038 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.26.4220-server_path_check.patch @@ -0,0 +1,95 @@ +https://github.com/google/mozc/issues/471 + +--- /src/ipc/ipc_path_manager.cc ++++ /src/ipc/ipc_path_manager.cc +@@ -340,9 +340,21 @@ + return false; + } + ++ // Expand symbolic links in the expected server path to avoid false negatives ++ // during comparisons of the expected server path and the actual server path. ++ string real_server_path = server_path; ++#ifndef OS_WIN ++ char real_server_path_[PATH_MAX]; ++ if (realpath(server_path.c_str(), real_server_path_) == NULL) { ++ LOG(ERROR) << "realpath failed: " << strerror(errno); ++ return false; ++ } ++ real_server_path = real_server_path_; ++#endif ++ + // compare path name + if (pid == server_pid_) { +- return (server_path == server_path_); ++ return (real_server_path == server_path_); + } + + server_pid_ = 0; +@@ -352,17 +364,17 @@ + { + std::wstring expected_server_ntpath; + const std::map<string, std::wstring>::const_iterator it = +- expected_server_ntpath_cache_.find(server_path); ++ expected_server_ntpath_cache_.find(real_server_path); + if (it != expected_server_ntpath_cache_.end()) { + expected_server_ntpath = it->second; + } else { + std::wstring wide_server_path; +- Util::UTF8ToWide(server_path, &wide_server_path); ++ Util::UTF8ToWide(real_server_path, &wide_server_path); + if (WinUtil::GetNtPath(wide_server_path, &expected_server_ntpath)) { +- // Caches the relationship from |server_path| to +- // |expected_server_ntpath| in case |server_path| is renamed later. ++ // Caches the relationship from |real_server_path| to ++ // |expected_server_ntpath| in case |real_server_path| is renamed later. + // (This can happen during the updating). +- expected_server_ntpath_cache_[server_path] = expected_server_ntpath; ++ expected_server_ntpath_cache_[real_server_path] = expected_server_ntpath; + } + } + +@@ -379,9 +391,9 @@ + return false; + } + +- // Here we can safely assume that |server_path| (expected one) should be ++ // Here we can safely assume that |real_server_path| (expected one) should be + // the same to |server_path_| (actual one). +- server_path_ = server_path; ++ server_path_ = real_server_path; + server_pid_ = pid; + } + #endif // OS_WIN +@@ -406,7 +418,7 @@ + #ifdef OS_LINUX + // load from /proc/<pid>/exe + char proc[128]; +- char filename[512]; ++ char filename[PATH_MAX]; + absl::SNPrintF(proc, sizeof(proc) - 1, "/proc/%u/exe", pid); + const ssize_t size = readlink(proc, filename, sizeof(filename) - 1); + if (size == -1) { +@@ -419,18 +431,18 @@ + server_pid_ = pid; + #endif // OS_LINUX + +- VLOG(1) << "server path: " << server_path << " " << server_path_; +- if (server_path == server_path_) { ++ VLOG(1) << "server path: " << real_server_path << " " << server_path_; ++ if (real_server_path == server_path_) { + return true; + } + + #ifdef OS_LINUX +- if ((server_path + " (deleted)") == server_path_) { +- LOG(WARNING) << server_path << " on disk is modified"; ++ if ((real_server_path + " (deleted)") == server_path_) { ++ LOG(WARNING) << real_server_path << " on disk is modified"; + // If a user updates the server binary on disk during the server is running, + // "readlink /proc/<pid>/exe" returns a path with the " (deleted)" suffix. + // We allow the special case. +- server_path_ = server_path; ++ server_path_ = real_server_path; + return true; + } + #endif // OS_LINUX diff --git a/app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch b/app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch new file mode 100644 index 000000000000..33f72b8f7a63 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.26.4220-system_abseil-cpp.patch @@ -0,0 +1,407 @@ +https://github.com/google/mozc/issues/490 + +--- /src/base/absl.gyp ++++ /src/base/absl.gyp +@@ -28,119 +28,209 @@ + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + { +- 'variables': { +- 'absl_srcdir': '<(DEPTH)/third_party/abseil-cpp/absl', +- 'gen_absl_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/abseil-cpp/absl', +- }, ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'variables': { ++ 'absl_srcdir': '<(DEPTH)/third_party/abseil-cpp/absl', ++ 'gen_absl_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/abseil-cpp/absl', ++ }, ++ }], ++ ], + 'targets': [ + { + 'target_name': 'absl_base', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/base/internal/cycleclock.cc', +- '<(absl_srcdir)/base/internal/low_level_alloc.cc', +- '<(absl_srcdir)/base/internal/raw_logging.cc', +- '<(absl_srcdir)/base/internal/spinlock.cc', +- '<(absl_srcdir)/base/internal/spinlock_wait.cc', +- '<(absl_srcdir)/base/internal/sysinfo.cc', +- '<(absl_srcdir)/base/internal/thread_identity.cc', +- '<(absl_srcdir)/base/internal/throw_delegate.cc', +- '<(absl_srcdir)/base/internal/unscaledcycleclock.cc', +- '<(absl_srcdir)/container/internal/raw_hash_set.cc', +- '<(absl_srcdir)/hash/internal/city.cc', +- '<(absl_srcdir)/hash/internal/hash.cc', +- ], +- 'msvs_disabled_warnings': [ +- # 'type' : forcing value to bool 'true' or 'false' +- # (performance warning) +- # http://msdn.microsoft.com/en-us/library/b6801kcy.aspx +- '4800', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_base -labsl_city -labsl_hash -labsl_malloc_internal -labsl_raw_hash_set -labsl_raw_logging_internal -labsl_spinlock_wait -labsl_throw_delegate', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/cycleclock.cc', ++ # libabsl_malloc_internal ++ '<(absl_srcdir)/base/internal/low_level_alloc.cc', ++ # libabsl_raw_logging_internal ++ '<(absl_srcdir)/base/internal/raw_logging.cc', ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/spinlock.cc', ++ # libabsl_spinlock_wait ++ '<(absl_srcdir)/base/internal/spinlock_wait.cc', ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/sysinfo.cc', ++ '<(absl_srcdir)/base/internal/thread_identity.cc', ++ # libabsl_throw_delegate ++ '<(absl_srcdir)/base/internal/throw_delegate.cc', ++ # libabsl_base ++ '<(absl_srcdir)/base/internal/unscaledcycleclock.cc', ++ # libabsl_raw_hash_set ++ '<(absl_srcdir)/container/internal/raw_hash_set.cc', ++ # libabsl_city ++ '<(absl_srcdir)/hash/internal/city.cc', ++ # libabsl_hash ++ '<(absl_srcdir)/hash/internal/hash.cc', ++ ], ++ 'msvs_disabled_warnings': [ ++ # 'type' : forcing value to bool 'true' or 'false' ++ # (performance warning) ++ # http://msdn.microsoft.com/en-us/library/b6801kcy.aspx ++ '4800', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_numeric', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/numeric/int128.cc', +- ], +- 'dependencies': [ +- 'absl_base', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_int128', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_int128 ++ '<(absl_srcdir)/numeric/int128.cc', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_strings_internal', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/strings/internal/charconv_bigint.cc', +- '<(absl_srcdir)/strings/internal/charconv_parse.cc', +- '<(absl_srcdir)/strings/internal/escaping.cc', +- '<(absl_srcdir)/strings/internal/memutil.cc', +- '<(absl_srcdir)/strings/internal/str_format/arg.cc', +- '<(absl_srcdir)/strings/internal/str_format/bind.cc', +- '<(absl_srcdir)/strings/internal/str_format/extension.cc', +- '<(absl_srcdir)/strings/internal/str_format/float_conversion.cc', +- '<(absl_srcdir)/strings/internal/str_format/output.cc', +- '<(absl_srcdir)/strings/internal/str_format/parser.cc', +- '<(absl_srcdir)/strings/internal/utf8.cc', +- ], +- 'dependencies': [ +- 'absl_base', +- 'absl_numeric', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_strings_internal', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_strings ++ '<(absl_srcdir)/strings/internal/charconv_bigint.cc', ++ '<(absl_srcdir)/strings/internal/charconv_parse.cc', ++ # libabsl_strings_internal ++ '<(absl_srcdir)/strings/internal/escaping.cc', ++ # libabsl_strings ++ '<(absl_srcdir)/strings/internal/memutil.cc', ++ # libabsl_str_format_internal ++ '<(absl_srcdir)/strings/internal/str_format/arg.cc', ++ '<(absl_srcdir)/strings/internal/str_format/bind.cc', ++ '<(absl_srcdir)/strings/internal/str_format/extension.cc', ++ '<(absl_srcdir)/strings/internal/str_format/float_conversion.cc', ++ '<(absl_srcdir)/strings/internal/str_format/output.cc', ++ '<(absl_srcdir)/strings/internal/str_format/parser.cc', ++ # libabsl_strings_internal ++ '<(absl_srcdir)/strings/internal/utf8.cc', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ 'absl_numeric', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_strings', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/strings/ascii.cc', +- '<(absl_srcdir)/strings/charconv.cc', +- '<(absl_srcdir)/strings/escaping.cc', +- '<(absl_srcdir)/strings/match.cc', +- '<(absl_srcdir)/strings/numbers.cc', +- '<(absl_srcdir)/strings/str_cat.cc', +- '<(absl_srcdir)/strings/str_replace.cc', +- '<(absl_srcdir)/strings/str_split.cc', +- '<(absl_srcdir)/strings/string_view.cc', +- '<(absl_srcdir)/strings/substitute.cc', +- ], +- 'dependencies': [ +- 'absl_base', +- 'absl_numeric', +- 'absl_strings_internal', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_str_format_internal -labsl_strings -labsl_strings_internal', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_strings ++ '<(absl_srcdir)/strings/ascii.cc', ++ '<(absl_srcdir)/strings/charconv.cc', ++ '<(absl_srcdir)/strings/escaping.cc', ++ '<(absl_srcdir)/strings/match.cc', ++ '<(absl_srcdir)/strings/numbers.cc', ++ '<(absl_srcdir)/strings/str_cat.cc', ++ '<(absl_srcdir)/strings/str_replace.cc', ++ '<(absl_srcdir)/strings/str_split.cc', ++ '<(absl_srcdir)/strings/string_view.cc', ++ '<(absl_srcdir)/strings/substitute.cc', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ 'absl_numeric', ++ 'absl_strings_internal', ++ ], ++ }], + ], + }, + { + 'target_name': 'absl_time', +- 'type': 'static_library', + 'toolsets': ['host', 'target'], +- 'sources': [ +- '<(absl_srcdir)/time/civil_time.cc', +- '<(absl_srcdir)/time/clock.cc', +- '<(absl_srcdir)/time/duration.cc', +- '<(absl_srcdir)/time/format.cc', +- '<(absl_srcdir)/time/time.cc', +- '<(absl_srcdir)/time/internal/cctz/src/civil_time_detail.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_fixed.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_format.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_if.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_impl.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_info.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_libc.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_lookup.cc', +- '<(absl_srcdir)/time/internal/cctz/src/time_zone_posix.cc', +- '<(absl_srcdir)/time/internal/cctz/src/zone_info_source.cc', +- ], +- 'cflags': [ +- '-Wno-error', +- ], +- 'dependencies': [ +- 'absl_base', +- 'absl_numeric', +- 'absl_strings_internal', ++ 'conditions': [ ++ ['use_system_abseil_cpp==1', { ++ 'type': 'none', ++ 'all_dependent_settings': { ++ 'link_settings': { ++ 'libraries': [ ++ '-labsl_civil_time -labsl_time -labsl_time_zone', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ 'sources': [ ++ # libabsl_time ++ '<(absl_srcdir)/time/civil_time.cc', ++ '<(absl_srcdir)/time/clock.cc', ++ '<(absl_srcdir)/time/duration.cc', ++ '<(absl_srcdir)/time/format.cc', ++ '<(absl_srcdir)/time/time.cc', ++ # libabsl_civil_time ++ '<(absl_srcdir)/time/internal/cctz/src/civil_time_detail.cc', ++ # libabsl_time_zone ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_fixed.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_format.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_if.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_impl.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_info.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_libc.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_lookup.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/time_zone_posix.cc', ++ '<(absl_srcdir)/time/internal/cctz/src/zone_info_source.cc', ++ ], ++ 'cflags': [ ++ '-Wno-error', ++ ], ++ 'dependencies': [ ++ 'absl_base', ++ 'absl_numeric', ++ 'absl_strings_internal', ++ ], ++ }], + ], + }, + ], +--- /src/config/config_test.gyp ++++ /src/config/config_test.gyp +@@ -36,6 +36,7 @@ + 'config_handler_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../testing/testing.gyp:gtest_main', + '../testing/testing.gyp:mozctest', + 'config.gyp:config_handler', +@@ -80,6 +81,7 @@ + 'character_form_manager_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../testing/testing.gyp:gtest_main', + 'config.gyp:character_form_manager', + ], +--- /src/gyp/common.gypi ++++ /src/gyp/common.gypi +@@ -194,7 +194,13 @@ + 'include_dirs': [ + '<(abs_depth)', + '<(SHARED_INTERMEDIATE_DIR)', +- '<(absl_dir)', ++ ], ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'include_dirs': [ ++ '<(absl_dir)', ++ ], ++ }], + ], + 'mac_framework_headers': [], + 'target_conditions': [ +--- /src/gyp/common_win.gypi ++++ /src/gyp/common_win.gypi +@@ -307,10 +307,16 @@ + 'include_dirs': [ + '<(abs_depth)', + '<(SHARED_INTERMEDIATE_DIR)', +- '<(absl_dir)', + '<@(msvs_includes)', + '<(wtl_dir)/include', + ], ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'include_dirs': [ ++ '<(absl_dir)', ++ ], ++ }], ++ ], + 'msvs_configuration_attributes': { + 'CharacterSet': '<(win_char_set_unicode)', + }, +--- /src/gyp/defines.gypi ++++ /src/gyp/defines.gypi +@@ -63,6 +63,10 @@ + # use_libibus represents if ibus library is used or not. + # This option is only for Linux. + 'use_libibus%': '0', ++ ++ # use_system_abseil_cpp represents if system version or bundled version ++ # of abseil-cpp library is used. ++ 'use_system_abseil_cpp%': '0', + }, + 'target_defaults': { + 'defines': [ +--- /src/gyp/directories.gypi ++++ /src/gyp/directories.gypi +@@ -31,7 +31,12 @@ + 'variables': { + # Top directory of third party libraries. + 'third_party_dir': '<(DEPTH)/third_party', +- 'absl_dir': '<(DEPTH)/third_party/abseil-cpp', ++ ++ 'conditions': [ ++ ['use_system_abseil_cpp==0', { ++ 'absl_dir': '<(DEPTH)/third_party/abseil-cpp', ++ }], ++ ], + + # Top directory of additional third party libraries. + 'ext_third_party_dir%': '<(abs_depth)/third_party', +--- /src/session/session_test.gyp ++++ /src/session/session_test.gyp +@@ -221,6 +221,7 @@ + 'internal/key_event_transformer_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../base/base.gyp:base', + '../converter/converter_base.gyp:converter_mock', + '../engine/engine.gyp:mock_converter_engine', +--- /src/storage/storage_test.gyp ++++ /src/storage/storage_test.gyp +@@ -41,6 +41,7 @@ + 'tiny_storage_test.cc', + ], + 'dependencies': [ ++ '../base/absl.gyp:absl_base', + '../testing/testing.gyp:gtest_main', + 'storage.gyp:storage', + ], diff --git a/app-i18n/mozc/files/mozc-2.26.4220-system_gtest.patch b/app-i18n/mozc/files/mozc-2.26.4220-system_gtest.patch new file mode 100644 index 000000000000..47891fab9b47 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.26.4220-system_gtest.patch @@ -0,0 +1,141 @@ +https://github.com/google/mozc/issues/490 + +--- /src/gyp/defines.gypi ++++ /src/gyp/defines.gypi +@@ -67,6 +67,10 @@ + # use_system_abseil_cpp represents if system version or bundled version + # of abseil-cpp library is used. + 'use_system_abseil_cpp%': '0', ++ ++ # use_system_gtest represents if system version or bundled version ++ # of gtest library is used. ++ 'use_system_gtest%': '0', + }, + 'target_defaults': { + 'defines': [ +--- /src/testing/testing.gyp ++++ /src/testing/testing.gyp +@@ -59,54 +59,76 @@ + 'targets': [ + { + 'target_name': 'testing', +- 'type': 'static_library', +- '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', +- }, +- '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-matchers.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', ++ ['use_system_gtest==1', { ++ 'type': 'none', ++ 'variables': { ++ 'gtest_defines': [ ++ 'GTEST_LANG_CXX11=1', ++ 'GTEST_HAS_TR1_TUPLE=0', # disable tr1 tuple in favor of C++11 tuple. ++ ], ++ }, ++ 'all_dependent_settings': { ++ 'defines': [ ++ '<@(gtest_defines)', ++ ], ++ 'link_settings': { ++ 'libraries': [ ++ '-lgmock -lgtest', ++ ], ++ }, ++ }, ++ }, { ++ 'type': 'static_library', ++ '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', ++ }, ++ '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-matchers.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', ++ ], ++ }], + ], + }], + ], diff --git a/app-i18n/mozc/files/mozc-2.26.4220-system_jsoncpp.patch b/app-i18n/mozc/files/mozc-2.26.4220-system_jsoncpp.patch new file mode 100644 index 000000000000..7ff132eaa591 --- /dev/null +++ b/app-i18n/mozc/files/mozc-2.26.4220-system_jsoncpp.patch @@ -0,0 +1,117 @@ +https://github.com/google/mozc/issues/490 + +--- /src/gyp/defines.gypi ++++ /src/gyp/defines.gypi +@@ -71,6 +71,10 @@ + # use_system_gtest represents if system version or bundled version + # of gtest library is used. + 'use_system_gtest%': '0', ++ ++ # use_system_jsoncpp represents if system version or bundled version ++ # of jsoncpp library is used. ++ 'use_system_jsoncpp%': '0', + }, + 'target_defaults': { + 'defines': [ +--- /src/net/jsoncpp.gyp ++++ /src/net/jsoncpp.gyp +@@ -31,32 +31,60 @@ + 'targets': [ + { + 'target_name': 'jsoncpp', +- 'type': 'static_library', +- '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)', ++ 'conditions': [ ++ ['use_system_jsoncpp==1', { ++ 'type': 'none', ++ 'variables': { ++ 'jsoncpp_additional_macros': [ ++ 'JSON_USE_EXCEPTION=0', ++ 'MOZC_USE_SYSTEM_JSONCPP', ++ ], ++ }, ++ '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)', ++ ], ++ } ++ }, ++ }, { ++ 'type': 'static_library', ++ '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)', ++ ], ++ }, ++ }], + ], +- 'sources': [ +- '<@(jsoncpp_srcs)', +- 'jsoncpp.h', +- ], +- 'include_dirs': [ +- '<@(jsoncpp_include_dirs)', +- ], +- 'all_dependent_settings': { +- 'defines': [ +- '<@(jsoncpp_additional_macros)', +- ], +- }, + }, + ], + } +--- /src/net/jsoncpp.h ++++ /src/net/jsoncpp.h +@@ -35,7 +35,11 @@ + // Mozc basically disables C++ exception. + #define JSON_USE_EXCEPTION 0 + #endif // !JSON_USE_EXCEPTION ++#ifdef MOZC_USE_SYSTEM_JSONCPP ++#include <json/json.h> ++#else + #include "third_party/jsoncpp/include/json/json.h" ++#endif + #define MOZC_JSONCPP_JSON_H_INCLUDED + #endif // !MOZC_JSONCPP_JSON_H_INCLUDED + diff --git a/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild b/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild new file mode 100644 index 000000000000..8f04c74732d2 --- /dev/null +++ b/app-i18n/mozc/mozc-2.26.4220_p20201212102434_p20201219202429.ebuild @@ -0,0 +1,380 @@ +# Copyright 2010-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +PYTHON_COMPAT=( python3_{6,7,8,9,10} ) + +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="9ba59b64d53365c1fe93c1c245b4ec3e35bdadf0" + MOZC_DATE="${PV#*_p}" + MOZC_DATE="${MOZC_DATE%%_p*}" + + FCITX_MOZC_GIT_REVISION="1ea089debc31ff216473369ad71c08318384ee06" + FCITX_MOZC_DATE="${PV#*_p}" + FCITX_MOZC_DATE="${FCITX_MOZC_DATE#*_p}" + FCITX_MOZC_DATE="${FCITX_MOZC_DATE%%_p*}" + + JAPANESE_USAGE_DICTIONARY_GIT_REVISION="a4a66772e33746b91e99caceecced9a28507e925" + JAPANESE_USAGE_DICTIONARY_DATE="20180701040110" +fi + +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 -> ${PN}-${PV%%_p*}-${MOZC_DATE}.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 + fcitx4? ( https://github.com/fcitx/${PN}/archive/${FCITX_MOZC_GIT_REVISION}.tar.gz -> fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz )" +fi + +# 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 ~ppc64 ~x86" +IUSE="debug emacs fcitx4 +gui ibus renderer test" +REQUIRED_USE="|| ( emacs fcitx4 ibus )" +RESTRICT="!test? ( test )" + +BDEPEND="$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]') + >=dev-libs/protobuf-3.0.0 + dev-util/gyp + dev-util/ninja + virtual/pkgconfig + emacs? ( app-editors/emacs:* ) + fcitx4? ( sys-devel/gettext )" +DEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)] + >=dev-libs/protobuf-3.0.0:= + fcitx4? ( + app-i18n/fcitx:4 + virtual/libintl + ) + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + 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 + ) + test? ( + >=dev-cpp/gtest-1.8.0 + dev-libs/jsoncpp + )" +RDEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)] + >=dev-libs/protobuf-3.0.0:= + emacs? ( app-editors/emacs:* ) + fcitx4? ( + app-i18n/fcitx:4 + virtual/libintl + ) + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + 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 + )" + +S="${WORKDIR}/${P}/src" + +SITEFILE="50${PN}-gentoo.el" + +execute() { + einfo "$@" + "$@" +} + +python_check_deps() { + has_version -b "dev-python/six[${PYTHON_USEDEP}]" +} + +src_unpack() { + if [[ "${PV}" == "9999" ]]; then + git-r3_src_unpack + + if use fcitx4; then + local EGIT_SUBMODULES=() + git-r3_fetch https://github.com/fcitx/mozc refs/heads/fcitx + git-r3_checkout https://github.com/fcitx/mozc "${WORKDIR}/fcitx-mozc" + fi + else + unpack ${PN}-${PV%%_p*}-${MOZC_DATE}.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 + + if use fcitx4; then + unpack fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz + mv mozc-${FCITX_MOZC_GIT_REVISION} fcitx-${PN} + fi + fi +} + +src_prepare() { + if use fcitx4; then + cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die + fi + + pushd "${WORKDIR}/${P}" > /dev/null || die + + eapply "${FILESDIR}/${PN}-2.26.4220-system_abseil-cpp.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-system_gtest.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-system_jsoncpp.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-environmental_variables.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-server_path_check.patch" + + eapply_user + + popd > /dev/null || die + + 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 + + local ar=($(tc-getAR)) + local cc=($(tc-getCC)) + local cxx=($(tc-getCXX)) + local ld=($(tc-getLD)) + local nm=($(tc-getNM)) + local readelf=($(tc-getREADELF)) + + # 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 + + # https://github.com/google/mozc/issues/489 + sed \ + -e "/'-lc++'/d" \ + -e "/'-stdlib=libc++'/d" \ + -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 debug_extra_cflags=) + gyp_arguments+=(-D release_extra_cflags=) + + gyp_arguments+=(-D use_fcitx=$(usex fcitx4 YES NO)) + gyp_arguments+=(-D use_libibus=$(usex ibus 1 0)) + gyp_arguments+=(-D use_libprotobuf=1) + gyp_arguments+=(-D use_system_abseil_cpp=1) + gyp_arguments+=(-D use_system_gtest=$(usex test 1 0)) + gyp_arguments+=(-D use_system_jsoncpp=$(usex test 1 0)) + 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 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 ../../fcitx-${PN}/src/data/images/unix/ui-*.png; do + newins "${image}" "mozc-${image#../../fcitx-${PN}/src/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() { + elog + elog "ENVIRONMENTAL VARIABLES" + elog + elog "MOZC_SERVER_DIRECTORY" + elog " Mozc server directory" + elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc\"" + elog "MOZC_DOCUMENTS_DIRECTORY" + elog " Mozc documents directory" + elog " Value used by default: \"${EPREFIX}/usr/libexec/mozc/documents\"" + elog "MOZC_CONFIGURATION_DIRECTORY" + elog " Mozc configuration directory" + elog " Value used by default: \"~/.mozc\"" + elog + if use emacs; then + elog + 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\"." + elog + + elisp-site-regen + fi +} + +pkg_postrm() { + if use emacs; then + elisp-site-regen + fi +} diff --git a/app-i18n/mozc/mozc-9999.ebuild b/app-i18n/mozc/mozc-9999.ebuild index a44dfe7bcc02..f755bebb08c4 100644 --- a/app-i18n/mozc/mozc-9999.ebuild +++ b/app-i18n/mozc/mozc-9999.ebuild @@ -13,9 +13,16 @@ if [[ "${PV}" == "9999" ]]; then EGIT_SUBMODULES=(src/third_party/japanese_usage_dictionary) else MOZC_GIT_REVISION="" + MOZC_DATE="${PV#*_p}" + MOZC_DATE="${MOZC_DATE%%_p*}" + + FCITX_MOZC_GIT_REVISION="" + FCITX_MOZC_DATE="${PV#*_p}" + FCITX_MOZC_DATE="${FCITX_MOZC_DATE#*_p}" + FCITX_MOZC_DATE="${FCITX_MOZC_DATE%%_p*}" + JAPANESE_USAGE_DICTIONARY_GIT_REVISION="" JAPANESE_USAGE_DICTIONARY_DATE="" - FCITX_PATCH_VERSION="" fi DESCRIPTION="Mozc - Japanese input method editor" @@ -23,10 +30,9 @@ 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 + SRC_URI="https://github.com/google/${PN}/archive/${MOZC_GIT_REVISION}.tar.gz -> ${PN}-${PV%%_p*}-${MOZC_DATE}.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 - https://dev.gentoo.org/~juippis/distfiles/tmp/mozc-2.23.2815.102-protobuf_generated_classes_no_inheritance.patch - fcitx4? ( https://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-${FCITX_PATCH_VERSION}.patch )" + fcitx4? ( https://github.com/fcitx/${PN}/archive/${FCITX_MOZC_GIT_REVISION}.tar.gz -> fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz )" fi # Mozc: BSD @@ -36,30 +42,27 @@ fi 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 )" +IUSE="debug emacs fcitx4 +gui ibus renderer test" +REQUIRED_USE="|| ( emacs fcitx4 ibus )" RESTRICT="!test? ( test )" -BDEPEND="${PYTHON_DEPS} +BDEPEND="$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]') >=dev-libs/protobuf-3.0.0 dev-util/gyp dev-util/ninja virtual/pkgconfig emacs? ( app-editors/emacs:* ) fcitx4? ( sys-devel/gettext )" -RDEPEND=">=dev-libs/protobuf-3.0.0:= - emacs? ( app-editors/emacs:* ) +DEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)] + >=dev-libs/protobuf-3.0.0:= fcitx4? ( app-i18n/fcitx:4 virtual/libintl ) 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 @@ -71,12 +74,34 @@ RDEPEND=">=dev-libs/protobuf-3.0.0:= x11-libs/cairo x11-libs/gtk+:2 x11-libs/pango - )" -DEPEND="${RDEPEND} + ) test? ( >=dev-cpp/gtest-1.8.0 dev-libs/jsoncpp )" +RDEPEND=">=dev-cpp/abseil-cpp-20200923[cxx17(+)] + >=dev-libs/protobuf-3.0.0:= + emacs? ( app-editors/emacs:* ) + fcitx4? ( + app-i18n/fcitx:4 + virtual/libintl + ) + gui? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + 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 + )" S="${WORKDIR}/${P}/src" @@ -87,6 +112,10 @@ execute() { "$@" } +python_check_deps() { + has_version -b "dev-python/six[${PYTHON_USEDEP}]" +} + src_unpack() { if [[ "${PV}" == "9999" ]]; then git-r3_src_unpack @@ -97,55 +126,48 @@ src_unpack() { git-r3_checkout https://github.com/fcitx/mozc "${WORKDIR}/fcitx-mozc" fi else - unpack ${P}.tar.gz + unpack ${PN}-${PV%%_p*}-${MOZC_DATE}.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 + + if use fcitx4; then + unpack fcitx-${PN}-${PV%%_p*}-${FCITX_MOZC_DATE}.tar.gz + mv mozc-${FCITX_MOZC_GIT_REVISION} fcitx-${PN} + fi fi } src_prepare() { - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_1.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_2.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_3.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-python-3_4.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-system_libraries.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-gcc-8.patch" - eapply -p2 "${DISTDIR}/${PN}-2.23.2815.102-protobuf_generated_classes_no_inheritance.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-environmental_variables.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-reiwa.patch" - eapply -p2 "${FILESDIR}/${PN}-2.23.2815.102-server_path_check.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 - if [[ "${PV}" == "9999" ]]; then - cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die - else - eapply -p2 "${DISTDIR}/fcitx-mozc-${FCITX_PATCH_VERSION}.patch" - fi + cp -pr "${WORKDIR}/fcitx-mozc/src/unix/fcitx" unix || die fi + pushd "${WORKDIR}/${P}" > /dev/null || die + + eapply "${FILESDIR}/${PN}-2.26.4220-system_abseil-cpp.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-system_gtest.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-system_jsoncpp.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-environmental_variables.patch" + eapply "${FILESDIR}/${PN}-2.26.4220-server_path_check.patch" + eapply_user + popd > /dev/null || die + 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)) + local readelf=($(tc-getREADELF)) # Use absolute paths. Non-absolute paths are mishandled by GYP. ar[0]=$(type -P ${ar[0]}) @@ -163,6 +185,12 @@ src_prepare() { -e "s:<!(which nm):${nm[@]}:" \ -e "s:<!(which readelf):${readelf[@]}:" \ -i gyp/common.gypi || die + + # https://github.com/google/mozc/issues/489 + sed \ + -e "/'-lc++'/d" \ + -e "/'-stdlib=libc++'/d" \ + -i gyp/common.gypi || die } src_configure() { @@ -182,23 +210,20 @@ src_configure() { gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown) fi + gyp_arguments+=(-D debug_extra_cflags=) + gyp_arguments+=(-D release_extra_cflags=) + gyp_arguments+=(-D use_fcitx=$(usex fcitx4 YES NO)) - gyp_arguments+=(-D use_libgtest=$(usex test 1 0)) gyp_arguments+=(-D use_libibus=$(usex ibus 1 0)) - gyp_arguments+=(-D use_libjsoncpp=$(usex test 1 0)) gyp_arguments+=(-D use_libprotobuf=1) - gyp_arguments+=(-D use_libzinnia=$(usex gui 1 0)) + gyp_arguments+=(-D use_system_abseil_cpp=1) + gyp_arguments+=(-D use_system_gtest=$(usex test 1 0)) + gyp_arguments+=(-D use_system_jsoncpp=$(usex test 1 0)) 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") @@ -280,8 +305,8 @@ src_install() { 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-}" + for image in ../../fcitx-${PN}/src/data/images/unix/ui-*.png; do + newins "${image}" "mozc-${image#../../fcitx-${PN}/src/data/images/unix/ui-}" done local locale mo_file @@ -322,18 +347,6 @@ pkg_postinst() { elog "MOZC_CONFIGURATION_DIRECTORY" elog " Mozc configuration directory" elog " Value used by default: \"~/.mozc\"" - if use gui; then - elog "MOZC_ZINNIA_MODEL_FILE" - elog " Zinnia handwriting recognition model file" - if use handwriting-tegaki; then - elog " Value used by default: \"${EPREFIX}/usr/share/tegaki/models/zinnia/handwriting-ja.model\"" - elif use handwriting-tomoe; then - elog " Value used by default: \"${EPREFIX}/usr/$(get_libdir)/zinnia/model/tomoe/handwriting-ja.model\"" - fi - elog " Potential values:" - elog " \"${EPREFIX}/usr/share/tegaki/models/zinnia/handwriting-ja.model\"" - elog " \"${EPREFIX}/usr/$(get_libdir)/zinnia/model/tomoe/handwriting-ja.model\"" - fi elog if use emacs; then elog diff --git a/app-i18n/nkf/nkf-2.1.4.ebuild b/app-i18n/nkf/nkf-2.1.4.ebuild index e503d4298d0d..ceba175bc131 100644 --- a/app-i18n/nkf/nkf-2.1.4.ebuild +++ b/app-i18n/nkf/nkf-2.1.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -18,7 +18,7 @@ SRC_URI="mirror://sourceforge.jp/${PN}/64158/${P}.tar.gz LICENSE="ZLIB python? ( BSD )" SLOT="0" -KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-macos" +KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ppc64 sparc x86" IUSE="perl python l10n_ja" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" diff --git a/app-i18n/nkf/nkf-2.1.5.ebuild b/app-i18n/nkf/nkf-2.1.5.ebuild index de2b3c47372b..317a8a9f8d9e 100644 --- a/app-i18n/nkf/nkf-2.1.5.ebuild +++ b/app-i18n/nkf/nkf-2.1.5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -18,7 +18,7 @@ SRC_URI="mirror://sourceforge.jp/${PN}/70406/${P}.tar.gz LICENSE="ZLIB python? ( BSD )" SLOT="0" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-macos" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="perl python l10n_ja" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" diff --git a/app-i18n/opencc/Manifest b/app-i18n/opencc/Manifest index a71aa95470f2..5e274b54e2d7 100644 --- a/app-i18n/opencc/Manifest +++ b/app-i18n/opencc/Manifest @@ -1,2 +1,4 @@ DIST opencc-1.0.5.tar.gz 1598354 BLAKE2B a66b32b96dab543d8401960ff0548a4e3f9414606513941426eacf105bca0755a7b364c68b7eb996ef82444e52f849d2f8151353a14fb97a358ad1463fbea2d3 SHA512 3fbefbafe5c3c2491032158577ab97b5a3edf6ea98a03a7250deba082b72c3112ad4a3396d1a469936ec32e1d141f0a2236001c2891ac9c793add2b082596cc1 DIST opencc-1.0.6.tar.gz 1621561 BLAKE2B d58ee0e04e133fbf6a7632788bcaf0f7891bb74051a970075f6d94b048adfec7bbe4438913933d7dfdd4d58ec2c1a5ec47685415c26532ddd8c13e8abd52cab6 SHA512 67c7bb7432483c1781701dc64ff28e4d5750898ed3d2d41f97d3782918b5f9aa1a49baa1e3a58e4b24cfbd2adcf9ea166a05ad934221fb1cb7afb35e909749e7 +DIST opencc-1.1.0.tar.gz 2209140 BLAKE2B 71cc659976cf30ac0d7dd52cdfa644a85e4e38fed081176bb2f2da2702203c0faeddf76818c8cc89a5fe2a2cfe3eee85fcb27010766db461817b204403cc9b46 SHA512 c5d95e84e0c8edf600f441b79431f721e721b1028619170e27fbc762da32c9ef99c9d28c2c5eaf34226d23a24e2fe5e494cedb28f1182acb06f94b72d7cbb52c +DIST opencc-1.1.1.tar.gz 2212256 BLAKE2B 0299023f4c950ebedc0a7bc4ca142fbf737c612aca5c8cba8787bebcf2ac8afcacb056b015fbc151136166f679a4551fc5d6bbc0481b930331228ea7484fbe68 SHA512 48ccf61f63cf0a1c0fc484a52ae1d406a28949a52be7d7d1595e6aaf87f40ac47ea4697308441a9381f0cd6f404ee5a28b85a2fa2f288c4b3933be36f4a41363 diff --git a/app-i18n/opencc/files/opencc-1.1.0-parallel_build.patch b/app-i18n/opencc/files/opencc-1.1.0-parallel_build.patch new file mode 100644 index 000000000000..3163aa0a16e3 --- /dev/null +++ b/app-i18n/opencc/files/opencc-1.1.0-parallel_build.patch @@ -0,0 +1,40 @@ +https://github.com/BYVoid/OpenCC/issues/322 + +--- /data/CMakeLists.txt ++++ /data/CMakeLists.txt +@@ -116,6 +116,19 @@ + ) + endforeach(DICT) + ++add_custom_target( ++ copy_libopencc_to_dir_of_opencc_dict ++ COMMENT ++ "Copying libopencc to directory of opencc_dict" ++ COMMAND ++ ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:libopencc>" "$<TARGET_FILE_DIR:${OPENCC_DICT_BIN}>" ++) ++if (WIN32) ++ set(DICT_WIN32_DEPENDS copy_libopencc_to_dir_of_opencc_dict) ++else() ++ set(DICT_WIN32_DEPENDS) ++endif() ++ + foreach(DICT ${DICTS}) + add_custom_command( + OUTPUT +@@ -123,14 +136,13 @@ + COMMENT + "Building ${DICT}.ocd2" + COMMAND +- ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:libopencc>" "$<TARGET_FILE_DIR:${OPENCC_DICT_BIN}>" +- COMMAND + ${OPENCC_DICT_BIN} + --input ${DICT_${DICT}_INPUT} + --output ${DICT}.ocd2 + --from text + --to ocd2 + DEPENDS ++ ${DICT_WIN32_DEPENDS} + ${OPENCC_DICT_BIN} + ${DICT_${DICT}_INPUT} + ) diff --git a/app-i18n/opencc/files/opencc-1.1.1-system_libraries.patch b/app-i18n/opencc/files/opencc-1.1.1-system_libraries.patch new file mode 100644 index 000000000000..ee0527f22356 --- /dev/null +++ b/app-i18n/opencc/files/opencc-1.1.1-system_libraries.patch @@ -0,0 +1,94 @@ +https://github.com/BYVoid/OpenCC/issues/547 + +--- /CMakeLists.txt ++++ /CMakeLists.txt +@@ -28,7 +28,12 @@ + option(ENABLE_GTEST "Build all tests." OFF) + option(ENABLE_BENCHMARK "Build benchmark tests." OFF) + option(ENABLE_DARTS "Build DartsDict (ocd format)." ON) +-option(BUILD_BUNDLED_LIBMARISA "" ON) ++option(USE_SYSTEM_DARTS "Use system version of Darts" OFF) ++option(USE_SYSTEM_GOOGLE_BENCHMARK "Use system version of Google Benchmark" OFF) ++option(USE_SYSTEM_GTEST "Use system version of GoogleTest" OFF) ++option(USE_SYSTEM_MARISA "Use system version of Marisa" OFF) ++option(USE_SYSTEM_RAPIDJSON "Use system version of RapidJSON" OFF) ++option(USE_SYSTEM_TCLAP "Use system version of TCLAP" OFF) + + ######## Package information + set (PACKAGE_URL https://github.com/BYVoid/Opencc) +@@ -172,7 +177,7 @@ + + ######## Dependencies + +-if(BUILD_BUNDLED_LIBMARISA) ++if(NOT USE_SYSTEM_MARISA) + message(STATUS "Use bundled marisa library.") + add_subdirectory(deps/marisa-0.2.5) + else() +@@ -194,12 +199,16 @@ + ######## Testing + + if (ENABLE_GTEST) +- add_subdirectory(deps/gtest-1.11.0) ++ if(NOT USE_SYSTEM_GTEST) ++ add_subdirectory(deps/gtest-1.11.0) ++ endif() + enable_testing() + endif() + + if (ENABLE_BENCHMARK) + set(BENCHMARK_ENABLE_TESTING OFF) +- add_subdirectory(deps/google-benchmark) ++ if(NOT USE_SYSTEM_GOOGLE_BENCHMARK) ++ add_subdirectory(deps/google-benchmark) ++ endif() + enable_testing() + endif() +--- /src/CMakeLists.txt ++++ /src/CMakeLists.txt +@@ -1,7 +1,13 @@ + include (GenerateExportHeader) +-include_directories(../deps/marisa-0.2.5/include) +-include_directories(../deps/rapidjson-1.1.0) +-include_directories(../deps/tclap-1.2.2) ++if(NOT USE_SYSTEM_MARISA) ++ include_directories(../deps/marisa-0.2.5/include) ++endif() ++if(NOT USE_SYSTEM_RAPIDJSON) ++ include_directories(../deps/rapidjson-1.1.0) ++endif() ++if(NOT USE_SYSTEM_TCLAP) ++ include_directories(../deps/tclap-1.2.2) ++endif() + + # Library + +@@ -72,7 +78,9 @@ + ) + + if (ENABLE_DARTS) +- include_directories(../deps/darts-clone) ++ if(NOT USE_SYSTEM_DARTS) ++ include_directories(../deps/darts-clone) ++ endif() + set( + LIBOPENCC_HEADERS + ${LIBOPENCC_HEADERS} +--- /test/CMakeLists.txt ++++ /test/CMakeLists.txt +@@ -1,4 +1,3 @@ +-include_directories(../deps/libdarts/src) + include_directories(../src) + + set(CONFIG_TEST +@@ -27,7 +26,9 @@ + ) + endif() + +- include_directories(../deps/gtest-1.7.0/include) ++ if(NOT USE_SYSTEM_GTEST) ++ include_directories(../deps/gtest-1.7.0/include) ++ endif() + set(UNITTESTS + CommandLineConvertTest + ) diff --git a/app-i18n/opencc/files/opencc-1.1.2-system_libraries.patch b/app-i18n/opencc/files/opencc-1.1.2-system_libraries.patch new file mode 100644 index 000000000000..e0b624a63e9f --- /dev/null +++ b/app-i18n/opencc/files/opencc-1.1.2-system_libraries.patch @@ -0,0 +1,111 @@ +https://github.com/BYVoid/OpenCC/issues/547 + +--- /CMakeLists.txt ++++ /CMakeLists.txt +@@ -28,8 +28,14 @@ + option(ENABLE_GTEST "Build all tests." OFF) + option(ENABLE_BENCHMARK "Build benchmark tests." OFF) + option(ENABLE_DARTS "Build DartsDict (ocd format)." ON) +-option(BUILD_BUNDLED_LIBMARISA "" ON) + option(BUILD_PYTHON "Build python library" OFF) ++option(USE_SYSTEM_DARTS "Use system version of Darts" OFF) ++option(USE_SYSTEM_GOOGLE_BENCHMARK "Use system version of Google Benchmark" OFF) ++option(USE_SYSTEM_GTEST "Use system version of GoogleTest" OFF) ++option(USE_SYSTEM_MARISA "Use system version of Marisa" OFF) ++option(USE_SYSTEM_PYBIND11 "Use system version of pybind11" OFF) ++option(USE_SYSTEM_RAPIDJSON "Use system version of RapidJSON" OFF) ++option(USE_SYSTEM_TCLAP "Use system version of TCLAP" OFF) + + ######## Package information + set (PACKAGE_URL https://github.com/BYVoid/Opencc) +@@ -173,7 +179,7 @@ + + ######## Dependencies + +-if(BUILD_BUNDLED_LIBMARISA) ++if(NOT USE_SYSTEM_MARISA) + message(STATUS "Use bundled marisa library.") + add_subdirectory(deps/marisa-0.2.5) + else() +@@ -195,20 +201,30 @@ + ######## Testing + + if (ENABLE_GTEST) +- add_subdirectory(deps/gtest-1.11.0) ++ if(NOT USE_SYSTEM_GTEST) ++ add_subdirectory(deps/gtest-1.11.0) ++ endif() + enable_testing() + endif() + + if (ENABLE_BENCHMARK) + set(BENCHMARK_ENABLE_TESTING OFF) +- add_subdirectory(deps/google-benchmark) ++ if(NOT USE_SYSTEM_GOOGLE_BENCHMARK) ++ add_subdirectory(deps/google-benchmark) ++ endif() + enable_testing() + endif() + + ######## Python + + if (BUILD_PYTHON) +- add_subdirectory(deps/pybind11-2.5.0) ++ if(USE_SYSTEM_PYBIND11) ++ include(pybind11Config) ++ include(pybind11Common) ++ include(pybind11Tools) ++ else() ++ add_subdirectory(deps/pybind11-2.5.0) ++ endif() + pybind11_add_module(opencc_clib src/py_opencc.cpp) + target_link_libraries(opencc_clib PRIVATE libopencc) + endif() +--- /src/CMakeLists.txt ++++ /src/CMakeLists.txt +@@ -1,7 +1,13 @@ + include (GenerateExportHeader) +-include_directories(../deps/marisa-0.2.5/include) +-include_directories(../deps/rapidjson-1.1.0) +-include_directories(../deps/tclap-1.2.2) ++if(NOT USE_SYSTEM_MARISA) ++ include_directories(../deps/marisa-0.2.5/include) ++endif() ++if(NOT USE_SYSTEM_RAPIDJSON) ++ include_directories(../deps/rapidjson-1.1.0) ++endif() ++if(NOT USE_SYSTEM_TCLAP) ++ include_directories(../deps/tclap-1.2.2) ++endif() + + # Library + +@@ -72,7 +78,9 @@ + ) + + if (ENABLE_DARTS) +- include_directories(../deps/darts-clone) ++ if(NOT USE_SYSTEM_DARTS) ++ include_directories(../deps/darts-clone) ++ endif() + set( + LIBOPENCC_HEADERS + ${LIBOPENCC_HEADERS} +--- /test/CMakeLists.txt ++++ /test/CMakeLists.txt +@@ -1,4 +1,3 @@ +-include_directories(../deps/libdarts/src) + include_directories(../src) + + set(CONFIG_TEST +@@ -27,7 +26,9 @@ + ) + endif() + +- include_directories(../deps/gtest-1.7.0/include) ++ if(NOT USE_SYSTEM_GTEST) ++ include_directories(../deps/gtest-1.7.0/include) ++ endif() + set(UNITTESTS + CommandLineConvertTest + ) diff --git a/app-i18n/opencc/opencc-1.0.5.ebuild b/app-i18n/opencc/opencc-1.0.5.ebuild index 44843b8daedb..662c999b73fe 100644 --- a/app-i18n/opencc/opencc-1.0.5.ebuild +++ b/app-i18n/opencc/opencc-1.0.5.ebuild @@ -27,7 +27,7 @@ fi # deps/tclap-1.2.1: MIT LICENSE="Apache-2.0 BSD-2 MIT test? ( BSD )" SLOT="0/2" -KEYWORDS="amd64 arm64 hppa ppc ppc64 sparc x86" +KEYWORDS="amd64 arm64 ~hppa ppc ppc64 sparc x86" IUSE="doc test" RESTRICT="!test? ( test )" diff --git a/app-i18n/opencc/opencc-1.1.0.ebuild b/app-i18n/opencc/opencc-1.1.0.ebuild new file mode 100644 index 000000000000..de16b2488ea2 --- /dev/null +++ b/app-i18n/opencc/opencc-1.1.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 2010-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +PYTHON_COMPAT=( python3_{6,7,8,9,10} ) + +inherit cmake python-any-r1 + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/BYVoid/OpenCC" +fi + +DESCRIPTION="Library for conversion between Traditional and Simplified Chinese characters" +HOMEPAGE="https://github.com/BYVoid/OpenCC" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz" +fi + +# OpenCC: Apache-2.0 +# deps/darts-clone: BSD-2 +# deps/gtest-1.11.0: BSD +# deps/marisa-0.2.5: || ( BSD-2 LGPL-2.1+ ) +# deps/rapidjson-1.1.0: MIT +# deps/tclap-1.2.2: MIT +LICENSE="Apache-2.0 BSD-2 MIT || ( BSD-2 LGPL-2.1+ ) test? ( BSD )" +SLOT="0/2" +KEYWORDS="~amd64 ~x86" +IUSE="doc test" +RESTRICT="!test? ( test )" + +BDEPEND="${PYTHON_DEPS} + doc? ( app-doc/doxygen )" +DEPEND="" +RDEPEND="" + +if [[ "${PV}" != "9999" ]]; then + S="${WORKDIR}/OpenCC-ver.${PV}" +fi + +PATCHES=( + "${FILESDIR}/${PN}-1.1.0-parallel_build.patch" +) + +DOCS=(AUTHORS NEWS.md README.md) + +src_prepare() { + cmake_src_prepare + + sed -e "s:\${DIR_SHARE_OPENCC}/doc:share/doc/${PF}:" -i doc/CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc ON OFF) + -DBUILD_SHARED_LIBS=ON + -DENABLE_GTEST=$(usex test ON OFF) + ) + + cmake_src_configure +} diff --git a/app-i18n/opencc/opencc-1.1.1.ebuild b/app-i18n/opencc/opencc-1.1.1.ebuild new file mode 100644 index 000000000000..a039b0c9253d --- /dev/null +++ b/app-i18n/opencc/opencc-1.1.1.ebuild @@ -0,0 +1,76 @@ +# Copyright 2010-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" +PYTHON_COMPAT=( python3_{6,7,8,9,10} ) + +inherit cmake python-any-r1 + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/BYVoid/OpenCC" +fi + +DESCRIPTION="Library for conversion between Traditional and Simplified Chinese characters" +HOMEPAGE="https://github.com/BYVoid/OpenCC" +if [[ "${PV}" == "9999" ]]; then + SRC_URI="" +else + SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="Apache-2.0" +SLOT="0/1.1" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="doc test" +RESTRICT="!test? ( test )" + +BDEPEND="${PYTHON_DEPS} + doc? ( app-doc/doxygen )" +DEPEND="dev-cpp/tclap + dev-libs/darts + dev-libs/marisa:0= + dev-libs/rapidjson + test? ( + dev-cpp/benchmark + dev-cpp/gtest + )" +RDEPEND="dev-libs/marisa:0=" + +if [[ "${PV}" != "9999" ]]; then + S="${WORKDIR}/OpenCC-ver.${PV}" +fi + +PATCHES=( + "${FILESDIR}/${PN}-1.1.0-parallel_build.patch" + "${FILESDIR}/${PN}-1.1.1-system_libraries.patch" +) + +DOCS=(AUTHORS NEWS.md README.md) + +src_prepare() { + rm -r deps || die + + cmake_src_prepare + + sed -e "s:\${DIR_SHARE_OPENCC}/doc:share/doc/${PF}:" -i doc/CMakeLists.txt || die +} + +src_configure() { + local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/rapidjson" + + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc ON OFF) + -DENABLE_BENCHMARK=$(usex test ON OFF) + -DENABLE_GTEST=$(usex test ON OFF) + -DUSE_SYSTEM_DARTS=ON + -DUSE_SYSTEM_GOOGLE_BENCHMARK=ON + -DUSE_SYSTEM_GTEST=ON + -DUSE_SYSTEM_MARISA=ON + -DUSE_SYSTEM_RAPIDJSON=ON + -DUSE_SYSTEM_TCLAP=ON + ) + + cmake_src_configure +} diff --git a/app-i18n/opencc/opencc-9999.ebuild b/app-i18n/opencc/opencc-9999.ebuild index 34e9408dac2c..8461eab49b5d 100644 --- a/app-i18n/opencc/opencc-9999.ebuild +++ b/app-i18n/opencc/opencc-9999.ebuild @@ -20,44 +20,56 @@ else SRC_URI="https://github.com/BYVoid/OpenCC/archive/ver.${PV}.tar.gz -> ${P}.tar.gz" fi -# OpenCC: Apache-2.0 -# deps/darts-clone: BSD-2 -# deps/gtest-1.11.0: BSD -# deps/marisa-0.2.5: || ( BSD-2 LGPL-2.1+ ) -# deps/rapidjson-1.1.0: MIT -# deps/tclap-1.2.2: MIT -LICENSE="Apache-2.0 BSD-2 MIT || ( BSD-2 LGPL-2.1+ ) test? ( BSD )" -SLOT="0/2" +LICENSE="Apache-2.0" +SLOT="0/1.1" KEYWORDS="" IUSE="doc test" RESTRICT="!test? ( test )" BDEPEND="${PYTHON_DEPS} doc? ( app-doc/doxygen )" -DEPEND="" -RDEPEND="" +DEPEND="dev-cpp/tclap + dev-libs/darts + dev-libs/marisa:0= + dev-libs/rapidjson + test? ( + dev-cpp/benchmark + dev-cpp/gtest + )" +RDEPEND="dev-libs/marisa:0=" if [[ "${PV}" != "9999" ]]; then S="${WORKDIR}/OpenCC-ver.${PV}" fi PATCHES=( - "${FILESDIR}/${PN}-stop-copy.patch" + "${FILESDIR}/${PN}-1.1.0-parallel_build.patch" + "${FILESDIR}/${PN}-1.1.2-system_libraries.patch" ) DOCS=(AUTHORS NEWS.md README.md) src_prepare() { + rm -r deps || die + cmake_src_prepare sed -e "s:\${DIR_SHARE_OPENCC}/doc:share/doc/${PF}:" -i doc/CMakeLists.txt || die } src_configure() { + local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/rapidjson" + local mycmakeargs=( -DBUILD_DOCUMENTATION=$(usex doc ON OFF) - -DBUILD_SHARED_LIBS=ON + -DENABLE_BENCHMARK=$(usex test ON OFF) -DENABLE_GTEST=$(usex test ON OFF) + -DUSE_SYSTEM_DARTS=ON + -DUSE_SYSTEM_GOOGLE_BENCHMARK=ON + -DUSE_SYSTEM_GTEST=ON + -DUSE_SYSTEM_MARISA=ON + -DUSE_SYSTEM_RAPIDJSON=ON + -DUSE_SYSTEM_TCLAP=ON ) cmake_src_configure diff --git a/app-i18n/rime-data/metadata.xml b/app-i18n/rime-data/metadata.xml index 6d55e417175e..e122af9f60ad 100644 --- a/app-i18n/rime-data/metadata.xml +++ b/app-i18n/rime-data/metadata.xml @@ -1,23 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>dlan@gentoo.org</email> - <name>Yixun Lan</name> - </maintainer> - <maintainer type="project"> - <email>cjk@gentoo.org</email> - <name>Cjk</name> - </maintainer> - <use> - <flag name="extra">Install extra packages</flag> - </use> - <upstream> - <maintainer> - <email>chen.sst@gmail.com</email> - <name>Gong Chen</name> - </maintainer> - <remote-id type="github">rime/brise</remote-id> - </upstream> + <maintainer type="person"> + <email>arfrever.fta@gmail.com</email> + <name>Arfrever Frehtes Taifersar Arahesis</name> + </maintainer> + <maintainer type="person"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <maintainer type="project"> + <email>cjk@gentoo.org</email> + <name>Cjk</name> + </maintainer> + <use> + <flag name="extra">Install extra packages</flag> + </use> + <upstream> + <maintainer> + <email>chen.sst@gmail.com</email> + <name>弓辰 (Gōng Chén)</name> + </maintainer> + <remote-id type="github">rime/brise</remote-id> + </upstream> <origin>gentoo-staging</origin> </pkgmetadata> diff --git a/app-i18n/tagainijisho/metadata.xml b/app-i18n/tagainijisho/metadata.xml index 45f2afa9b5f6..7b85fd182a1c 100644 --- a/app-i18n/tagainijisho/metadata.xml +++ b/app-i18n/tagainijisho/metadata.xml @@ -2,13 +2,14 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>calchan@gentoo.org</email> - <name>Denis Dupeyron</name> - </maintainer> - <maintainer type="person"> <email>arfrever.fta@gmail.com</email> <name>Arfrever Frehtes Taifersar Arahesis</name> </maintainer> + <maintainer type="person"> + <email>floppym@gentoo.org</email> + <name>Mike Gilbert</name> + <description>Proxy</description> + </maintainer> <longdescription> Tagaini Jisho is a free, open-source Japanese dictionary and kanji lookup tool that is available for Windows, MacOS X and Linux and aims at becoming your diff --git a/app-i18n/transifex-client/transifex-client-0.14.2.ebuild b/app-i18n/transifex-client/transifex-client-0.14.2.ebuild index 494f51e64d5e..678df83d5ead 100644 --- a/app-i18n/transifex-client/transifex-client-0.14.2.ebuild +++ b/app-i18n/transifex-client/transifex-client-0.14.2.ebuild @@ -18,7 +18,7 @@ KEYWORDS="~amd64 ~x86" IUSE="test" RESTRICT="!test? ( test )" -BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )" +BDEPEND="test? ( <dev-python/mock-4.0[${PYTHON_USEDEP}] )" RDEPEND="dev-python/GitPython[${PYTHON_USEDEP}] <dev-python/python-slugify-5.0.0[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] diff --git a/app-i18n/uchardet/uchardet-0.0.6-r2.ebuild b/app-i18n/uchardet/uchardet-0.0.6-r2.ebuild index 8d86ff1b0b38..da7d6a5567be 100644 --- a/app-i18n/uchardet/uchardet-0.0.6-r2.ebuild +++ b/app-i18n/uchardet/uchardet-0.0.6-r2.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://www.freedesktop.org/software/uchardet/releases/${P}.tar.xz" LICENSE="|| ( MPL-1.1 GPL-2+ LGPL-2.1+ )" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86" IUSE="cpu_flags_x86_sse2 static-libs test" RESTRICT="!test? ( test )" diff --git a/app-i18n/uim/uim-1.8.8.ebuild b/app-i18n/uim/uim-1.8.8.ebuild index 3ed23be0370a..2f6435d4dcfe 100644 --- a/app-i18n/uim/uim-1.8.8.ebuild +++ b/app-i18n/uim/uim-1.8.8.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 -inherit autotools elisp-common flag-o-matic gnome2-utils +inherit autotools elisp-common flag-o-matic gnome2-utils qmake-utils DESCRIPTION="A multilingual input method framework" HOMEPAGE="https://github.com/uim/uim" @@ -19,26 +19,17 @@ REQUIRED_USE="gtk? ( X ) qt5? ( X ) xft? ( X )" -CDEPEND="!dev-scheme/sigscheme - X? ( - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXft - x11-libs/libXrender - x11-libs/libXt - ) +COMMON_DEPEND=" anthy? ( app-i18n/anthy ) canna? ( app-i18n/canna ) curl? ( net-misc/curl ) eb? ( dev-libs/eb ) emacs? ( >=app-editors/emacs-23.1:* ) expat? ( dev-libs/expat ) - libffi? ( dev-libs/libffi:= ) gtk? ( x11-libs/gtk+:3 ) gtk2? ( x11-libs/gtk+:2 ) libedit? ( dev-libs/libedit ) + libffi? ( dev-libs/libffi:= ) libnotify? ( x11-libs/libnotify ) m17n-lib? ( dev-libs/m17n-lib ) ncurses? ( sys-libs/ncurses:0= ) @@ -49,13 +40,22 @@ CDEPEND="!dev-scheme/sigscheme ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) - )" -DEPEND="${CDEPEND} - dev-util/intltool - sys-devel/gettext - virtual/pkgconfig - X? ( x11-base/xorg-proto )" -RDEPEND="${CDEPEND} + ) + X? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXft + x11-libs/libXrender + x11-libs/libXt + ) +" +DEPEND="${COMMON_DEPEND} + X? ( x11-base/xorg-proto ) +" +RDEPEND="${COMMON_DEPEND} + !dev-scheme/sigscheme X? ( media-fonts/font-sony-misc l10n_ja? ( @@ -77,7 +77,13 @@ RDEPEND="${CDEPEND} ) ) l10n_zh-TW? ( media-fonts/intlfonts ) - )" + ) +" +BDEPEND=" + dev-util/intltool + sys-devel/gettext + virtual/pkgconfig +" PATCHES=( "${FILESDIR}"/${PN}-gentoo.patch @@ -86,6 +92,7 @@ PATCHES=( "${FILESDIR}"/${PN}-zh-TW.patch "${FILESDIR}"/${P}-fno-common.patch ) + DOCS=( AUTHORS NEWS README RELNOTE doc ) AT_NO_RECURSIVE="yes" @@ -121,6 +128,7 @@ src_configure() { $(use_enable nls) $(use_with qt5) $(use_with qt5 qt5-immodule) + _QMAKE5=$(qt5_get_bindir)/qmake $(use_with skk) $(use_with sqlite sqlite3) $(use_enable ssl openssl) @@ -214,7 +222,7 @@ pkg_postinst() { if use emacs; then elisp-site-regen - echo + elog elog "uim is autoloaded with Emacs with a minimal set of features:" elog "There is no keybinding defined to call it directly, so please" elog "create one yourself and choose an input method." |
