summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Vyalkova <cyber+gentoo@sysrq.in>2023-01-14 20:04:57 +0200
committerJoonas Niilola <juippis@gentoo.org>2023-01-14 20:05:36 +0200
commit30f732b0c78067ac47867139ed9416308b57d858 (patch)
tree62c6550376dbd695680e9e30d173d8e1abf05fb0 /net-nntp
parentapp-misc/liquidctl: drop 1.12.0 (diff)
downloadgentoo-30f732b0c78067ac47867139ed9416308b57d858.tar.gz
gentoo-30f732b0c78067ac47867139ed9416308b57d858.tar.bz2
gentoo-30f732b0c78067ac47867139ed9416308b57d858.zip
net-nntp/tin: add 2.6.2
In this update: * New: NNTPS support with different backends (openssl by default) * New: PCRE2 support (enabled by default) * Enable local news support * Add missing virtual/libiconv dependency * Add missing sys-devel/gettext bdep * Drop net-mail/metamail optfeature dep (treecleaned) * Export BUILD_* variables Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-nntp')
-rw-r--r--net-nntp/tin/Manifest1
-rw-r--r--net-nntp/tin/files/tin-2.6.2-gnutls.patch36
-rw-r--r--net-nntp/tin/metadata.xml18
-rw-r--r--net-nntp/tin/tin-2.6.2.ebuild116
4 files changed, 163 insertions, 8 deletions
diff --git a/net-nntp/tin/Manifest b/net-nntp/tin/Manifest
index 035c264e9bf5..a1a8f0c73e92 100644
--- a/net-nntp/tin/Manifest
+++ b/net-nntp/tin/Manifest
@@ -1 +1,2 @@
DIST tin-2.6.1.tar.xz 1570500 BLAKE2B ec9c54b8b89ecd33a42ede37c8db50828de2dce56ddff01900121903a18d73bde8a06733ca2dfb72c676eb373b5ea874cecb9a1ee7890ada4ad6539d9ff1a435 SHA512 dc9ace5e24cac1efcaac25df1747dd435573130cff4e9c846c89e8faaed8e8120d66a2021332c01f350744155bcb7be608657285560a1a2457b4635cc8fa22b3
+DIST tin-2.6.2.tar.xz 1598732 BLAKE2B 0e5bac9a711fb69e64d64b4f0c070d456f38f727e7b7aa794ad5ada8695c2174023964b8f07d2e7d6add51cf0c7c3102965bef653a7e873275747145cb70dbe2 SHA512 4c9e0edb3268d57fb89d9d53a90e8a5ba73da7c1da63c834224bed0f763502a7c3dd325351d3e57b1ddcb57494a84228cc38f227c49300b759fad8d112b1cac1
diff --git a/net-nntp/tin/files/tin-2.6.2-gnutls.patch b/net-nntp/tin/files/tin-2.6.2-gnutls.patch
new file mode 100644
index 000000000000..b7f7de0956a2
--- /dev/null
+++ b/net-nntp/tin/files/tin-2.6.2-gnutls.patch
@@ -0,0 +1,36 @@
+Upstream patch to allow GnuTLS support without debug definitions.
+
+--- a/src/nntps.c
++++ b/src/nntps.c
+@@ -41,8 +41,8 @@
+ #endif /* USE_LIBTLS */
+
+ #ifdef USE_GNUTLS
+-# ifdef DEBUG
+ static int verification_func(gnutls_session_t session);
++# ifdef DEBUG
+ static void log_func(int level, const char *msg);
+ # endif /* DEBUG */
+ #else
+@@ -933,8 +933,7 @@
+ #endif /* USE_OPENSSL */
+
+
+-#ifdef DEBUG
+-# ifdef USE_GNUTLS
++#ifdef USE_GNUTLS
+ static int
+ verification_func(
+ gnutls_session_t session)
+@@ -953,8 +952,11 @@
+
+ return gnutls_verification_status;
+ }
++#endif /* USE_GNUTLS */
+
+
++#ifdef DEBUG
++# ifdef USE_GNUTLS
+ static void
+ log_func(
+ int level,
diff --git a/net-nntp/tin/metadata.xml b/net-nntp/tin/metadata.xml
index e9e3c1ae47e8..2273dcd0ef5a 100644
--- a/net-nntp/tin/metadata.xml
+++ b/net-nntp/tin/metadata.xml
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
-<upstream>
-<doc>http://www.tin.org/bin/man.cgi?section=1&amp;topic=tin</doc>
-</upstream>
-<use>
-<flag name="cancel-locks">Enable Cancel-Lock header functionality</flag>
-<flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> support</flag>
-</use>
+ <!-- maintainer-needed -->
+ <upstream>
+ <doc>http://www.tin.org/bin/man.cgi?section=1&amp;topic=tin</doc>
+ </upstream>
+ <use>
+ <flag name="cancel-locks">Enable Cancel-Lock header functionality</flag>
+ <flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> support</flag>
+ <flag name="libtls" restrict="&gt;=net-nntp/tin-2.6.2">Prefer <pkg>dev-libs/libretls</pkg> as SSL/TLS provider (ineffective with USE=-ssl)</flag>
+ <flag name="pcre2" restrict="&gt;=net-nntp/tin-2.6.2">Use <pkg>dev-libs/libpcre2</pkg> instead of <pkg>dev-libs/libpcre</pkg></flag>
+ </use>
</pkgmetadata>
diff --git a/net-nntp/tin/tin-2.6.2.ebuild b/net-nntp/tin/tin-2.6.2.ebuild
new file mode 100644
index 000000000000..50345f36be9e
--- /dev/null
+++ b/net-nntp/tin/tin-2.6.2.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit optfeature toolchain-funcs
+
+DESCRIPTION="A threaded NNTP and spool based UseNet newsreader"
+HOMEPAGE="http://www.tin.org/"
+SRC_URI="ftp://ftp.tin.org/pub/news/clients/tin/stable/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cancel-locks debug gnutls gpg libtls nls +pcre2 sasl socks5 ssl"
+
+RDEPEND="
+ dev-libs/icu:=
+ dev-libs/uulib
+ sys-libs/ncurses:=
+ virtual/libiconv
+ cancel-locks? ( >=net-libs/canlock-3.0:= )
+ gpg? ( app-crypt/gnupg )
+ nls? ( virtual/libintl )
+ pcre2? ( dev-libs/libpcre2:= )
+ !pcre2? ( dev-libs/libpcre:3 )
+ sasl? ( virtual/gsasl )
+ socks5? ( net-proxy/dante )
+ ssl? (
+ gnutls? ( net-libs/gnutls:= )
+ !gnutls? (
+ libtls? ( dev-libs/libretls:= )
+ !libtls? ( dev-libs/openssl:= )
+ )
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-alternatives/yacc
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=( "${FILESDIR}"/${P}-gnutls.patch )
+
+DOCS=(
+ README{,.MAC,.WIN}
+ doc/{CHANGES{,.old},CREDITS,TODO,WHATSNEW,filtering}
+)
+
+src_configure() {
+ tc-export AR CC RANLIB
+ tc-export_build_env
+
+ local myeconfargs=(
+ $(use_enable cancel-locks)
+ $(use_with cancel-locks canlock)
+
+ $(use_with pcre2 pcre2-config)
+ $(use_with !pcre2 pcre "${ESYSROOT}"/usr)
+
+ $(use_enable debug)
+ $(use_enable gpg pgp-gpg)
+ $(use_enable nls)
+ $(use_with socks5 socks)
+ --disable-mime-strict-charset
+ --enable-nntp
+ --enable-prototypes
+ --with-coffee # easter egg :)
+ --with-nntp-default-server="${TIN_DEFAULT_SERVER:-${NNTPSERVER:-news.gmane.io}}"
+ --with-screen=ncursesw
+ )
+
+ if use ssl; then
+ if use gnutls; then
+ myeconfargs+=( --with-nntps=gnutls )
+ elif use libtls; then
+ myeconfargs+=( --with-nntps=libtls )
+ else
+ myeconfargs+=( --with-nntps=openssl )
+ fi
+ fi
+
+ myeconfargs+=(
+ # set default paths for utilities
+ --with-editor="${EPREFIX}"/usr/libexec/editor
+ --with-gpg="${EPREFIX}"/usr/bin/gpg
+ --with-ispell="${EPREFIX}"/usr/bin/aspell
+ --with-mailer="${EPREFIX}"/bin/mail
+ --with-sum="${EPREFIX}"/usr/bin/sum
+
+ # set default paths for directories
+ --with-libdir="${EPREFIX}"/var/lib/news
+ --with-spooldir="${EPREFIX}"/var/spool/news
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # To build from the root dir you have to call `make build`, not just `make`.
+ emake build
+}
+
+src_install() {
+ default
+
+ emake DESTDIR="${D}" install_sysdefs
+ emake -C src DESTDIR="${D}" install_nls_man
+
+ dodoc doc/{*.sample,*.txt}
+}
+
+pkg_postinst() {
+ optfeature "spell checker support" app-text/aspell
+}