From c9d5e36040f4853e99710c340432317848d228b3 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Sat, 22 Jan 2022 11:56:52 +0800 Subject: [PATCH] net-im/dingtalk: bump to 1.3.0.61 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Huang Rui --- net-im/dingtalk/Manifest | 1 + net-im/dingtalk/dingtalk-1.3.0.61.ebuild | 100 +++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 net-im/dingtalk/dingtalk-1.3.0.61.ebuild diff --git a/net-im/dingtalk/Manifest b/net-im/dingtalk/Manifest index c3c95fd4a..cba0a913f 100644 --- a/net-im/dingtalk/Manifest +++ b/net-im/dingtalk/Manifest @@ -1,2 +1,3 @@ DIST com.alibabainc.dingtalk_1.2.0.140_amd64.deb 245642704 BLAKE2B a6283c7912cf135c08d8774720055b9e663b7a65030064c001fcb7bef29317fd8d129a171fd85dd3ded257562bb46ffb662c0fe81f44ad20d82da3c76bb0c14a SHA512 d3c7b9c776c18059a8786153b6dd0936eb632b25a5e358a3b2cb0cf35bc5a1ed740d86f4e833be3c3e6a0819b7d772c5e36e4470468d56628e91490b2fead2f6 DIST com.alibabainc.dingtalk_1.2.0.147_amd64.deb 245650912 BLAKE2B 82bea61fd1e6a1d6eeec7aec3b024046f134dd1fba161f1f4d0e4ae5a1d672dd853e09ab2fa9588d4b41fb780c18ed23e4d053b8e64a44c2128b8143344cab44 SHA512 0c09917634748d44df06c19cc63f887737820784c22520520d111aae615b174812688d3c0d25ce3bc9acb61575bc5ec76d923e2057ca1497977f5044181e570d +DIST com.alibabainc.dingtalk_1.3.0.61_amd64.deb 228522300 BLAKE2B 25922c48f04927accc273c7debbcaa6cd901531c0d7d7d974e738e9da689fd3a69b5729a29ab2068360e57c298509c19dde1edb6b9c4202bf2ca906275a7f5db SHA512 c570d16d50c151b4fabf3f0424ded93403f1e6ca3c4f5f92553d7b082238b5dd8b6d5ad22c293da1287a6ae2eb2479112c9af0701aef2f9e8273bb01872c4976 diff --git a/net-im/dingtalk/dingtalk-1.3.0.61.ebuild b/net-im/dingtalk/dingtalk-1.3.0.61.ebuild new file mode 100644 index 000000000..1dabe55c4 --- /dev/null +++ b/net-im/dingtalk/dingtalk-1.3.0.61.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop multilib unpacker xdg + +DESCRIPTION="dingtalk" +HOMEPAGE="https://gov.dingtalk.com" +SRC_URI="https://dtapp-pub.dingtalk.com/dingtalk-desktop/xc_dingtalk_update/linux_deb/Release/com.alibabainc.${PN}_${PV}_amd64.deb" + +LICENSE="all-rights-reserved" +KEYWORDS="-* ~amd64" +SLOT="0" + +RESTRICT="strip mirror bindist" + +RDEPEND=" + dev-libs/libthai + dev-qt/qtgui + net-nds/openldap + media-sound/pulseaudio + media-video/rtmpdump + sys-libs/glibc + sys-libs/zlib + sys-process/procps + x11-libs/gtk+:2 + x11-libs/gtk+:3 + x11-libs/libXScrnSaver +" + +BDEPEND="dev-util/patchelf" + +DEPEND="${RDEPEND}" + +QA_PREBUILT="*" + +S=${WORKDIR} + +src_unpack() { + : +} + +src_install() { + dodir / + cd "${ED}" || die + unpacker + # Remove the libraries that break compatibility in modern systems + # Dingtalk will use the system libs instead + version=$(cat opt/apps/com.alibabainc.dingtalk/files/version) + # Use system stdc++ + rm opt/apps/com.alibabainc.dingtalk/files/${version}/libstdc++* || die + # Use system glibc + rm opt/apps/com.alibabainc.dingtalk/files/${version}/libm.so* || die + # Use system zlib + rm opt/apps/com.alibabainc.dingtalk/files/${version}/libz* || die + # Use system gtk+, or it can't be switch input method on popup window + rm opt/apps/com.alibabainc.dingtalk/files/${version}/libgtk-x11* || die + + # Set RPATH for preserve-libs handling + pushd "opt/apps/com.alibabainc.dingtalk/files/${version}/" || die + local x + for x in $(find) ; do + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue + local rpath_root="/opt/apps/com.alibabainc.dingtalk/files/${version}" + patchelf --set-rpath "${rpath_root}/:${rpath_root}/swiftshader/:${rpath_root}/platforminputcontexts/:${rpath_root}/imageformats/" "${x}" || \ + die "patchelf failed on ${x}" + done + popd || die + # Fix fcitx5 + sed -i "s/export XMODIFIERS/#export XMODIFIERS/g" opt/apps/com.alibabainc.dingtalk/files/Elevator.sh || die + sed -i "s/export QT_IM_MODULE/#export QT_IM_MODULE/g" opt/apps/com.alibabainc.dingtalk/files/Elevator.sh || die + + cat >> opt/apps/com.alibabainc.dingtalk/files/Elevator.sh.head <<- EOF || die +#!/bin/sh +if [ -z "\${QT_IM_MODULE}" ] +then + if [ -n "\$(pidof fcitx5)" ] + then + export XMODIFIERS="@im=fcitx5" + export QT_IM_MODULE=fcitx5 + elif [ -n "\$(pidof ibus-daemon)" ] + then + export XMODIFIERS="@im=ibus" + export QT_IM_MODULE=ibus + else + export XMODIFIERS="@im=fcitx" + export QT_IM_MODULE=fcitx + fi +fi + EOF + + cat opt/apps/com.alibabainc.dingtalk/files/Elevator.sh.head opt/apps/com.alibabainc.dingtalk/files/Elevator.sh > opt/apps/com.alibabainc.dingtalk/files/Elevator.sh.new || die + cat opt/apps/com.alibabainc.dingtalk/files/Elevator.sh.new > opt/apps/com.alibabainc.dingtalk/files/Elevator.sh || die + rm opt/apps/com.alibabainc.dingtalk/files/Elevator.sh.head opt/apps/com.alibabainc.dingtalk/files/Elevator.sh.new || die + + mkdir -p usr/share/applications || die + cp opt/apps/com.alibabainc.dingtalk/entries/applications/com.alibabainc.dingtalk.desktop usr/share/applications/ || die +} -- 2.11.4.GIT