net-misc/rustdesk: update deps
[gentoo-zh.git] / app-i18n / librime / librime-1.8.5.ebuild
blob24691d1e74e39f09a09cc20ddfc9d7a7bf47f0cf
1 # Copyright 2012-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI="7"
6 inherit cmake
8 if [[ "${PV}" == "9999" ]]; then
9         inherit git-r3
11         EGIT_REPO_URI="https://github.com/rime/librime"
12         EGIT_SUBMODULES=()
15 DESCRIPTION="RIME (Rime Input Method Engine) core library"
16 HOMEPAGE="https://rime.im/ https://github.com/rime/librime"
17 if [[ "${PV}" == "9999" ]]; then
18         SRC_URI=""
19 else
20         SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
23 LICENSE="BSD"
24 SLOT="0/1-${PV}"
25 KEYWORDS="~amd64 ~arm64 ~x86"
26 IUSE="debug test"
27 RESTRICT="!test? ( test )"
29 BDEPEND="dev-libs/capnproto:0"
30 RDEPEND="app-i18n/opencc:0=
31         >=dev-cpp/glog-0.3.5:0=
32         dev-cpp/yaml-cpp:0=
33         dev-libs/boost:=
34         dev-libs/capnproto:0=
35         dev-libs/leveldb:0=
36         dev-libs/marisa:0="
37 DEPEND="${RDEPEND}
38         dev-libs/darts
39         dev-libs/utfcpp
40         x11-base/xorg-proto
41         test? ( dev-cpp/gtest )"
43 DOCS=(CHANGELOG.md README.md)
45 src_prepare() {
46         # eapply "${FILESDIR}/${PN}-1.6.0-boost-1.76.patch"
48         # Use headers of dev-libs/darts, dev-libs/utfcpp and x11-base/xorg-proto.
49         sed -e "/\${PROJECT_SOURCE_DIR}\/thirdparty/d" -i CMakeLists.txt || die
51         cmake_src_prepare
54 src_configure() {
55         local -x CXXFLAGS="${CXXFLAGS} -I${ESYSROOT}/usr/include/utf8cpp"
57         if use debug; then
58                 CXXFLAGS+=" -DDCHECK_ALWAYS_ON"
59         else
60                 CXXFLAGS+=" -DNDEBUG"
61         fi
63         local mycmakeargs=(
64                 -DBOOST_USE_CXX11=ON
65                 -DBUILD_TEST=$(usex test ON OFF)
66                 -DCMAKE_DISABLE_FIND_PACKAGE_Gflags=ON
67                 -DENABLE_EXTERNAL_PLUGINS=ON
68                 -DINSTALL_PRIVATE_HEADERS=ON
69         )
71         cmake_src_configure