65 lines
2.1 KiB
Bash
65 lines
2.1 KiB
Bash
# Template file for 'telegram-desktop'
|
|
pkgname=telegram-desktop
|
|
version=1.9.8
|
|
revision=1
|
|
wrksrc="tdesktop-${version}-full"
|
|
build_style=cmake
|
|
build_helper="qemu"
|
|
configure_args="-DTDESKTOP_API_ID=209235
|
|
-DTDESKTOP_API_HASH=169ee702e1df4b6e66d80311db36cc43
|
|
-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF -DTDESKTOP_USE_PACKAGED_TGVOIP=OFF
|
|
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON -DTDESKTOP_DISABLE_GTK_INTEGRATION=ON
|
|
-DTDESKTOP_LAUNCHER_BASENAME=org.telegram.desktop.desktop
|
|
-DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON
|
|
-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=ON"
|
|
hostmakedepends="pkg-config qt5-qmake qt5-host-tools python"
|
|
makedepends="alsa-lib-devel ffmpeg-devel libdbusmenu-glib-devel libopenal-devel
|
|
minizip-devel opus-devel xxHash-devel pulseaudio-devel qt5-devel range-v3
|
|
libva-devel enchant2-devel rapidjson liblz4-devel liblzma-devel rlottie-devel
|
|
MesaLib-devel"
|
|
depends="qt5-imageformats qt5>=5.13.2<5.13.3"
|
|
short_desc="Telegram Desktop messaging app"
|
|
maintainer="John <johnz@posteo.net>"
|
|
license="GPL-3.0-or-later WITH OpenSSL"
|
|
homepage="https://desktop.telegram.org/"
|
|
changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
|
|
distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
|
|
checksum=4dcf14cff65777a176a4552b982e67fa802668f29d212025b0c05342010a03e7
|
|
|
|
|
|
case $XBPS_TARGET_MACHINE in
|
|
mips*)
|
|
broken="unsupported"
|
|
;;
|
|
ppc64*) ;;
|
|
armv[56]*|ppc*)
|
|
makedepends+=" libatomic-devel"
|
|
LDFLAGS="-latomic"
|
|
;;
|
|
esac
|
|
|
|
if [ "$XBPS_WORDSIZE" -eq 32 ]; then
|
|
nodebug=yes
|
|
fi
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" qt5-devel"
|
|
fi
|
|
|
|
post_extract() {
|
|
_qt5_dep_ver="${depends#*>=}"
|
|
_qt5_dep_ver="${_qt5_dep_ver%<*}"
|
|
_qt5_version="$(xbps-uhelper version qt5)"
|
|
|
|
if [[ "${_qt5_version%_*}" != "${_qt5_dep_ver}" ]]; then
|
|
echo
|
|
msg_red "Qt5 version doesn't match version listed in \$depends\\n"
|
|
msg_red "${_qt5_version%_*} does not match ${_qt5_dep_ver}\\n"
|
|
exit 1
|
|
fi
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
ppc64*) ;;
|
|
armv[56]*|ppc*) vsed -e '/desktop-app::external_openal/ a atomic' \
|
|
-i Telegram/CMakeLists.txt ;;
|
|
esac
|
|
}
|