pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/chat
Module Name: pkgsrc
Committed By: nia
Date: Mon Apr 6 13:46:38 UTC 2026
Modified Files:
pkgsrc/chat: Makefile
Added Files:
pkgsrc/chat/nchat: DESCR Makefile PLIST distinfo
pkgsrc/chat/nchat/patches:
patch-lib_ncutil_ext_sqlite__modern__cpp_configure
patch-lib_ncutil_src_fileutil.cpp
patch-lib_tgchat_ext_td_tdutils_td_utils_port_detail_KQueue.cpp
patch-src_main.cpp patch-src_uicontroller.cpp
patch-src_uikeydump.cpp
Log Message:
nchat: Initial import.
nchat is a multi-protocol terminal-based messaging client.
Note: Only the Telegram functionality is available in this package.
To generate a diff of this commit:
cvs rdiff -u -r1.309 -r1.310 pkgsrc/chat/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/nchat/DESCR pkgsrc/chat/nchat/Makefile \
pkgsrc/chat/nchat/PLIST pkgsrc/chat/nchat/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/chat/nchat/patches/patch-lib_ncutil_ext_sqlite__modern__cpp_configure \
pkgsrc/chat/nchat/patches/patch-lib_ncutil_src_fileutil.cpp \
pkgsrc/chat/nchat/patches/patch-lib_tgchat_ext_td_tdutils_td_utils_port_detail_KQueue.cpp \
pkgsrc/chat/nchat/patches/patch-src_main.cpp \
pkgsrc/chat/nchat/patches/patch-src_uicontroller.cpp \
pkgsrc/chat/nchat/patches/patch-src_uikeydump.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/chat/Makefile
diff -u pkgsrc/chat/Makefile:1.309 pkgsrc/chat/Makefile:1.310
--- pkgsrc/chat/Makefile:1.309 Wed Jan 28 10:39:24 2026
+++ pkgsrc/chat/Makefile Mon Apr 6 13:46:37 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.309 2026/01/28 10:39:24 wiz Exp $
+# $NetBSD: Makefile,v 1.310 2026/04/06 13:46:37 nia Exp $
#
COMMENT= Communication programs
@@ -80,6 +80,7 @@ SUBDIR+= mcabber
SUBDIR+= meanwhile
SUBDIR+= miniircd
SUBDIR+= mumble
+SUBDIR+= nchat
SUBDIR+= neonmodem
SUBDIR+= ngircd
SUBDIR+= ninja
Added files:
Index: pkgsrc/chat/nchat/DESCR
diff -u /dev/null pkgsrc/chat/nchat/DESCR:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/DESCR Mon Apr 6 13:46:38 2026
@@ -0,0 +1,3 @@
+nchat is a multi-protocol terminal-based messaging client.
+
+Note: Only the Telegram functionality is available in this package.
Index: pkgsrc/chat/nchat/Makefile
diff -u /dev/null pkgsrc/chat/nchat/Makefile:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/Makefile Mon Apr 6 13:46:38 2026
@@ -0,0 +1,58 @@
+# $NetBSD: Makefile,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+DISTNAME= nchat-5.14.44
+CATEGORIES= chat
+MASTER_SITES= ${MASTER_SITE_GITHUB:=d99kris/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/d99kris/nchat
+COMMENT= Terminal-based Telegram messaging client
+LICENSE= mit
+
+DEPENDS+= ${PYPKGPREFIX}-urllib3>=0:../../www/py-urllib3
+TOOL_DEPENDS+= gperf-[0-9]*:../../devel/gperf
+
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+USE_CXX_FEATURES+= c++14
+
+# go required ... messy
+CMAKE_CONFIGURE_ARGS+= -DHAS_SIGNAL=OFF
+CMAKE_CONFIGURE_ARGS+= -DHAS_WHATSAPP=OFF
+
+CMAKE_CONFIGURE_ARGS+= -DCURSES_INCLUDE_PATH=${BUILDLINK_INCDIRS.curses}
+
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGBASE}
+LDFLAGS.NetBSD+= -lexecinfo # backtrace
+
+# Refuses to build the Telegram module on big-endian, making
+# it quite useless.
+NOT_FOR_PLATFORM+= ${BIGENDIANPLATFORMS}
+
+REPLACE_PYTHON+= src/compose
+
+FAKE_NCURSES= yes
+.include "../../mk/curses.buildlink3.mk"
+
+.if !${CURSES_TYPE:M*ncurses*}
+BUILDLINK_TRANSFORM+= l:gnuform:form
+.endif
+
+INSTALLATION_DIRS+= lib/${PKGBASE}
+
+post-install:
+ ${MV} ${DESTDIR}${PREFIX}/lib/*.${SHLIB_EXT}* \
+ ${DESTDIR}${PREFIX}/lib/${PKGBASE}
+
+.include "../../devel/cmake/build.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../sysutils/file/buildlink3.mk"
+.include "../../mk/atomic64.mk"
+PTHREAD_OPTS?= require
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/chat/nchat/PLIST
diff -u /dev/null pkgsrc/chat/nchat/PLIST:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/PLIST Mon Apr 6 13:46:38 2026
@@ -0,0 +1,29 @@
+@comment $NetBSD: PLIST,v 1.1 2026/04/06 13:46:38 nia Exp $
+bin/nchat
+lib/nchat/libduchat.${SHLIB_EXT}
+lib/nchat/libncutil.${SHLIB_EXT}
+lib/nchat/libtdclientshared.${SHLIB_EXT}
+lib/nchat/libtgchat.${SHLIB_EXT}
+libexec/nchat/compose
+man/man1/nchat.1
+share/nchat/themes/basic-color/color.conf
+share/nchat/themes/basic-color/usercolor.conf
+share/nchat/themes/catppuccin-mocha/color.conf
+share/nchat/themes/catppuccin-mocha/usercolor.conf
+share/nchat/themes/default/color.conf
+share/nchat/themes/dracula/color.conf
+share/nchat/themes/dracula/usercolor.conf
+share/nchat/themes/espresso/color.conf
+share/nchat/themes/espresso/usercolor.conf
+share/nchat/themes/gruvbox-dark/color.conf
+share/nchat/themes/gruvbox-dark/usercolor.conf
+share/nchat/themes/solarized-dark-higher-contrast/color.conf
+share/nchat/themes/solarized-dark-higher-contrast/usercolor.conf
+share/nchat/themes/tokyo-night/color.conf
+share/nchat/themes/tokyo-night/usercolor.conf
+share/nchat/themes/tomorrow-night/color.conf
+share/nchat/themes/tomorrow-night/usercolor.conf
+share/nchat/themes/zenbones-dark/color.conf
+share/nchat/themes/zenbones-dark/usercolor.conf
+share/nchat/themes/zenburned/color.conf
+share/nchat/themes/zenburned/usercolor.conf
Index: pkgsrc/chat/nchat/distinfo
diff -u /dev/null pkgsrc/chat/nchat/distinfo:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/distinfo Mon Apr 6 13:46:38 2026
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+BLAKE2s (nchat-5.14.44.tar.gz) = 004b57425a19b0ea71a22ca2232064c4d17fbf3782c44e47c707322fadf2b424
+SHA512 (nchat-5.14.44.tar.gz) = 9b6e77b6521ef7e785cfc80e39df3e0a1718913af55e91c5c99a7661a9c0c1543dcb88db45442b82f36ac75ca1452ab4681f8e0d440bbd68b544dbe535046f46
+Size (nchat-5.14.44.tar.gz) = 7996752 bytes
+SHA1 (patch-lib_ncutil_ext_sqlite__modern__cpp_configure) = 03abb00974428a1fbda26a8f5c9cb74ca4a9ad57
+SHA1 (patch-lib_ncutil_src_fileutil.cpp) = ae1ce3ca1f8ebc7c53be7690323f60af7107392d
+SHA1 (patch-lib_tgchat_ext_td_tdutils_td_utils_port_detail_KQueue.cpp) = de142a044e3a03186ff493c8fa72218221251ef7
+SHA1 (patch-src_main.cpp) = 83fcdbaaa9f41a372f5b7c5477e28a43e5e9cce3
+SHA1 (patch-src_uicontroller.cpp) = 42c9ee8d91b7f72c4df9b76c09b1c577e68db168
+SHA1 (patch-src_uikeydump.cpp) = 111ee9bc7a7e19fdd11b7cd5d28c593438bb40fa
Index: pkgsrc/chat/nchat/patches/patch-lib_ncutil_ext_sqlite__modern__cpp_configure
diff -u /dev/null pkgsrc/chat/nchat/patches/patch-lib_ncutil_ext_sqlite__modern__cpp_configure:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/patches/patch-lib_ncutil_ext_sqlite__modern__cpp_configure Mon Apr 6 13:46:38 2026
@@ -0,0 +1,69 @@
+$NetBSD: patch-lib_ncutil_ext_sqlite__modern__cpp_configure,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+POSIXification.
+
+--- lib/ncutil/ext/sqlite_modern_cpp/configure.orig 2026-04-06 11:16:48.032071516 +0000
++++ lib/ncutil/ext/sqlite_modern_cpp/configure
+@@ -2544,7 +2544,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+- if test "" == ""
++ if test "" = ""
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flag -Wall works" >&5
+ $as_echo_n "checking if compiler flag -Wall works... " >&6; }
+@@ -2586,7 +2586,7 @@ $as_echo "no" >&6; }
+ fi
+
+
+- if test "" == ""
++ if test "" = ""
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flag -Wextra works" >&5
+ $as_echo_n "checking if compiler flag -Wextra works... " >&6; }
+@@ -2627,7 +2627,7 @@ $as_echo "no" >&6; }
+ fi
+
+
+- if test "" == ""
++ if test "" = ""
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flag -W works" >&5
+ $as_echo_n "checking if compiler flag -W works... " >&6; }
+@@ -2668,7 +2668,7 @@ $as_echo "no" >&6; }
+ fi
+
+
+- if test "" == ""
++ if test "" = ""
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flag -O3 works" >&5
+ $as_echo_n "checking if compiler flag -O3 works... " >&6; }
+@@ -2709,7 +2709,7 @@ $as_echo "no" >&6; }
+ fi
+
+
+- if test "" == ""
++ if test "" = ""
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flag -Werror works" >&5
+ $as_echo_n "checking if compiler flag -Werror works... " >&6; }
+@@ -2750,7 +2750,7 @@ $as_echo "no" >&6; }
+ fi
+
+
+- if test "" == ""
++ if test "" = ""
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flag -std=c++14 works" >&5
+ $as_echo_n "checking if compiler flag -std=c++14 works... " >&6; }
+@@ -3350,7 +3350,7 @@ fi
+ fi
+
+
+-if test "$sqlite" == "no"
++if test "$sqlite" = "no"
+ then
+ as_fn_error $? "sqlite3 not found." "$LINENO" 5
+ fi
Index: pkgsrc/chat/nchat/patches/patch-lib_ncutil_src_fileutil.cpp
diff -u /dev/null pkgsrc/chat/nchat/patches/patch-lib_ncutil_src_fileutil.cpp:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/patches/patch-lib_ncutil_src_fileutil.cpp Mon Apr 6 13:46:38 2026
@@ -0,0 +1,47 @@
+$NetBSD: patch-lib_ncutil_src_fileutil.cpp,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+Make code that is not really Linux-specific universal.
+
+Add some specific code for finding KERN_PROC_PATHNAME on NetBSD.
+
+--- lib/ncutil/src/fileutil.cpp.orig 2026-04-06 12:05:58.664053408 +0000
++++ lib/ncutil/src/fileutil.cpp
+@@ -18,6 +18,9 @@
+ #endif
+
+ #include <sys/types.h>
++#if defined(__NetBSD__)
++#include <sys/sysctl.h>
++#endif
+ #include <sys/stat.h>
+
+ #if defined(__APPLE__)
+@@ -240,7 +243,15 @@ std::string FileUtil::GetSelfPath()
+ {
+ return std::string(pathbuf);
+ }
+-#elif defined(__linux__)
++#elif defined(__NetBSD__)
++ char buf[PATH_MAX];
++ int mib[4] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME };
++ size_t buflen = sizeof(buf);
++ if (sysctl(mib, 4, buf, &buflen, NULL, 0) == 0)
++ {
++ return std::string(buf);
++ }
++#else
+ char pathbuf[PATH_MAX];
+ ssize_t count = readlink("/proc/self/exe", pathbuf, sizeof(pathbuf));
+ if (count > 0)
+@@ -255,10 +266,9 @@ std::string FileUtil::GetLibSuffix()
+ {
+ #if defined(__APPLE__)
+ return ".dylib";
+-#elif defined(__linux__)
++#else
+ return ".so";
+ #endif
+- return "";
+ }
+
+ std::string FileUtil::GetSuffixedCount(ssize_t p_Size)
Index: pkgsrc/chat/nchat/patches/patch-lib_tgchat_ext_td_tdutils_td_utils_port_detail_KQueue.cpp
diff -u /dev/null pkgsrc/chat/nchat/patches/patch-lib_tgchat_ext_td_tdutils_td_utils_port_detail_KQueue.cpp:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/patches/patch-lib_tgchat_ext_td_tdutils_td_utils_port_detail_KQueue.cpp Mon Apr 6 13:46:38 2026
@@ -0,0 +1,24 @@
+$NetBSD: patch-lib_tgchat_ext_td_tdutils_td_utils_port_detail_KQueue.cpp,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+On recent NetBSD releases this workaround now causes a compilation
+error, so limit it to older releases.
+
+--- lib/tgchat/ext/td/tdutils/td/utils/port/detail/KQueue.cpp.orig 2026-04-06 11:28:02.175309265 +0000
++++ lib/tgchat/ext/td/tdutils/td/utils/port/detail/KQueue.cpp
+@@ -16,6 +16,7 @@ char disable_linker_warning_about_empty_file_kqueue_cp
+ #include <cerrno>
+ #include <utility>
+
++#include <sys/param.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+
+@@ -84,7 +85,7 @@ void KQueue::add_change(std::uintptr_t ident, int16 fi
+ if (changes_n_ == static_cast<int>(events_.size())) {
+ flush_changes();
+ }
+-#if TD_NETBSD
++#if TD_NETBSD && (defined(__NetBSD__) && __NetBSD_Version__ < 999001500)
+ auto set_udata = reinterpret_cast<std::intptr_t>(udata);
+ #else
+ auto set_udata = udata;
Index: pkgsrc/chat/nchat/patches/patch-src_main.cpp
diff -u /dev/null pkgsrc/chat/nchat/patches/patch-src_main.cpp:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/patches/patch-src_main.cpp Mon Apr 6 13:46:38 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_main.cpp,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+Load the libs from our own isolated directory.
+
+--- src/main.cpp.orig 2026-04-06 12:01:44.350189123 +0000
++++ src/main.cpp
+@@ -81,7 +81,7 @@ class ProtocolFactory : public ProtocolBaseFactory (pu
+ std::shared_ptr<T> protocol;
+ #ifdef HAS_DYNAMICLOAD
+ std::string libPath =
+- FileUtil::DirName(FileUtil::GetSelfPath()) + "/../" CMAKE_INSTALL_LIBDIR "/" + T::GetLibName() +
++ FileUtil::DirName(FileUtil::GetSelfPath()) + "/../" CMAKE_INSTALL_LIBDIR "/nchat/" + T::GetLibName() +
+ FileUtil::GetLibSuffix();
+ std::string createFunc = T::GetCreateFunc();
+ void* handle = dlopen(libPath.c_str(), RTLD_LAZY);
Index: pkgsrc/chat/nchat/patches/patch-src_uicontroller.cpp
diff -u /dev/null pkgsrc/chat/nchat/patches/patch-src_uicontroller.cpp:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/patches/patch-src_uicontroller.cpp Mon Apr 6 13:46:38 2026
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_uicontroller.cpp,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+SunOS needs <string.h> for FD_ZERO.
+
+--- src/uicontroller.cpp.orig 2026-04-06 12:52:46.523168737 +0000
++++ src/uicontroller.cpp
+@@ -7,6 +7,7 @@
+
+ #include "uicontroller.h"
+
++#include <cstring>
+ #include <cwchar>
+
+ #include <unistd.h>
Index: pkgsrc/chat/nchat/patches/patch-src_uikeydump.cpp
diff -u /dev/null pkgsrc/chat/nchat/patches/patch-src_uikeydump.cpp:1.1
--- /dev/null Mon Apr 6 13:46:38 2026
+++ pkgsrc/chat/nchat/patches/patch-src_uikeydump.cpp Mon Apr 6 13:46:38 2026
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_uikeydump.cpp,v 1.1 2026/04/06 13:46:38 nia Exp $
+
+SunOS needs <string.h> for FD_ZERO.
+
+--- src/uikeydump.cpp.orig 2026-04-06 13:41:45.995901727 +0000
++++ src/uikeydump.cpp
+@@ -8,6 +8,7 @@
+ #include "uikeydump.h"
+
+ #include <locale.h>
++#include <string.h>
+ #include <unistd.h>
+
+ #include <sys/select.h>
Home |
Main Index |
Thread Index |
Old Index