git: 47f880fc44ad - main - net-im/tde2e: add new port, a framework for net-im/telegram-desktop
Date: Fri, 23 May 2025 20:00:01 UTC
The branch main has been updated by osa:
URL: https://cgit.FreeBSD.org/ports/commit/?id=47f880fc44ad51abaf4a8e23f3ac8b9429c4bebe
commit 47f880fc44ad51abaf4a8e23f3ac8b9429c4bebe
Author: Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2025-05-23 19:56:46 +0000
Commit: Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2025-05-23 19:59:49 +0000
net-im/tde2e: add new port, a framework for net-im/telegram-desktop
---
net-im/Makefile | 1 +
net-im/tde2e/Makefile | 30 ++++++++++++++++++++++
net-im/tde2e/distinfo | 3 +++
net-im/tde2e/files/patch-CMakeLists.txt | 11 ++++++++
.../patch-CMake_GetGitRevisionDescription.cmake | 11 ++++++++
net-im/tde2e/pkg-descr | 2 ++
net-im/tde2e/pkg-plist | 10 ++++++++
7 files changed, 68 insertions(+)
diff --git a/net-im/Makefile b/net-im/Makefile
index e6f3d7039073..c218b559529e 100644
--- a/net-im/Makefile
+++ b/net-im/Makefile
@@ -141,6 +141,7 @@
SUBDIR += spectral
SUBDIR += ssh-chat
SUBDIR += sshout
+ SUBDIR += tde2e
SUBDIR += tdlib
SUBDIR += tdlib-purple
SUBDIR += telegram-cli
diff --git a/net-im/tde2e/Makefile b/net-im/tde2e/Makefile
new file mode 100644
index 000000000000..26dbcbd47ed1
--- /dev/null
+++ b/net-im/tde2e/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= tde2e
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.8.49
+CATEGORIES= net-im devel
+
+MAINTAINER= osa@FreeBSD.org
+COMMENT= Library for building Telegram clients
+WWW= https://github.com/tdlib/td
+
+LICENSE= BSL
+
+USES= cmake:testing compiler:c++14-lang gperf readline ssl
+
+CONFLICTS_INSTALL= tdlib
+
+USE_GITHUB= yes
+GH_ACCOUNT= tdlib
+GH_PROJECT= td
+GH_TAGNAME= 51743df # 1.8.49 + patches
+
+CMAKE_ON= TD_INSTALL_STATIC_LIBRARIES TD_E2E_ONLY
+CMAKE_OFF= BUILD_TESTING FREEBSD_BUILD_BENCHMARKS
+
+PLIST_SUB+= LIBVERSION=${PORTVERSION}
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%COMMIT%%|${GH_TAGNAME}|g' \
+ ${WRKSRC}/CMake/GetGitRevisionDescription.cmake
+
+.include <bsd.port.mk>
diff --git a/net-im/tde2e/distinfo b/net-im/tde2e/distinfo
new file mode 100644
index 000000000000..32acaaec2c96
--- /dev/null
+++ b/net-im/tde2e/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1748015088
+SHA256 (tdlib-td-v1.8.49-51743df_GH0.tar.gz) = 19969a245e584e79f8ba0588cc8f3e762ef21a406a2050e54da1dea77de5a7cf
+SIZE (tdlib-td-v1.8.49-51743df_GH0.tar.gz) = 5474589
diff --git a/net-im/tde2e/files/patch-CMakeLists.txt b/net-im/tde2e/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..2e8b91fcc1d6
--- /dev/null
+++ b/net-im/tde2e/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2025-05-23 15:52:11 UTC
++++ CMakeLists.txt
+@@ -238,7 +238,7 @@ endif()
+ add_subdirectory(test)
+ endif()
+
+-if (NOT CMAKE_CROSSCOMPILING)
++if (FREEBSD_BUILD_BENCHMARKS AND NOT CMAKE_CROSSCOMPILING)
+ add_subdirectory(benchmark)
+ endif()
+
diff --git a/net-im/tde2e/files/patch-CMake_GetGitRevisionDescription.cmake b/net-im/tde2e/files/patch-CMake_GetGitRevisionDescription.cmake
new file mode 100644
index 000000000000..513f018c9395
--- /dev/null
+++ b/net-im/tde2e/files/patch-CMake_GetGitRevisionDescription.cmake
@@ -0,0 +1,11 @@
+--- CMake/GetGitRevisionDescription.cmake.orig 2025-05-10 18:47:56 UTC
++++ CMake/GetGitRevisionDescription.cmake
+@@ -67,7 +67,7 @@ function(get_git_head_revision _refspecvar _hashvar)
+ endif()
+ if (GIT_DIR STREQUAL "")
+ set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
+- set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
++ set(${_hashvar} "51743df" PARENT_SCOPE)
+ return()
+ endif()
+
diff --git a/net-im/tde2e/pkg-descr b/net-im/tde2e/pkg-descr
new file mode 100644
index 000000000000..82b536fa768d
--- /dev/null
+++ b/net-im/tde2e/pkg-descr
@@ -0,0 +1,2 @@
+TDLib (Telegram Database library) is a cross-platform library for building
+Telegram clients. It can be easily used from almost any programming language.
diff --git a/net-im/tde2e/pkg-plist b/net-im/tde2e/pkg-plist
new file mode 100644
index 000000000000..f6bc08e5e120
--- /dev/null
+++ b/net-im/tde2e/pkg-plist
@@ -0,0 +1,10 @@
+include/td/e2e/e2e_api.h
+include/td/e2e/e2e_errors.h
+lib/cmake/tde2e/tde2eConfig.cmake
+lib/cmake/tde2e/tde2eConfigVersion.cmake
+lib/cmake/tde2e/tde2eStaticTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/tde2e/tde2eStaticTargets.cmake
+lib/libtde2e.a
+lib/libtdutils.a
+libdata/pkgconfig/tde2e.pc
+libdata/pkgconfig/tdutils.pc