mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-02 04:58:52 +02:00
Telegram: disable ASLR and set heap limit for build
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From df98777e9f9c0dabedcd773bd48aca2067f7b76f Mon Sep 17 00:00:00 2001
|
||||
From 7e56df8f6daa4f1960535050c130b86ee8d0026f Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 5 Oct 2019 18:16:54 +1000
|
||||
Date: Sun, 6 Oct 2019 15:25:59 +1000
|
||||
Subject: Add Sonnet spell checking
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ index ae480a0..fe65db1 100644
|
||||
|
||||
class MaskedInputField : public RpWidgetWrap<QLineEdit> {
|
||||
diff --git a/Telegram/gyp/common/haiku.gypi b/Telegram/gyp/common/haiku.gypi
|
||||
index a1fe2c9..b6c57c3 100644
|
||||
index 0c55076..b077e62 100644
|
||||
--- a/Telegram/gyp/common/haiku.gypi
|
||||
+++ b/Telegram/gyp/common/haiku.gypi
|
||||
@@ -35,7 +35,16 @@
|
||||
@@ -71,11 +71,11 @@ index a1fe2c9..b6c57c3 100644
|
||||
+ '<(haiku_path_include)/KF5/SonnetUi/Sonnet',
|
||||
+ '<(haiku_path_include)/KF5/SonnetUi/sonnet',
|
||||
+ ],
|
||||
'conditions': [
|
||||
[ '"<!(uname -p)" == "x86_64"', {
|
||||
'defines': [
|
||||
'defines': [
|
||||
'_REENTRANT',
|
||||
'QT_PLUGIN',
|
||||
diff --git a/Telegram/gyp/telegram/haiku.gypi b/Telegram/gyp/telegram/haiku.gypi
|
||||
index c12e292..c4ce5b6 100644
|
||||
index 58da6a6..008585e 100644
|
||||
--- a/Telegram/gyp/telegram/haiku.gypi
|
||||
+++ b/Telegram/gyp/telegram/haiku.gypi
|
||||
@@ -30,6 +30,12 @@
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From cbe3568b0c1aca96b787aae53120ec157c169f24 Mon Sep 17 00:00:00 2001
|
||||
From fb5d922dc83f3b243f74d0b0fc7ae89e50735a4d Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 5 Oct 2019 18:11:55 +1000
|
||||
Date: Sun, 6 Oct 2019 15:18:21 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
@@ -44,22 +44,6 @@ index 3bcb595..b97d66a 100644
|
||||
#define OS_POSIX 1
|
||||
#endif // OS_MAC || OS_LINUX
|
||||
|
||||
diff --git a/Telegram/SourceFiles/base/flat_set_tests.cpp b/Telegram/SourceFiles/base/flat_set_tests.cpp
|
||||
index a73f1d2..77d98a6 100644
|
||||
--- a/Telegram/SourceFiles/base/flat_set_tests.cpp
|
||||
+++ b/Telegram/SourceFiles/base/flat_set_tests.cpp
|
||||
@@ -5,7 +5,11 @@ the official desktop application for the Telegram messaging service.
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
+#if !defined(Q_OS_HAIKU)
|
||||
#include "catch.hpp"
|
||||
+#else
|
||||
+#include "../ThirdParty/variant/test/include/catch.hpp"
|
||||
+#endif
|
||||
|
||||
#include "base/flat_set.h"
|
||||
|
||||
diff --git a/Telegram/SourceFiles/core/crash_reports.cpp b/Telegram/SourceFiles/core/crash_reports.cpp
|
||||
index ce938a3..02066c7 100644
|
||||
--- a/Telegram/SourceFiles/core/crash_reports.cpp
|
||||
@@ -2379,10 +2363,10 @@ index 6531a7a..242f869 100644
|
||||
'libs_loc%': '<(libs_loc)',
|
||||
diff --git a/Telegram/gyp/common/haiku.gypi b/Telegram/gyp/common/haiku.gypi
|
||||
new file mode 100644
|
||||
index 0000000..a1fe2c9
|
||||
index 0000000..0c55076
|
||||
--- /dev/null
|
||||
+++ b/Telegram/gyp/common/haiku.gypi
|
||||
@@ -0,0 +1,87 @@
|
||||
@@ -0,0 +1,67 @@
|
||||
+# This file is part of Telegram Desktop,
|
||||
+# the official desktop version of Telegram messaging app, see https://telegram.org
|
||||
+#
|
||||
@@ -2400,7 +2384,7 @@ index 0000000..a1fe2c9
|
||||
+# to link the code of portions of this program with the OpenSSL library.
|
||||
+#
|
||||
+# Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||
+# Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
+# Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
+
|
||||
+{
|
||||
+ 'conditions': [
|
||||
@@ -2421,46 +2405,26 @@ index 0000000..a1fe2c9
|
||||
+ '-Wno-sign-compare',
|
||||
+ ],
|
||||
+ },
|
||||
+ 'conditions': [
|
||||
+ [ '"<!(uname -p)" == "x86_64"', {
|
||||
+ 'defines': [
|
||||
+ 'Q_OS_HAIKU',
|
||||
+ 'TDESKTOP_DISABLE_CRASH_REPORTS',
|
||||
+ 'TDESKTOP_DISABLE_AUTOUPDATE',
|
||||
+ 'TDESKTOP_DISABLE_UNITY_INTEGRATION',
|
||||
+ 'TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION',
|
||||
+ ],
|
||||
+ 'conditions': [
|
||||
+ [ '"<(official_build_target)" != "" and "<(official_build_target)" != "haiku"', {
|
||||
+ 'sources': [ '__Wrong_Official_Build_Target_<(official_build_target)_' ],
|
||||
+ }],
|
||||
+ ],
|
||||
+ }, {
|
||||
+ 'defines': [
|
||||
+ 'Q_OS_HAIKU',
|
||||
+ 'TDESKTOP_DISABLE_CRASH_REPORTS',
|
||||
+ 'TDESKTOP_DISABLE_AUTOUPDATE',
|
||||
+ 'TDESKTOP_DISABLE_UNITY_INTEGRATION',
|
||||
+ 'TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION',
|
||||
+ ],
|
||||
+ 'conditions': [
|
||||
+ [ '"<(official_build_target)" != "" and "<(official_build_target)" != "haiku"', {
|
||||
+ 'sources': [ '__Wrong_Official_Build_Target_<(official_build_target)_' ],
|
||||
+ }],
|
||||
+ ],
|
||||
+ }],
|
||||
+ ],
|
||||
+ 'defines': [
|
||||
+ '_REENTRANT',
|
||||
+ 'QT_PLUGIN',
|
||||
+ 'Q_OS_HAIKU',
|
||||
+ 'TDESKTOP_DISABLE_CRASH_REPORTS',
|
||||
+ 'TDESKTOP_DISABLE_AUTOUPDATE',
|
||||
+ 'TDESKTOP_DISABLE_UNITY_INTEGRATION',
|
||||
+ 'TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION',
|
||||
+ ],
|
||||
+ 'cflags_c': [
|
||||
+ '<@(haiku_common_flags)',
|
||||
+ '-std=gnu11',
|
||||
+ '--param ggc-min-expand=10',
|
||||
+ '--param ggc-min-heapsize=8192',
|
||||
+ ],
|
||||
+ 'cflags_cc': [
|
||||
+ '<@(haiku_common_flags)',
|
||||
+ '-std=c++1z',
|
||||
+ '--param ggc-min-expand=10',
|
||||
+ '--param ggc-min-heapsize=8192',
|
||||
+ '-Wno-register',
|
||||
+ ],
|
||||
+ 'configurations': {
|
||||
@@ -2743,10 +2707,10 @@ index f5624a8..fd1e3bd 100644
|
||||
'<(RULE_INPUT_PATH)',
|
||||
diff --git a/Telegram/gyp/telegram/haiku.gypi b/Telegram/gyp/telegram/haiku.gypi
|
||||
new file mode 100644
|
||||
index 0000000..c12e292
|
||||
index 0000000..58da6a6
|
||||
--- /dev/null
|
||||
+++ b/Telegram/gyp/telegram/haiku.gypi
|
||||
@@ -0,0 +1,71 @@
|
||||
@@ -0,0 +1,79 @@
|
||||
+# This file is part of Telegram Desktop,
|
||||
+# the official desktop version of Telegram messaging app, see https://telegram.org
|
||||
+#
|
||||
@@ -2764,7 +2728,7 @@ index 0000000..c12e292
|
||||
+# to link the code of portions of this program with the OpenSSL library.
|
||||
+#
|
||||
+# Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||
+# Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
||||
+# Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
+
|
||||
+{
|
||||
+ 'conditions': [[ 'build_haiku', {
|
||||
@@ -2799,15 +2763,23 @@ index 0000000..c12e292
|
||||
+ '-lz',
|
||||
+# '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
|
||||
+ ],
|
||||
+ 'cflags_cc': [
|
||||
+ '-Wno-strict-overflow',
|
||||
+ '-Wno-maybe-uninitialized',
|
||||
+ ],
|
||||
+ 'configurations': {
|
||||
+ 'Release': {
|
||||
+ 'cflags': [
|
||||
+ '-Ofast',
|
||||
+ '-fno-strict-aliasing',
|
||||
+ '--param ggc-min-expand=10',
|
||||
+ '--param ggc-min-heapsize=8192',
|
||||
+ ],
|
||||
+ 'cflags_cc': [
|
||||
+ '-Ofast',
|
||||
+ '-fno-strict-aliasing',
|
||||
+ '--param ggc-min-expand=10',
|
||||
+ '--param ggc-min-heapsize=8192',
|
||||
+ ],
|
||||
+ 'ldflags': [
|
||||
+ '-Ofast',
|
||||
|
||||
@@ -3,7 +3,7 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
|
||||
HOMEPAGE="https://www.telegram.org/"
|
||||
COPYRIGHT="2013-2019 Telegram"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="3d5642d609415cbfe4ba72276947ec63b2ebeb6de2fdd0aa942e8a0f089f0f57"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion.tar.gz"
|
||||
@@ -44,7 +44,8 @@ srcGitRev_10="9a2a9f2d0f38a39c5ec9b329042ca5f060b058e0"
|
||||
SOURCE_URI_10="https://github.com/lz4/lz4/archive/$srcGitRev_10.tar.gz"
|
||||
CHECKSUM_SHA256_10="fb17b28934ea7f85bd381dd183d765973f7e90a7e2ebc2415af61fe6848741cc"
|
||||
SOURCE_FILENAME_10="lz4-$srcGitRev_10.tar.gz"
|
||||
SOURCE_URI_11="https://salsa.debian.org/debian/telegram-desktop/raw/debian/master/debian/rules#noarchive"
|
||||
srcGitRev_11="0663103551379b958b2e79c51d51d163ec484300"
|
||||
SOURCE_URI_11="https://salsa.debian.org/debian/telegram-desktop/raw/$srcGitRev_11/debian/rules#noarchive"
|
||||
CHECKSUM_SHA256_11="2b24fb808acee36b5a15824c4ff8bd8b8e83a326a9e4593d2b21922425c5ffb3"
|
||||
|
||||
PATCHES="
|
||||
@@ -165,6 +166,7 @@ BUILD()
|
||||
Telegram/gyp/refresh.sh --api-id $TELEGRAM_API_ID --api-hash $TELEGRAM_API_HASH
|
||||
cd out/Release
|
||||
# multi-job takes too much memory
|
||||
export DISABLE_ASLR=1
|
||||
make
|
||||
|
||||
#build notify gate tool
|
||||
|
||||
Reference in New Issue
Block a user