git: 7f38c6b7d630 - main - net-im/telegram-desktop: pretend FreeBSD is Linux

From: Adriaan de Groot <adridg_at_FreeBSD.org>
Date: Sun, 08 Jan 2023 21:36:21 UTC
The branch main has been updated by adridg:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f38c6b7d6302846e806592db36f43e32a785b8b

commit 7f38c6b7d6302846e806592db36f43e32a785b8b
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2022-12-24 23:59:58 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2023-01-08 21:35:12 +0000

    net-im/telegram-desktop: pretend FreeBSD is Linux
    
    This may be superfluous, since there's a -DLINUX=1 in
    the ports Makefile now as well.
---
 net-im/telegram-desktop/Makefile                   |  3 ++-
 net-im/telegram-desktop/files/patch-CMakeLists.txt | 10 ++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/net-im/telegram-desktop/Makefile b/net-im/telegram-desktop/Makefile
index 2688ce85acba..68d21fdffae7 100644
--- a/net-im/telegram-desktop/Makefile
+++ b/net-im/telegram-desktop/Makefile
@@ -72,7 +72,8 @@ USE_GL=		gl
 USE_GNOME=	glib20 glibmm26
 USE_XORG=	x11 xcb xcomposite xdamage xext xfixes xrandr xrender xtst
 
-CMAKE_ARGS=	-DTDESKTOP_API_ID=${TELEGRAM_API_ID} -DTDESKTOP_API_HASH=${TELEGRAM_API_HASH}
+CMAKE_ARGS=	-DTDESKTOP_API_ID=${TELEGRAM_API_ID} -DTDESKTOP_API_HASH=${TELEGRAM_API_HASH} \
+		-DLINUX=1
 CMAKE_ON=	DESKTOP_APP_USE_PACKAGED DESKTOP_APP_DISABLE_CRASH_REPORTS \
 		DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
 CMAKE_OFF=	DESKTOP_APP_USE_PACKAGED_FONTS
diff --git a/net-im/telegram-desktop/files/patch-CMakeLists.txt b/net-im/telegram-desktop/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..6a00ae221e94
--- /dev/null
+++ b/net-im/telegram-desktop/files/patch-CMakeLists.txt
@@ -0,0 +1,10 @@
+--- CMakeLists.txt.orig	2022-12-25 22:21:34.522573000 +0100
++++ CMakeLists.txt	2022-12-25 22:21:42.197358000 +0100
+@@ -31,6 +31,7 @@
+     HOMEPAGE_URL "https://desktop.telegram.org"
+ )
+ set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Telegram)
++set(LINUX 1)
+ 
+ get_filename_component(third_party_loc "Telegram/ThirdParty" REALPATH)
+ get_filename_component(submodules_loc "Telegram" REALPATH)