Telegram: fix build for secondary arch

This commit is contained in:
Gerasim Troeglazov
2021-03-25 11:42:15 +10:00
parent d3f0e5bdac
commit acbd472d84
2 changed files with 15 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
From fea67a51ebf1df0671fcf631b13b579b6c9cc0f5 Mon Sep 17 00:00:00 2001
From 63c7b491bd09ccffd063713e380219a5435855db Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 24 Mar 2021 19:03:17 +1000
Date: Thu, 25 Mar 2021 11:17:40 +1000
Subject: Add Haiku support
@@ -152,10 +152,10 @@ index 139667e..81361ef 100644
#ifdef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
new file mode 100644
index 0000000..76f43f2
index 0000000..d784c03
--- /dev/null
+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
@@ -0,0 +1,252 @@
@@ -0,0 +1,247 @@
+/*
+This file is part of Telegram Desktop for Haiku,
+
@@ -180,14 +180,9 @@ index 0000000..76f43f2
+#include "core/core_settings.h"
+#include "main/main_session.h"
+
+#define USE_HAIKU_UINT64
+#include "base/haiku_types.h"
+
+#ifdef __x86_64__
+#define uint64 __haiku_uint64
+#else
+#define uint32 __haiku_uint32
+#endif
+
+#include <AppKit.h>
+#include <SupportKit.h>
+#include <Notification.h>
@@ -501,18 +496,25 @@ index f6b53fa..cb43253 100644
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
diff --git a/Telegram/lib_base/base/haiku_types.h b/Telegram/lib_base/base/haiku_types.h
new file mode 100644
index 0000000..1aec6c5
index 0000000..3a57ce2
--- /dev/null
+++ b/Telegram/lib_base/base/haiku_types.h
@@ -0,0 +1,17 @@
@@ -0,0 +1,24 @@
+#pragma once
+
+#ifdef Q_OS_HAIKU
+
+#define _SUPPORT_DEFS_H
+
+#ifdef __x86_64__
+#define int64 __haiku_int64
+#ifdef USE_HAIKU_UINT64
+#define uint64 __haiku_uint64
+#endif
+#else
+#define int32 __haiku_int32
+#define uint32 __haiku_uint32
+#endif
+
+typedef int32 status_t;
+typedef uint32 type_code;

View File

@@ -3,7 +3,7 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
HOMEPAGE="https://www.telegram.org/"
COPYRIGHT="2013-2021 Telegram"
LICENSE="GNU GPL v3"
REVISION="2"
REVISION="3"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
CHECKSUM_SHA256="41bfbe1ee63da9a6af7cf7d11b1cdd13a6754b51b294ac5a9d56f5f11dfbdd05"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"