1 # Copyright 2022-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
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}"
26 IUSE
="ffmpeg epwing systemfmt systemtoml tts zim"
38 dev-qt/qtbase:6[dbus,concurrent,cups,gui,network,sql,widgets,xml,X]
40 dev-qt/qtdeclarative:6
42 dev-qt/qtwebengine:6[widgets]
47 !ffmpeg? ( dev-qt/qtmultimedia:6[gstreamer] )
49 tts? ( dev-qt/qtspeech:6 )
51 systemfmt? ( dev-libs/libfmt )
52 systemtoml? ( dev-cpp/tomlplusplus )
58 zim? ( app-arch/libzim )
62 dev-qt/qttools:6[assistant,linguist]
68 local loc_dir
="${S}/locale"
69 plocale_find_changes
"${loc_dir}" "" ".ts"
71 rm -vf "locale/${1}.ts" || die
73 plocale_for_each_disabled_locale rm_loc
79 # stack overfow & std::bad_alloc on musl
80 use elibc_musl
&& append-ldflags
-Wl,-z,stack-size
=2097152
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