1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DEB_PN
="com.qq.weixin.deepin"
11 DESCRIPTION
="Tencent WeChat on Deepin Wine For Gentoo"
12 HOMEPAGE
="https://aur.archlinux.org/packages/deepin-wine-wechat"
15 https://github.com/vufa/deepin-wine-wechat-arch/releases/download/v${PV}-${MY_RV}/${P}-${MY_RV}-x86_64.pkg.tar.zst
16 fake-simsun? ( https://github.com/oatiz/lyraile-overlay/releases/download/tempfile/fake_simsun.ttc )
19 RESTRICT
="mirror strip"
24 IUSE
="+wqy-microhei fake-simsun reg-patch"
25 REQUIRED_USE
="wqy-microhei? ( !fake-simsun )"
28 app-emulation/deepin-wine-helper
29 app-emulation/deepin-wine6-stable
30 media-libs/alsa-lib[abi_x86_32]
31 media-libs/libpulse[abi_x86_32]
32 media-libs/openal[abi_x86_32]
33 media-plugins/alsa-plugins[abi_x86_32]
34 >=net-nds/openldap-2.4.0[abi_x86_32]
36 wqy-microhei? ( media-fonts/wqy-microhei )
52 7z x
-aoa "${S}/opt/apps/${DEB_PN}/files/files.7z" -o"${S}/deepinwechatdir" || die
53 unlink
"${S}/deepinwechatdir/drive_c/windows/Fonts/wqy-microhei.ttc" || die
54 if use wqy-microhei
; then
55 ln -sf "/usr/share/fonts/wqy-microhei/wqy-microhei.ttc" \
56 "${S}/deepinwechatdir/drive_c/windows/Fonts/wqy-microhei.ttc" || die
57 elif use fake-simsun
; then
58 # https://bbs.deepin.org/en/post/213530
59 cp "${DISTDIR}/fake_simsun.ttc" "${S}/deepinwechatdir/drive_c/windows/Fonts/" || die
61 if use reg-patch
; then
62 patch -p1 -d "${S}/deepinwechatdir/" < "${FILESDIR}/reg.patch" || die
64 7z a
-t7z -r "${S}"/files
.7z
"${S}"/deepinwechatdir
/* || die
65 md5sum "${S}/files.7z" | awk '{ print $1 }' > "${S}/opt/apps/${DEB_PN}/files/files.md5sum" || die
66 mv "${S}/files.7z" "${S}/opt/apps/${DEB_PN}/files/files.7z" || die
72 fperms
+x
/opt
/apps
/com.qq.weixin.deepin
/files
/run.sh
76 ewarn
"Because deepin changed DeployApp, WeChat will be reinstalled after"
77 ewarn
"upgrading from the old version."
78 find /home
-maxdepth 2 -name ".deepinwine" -exec rm -f "{}/Deepin-WeChat/reinstalled" \
; || die
82 find /home
-maxdepth 2 -name ".deepinwine" -exec rm -rf "{}/Deepin-WeChat/" \
; || die