remove ia64 keywords
[gentoo-zh.git] / app-text / goldendict / goldendict-24.05.05.ebuild
blob81881218e5082da04a118bc06eb69c2d0593b0ae
1 # Copyright 1999-2022 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 es_BO es_ES fa_IR fi_FI fr_FR hi_IN ie_001 it_IT ja_JP jbo_EN ko_KR lt_LT mk_MK nl_NL pl_PL pt_BR pt_PT qt_extra_es qt_extra_it qt_extra_lt qtwebengine_zh_CN 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"
7 inherit desktop qmake-utils flag-o-matic xdg-utils plocale
9 MY_PV="24.05.05-LiXia.ecd1138c"
11 DESCRIPTION="Feature-rich dictionary lookup program (qtwebengine fork)"
12 HOMEPAGE="https://xiaoyifang.github.io/goldendict-ng/"
13 SRC_URI="https://github.com/xiaoyifang/goldendict-ng/archive/v${MY_PV}.tar.gz"
15 S="${WORKDIR}/goldendict-ng-${MY_PV}"
16 LICENSE="GPL-3"
17 SLOT="0"
18 KEYWORDS="~amd64"
19 IUSE="debug ffmpeg opencc multimedia wayland xapian zim"
21 RDEPEND="
22 app-arch/bzip2
23 app-arch/xz-utils
24 virtual/libiconv
25 >=app-text/hunspell-1.2:=
26 dev-libs/eb
27 dev-libs/lzo
28 dev-qt/qtbase:6[X,concurrent,gui,network,sql,widgets,xml]
29 dev-qt/qtmultimedia:6
30 dev-qt/qtspeech:6
31 dev-qt/qtsvg:6
32 dev-qt/qtwebengine:6[widgets]
33 dev-qt/qtdeclarative:6
34 dev-qt/qt5compat:6
35 media-libs/libvorbis
36 sys-libs/zlib
37 x11-libs/libX11
38 x11-libs/libXtst
39 virtual/opengl
40 ffmpeg? (
41 media-libs/libao
42 media-video/ffmpeg:0=
44 opencc? ( app-i18n/opencc )
45 multimedia? ( dev-qt/qtmultimedia[gstreamer] )
46 xapian? ( dev-libs/xapian )
47 zim? ( app-arch/libzim )
49 DEPEND="${RDEPEND}"
50 BDEPEND="
51 dev-qt/qttools:6[assistant,linguist]
52 virtual/pkgconfig
55 src_prepare() {
56 default
58 use wayland && eapply "${FILESDIR}/remove-X11.patch"
60 # disable git
61 sed -i -e '/git describe/s/^/#/' ${PN}.pro || die
63 # fix flags
64 echo "QMAKE_CXXFLAGS_RELEASE = ${CFLAGS}" >> goldendict.pro
65 echo "QMAKE_CFLAGS_RELEASE = ${CXXFLAGS}" >> goldendict.pro
67 local loc_dir="${S}/locale"
68 plocale_find_changes "${loc_dir}" "" ".ts"
69 rm_loc() {
70 rm -vf "locale/${1}.ts" || die
71 sed -i "/${1}.ts/d" ${PN}.pro || die
73 plocale_for_each_disabled_locale rm_loc
76 src_configure() {
77 local myconf=( CONFIG+=use_iconv CONFIG+=release )
78 use opencc && myconf+=( CONFIG+=chinese_conversion_support )
79 use ffmpeg || myconf+=( CONFIG+=no_ffmpeg_player )
80 use multimedia || myconf+=( CONFIG+=no_qtmultimedia_player )
81 use xapian && myconf+=( CONFIG+=use_xapian )
82 use zim && myconf+=( CONFIG+=zim_support )
84 # stack overfow & std::bad_alloc on musl
85 use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
87 eqmake6 "${myconf[@]}" PREFIX="/usr" goldendict.pro
90 src_install() {
91 dobin ${PN}
92 domenu redist/io.github.xiaoyifang.goldendict_ng.desktop
93 doicon redist/icons/${PN}.png
95 insinto /usr/share/${PN}/locale
96 doins .qm/*.qm
99 pkg_postinst() {
100 xdg_icon_cache_update
101 xdg_desktop_database_update
104 pkg_postrm() {
105 xdg_icon_cache_update
106 xdg_desktop_database_update