net-libs/tdlib: Bump to 1.8.55

Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43917
Closes: https://github.com/gentoo/gentoo/pull/43917
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Esteve Varela Colominas
2025-09-23 23:41:27 +02:00
committed by Sam James
parent 1b0388de0c
commit 0c78ae8fab
2 changed files with 78 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST tdlib-1.8.49_p20250510.tar.gz 5477630 BLAKE2B 4f42bdb5306bf16c5e8f7f13809c3d1aa6f4805584aa21c87a2fb342b6b56c6ee9a6d8e108fabe42c195aa5ad03a7fc1d880fbcf68c8452359cfdf5bede33f7a SHA512 c0ec498011b821d545904674ed3534a5a2be4b38025daa4bb4e9661ec62c1583bc1edadb1dae2bc2619dc50e72baf5a3690e9aed6e87b2c123ce27370d00d9ff
DIST tdlib-1.8.55.tar.gz 5569844 BLAKE2B 6b21086991126df93ecbd101c914c085e96603e51d34a2ddda2f805f59f1152fb05fb99efe7b998e395f74a843c9e85e3be59935f1b367e9dc4f9081d839a929 SHA512 fca25e017e6bc27bcc0a69b35ad478a5acfc46b511917440c3e560c18378c3f4133c1c553eb9a0752db5328f61c5813312d653f4ad5e5d0284b7a79d4f480be8

View File

@@ -0,0 +1,77 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Cross-platform library for building Telegram clients"
HOMEPAGE="https://github.com/tdlib/td"
MY_PV="7d257dcda5dd2c616c1146540ef51147c5bb2c69"
SRC_URI="https://github.com/tdlib/td/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/td-${MY_PV}"
LICENSE="Boost-1.0"
SLOT="0/${PV%_p*}"
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
IUSE="+tde2e test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/openssl
sys-libs/zlib
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-util/gperf
"
src_prepare() {
sed -e '/add_library(/s/ STATIC//' \
-i CMakeLists.txt */CMakeLists.txt || die
sed -e '/set(INSTALL_STATIC_TARGETS /s/ tdjson_static TdJsonStatic//' \
-e '/generate_pkgconfig(tdjson_static /d' \
-i CMakeLists.txt || die
# Benchmarks take way too long to compile
sed -e '/add_subdirectory(benchmark)/d' \
-i CMakeLists.txt || die
# Fix tests linking
sed -e 's/target_link_libraries(run_all_tests PRIVATE /&tdmtproto /' \
-i test/CMakeLists.txt
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test)
-DTDE2E_INSTALL_INCLUDES=yes
)
cmake_src_configure
if use tde2e; then
# Generate cmake configuration files for the e2e-only variant
# These are required by certain programs which depend on "tde2e"
mycmakeargs+=( -DTD_E2E_ONLY=ON )
BUILD_DIR="${S}_tde2e" cmake_src_configure
fi
}
src_install() {
cmake_src_install
if use tde2e; then
# Install the tde2e headers
insinto /usr/include/td/e2e
doins tde2e/td/e2e/e2e_api.h tde2e/td/e2e/e2e_errors.h
# Install the tde2e cmake files
cd "${S}_tde2e" || die
insinto /usr/$(get_libdir)/cmake/tde2e
doins tde2eConfig.cmake tde2eConfigVersion.cmake
doins CMakeFiles/Export/*/tde2eStaticTargets*.cmake
fi
}