net-im/dingtalk: add 7.6.25.4122001, fix executable stack

This commit is contained in:
qwe795138426 2025-02-14 10:37:26 +00:00 committed by peeweep
parent dd80d4fca8
commit 1a840c567b
5 changed files with 164 additions and 12 deletions

View File

@ -1,3 +1,4 @@
DIST com.alibabainc.dingtalk_7.0.40.30706_amd64.deb 248740444 BLAKE2B 3bf677efe06da1f3ddf1ed45097ad8c62b599a9037705cc582a3e0d69ae6f8a67cff29b01ceef475c8f6faadcf96505bf479bd3e5e95522bfc37046bcc93bdcc SHA512 cb6b5617a6026378c04f2ac6c3fc20b67cae0741669ec5df3718d1e170720fd391921b85a211fe786138cffd65dc7f1519d3a15589b718c76f83691659463d3a
DIST com.alibabainc.dingtalk_7.1.0.31017_amd64.deb 263272704 BLAKE2B 19de380ee37b2c387d5808f4cc09897ff9f5f08ddd371d99624bd7aeb12869d50dd85d7101efa6f1b7ac2e86ad5a6d23c3d6dc49891bd9cf22ab12407a769d92 SHA512 d3507ba93c51b74cd64022802348ccb452b32193d413da635befb8c71dc97719732c8b2e8820a183002c593b033ed8d950ab17069e0870aaf534afa55c04dc7d
DIST com.alibabainc.dingtalk_7.1.0.31120_amd64.deb 289377480 BLAKE2B 3b7060bfe45242c0d4d0f59ec2bf31e2de2c64d897d238bf8a3b586329dd2e15291704e92b771d60e42055f3c11541c299fc2f30c051571c7af7c87601fe4088 SHA512 564a17f27551fdb6b2bcc5818577ce940c548e58d5e32c0145ad0fcb50c9f6878d3772f434e436b5b259d365327ed00909b725b177f5557155b27d131bc6072f
DIST com.alibabainc.dingtalk_7.6.25.4122001_amd64.deb 356334500 BLAKE2B 6f4a05b74daace6a63dfffb8dc67a3a84101e216f55d1e4d31b7af84289173d2982d53ade11a830910764f34ce464d5919e358f706b0cb9a81d5f7916c58fc57 SHA512 613cb6f1a79580a892a0d5db2805a18c59905b585ef89635c602abf3ffe2c66dde4ba539ac2109450ab99f21ada27d7ec472fb746a1d3048c70d9b6e21042392

View File

@ -10,6 +10,8 @@ DESCRIPTION="Communication platform that supports video and audio conferencing"
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"
S=${WORKDIR}
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64"
@ -24,7 +26,7 @@ RDEPEND="
media-video/rtmpdump
net-misc/curl
net-nds/openldap
sys-libs/glibc
virtual/libc
sys-libs/zlib
sys-process/procps
x11-libs/gtk+:2
@ -35,9 +37,10 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="dev-util/patchelf"
S=${WORKDIR}
BDEPEND="
dev-util/patchelf
dev-util/execstack
"
QA_PREBUILT="*"
@ -58,6 +61,9 @@ src_install() {
# use system freetype, fix undefined symbol: FT_Get_Color_Glyph_Layer
rm -rf "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libfreetype.so* || die
# Fix */dingtalk_dll.so: cannot enable executable stack as shared object requires: Invalid argument
execstack -c "${WORKDIR}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/{dingtalk_dll,libconference_new}.so || die
# Set RPATH for preserve-libs handling
pushd "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}" || die
local x

View File

@ -10,6 +10,8 @@ DESCRIPTION="Communication platform that supports video and audio conferencing"
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"
S=${WORKDIR}
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64"
@ -24,7 +26,7 @@ RDEPEND="
media-video/rtmpdump
net-misc/curl
net-nds/openldap
sys-libs/glibc
virtual/libc
sys-libs/zlib
sys-process/procps
x11-libs/gtk+:2
@ -35,9 +37,10 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="dev-util/patchelf"
S=${WORKDIR}
BDEPEND="
dev-util/patchelf
dev-util/execstack
"
QA_PREBUILT="*"
@ -58,6 +61,9 @@ src_install() {
# use system freetype, fix undefined symbol: FT_Get_Color_Glyph_Layer
rm -rf "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libfreetype.so* || die
# Fix */dingtalk_dll.so: cannot enable executable stack as shared object requires: Invalid argument
execstack -c "${WORKDIR}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/{dingtalk_dll,libconference_new}.so || die
# Set RPATH for preserve-libs handling
pushd "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}" || die
local x

View File

@ -10,6 +10,8 @@ DESCRIPTION="Communication platform that supports video and audio conferencing"
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"
S=${WORKDIR}
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64"
@ -25,7 +27,7 @@ RDEPEND="
media-video/rtmpdump
net-misc/curl
net-nds/openldap
sys-libs/glibc
virtual/libc
sys-libs/zlib
sys-process/procps
x11-libs/gtk+:2
@ -36,9 +38,10 @@ RDEPEND="
DEPEND="${RDEPEND}"
BDEPEND="dev-util/patchelf"
S=${WORKDIR}
BDEPEND="
dev-util/patchelf
dev-util/execstack
"
QA_PREBUILT="*"
@ -59,6 +62,9 @@ src_install() {
# use system freetype, fix undefined symbol: FT_Get_Color_Glyph_Layer
rm -rf "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libfreetype.so* || die
# Fix */dingtalk_dll.so: cannot enable executable stack as shared object requires: Invalid argument
execstack -c "${WORKDIR}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/{dingtalk_dll,libconference_new}.so || die
# Set RPATH for preserve-libs handling
pushd "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}" || die
local x

View File

@ -0,0 +1,133 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PGK_NAME="com.alibabainc.dingtalk"
inherit desktop unpacker xdg
DESCRIPTION="Communication platform that supports video and audio conferencing"
HOMEPAGE="https://gov.dingtalk.com"
SRC_URI="https://dtapp-pub.dingtalk.com/dingtalk-desktop/xc_dingtalk_update/linux_deb/Release/0211/com.alibabainc.${PN}_${PV}_amd64.deb"
S=${WORKDIR}
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64"
RESTRICT="strip mirror bindist"
RDEPEND="
dev-libs/wayland
dev-libs/libthai
dev-qt/qtgui
media-libs/tiff-compat:4
media-libs/libpulse
media-video/rtmpdump
net-misc/curl
net-nds/openldap
virtual/libc
sys-libs/zlib
sys-process/procps
x11-libs/gtk+:2
x11-libs/gtk+:3
x11-libs/libXScrnSaver
virtual/libcrypt
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-util/patchelf
dev-util/execstack
"
QA_PREBUILT="*"
src_install() {
# Install scalable icon
doicon -s scalable "${FILESDIR}"/dingtalk.svg
# Remove the libraries that break compatibility in modern systems
# Dingtalk will use the system libs instead
MY_VERSION=$(cat "${S}"/opt/apps/"${MY_PGK_NAME}"/files/version)
# Use system stdc++
rm -f "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libstdc++* || die
# Use system glibc
rm -f "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libm.so* || die
# Use system zlib
rm -f "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libz* || die
# Use system libcurl, fix preserved depend problem
rm -f "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libcurl.so* || die
# use system freetype, fix undefined symbol: FT_Get_Color_Glyph_Layer
rm -rf "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/libfreetype.so* || die
# Fix */dingtalk_dll.so: cannot enable executable stack as shared object requires: Invalid argument
execstack -c "${WORKDIR}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_VERSION}"/{dingtalk_dll,libconference_new}.so || die
# Set RPATH for preserve-libs handling
pushd "${S}"/opt/apps/"${MY_PGK_NAME}"/files/"${MY_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/${MY_PGK_NAME}/files/${MY_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 ldd pattern error
sed -i 's/libc_version=.*/libc_version=`ldd --version | grep ldd | rev | cut -d" " -f1 | rev`/g' "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh || die
# Fix fcitx5
sed -i "s/export XMODIFIERS/#export XMODIFIERS/g" "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh || die
sed -i "s/export QT_IM_MODULE/#export QT_IM_MODULE/g" "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh || die
cat >> "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh.head <<- EOF || die
#!/bin/sh
if [ -z "\${QT_IM_MODULE}" ]
then
if [ -n "\$(pidof fcitx5)" ]
then
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=fcitx
elif [ -n "\$(pidof ibus-daemon)" ]
then
export XMODIFIERS="@im=ibus"
export QT_IM_MODULE=ibus
elif [ -n "\$(pidof fcitx)" ]
then
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=fcitx
fi
fi
EOF
cat "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh.head "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh > "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh.new || die
cat "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh.new > "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh || die
rm "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh.head "${S}"/opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh.new || die
# Add dingtalk command
mkdir -p "${S}"/usr/bin/ || die
ln -s /opt/apps/"${MY_PGK_NAME}"/files/Elevator.sh "${S}"/usr/bin/dingtalk || die
# Fix file path and desktop files
sed -E -i 's/^Icon=.*$/Icon=dingtalk/g' "${S}"/opt/apps/"${MY_PGK_NAME}"/entries/applications/*.desktop || die
mkdir -p usr/share/applications || die
mv "${S}"/opt/apps/"${MY_PGK_NAME}"/entries/applications/"${MY_PGK_NAME}".desktop usr/share/applications/ || die
# Install package and fix permissions
insinto /opt/apps
doins -r opt/apps/${MY_PGK_NAME}
insinto /usr
doins -r usr/*
pushd "${S}" || die
for x in $(find "opt/apps/${MY_PGK_NAME}") ; do
# Fix shell script permissions
[[ "${x: -3}" == ".sh" ]] && fperms 0755 "/${x}"
# Use \x7fELF header to separate ELF executables and libraries
[[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] && fperms 0755 "/${x}"
done
popd || die
}