mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
Telegram: bump version
* build with ffmpeg4 (more stable) * temporary and dirty solution for disabling building with PCH At the moment our gcc13 port for x86 architecture does not support relocatable PCH - https://gcc.gnu.org/bugzilla//show_bug.cgi?id=110746
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From 08824027b015a014c40d7573b70c62e99b636c79 Mon Sep 17 00:00:00 2001
|
||||
From 1e2bebad798b1ee8b9dac52b60785b8f622ab30e Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 29 Oct 2023 22:21:07 +1000
|
||||
Date: Tue, 7 Nov 2023 21:10:21 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
13833
net-im/telegram-desktop/patches/pch_disable-4.11.6.patchset
Normal file
13833
net-im/telegram-desktop/patches/pch_disable-4.11.6.patchset
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
From 438a908f49de4831ffb8b04dc37d7f3f937a79ad Mon Sep 17 00:00:00 2001
|
||||
From b03656330c1117db00852a46f1cd1d87c00fa511 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 30 Oct 2023 20:41:28 +1000
|
||||
Date: Tue, 7 Nov 2023 21:11:07 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ index 0000000..e5f8b64
|
||||
+
|
||||
+resource("BEOS:default_shortcut") "S";
|
||||
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
|
||||
index 95ac565..612cffe 100644
|
||||
index 3ad5943..da7e4f2 100644
|
||||
--- a/Telegram/CMakeLists.txt
|
||||
+++ b/Telegram/CMakeLists.txt
|
||||
@@ -91,6 +91,15 @@ PRIVATE
|
||||
@@ -134,7 +134,7 @@ index 95ac565..612cffe 100644
|
||||
target_precompile_headers(Telegram PRIVATE $<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${src_loc}/stdafx.h>)
|
||||
nice_target_sources(Telegram ${src_loc}
|
||||
PRIVATE
|
||||
@@ -1476,6 +1485,17 @@ if (NOT build_winstore)
|
||||
@@ -1482,6 +1491,17 @@ if (NOT build_winstore)
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -152,9 +152,9 @@ index 95ac565..612cffe 100644
|
||||
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
remove_target_sources(Telegram ${src_loc}
|
||||
platform/linux/linux_wayland_integration.cpp
|
||||
@@ -1635,7 +1655,7 @@ if (build_macstore)
|
||||
else()
|
||||
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
|
||||
@@ -1670,7 +1690,7 @@ else()
|
||||
set(bundle_identifier "com.tdesktop.Telegram")
|
||||
endif()
|
||||
set(bundle_entitlements "Telegram.entitlements")
|
||||
- if (LINUX AND DESKTOP_APP_USE_PACKAGED)
|
||||
+ if (LINUX AND NOT HAIKU AND DESKTOP_APP_USE_PACKAGED)
|
||||
@@ -715,10 +715,10 @@ index 41828ed..9cb4c73 100644
|
||||
add("pavucontrol");
|
||||
add("alsamixergui");
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/tray_linux.cpp b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
|
||||
index 2a96e1f..a0a8a54 100644
|
||||
index a9e1de3..291eaa7 100644
|
||||
--- a/Telegram/SourceFiles/platform/linux/tray_linux.cpp
|
||||
+++ b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
|
||||
@@ -318,7 +318,7 @@ void Tray::createIcon() {
|
||||
@@ -285,7 +285,7 @@ void Tray::createIcon() {
|
||||
const auto showXEmbed = [=] {
|
||||
_aboutToShowRequests.fire({});
|
||||
InvokeQueued(_menuXEmbed.get(), [=] {
|
||||
@@ -1075,41 +1075,3 @@ index d9af92a..cd4ba1d 100644
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
||||
From 104dbfab0e3fc0769fb64449bc37070c816595d8 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 6 Nov 2023 23:11:45 +1000
|
||||
Subject: Fix for clang
|
||||
|
||||
|
||||
diff --git a/Telegram/SourceFiles/payments/payments_form.cpp b/Telegram/SourceFiles/payments/payments_form.cpp
|
||||
index 6099314..6d133e3 100644
|
||||
--- a/Telegram/SourceFiles/payments/payments_form.cpp
|
||||
+++ b/Telegram/SourceFiles/payments/payments_form.cpp
|
||||
@@ -299,7 +299,7 @@ MTPInputInvoice Form::inputInvoice() const {
|
||||
users->users
|
||||
) | ranges::views::transform([](not_null<UserData*> user) {
|
||||
return MTPInputUser(user->inputUser);
|
||||
- }) | ranges::to<QVector>),
|
||||
+ }) | ranges::to<QList>),
|
||||
users->boostPeer ? users->boostPeer->input : MTPInputPeer(),
|
||||
MTP_string(giftCode.currency),
|
||||
MTP_long(giftCode.amount)),
|
||||
@@ -325,12 +325,12 @@ MTPInputInvoice Form::inputInvoice() const {
|
||||
giveaway.additionalChannels
|
||||
) | ranges::views::transform([](not_null<ChannelData*> c) {
|
||||
return MTPInputPeer(c->input);
|
||||
- }) | ranges::to<QVector>()),
|
||||
+ }) | ranges::to<QList>()),
|
||||
MTP_vector<MTPstring>(ranges::views::all(
|
||||
giveaway.countries
|
||||
) | ranges::views::transform([](QString value) {
|
||||
return MTP_string(value);
|
||||
- }) | ranges::to<QVector>()),
|
||||
+ }) | ranges::to<QList>()),
|
||||
MTP_long(giftCode.randomId),
|
||||
MTP_int(giveaway.untilDate),
|
||||
MTP_string(giftCode.currency),
|
||||
--
|
||||
2.42.0
|
||||
|
||||
@@ -3,9 +3,9 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
|
||||
HOMEPAGE="https://www.telegram.org/"
|
||||
COPYRIGHT="2013-2023 Telegram"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
|
||||
CHECKSUM_SHA256="b5e84a934568e9160c1cacd1fb3f5f4079c1665e9a24d6de23e835fdb8ac9cfe"
|
||||
CHECKSUM_SHA256="4fdd344d9c702cb98ac50ef21cda39b2f4a709e8b6f34b078d1217d48643ae7e"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
|
||||
SOURCE_DIR="tdesktop-$portVersion-full"
|
||||
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"
|
||||
@@ -15,6 +15,7 @@ CHECKSUM_SHA256_2="613e7e357518739e1f7d035337f37c344b248283fd4d916ddc95df73c2ff8
|
||||
PATCHES="
|
||||
libtgvoip-$portVersion.patchset
|
||||
telegram_desktop-$portVersion.patchset
|
||||
pch_disable-$portVersion.patchset
|
||||
"
|
||||
ADDITIONAL_FILES="telegram_desktop.rdef.in"
|
||||
|
||||
@@ -26,7 +27,7 @@ PROVIDES="
|
||||
app:Telegram
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libabsl_strings$secondaryArchSuffix
|
||||
lib:libatomic$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix
|
||||
@@ -72,10 +73,9 @@ REQUIRES="
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
gcc${secondaryArchSuffix}_syslibs
|
||||
qt6_tools${secondaryArchSuffix}_devel
|
||||
devel:libabsl_strings$secondaryArchSuffix >= 2301.0.0
|
||||
devel:libavcodec$secondaryArchSuffix >= 59
|
||||
devel:libavcodec$secondaryArchSuffix >= 58
|
||||
devel:libboost_filesystem$secondaryArchSuffix >= 1.70.0
|
||||
devel:libboost_regex$secondaryArchSuffix >= 1.70.0
|
||||
devel:libboost_system$secondaryArchSuffix >= 1.70.0
|
||||
@@ -88,7 +88,6 @@ BUILD_REQUIRES="
|
||||
devel:libgthread_2.0$secondaryArchSuffix
|
||||
devel:libhunspell_1.7$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libLLVM_17$secondaryArchSuffix
|
||||
devel:liblz4$secondaryArchSuffix
|
||||
devel:liblzma$secondaryArchSuffix
|
||||
devel:libminizip$secondaryArchSuffix
|
||||
@@ -111,34 +110,40 @@ BUILD_REQUIRES="
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
makefile_engine
|
||||
cmd:clang$secondaryArchSuffix >= 17
|
||||
cmd:clang++$secondaryArchSuffix >= 17
|
||||
makefile_engine
|
||||
cmd:cmake
|
||||
cmd:find
|
||||
cmd:gawk
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:g_ir_scanner
|
||||
cmd:lld$secondaryArchSuffix >= 17
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:patch
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python3.10
|
||||
cmd:sed
|
||||
cmd:xargs
|
||||
cmd:yasm
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
if [ $targetArchitecture == x86_gcc2 ]; then
|
||||
cd $sourceDir
|
||||
patch -p1 < $sourceDir/pch_disable.patchset
|
||||
fi
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export DISABLE_ASLR=1
|
||||
export GI_GIR_PATH="`finddir B_SYSTEM_DATA_DIRECTORY`"/gir-1.0
|
||||
|
||||
local DISABLE_PRECOMPILE_HEADERS="OFF"
|
||||
|
||||
if [ $targetArchitecture == x86_gcc2 ]; then
|
||||
# disable stack protector
|
||||
sed -i -e '/-fstack-protector-all/d' cmake/options_linux.cmake
|
||||
sed -i -e '/_GLIBCXX_ASSERTIONS/d' cmake/options_linux.cmake
|
||||
# use clang for build
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
DISABLE_PRECOMPILE_HEADERS="ON"
|
||||
fi
|
||||
|
||||
# get API_ID and API_HASH from Debian
|
||||
@@ -157,9 +162,9 @@ BUILD()
|
||||
echo -e "\e[32m***************************************************************************\e[39m"
|
||||
fi
|
||||
|
||||
# build telegram
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=$DISABLE_PRECOMPILE_HEADERS \
|
||||
-DBoost_USE_STATIC_LIBS=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DTDESKTOP_API_TEST=OFF \
|
||||
Reference in New Issue
Block a user