Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 731068 Details for
Bug 806372
net-libs/tdlib - new package
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add net-libs/tdlib
file_806372.txt (text/plain), 6.11 KB, created by
akater
on 2021-08-07 12:53:42 UTC
(
hide
)
Description:
Add net-libs/tdlib
Filename:
MIME Type:
Creator:
akater
Created:
2021-08-07 12:53:42 UTC
Size:
6.11 KB
patch
obsolete
>From 5670d68ef3e93d15e2b3d7d1417c0b41db35ddfa Mon Sep 17 00:00:00 2001 >From: akater <nuclearspace@gmail.com> >Date: Wed, 4 Aug 2021 09:21:06 +0000 >Subject: [PATCH] net-libs/tdlib: New package > >Signed-off-by: Dmitrii Neskoromnyi <nuclearspace@gmail.com> >Bug: https://bugs.gentoo.org/806372 >Package-Manager: Portage-3.0.20, Repoman-3.0.2 >--- > net-libs/tdlib/Manifest | 1 + > .../tdlib/files/tdlib-1.7.0-fix-runpath.patch | 13 ++ > net-libs/tdlib/metadata.xml | 23 ++++ > net-libs/tdlib/tdlib-1.7.0.ebuild | 116 ++++++++++++++++++ > 4 files changed, 153 insertions(+) > create mode 100644 net-libs/tdlib/Manifest > create mode 100644 net-libs/tdlib/files/tdlib-1.7.0-fix-runpath.patch > create mode 100644 net-libs/tdlib/metadata.xml > create mode 100644 net-libs/tdlib/tdlib-1.7.0.ebuild > >diff --git a/net-libs/tdlib/Manifest b/net-libs/tdlib/Manifest >new file mode 100644 >index 00000000000..71699b9c0cf >--- /dev/null >+++ b/net-libs/tdlib/Manifest >@@ -0,0 +1 @@ >+DIST tdlib-1.7.0.tar.gz 4346133 BLAKE2B a4c83269cdb1b66485d858dd576135b85516f5215111cde4e84398d907b1c4226f7ff97a3b0515888f4a169fbe1936430bd86be3f375107f5d5c36d61c63b75a SHA512 eeff4921cd2624cb29386d319510c84eb49ea01321319e23e0ae92978c831eeaf9e4b891b22bc08a4eeb7fa24c1c9d0604f8affc7065c8e722fa3a055f882ea6 >diff --git a/net-libs/tdlib/files/tdlib-1.7.0-fix-runpath.patch b/net-libs/tdlib/files/tdlib-1.7.0-fix-runpath.patch >new file mode 100644 >index 00000000000..97337a476ab >--- /dev/null >+++ b/net-libs/tdlib/files/tdlib-1.7.0-fix-runpath.patch >@@ -0,0 +1,13 @@ >+Resolve insecure runpath issue. >+ >+--- a/CMakeLists.txt >++++ b/CMakeLists.txt >+@@ -17,6 +17,7 @@ >+ set(CMAKE_INSTALL_INCLUDEDIR "include") >+ endif() >+ >++set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) >+ if (POLICY CMP0054) >+ # do not expand quoted arguments >+ cmake_policy(SET CMP0054 NEW) >+ >diff --git a/net-libs/tdlib/metadata.xml b/net-libs/tdlib/metadata.xml >new file mode 100644 >index 00000000000..69630794c12 >--- /dev/null >+++ b/net-libs/tdlib/metadata.xml >@@ -0,0 +1,23 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> >+<pkgmetadata> >+ <maintainer type="project" proxied="proxy"> >+ <email>proxy-maint@gentoo.org</email> >+ <name>Proxy Maintainers</name> >+ </maintainer> >+ <longdescription>TDLib (Telegram Database Library) is a >+cross-platform, fully functional Telegam client, designed by Telegram >+to help third-party developers create their own custom applications >+using the Telegram platform. >+ </longdescription> >+ <use> >+ <flag name="clang">Compile using Clang</flag> >+ <flag name="cli">Install tg_cli</flag> >+ <flag name="gcc">Compile using GCC</flag> >+ <flag name="low-ram">Split source files during compilation (for systems with less than 3.5G RAM)</flag> >+ <flag name="lto">Enable Link Time Optimization</flag> >+ </use> >+ <upstream> >+ <remote-id type="github">td/tdlib</remote-id> >+ </upstream> >+</pkgmetadata> >diff --git a/net-libs/tdlib/tdlib-1.7.0.ebuild b/net-libs/tdlib/tdlib-1.7.0.ebuild >new file mode 100644 >index 00000000000..68998313eb9 >--- /dev/null >+++ b/net-libs/tdlib/tdlib-1.7.0.ebuild >@@ -0,0 +1,116 @@ >+# Copyright 1999-2021 Gentoo Authors >+# Distributed under the terms of the GNU General Public License v2 >+ >+EAPI=7 >+ >+inherit cmake >+ >+DESCRIPTION="Cross-platform library for building Telegram clients" >+HOMEPAGE="https://core.telegram.org/tdlib" >+SRC_URI="https://github.com/tdlib/td/archive/v${PV}.tar.gz -> ${P}.tar.gz" >+RESTRICT="mirror" >+ >+LICENSE="Boost-1.0" >+SLOT="0" >+KEYWORDS="~amd64 ~x86" >+IUSE="clang cli debug doc +gcc java low-ram lto test" >+RESTRICT="!test? ( test )" >+ >+REQUIRED_USE=" >+ gcc? ( !clang ) >+ !gcc? ( clang ) >+ java? ( !lto ) >+" >+# according to TDLib build instructions, lto excludes java >+ >+S="${WORKDIR}/td-${PV}" >+ >+BDEPEND="gcc? ( >=sys-devel/gcc-4.9.2 ) >+ >=dev-util/cmake-3.0.2 >+ dev-util/gperf >+ lto? ( >=dev-util/cmake-3.9.0 ) >+ clang? ( >=sys-devel/clang-3.4:= ) >+ low-ram? ( dev-lang/php[cli] ) >+ doc? ( app-doc/doxygen ) >+ java? ( virtual/jdk:= )" >+ >+# todo: tdlib apparently uses sqlite but sqlite is not required in the build manual >+# maybe we'll have to provide system-sqlite USE flag >+# pg_overlay has sqlite-related stuff in its src_prepare >+ >+RDEPEND="dev-libs/openssl:0= >+ sys-libs/zlib" >+ >+DOCS=( README.md ) >+ >+src_prepare() { >+ >+ eapply "${FILESDIR}/${PN}"-1.7.0-fix-runpath.patch >+ >+ # from mva >+ sed -r \ >+ -e '/install\(TARGETS/,/ INCLUDES/{s@(LIBRARY DESTINATION).*@\1 ${CMAKE_INSTALL_LIBDIR}@;s@(ARCHIVE DESTINATION).*@\1 ${CMAKE_INSTALL_LIBDIR}@;s@(RUNTIME DESTINATION).*@\1 ${CMAKE_INSTALL_BINDIR}@}' \ >+ -i CMakeLists.txt >+ >+ # from pg_overlay >+ if use test >+ then >+ sed -i -e '/run_all_tests/! {/all_tests/d}' \ >+ test/CMakeLists.txt || die >+ else >+ sed -i \ >+ -e '/enable_testing/d' \ >+ -e '/add_subdirectory.*test/d' \ >+ CMakeLists.txt || die >+ fi >+ # for now, tests segfault for me on glibc and musl >+ >+ cmake_src_prepare >+} >+ >+src_configure(){ >+ local mycmakeargs=( >+ -DCMAKE_BUILD_TYPE=$(usex debug Debug Release) >+ -DCMAKE_INSTALL_PREFIX=/usr >+ -DTD_ENABLE_LTO=$(usex lto ON OFF) >+ -DTD_ENABLE_JNI=$(usex java ON OFF) >+ # According to TDLib build instructions, DOTNET=ON is only needed >+ # for using tdlib from C# under Windows through C++/CLI >+ -DTD_ENABLE_DOTNET=OFF >+ ) >+ >+ cmake_src_configure >+ >+ if use low-ram; then >+ cmake --build "${BUILD_DIR}" --target prepare_cross_compiling >+ php SplitSource.php >+ # todo: we need to die on errors here but I don't know how >+ fi >+ >+} >+ >+src_compile() { >+ >+ cmake_src_compile >+ >+ # from pg_overlay >+ if use doc ; then >+ doxygen Doxyfile || die "Could not build docs with doxygen" >+ fi >+ # completes without errors but I don't know if it's sensible >+} >+ >+src_install() { >+ >+ use low-ram && php SplitSource.php --undo >+ >+ cmake_src_install >+ >+ use cli && dobin "${BUILD_DIR}"/tg_cli >+ # can't we just skip it during build? >+ >+ # from pg_overlay >+ use doc && local HTML_DOCS=( docs/html/. ) >+ einstalldocs >+ >+} >-- >2.31.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 806372
:
730082
|
730272
| 731068