Gentoo Archives: gentoo-proxy-maint

From: Anna Vyalkova <cyber+gentoo@×××××.in>
To: gentoo-proxy-maint@l.g.o
Subject: [gentoo-proxy-maint] [PATCH v5] net-nntp/tin: add 2.6.2
Date: Sat, 14 Jan 2023 10:28:56
Message-Id: 20230114102820.28058-1-cyber+gentoo@sysrq.in
In Reply to: [gentoo-proxy-maint] [PATCH] net-nntp/tin: add 2.6.2 by Anna Vyalkova
1 In this update:
2 * New: NNTPS support with different backends (openssl by default)
3 * New: PCRE2 support (enabled by default)
4 * Enable local news support
5 * Add missing virtual/libiconv dependency
6 * Add missing sys-devel/gettext bdep
7 * Drop net-mail/metamail optfeature dep (treecleaned)
8 * Export BUILD_* variables
9
10 Signed-off-by: Anna Vyalkova <cyber+gentoo@×××××.in>
11 ---
12
13 Changes since v4:
14 - remove REQUIRED_USE
15
16 net-nntp/tin/Manifest | 1 +
17 net-nntp/tin/files/tin-2.6.2-gnutls.patch | 36 +++++++
18 net-nntp/tin/metadata.xml | 18 ++--
19 net-nntp/tin/tin-2.6.2.ebuild | 116 ++++++++++++++++++++++
20 4 files changed, 163 insertions(+), 8 deletions(-)
21 create mode 100644 net-nntp/tin/files/tin-2.6.2-gnutls.patch
22 create mode 100644 net-nntp/tin/tin-2.6.2.ebuild
23
24 diff --git a/net-nntp/tin/Manifest b/net-nntp/tin/Manifest
25 index 035c264e9b..a1a8f0c73e 100644
26 --- a/net-nntp/tin/Manifest
27 +++ b/net-nntp/tin/Manifest
28 @@ -1 +1,2 @@
29 DIST tin-2.6.1.tar.xz 1570500 BLAKE2B ec9c54b8b89ecd33a42ede37c8db50828de2dce56ddff01900121903a18d73bde8a06733ca2dfb72c676eb373b5ea874cecb9a1ee7890ada4ad6539d9ff1a435 SHA512 dc9ace5e24cac1efcaac25df1747dd435573130cff4e9c846c89e8faaed8e8120d66a2021332c01f350744155bcb7be608657285560a1a2457b4635cc8fa22b3
30 +DIST tin-2.6.2.tar.xz 1598732 BLAKE2B 0e5bac9a711fb69e64d64b4f0c070d456f38f727e7b7aa794ad5ada8695c2174023964b8f07d2e7d6add51cf0c7c3102965bef653a7e873275747145cb70dbe2 SHA512 4c9e0edb3268d57fb89d9d53a90e8a5ba73da7c1da63c834224bed0f763502a7c3dd325351d3e57b1ddcb57494a84228cc38f227c49300b759fad8d112b1cac1
31 diff --git a/net-nntp/tin/files/tin-2.6.2-gnutls.patch b/net-nntp/tin/files/tin-2.6.2-gnutls.patch
32 new file mode 100644
33 index 0000000000..84f31f684c
34 --- /dev/null
35 +++ b/net-nntp/tin/files/tin-2.6.2-gnutls.patch
36 @@ -0,0 +1,36 @@
37 +Upstream patch to allow GnuTLS support without debug definitions.
38 +
39 +--- a/src/nntps.c
40 ++++ b/src/nntps.c
41 +@@ -41,8 +41,8 @@
42 + #endif /* USE_LIBTLS */
43 +
44 + #ifdef USE_GNUTLS
45 +-# ifdef DEBUG
46 + static int verification_func(gnutls_session_t session);
47 ++# ifdef DEBUG
48 + static void log_func(int level, const char *msg);
49 + # endif /* DEBUG */
50 + #else
51 +@@ -933,8 +933,7 @@
52 + #endif /* USE_OPENSSL */
53 +
54 +
55 +-#ifdef DEBUG
56 +-# ifdef USE_GNUTLS
57 ++#ifdef USE_GNUTLS
58 + static int
59 + verification_func(
60 + gnutls_session_t session)
61 +@@ -953,8 +952,11 @@
62 +
63 + return gnutls_verification_status;
64 + }
65 ++#endif /* USE_GNUTLS */
66 +
67 +
68 ++#ifdef DEBUG
69 ++# ifdef USE_GNUTLS
70 + static void
71 + log_func(
72 + int level,
73 diff --git a/net-nntp/tin/metadata.xml b/net-nntp/tin/metadata.xml
74 index e9e3c1ae47..2273dcd0ef 100644
75 --- a/net-nntp/tin/metadata.xml
76 +++ b/net-nntp/tin/metadata.xml
77 @@ -1,12 +1,14 @@
78 <?xml version="1.0" encoding="UTF-8"?>
79 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
80 <pkgmetadata>
81 -<!-- maintainer-needed -->
82 -<upstream>
83 -<doc>http://www.tin.org/bin/man.cgi?section=1&amp;topic=tin</doc>
84 -</upstream>
85 -<use>
86 -<flag name="cancel-locks">Enable Cancel-Lock header functionality</flag>
87 -<flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> support</flag>
88 -</use>
89 + <!-- maintainer-needed -->
90 + <upstream>
91 + <doc>http://www.tin.org/bin/man.cgi?section=1&amp;topic=tin</doc>
92 + </upstream>
93 + <use>
94 + <flag name="cancel-locks">Enable Cancel-Lock header functionality</flag>
95 + <flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> support</flag>
96 + <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>
97 + <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>
98 + </use>
99 </pkgmetadata>
100 diff --git a/net-nntp/tin/tin-2.6.2.ebuild b/net-nntp/tin/tin-2.6.2.ebuild
101 new file mode 100644
102 index 0000000000..d89c182703
103 --- /dev/null
104 +++ b/net-nntp/tin/tin-2.6.2.ebuild
105 @@ -0,0 +1,116 @@
106 +# Copyright 1999-2022 Gentoo Authors
107 +# Distributed under the terms of the GNU General Public License v2
108 +
109 +EAPI=8
110 +
111 +inherit optfeature toolchain-funcs
112 +
113 +DESCRIPTION="A threaded NNTP and spool based UseNet newsreader"
114 +HOMEPAGE="http://www.tin.org/"
115 +SRC_URI="ftp://ftp.tin.org/pub/news/clients/tin/stable/${P}.tar.xz"
116 +
117 +LICENSE="BSD"
118 +SLOT="0"
119 +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
120 +IUSE="cancel-locks debug gnutls gpg libtls nls +pcre2 sasl socks5 ssl"
121 +
122 +RDEPEND="
123 + dev-libs/icu:=
124 + dev-libs/uulib
125 + sys-libs/ncurses:=
126 + virtual/libiconv
127 + cancel-locks? ( >=net-libs/canlock-3.0:= )
128 + gpg? ( app-crypt/gnupg )
129 + nls? ( virtual/libintl )
130 + pcre2? ( dev-libs/libpcre2:= )
131 + !pcre2? ( dev-libs/libpcre:3 )
132 + sasl? ( virtual/gsasl )
133 + socks5? ( net-proxy/dante )
134 + ssl? (
135 + gnutls? ( net-libs/gnutls:= )
136 + !gnutls? (
137 + libtls? ( dev-libs/libretls:= )
138 + !libtls? ( dev-libs/openssl:= )
139 + )
140 + )
141 +"
142 +DEPEND="${RDEPEND}"
143 +BDEPEND="
144 + app-alternatives/yacc
145 + virtual/pkgconfig
146 + nls? ( sys-devel/gettext )
147 +"
148 +
149 +PATCHES=( "${FILESDIR}"/${P}-gnutls.patch )
150 +
151 +DOCS=(
152 + README{,.MAC,.WIN}
153 + doc/{CHANGES{,.old},CREDITS,TODO,WHATSNEW,filtering}
154 +)
155 +
156 +src_configure() {
157 + tc-export AR CC RANLIB
158 + tc-export_build_env
159 +
160 + local myeconfargs=(
161 + $(use_enable cancel-locks)
162 + $(use_with cancel-locks canlock)
163 +
164 + $(use_with pcre2 pcre2-config)
165 + $(use_with !pcre2 pcre "${ESYSROOT}"/usr)
166 +
167 + $(use_enable debug)
168 + $(use_enable gpg pgp-gpg)
169 + $(use_enable nls)
170 + $(use_with socks5 socks)
171 + --disable-mime-strict-charset
172 + --enable-nntp
173 + --enable-prototypes
174 + --with-coffee # easter egg :)
175 + --with-nntp-default-server="${TIN_DEFAULT_SERVER:-${NNTPSERVER:-news.gmane.io}}"
176 + --with-screen=ncursesw
177 + )
178 +
179 + if use ssl; then
180 + if use gnutls; then
181 + myeconfargs+=( --with-nntps=gnutls )
182 + elif use libtls; then
183 + myeconfargs+=( --with-nntps=libtls )
184 + else
185 + myeconfargs+=( --with-nntps=openssl )
186 + fi
187 + fi
188 +
189 + myeconfargs+=(
190 + # set default paths for utilities
191 + --with-editor="${EPREFIX}"/usr/libexec/editor
192 + --with-gpg="${EPREFIX}"/usr/bin/gpg
193 + --with-ispell="${EPREFIX}"/usr/bin/aspell
194 + --with-mailer="${EPREFIX}"/bin/mail
195 + --with-sum="${EPREFIX}"/usr/bin/sum
196 +
197 + # set default paths for directories
198 + --with-libdir="${EPREFIX}"/var/lib/news
199 + --with-spooldir="${EPREFIX}"/var/spool/news
200 + )
201 +
202 + econf "${myeconfargs[@]}"
203 +}
204 +
205 +src_compile() {
206 + # To build from the root dir you have to call `make build`, not just `make`.
207 + emake build
208 +}
209 +
210 +src_install() {
211 + default
212 +
213 + emake DESTDIR="${D}" install_sysdefs
214 + emake -C src DESTDIR="${D}" install_nls_man
215 +
216 + dodoc doc/{*.sample,*.txt}
217 +}
218 +
219 +pkg_postinst() {
220 + optfeature "spell checker support" app-text/aspell
221 +}
222 --
223 2.39.0

Replies

Subject Author
Re: [gentoo-proxy-maint] [PATCH v5] net-nntp/tin: add 2.6.2 Joonas Niilola <juippis@g.o>