Gentoo Archives: gentoo-commits

From: Rui Huang <vowstar@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-gfx/zwcad/
Date: Thu, 02 Jun 2022 09:15:37
Message-Id: 1654161302.71c6721b890bf8fffb2b877fee660dfa6dd0606a.vowstar@gentoo
1 commit: 71c6721b890bf8fffb2b877fee660dfa6dd0606a
2 Author: Huang Rui <vowstar <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 2 09:09:57 2022 +0000
4 Commit: Rui Huang <vowstar <AT> gmail <DOT> com>
5 CommitDate: Thu Jun 2 09:15:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=71c6721b
7
8 media-gfx/zwcad: fix fcitx problem and start script
9
10 Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
11
12 media-gfx/zwcad/zwcad-2022.22.2.2.3.ebuild | 18 ++++++++++++++++++
13 1 file changed, 18 insertions(+)
14
15 diff --git a/media-gfx/zwcad/zwcad-2022.22.2.2.3.ebuild b/media-gfx/zwcad/zwcad-2022.22.2.2.3.ebuild
16 index 9931adb9d..6c50bfc2c 100644
17 --- a/media-gfx/zwcad/zwcad-2022.22.2.2.3.ebuild
18 +++ b/media-gfx/zwcad/zwcad-2022.22.2.2.3.ebuild
19 @@ -77,11 +77,29 @@ src_install() {
20 sed -E -i 's/^Categories=.*$/Categories=Graphics;VectorGraphics;Engineering;Construction;2DGraphics;/g' "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/com.zwsoft.zwcad.desktop" || die
21 domenu "${S}/opt/apps/${MY_PGK_NAME}/entries/applications/com.zwsoft.zwcad.desktop"
22
23 + sed -i "1i\\export MONO_PATH=/opt/apps/${MY_PGK_NAME}/files/lib/mono/lib/mono/4.5\n" "${S}/opt/apps/${MY_PGK_NAME}/files/ZWCADRUN.sh" || die
24 + sed -E -i 's/export QT_IM_MODULE=fcitx//g' "${S}/opt/apps/${MY_PGK_NAME}/files/ZWCADRUN.sh" || die
25 +
26 # Add zw3d command
27 mkdir -p "${S}"/usr/bin/ || die
28
29 cat >> "${S}"/opt/apps/${MY_PGK_NAME}/zwcad <<- EOF || die
30 #!/bin/sh
31 +if [ -z "\${QT_IM_MODULE}" ]
32 +then
33 + if [ -n "\$(pidof fcitx5)" ]
34 + then
35 + export XMODIFIERS="@im=fcitx5"
36 + export QT_IM_MODULE=fcitx5
37 + elif [ -n "\$(pidof ibus-daemon)" ]
38 + then
39 + export XMODIFIERS="@im=ibus"
40 + export QT_IM_MODULE=ibus
41 + else
42 + export XMODIFIERS="@im=fcitx"
43 + export QT_IM_MODULE=fcitx
44 + fi
45 +fi
46 export MONO_PATH=/opt/apps/${MY_PGK_NAME}/files/lib/mono/lib/mono/4.5
47 sh /opt/apps/${MY_PGK_NAME}/files/ZWCADRUN.sh \$*
48 EOF