net-im/tencent-qq: bump version to 3.2.15_p250110
[gentoo-zh.git] / app-text / goldendict / goldendict-24.09.1.ebuild
blob06771a37efea5bf0d8333206583e6fb967dceadd
1 # Copyright 2022-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
5 PLOCALES="ar_SA ay_BO be_BY bg_BG crowdin cs_CZ de_CH de_DE el_GR eo_UY es_AR
6 es_BO es_ES fa_IR fi_FI fr_FR hi_IN ie_001 it_IT ja_JP jbo_EN ko_KR lt_LT
7 mk_MK nl_NL pl_PL pt_BR pt_PT qt_extra_es qt_extra_it qt_extra_lt qtwebengine_zh_CN
8 qu_PE ru_RU sk_SK sq_AL sr_SP sv_SE tg_TJ tk_TM tr_TR uk_UA vi_VN zh_CN zh_TW"
10 inherit cmake flag-o-matic plocale xdg
12 MY_PV="24.09.1-Release.ca9dd133"
14 DESCRIPTION="Feature-rich dictionary lookup program (qtwebengine fork)"
15 HOMEPAGE="https://xiaoyifang.github.io/goldendict-ng/"
16 SRC_URI="https://github.com/xiaoyifang/goldendict-ng/archive/v${MY_PV}.tar.gz"
18 S="${WORKDIR}/goldendict-ng-${MY_PV}"
19 LICENSE="
20 GPL-3
21 !systemfmt? ( MIT )
22 !systemtoml? ( MIT )
24 SLOT="0"
25 KEYWORDS="~amd64"
26 IUSE="ffmpeg epwing systemfmt systemtoml tts zim"
28 DEPEND="
29 app-arch/bzip2
30 app-arch/lzma
31 app-arch/xz-utils
32 app-i18n/opencc
33 app-text/hunspell
34 dev-libs/eb
35 dev-libs/lzo:2
36 dev-libs/xapian
37 dev-qt/qt5compat:6
38 dev-qt/qtbase:6[dbus,concurrent,cups,gui,network,sql,widgets,xml,X]
39 dev-qt/qtmultimedia:6
40 dev-qt/qtdeclarative:6
41 dev-qt/qtsvg:6
42 dev-qt/qtwebengine:6[widgets]
43 ffmpeg? (
44 media-libs/libao
45 media-video/ffmpeg:*
47 !ffmpeg? ( dev-qt/qtmultimedia:6[gstreamer] )
48 media-libs/libvorbis
49 tts? ( dev-qt/qtspeech:6 )
50 sys-libs/zlib
51 systemfmt? ( dev-libs/libfmt )
52 systemtoml? ( dev-cpp/tomlplusplus )
53 virtual/opengl
54 virtual/libiconv
55 x11-libs/libX11
56 x11-libs/libxkbcommon
57 x11-libs/libXtst
58 zim? ( app-arch/libzim )
60 RDEPEND="${DEPEND}"
61 BDEPEND="
62 dev-qt/qttools:6[assistant,linguist]
63 dev-vcs/git
64 virtual/pkgconfig
67 src_prepare() {
68 local loc_dir="${S}/locale"
69 plocale_find_changes "${loc_dir}" "" ".ts"
70 rm_loc() {
71 rm -vf "locale/${1}.ts" || die
73 plocale_for_each_disabled_locale rm_loc
75 cmake_src_prepare
78 src_configure() {
79 # stack overfow & std::bad_alloc on musl
80 use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
82 local mycmakeargs=(
83 -DWITH_FFMPEG_PLAYER=$(usex ffmpeg ON OFF)
84 -DWITH_EPWING_SUPPORT=$(usex epwing ON OFF)
85 -DUSE_SYSTEM_FMT=$(usex systemfmt ON OFF)
86 -DUSE_SYSTEM_TOML=$(usex systemtoml ON OFF)
87 -DWITH_TTS=$(usex tts ON OFF)
88 -DWITH_ZIM=$(usex zim ON OFF)
89 -DWITH_VCPKG_BREAKPAD=OFF
91 cmake_src_configure