pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
tdlib: Import tdlib-1.6.0 as wip/tdlib
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Sun Oct 18 14:58:01 2020 +0200
Changeset: 296cc067f00bb31e6faa78350851d018707e0c60
Modified Files:
Makefile
Added Files:
tdlib/DESCR
tdlib/Makefile
tdlib/PLIST
tdlib/buildlink3.mk
tdlib/distinfo
tdlib/patches/patch-tdutils_CMakeLists.txt
tdlib/patches/patch-tdutils_td_utils_port_detail_KQueue.cpp
Log Message:
tdlib: Import tdlib-1.6.0 as wip/tdlib
TDLib (Telegram Database library) is a cross-platform library for
building Telegram clients. It can be easily used from almost any
programming language.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=296cc067f00bb31e6faa78350851d018707e0c60
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
tdlib/DESCR | 3 +++
tdlib/Makefile | 25 ++++++++++++++++++++++
tdlib/PLIST | 24 +++++++++++++++++++++
tdlib/buildlink3.mk | 16 ++++++++++++++
tdlib/distinfo | 8 +++++++
tdlib/patches/patch-tdutils_CMakeLists.txt | 17 +++++++++++++++
.../patch-tdutils_td_utils_port_detail_KQueue.cpp | 18 ++++++++++++++++
8 files changed, 112 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index c37c7557e7..a7399938dd 100644
--- a/Makefile
+++ b/Makefile
@@ -4874,6 +4874,7 @@ SUBDIR+= tcptunnel
SUBDIR+= tcpxtract
SUBDIR+= tctool
SUBDIR+= tde
+SUBDIR+= tdlib
SUBDIR+= teamspeak
SUBDIR+= teco
SUBDIR+= telegraf
diff --git a/tdlib/DESCR b/tdlib/DESCR
new file mode 100644
index 0000000000..e837f9a70c
--- /dev/null
+++ b/tdlib/DESCR
@@ -0,0 +1,3 @@
+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/tdlib/Makefile b/tdlib/Makefile
new file mode 100644
index 0000000000..87d9794fe7
--- /dev/null
+++ b/tdlib/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+DISTNAME= tdlib-1.6.0
+CATEGORIES= chat
+MASTER_SITES= ${MASTER_SITE_GITHUB:=tdlib/}
+GITHUB_PROJECT= td
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://core.telegram.org/tdlib
+COMMENT= Cross-platform library for building Telegram clients
+LICENSE= boost-license
+
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+CONFIGURE_DIRS= build
+CMAKE_ARG_PATH= ..
+
+pre-configure:
+ ${MKDIR} ${WRKSRC}/build
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/tdlib/PLIST b/tdlib/PLIST
new file mode 100644
index 0000000000..31077d8a81
--- /dev/null
+++ b/tdlib/PLIST
@@ -0,0 +1,24 @@
+@comment $NetBSD$
+include/td/telegram/Client.h
+include/td/telegram/Log.h
+include/td/telegram/td_api.h
+include/td/telegram/td_api.hpp
+include/td/telegram/td_json_client.h
+include/td/telegram/td_log.h
+include/td/telegram/tdjson_export.h
+include/td/tl/TlObject.h
+lib/cmake/Td/TdConfig.cmake
+lib/cmake/Td/TdConfigVersion.cmake
+lib/cmake/Td/TdTargets-noconfig.cmake
+lib/cmake/Td/TdTargets.cmake
+lib/libtdactor.a
+lib/libtdclient.a
+lib/libtdcore.a
+lib/libtddb.a
+lib/libtdjson.so
+lib/libtdjson.so.${PKGVERSION}
+lib/libtdjson_private.a
+lib/libtdjson_static.a
+lib/libtdnet.a
+lib/libtdsqlite.a
+lib/libtdutils.a
diff --git a/tdlib/buildlink3.mk b/tdlib/buildlink3.mk
new file mode 100644
index 0000000000..62b6427daa
--- /dev/null
+++ b/tdlib/buildlink3.mk
@@ -0,0 +1,16 @@
+# $NetBSD$
+
+BUILDLINK_TREE+= tdlib
+
+.if !defined(TDLIB_BUILDLINK3_MK)
+TDLIB_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.tdlib+= tdlib>=1.6.0
+BUILDLINK_PKGSRCDIR.tdlib?= ../../wip/tdlib
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+
+.endif # TDLIB_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -tdlib
diff --git a/tdlib/distinfo b/tdlib/distinfo
new file mode 100644
index 0000000000..ee09f662da
--- /dev/null
+++ b/tdlib/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (tdlib-1.6.0.tar.gz) = 14bbd702c3d6c4d53defee8c43dfa72747f0107a
+RMD160 (tdlib-1.6.0.tar.gz) = e7d37d0fed5d418432cf89ce6c4f086db98360d1
+SHA512 (tdlib-1.6.0.tar.gz) = aee8b3df17e8571ca587cc72092305fd0992fefc4d9f60b2c530c9e6726c6b6371f0e5819ca4d5a4ffbbef1345f2a18156aae979b80e124ffe183423f8f515e0
+Size (tdlib-1.6.0.tar.gz) = 3825444 bytes
+SHA1 (patch-tdutils_CMakeLists.txt) = 9cf8d205e0323116bc4ac602d311a861dc33cdef
+SHA1 (patch-tdutils_td_utils_port_detail_KQueue.cpp) = e72dfad449c956e0c8a4d44947115aaa15b3d519
diff --git a/tdlib/patches/patch-tdutils_CMakeLists.txt b/tdlib/patches/patch-tdutils_CMakeLists.txt
new file mode 100644
index 0000000000..bcb0026aeb
--- /dev/null
+++ b/tdlib/patches/patch-tdutils_CMakeLists.txt
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Avoid hardcoded gcc5 and i386 assumptions about about NetBSD.
+
+--- tdutils/CMakeLists.txt.orig 2020-01-31 00:47:49.000000000 +0000
++++ tdutils/CMakeLists.txt
+@@ -325,10 +325,6 @@ if (ANDROID)
+ target_link_libraries(tdutils PRIVATE log)
+ endif()
+
+-if (CMAKE_HOST_SYSTEM_NAME MATCHES "NetBSD")
+- target_link_libraries(tdutils PUBLIC /usr/pkg/gcc5/i486--netbsdelf/lib/libatomic.so)
+-endif()
+-
+ install(TARGETS tdutils EXPORT TdTargets
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
diff --git a/tdlib/patches/patch-tdutils_td_utils_port_detail_KQueue.cpp b/tdlib/patches/patch-tdutils_td_utils_port_detail_KQueue.cpp
new file mode 100644
index 0000000000..5dd2cf6f21
--- /dev/null
+++ b/tdlib/patches/patch-tdutils_td_utils_port_detail_KQueue.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Adjust to recent-ish NetBSD EV_SET(3) API.
+
+--- tdutils/td/utils/port/detail/KQueue.cpp.orig 2020-01-31 00:47:49.000000000 +0000
++++ tdutils/td/utils/port/detail/KQueue.cpp
+@@ -81,11 +81,7 @@ void KQueue::add_change(std::uintptr_t i
+ if (changes_n_ == static_cast<int>(events_.size())) {
+ flush_changes();
+ }
+-#if TD_NETBSD
+- auto set_udata = reinterpret_cast<std::intptr_t>(udata);
+-#else
+ auto set_udata = udata;
+-#endif
+ EV_SET(&events_[changes_n_], ident, filter, flags, fflags, data, set_udata);
+ VLOG(fd) << "Subscribe [fd:" << ident << "] [filter:" << filter << "] [udata: " << udata << "]";
+ changes_n_++;
Home |
Main Index |
Thread Index |
Old Index