mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
Telegram: more fixes, almost builds now
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,128 +0,0 @@
|
||||
diff --git a/Telegram/SourceFiles/base/build_config.h b/Telegram/SourceFiles/base/build_config.h
|
||||
index 17316303..3a93c274 100644
|
||||
--- a/Telegram/SourceFiles/base/build_config.h
|
||||
+++ b/Telegram/SourceFiles/base/build_config.h
|
||||
@@ -30,13 +30,15 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
#define OS_LINUX 1
|
||||
#elif defined(_WIN32) // __APPLE__ || __linux__
|
||||
#define OS_WIN 1
|
||||
+#elif defined(__HAIKU__) // __APPLE__ || __linux__
|
||||
+#define OS_HAIKU 1
|
||||
#else // __APPLE__ || __linux__ || _WIN32
|
||||
#error Please add support for your platform in base/build_config.h
|
||||
#endif // else for __APPLE__ || __linux__ || _WIN32
|
||||
|
||||
// For access to standard POSIXish features, use OS_POSIX instead of a
|
||||
// more specific macro.
|
||||
-#if defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_HAIKU)
|
||||
#define OS_POSIX 1
|
||||
#endif // OS_MAC || OS_LINUX
|
||||
|
||||
diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h
|
||||
index 633c4e4a..0d09e7d2 100644
|
||||
--- a/Telegram/SourceFiles/config.h
|
||||
+++ b/Telegram/SourceFiles/config.h
|
||||
@@ -272,6 +272,8 @@ inline const char *cApiDeviceModel() {
|
||||
return "Mac";
|
||||
#elif defined Q_OS_LINUX
|
||||
return "PC";
|
||||
+#elif defined Q_OS_HAIKU
|
||||
+ return "PC";
|
||||
#endif
|
||||
}
|
||||
inline const char *cApiSystemVersion() {
|
||||
@@ -281,6 +283,8 @@ inline const char *cApiSystemVersion() {
|
||||
return "OS X";
|
||||
#elif defined Q_OS_LINUX
|
||||
return "Linux";
|
||||
+#elif defined Q_OS_Haiku
|
||||
+ return "Haiku";
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/Telegram/SourceFiles/ui/effects/panel_animation.h b/Telegram/SourceFiles/ui/effects/panel_animation.h
|
||||
index 2e35ece1..2a879a0d 100644
|
||||
--- a/Telegram/SourceFiles/ui/effects/panel_animation.h
|
||||
+++ b/Telegram/SourceFiles/ui/effects/panel_animation.h
|
||||
@@ -20,7 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
-#include "styles/style_widgets.h"
|
||||
+//#include "styles/style_widgets.h"
|
||||
|
||||
namespace Ui {
|
||||
|
||||
diff --git a/Telegram/SourceFiles/ui/emoji_config.h b/Telegram/SourceFiles/ui/emoji_config.h
|
||||
index d580ba7a..3d844a43 100644
|
||||
--- a/Telegram/SourceFiles/ui/emoji_config.h
|
||||
+++ b/Telegram/SourceFiles/ui/emoji_config.h
|
||||
@@ -21,7 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
#pragma once
|
||||
|
||||
#include "ui/text/text.h"
|
||||
-#include "emoji.h"
|
||||
+//#include "emoji.h"
|
||||
|
||||
namespace Ui {
|
||||
namespace Emoji {
|
||||
diff --git a/Telegram/SourceFiles/ui/text/text.h b/Telegram/SourceFiles/ui/text/text.h
|
||||
index f5bcd66d..272dbc80 100644
|
||||
--- a/Telegram/SourceFiles/ui/text/text.h
|
||||
+++ b/Telegram/SourceFiles/ui/text/text.h
|
||||
@@ -20,7 +20,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
-#include "private/qfontengine_p.h"
|
||||
+//#include "private/qfontengine_p.h"
|
||||
|
||||
#include "core/click_handler.h"
|
||||
#include "ui/text/text_entity.h"
|
||||
diff --git a/Telegram/SourceFiles/ui/widgets/shadow.h b/Telegram/SourceFiles/ui/widgets/shadow.h
|
||||
index fcce8cc1..f844881f 100644
|
||||
--- a/Telegram/SourceFiles/ui/widgets/shadow.h
|
||||
+++ b/Telegram/SourceFiles/ui/widgets/shadow.h
|
||||
@@ -17,7 +17,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
-#include "styles/style_widgets.h"
|
||||
+//#include "styles/style_widgets.h"
|
||||
|
||||
namespace Ui {
|
||||
|
||||
diff --git a/Telegram/ThirdParty/minizip/ioapi.c b/Telegram/ThirdParty/minizip/ioapi.c
|
||||
index 7f5c191b..649255c5 100644
|
||||
--- a/Telegram/ThirdParty/minizip/ioapi.c
|
||||
+++ b/Telegram/ThirdParty/minizip/ioapi.c
|
||||
@@ -14,7 +14,7 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
||||
+#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__HAIKU__)
|
||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
|
||||
diff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi
|
||||
index 2c464928..d97715c9 100644
|
||||
--- a/Telegram/gyp/telegram_linux.gypi
|
||||
+++ b/Telegram/gyp/telegram_linux.gypi
|
||||
@@ -74,10 +74,10 @@
|
||||
# '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
|
||||
],
|
||||
'cflags_cc': [
|
||||
- '<!(pkg-config 2> /dev/null --cflags appindicator-0.1)',
|
||||
- '<!(pkg-config 2> /dev/null --cflags gtk+-2.0)',
|
||||
- '<!(pkg-config 2> /dev/null --cflags glib-2.0)',
|
||||
- '<!(pkg-config 2> /dev/null --cflags dee-1.0)',
|
||||
+# '<!(pkg-config 2> /dev/null --cflags appindicator-0.1)',
|
||||
+# '<!(pkg-config 2> /dev/null --cflags gtk+-2.0)',
|
||||
+# '<!(pkg-config 2> /dev/null --cflags glib-2.0)',
|
||||
+# '<!(pkg-config 2> /dev/null --cflags dee-1.0)',
|
||||
],
|
||||
'configurations': {
|
||||
'Release': {
|
||||
@@ -11,28 +11,31 @@ SOURCE_URI_2="https://github.com/telegramdesktop/libtgvoip/archive/$COMMIT_2.zip
|
||||
CHECKSUM_SHA256_2="afd82dde02fb43c0e66e462a3da1d9e84ae76aa3e71d37e696c261aa151d3cdd"
|
||||
COMMIT_3="550ac2f159ca883d360c196149b466955c77a573"
|
||||
SOURCE_URI_3="https://github.com/mapbox/variant/archive/$COMMIT_3.zip"
|
||||
CHECKSUM_SHA256_3="ab8f86c9234cbd976d71923e080ca70f698dd29a388e05a43f112117ceea418b"
|
||||
CHECKSUM_SHA256_3="3676117c49db1ef1ff2818f6f70713c3a4469f0da8ecb5c98c157499322501fc"
|
||||
COMMIT_4="c5851a8161938798c5594a66420cb814fea92711"
|
||||
SOURCE_URI_4="https://github.com/Microsoft/GSL/archive/$COMMIT_4.zip"
|
||||
CHECKSUM_SHA256_4="2fe4befdd1cd69de435797c8c50cd7ce749d140982f2260eead90f31721d2c95"
|
||||
COMMIT_5="5ca44b68721833ae3731802ed99af67c6f38a53a"
|
||||
SOURCE_URI_5="https://github.com/philsquared/Catch/archive/$COMMIT_5.zip"
|
||||
CHECKSUM_SHA256_5="3774ee51ab7a14045b151c4f8927b85349436525f1fefe033f6e5772752f9cd9"
|
||||
|
||||
ADDITIONAL_FILES="tdesktop.rdef.in"
|
||||
PATCHES="tdesktop-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
PROVIDES="
|
||||
telegram$secondaryArchSuffix = $portVersion
|
||||
tdesktop$secondaryArchSuffix = $portVersion
|
||||
app:Telegram$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgthread_2.0$secondaryArchSuffix
|
||||
lib:liblzma$secondaryArchSuffix
|
||||
lib:libopus$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
@@ -48,9 +51,11 @@ REQUIRES="
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libavcodec$secondaryArchSuffix
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgthread_2.0$secondaryArchSuffix
|
||||
devel:liblzma$secondaryArchSuffix
|
||||
devel:libopus$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
@@ -62,7 +67,6 @@ BUILD_REQUIRES="
|
||||
devel:libQt5WebKitWidgets$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libQt5Xml$secondaryArchSuffix
|
||||
devel:libxcb$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
@@ -76,23 +80,12 @@ BUILD_PREREQUIRES="
|
||||
BUILD()
|
||||
{
|
||||
# link submodules
|
||||
ln -sfn $sourceDir2 Telegram/ThirdParty/libtgvoip
|
||||
ln -sfn $sourceDir3 Telegram/ThirdParty/variant
|
||||
ln -sfn $sourceDir4 Telegram/ThirdParty/GSL
|
||||
ln -sfn $sourceDir5 Telegram/ThirdParty/Catch
|
||||
ln -sfn $sourceDir2/libtgvoip-$COMMIT_2 Telegram/ThirdParty/libtgvoip
|
||||
ln -sfn $sourceDir3/variant-$COMMIT_3 Telegram/ThirdParty/variant
|
||||
ln -sfn $sourceDir4/GSL-$COMMIT_4 Telegram/ThirdParty/GSL
|
||||
ln -sfn $sourceDir5/Catch-$COMMIT_5 Telegram/ThirdParty/Catch
|
||||
|
||||
# ln -sfn $sourceDir2/libtgvoip-$COMMIT_2 Telegram/ThirdParty/libtgvoip
|
||||
# ln -sfn $sourceDir3/variant-$COMMIT_3 Telegram/ThirdParty/variant
|
||||
# ln -sfn $sourceDir4/GSL-$COMMIT_4 Telegram/ThirdParty/GSL
|
||||
# ln -sfn $sourceDir5/Catch-$COMMIT_5 Telegram/ThirdParty/Catch
|
||||
|
||||
# ln -sfn ../../../../sources-2/libtgvoip-757a5d8ec31aadcf387ac3cb135256152c18de1c Telegram/ThirdParty/libtgvoip
|
||||
# ln -sfn ../../../../sources-3/variant-550ac2f159ca883d360c196149b466955c77a573 Telegram/ThirdParty/variant
|
||||
# ln -sfn ../../../../sources-4/GSL-c5851a8161938798c5594a66420cb814fea92711 Telegram/ThirdParty/GSL
|
||||
# ln -sfn ../../../../sources-5/Catch-5ca44b68721833ae3731802ed99af67c6f38a53a Telegram/ThirdParty/Catch
|
||||
|
||||
cd Telegram ; gyp/refresh.sh
|
||||
cd ../out/Release
|
||||
Telegram/gyp/refresh.sh ; cd out/Release
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user