Gentoo Archives: gentoo-proxy-maint

From: Anna Vyalkova <cyber+gentoo@×××××.in>
To: gentoo-proxy-maint@l.g.o
Subject: [gentoo-proxy-maint] [PATCH v4] net-nntp/tin: add 2.6.2
Date: Sat, 14 Jan 2023 09:48:38
Message-Id: 20230114094831.17557-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 net-nntp/tin/Manifest | 1 +
13 net-nntp/tin/files/tin-2.6.2-gnutls.patch | 36 +++++++
14 net-nntp/tin/metadata.xml | 19 ++--
15 net-nntp/tin/tin-2.6.2.ebuild | 121 ++++++++++++++++++++++
16 4 files changed, 169 insertions(+), 8 deletions(-)
17 create mode 100644 net-nntp/tin/files/tin-2.6.2-gnutls.patch
18 create mode 100644 net-nntp/tin/tin-2.6.2.ebuild
19
20 diff --git a/net-nntp/tin/Manifest b/net-nntp/tin/Manifest
21 index 035c264e9b..a1a8f0c73e 100644
22 --- a/net-nntp/tin/Manifest
23 +++ b/net-nntp/tin/Manifest
24 @@ -1 +1,2 @@
25 DIST tin-2.6.1.tar.xz 1570500 BLAKE2B ec9c54b8b89ecd33a42ede37c8db50828de2dce56ddff01900121903a18d73bde8a06733ca2dfb72c676eb373b5ea874cecb9a1ee7890ada4ad6539d9ff1a435 SHA512 dc9ace5e24cac1efcaac25df1747dd435573130cff4e9c846c89e8faaed8e8120d66a2021332c01f350744155bcb7be608657285560a1a2457b4635cc8fa22b3
26 +DIST tin-2.6.2.tar.xz 1598732 BLAKE2B 0e5bac9a711fb69e64d64b4f0c070d456f38f727e7b7aa794ad5ada8695c2174023964b8f07d2e7d6add51cf0c7c3102965bef653a7e873275747145cb70dbe2 SHA512 4c9e0edb3268d57fb89d9d53a90e8a5ba73da7c1da63c834224bed0f763502a7c3dd325351d3e57b1ddcb57494a84228cc38f227c49300b759fad8d112b1cac1
27 diff --git a/net-nntp/tin/files/tin-2.6.2-gnutls.patch b/net-nntp/tin/files/tin-2.6.2-gnutls.patch
28 new file mode 100644
29 index 0000000000..84f31f684c
30 --- /dev/null
31 +++ b/net-nntp/tin/files/tin-2.6.2-gnutls.patch
32 @@ -0,0 +1,36 @@
33 +Upstream patch to allow GnuTLS support without debug definitions.
34 +
35 +--- a/src/nntps.c
36 ++++ b/src/nntps.c
37 +@@ -41,8 +41,8 @@
38 + #endif /* USE_LIBTLS */
39 +
40 + #ifdef USE_GNUTLS
41 +-# ifdef DEBUG
42 + static int verification_func(gnutls_session_t session);
43 ++# ifdef DEBUG
44 + static void log_func(int level, const char *msg);
45 + # endif /* DEBUG */
46 + #else
47 +@@ -933,8 +933,7 @@
48 + #endif /* USE_OPENSSL */
49 +
50 +
51 +-#ifdef DEBUG
52 +-# ifdef USE_GNUTLS
53 ++#ifdef USE_GNUTLS
54 + static int
55 + verification_func(
56 + gnutls_session_t session)
57 +@@ -953,8 +952,11 @@
58 +
59 + return gnutls_verification_status;
60 + }
61 ++#endif /* USE_GNUTLS */
62 +
63 +
64 ++#ifdef DEBUG
65 ++# ifdef USE_GNUTLS
66 + static void
67 + log_func(
68 + int level,
69 diff --git a/net-nntp/tin/metadata.xml b/net-nntp/tin/metadata.xml
70 index e9e3c1ae47..22ce019d89 100644
71 --- a/net-nntp/tin/metadata.xml
72 +++ b/net-nntp/tin/metadata.xml
73 @@ -1,12 +1,15 @@
74 <?xml version="1.0" encoding="UTF-8"?>
75 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
76 <pkgmetadata>
77 -<!-- maintainer-needed -->
78 -<upstream>
79 -<doc>http://www.tin.org/bin/man.cgi?section=1&amp;topic=tin</doc>
80 -</upstream>
81 -<use>
82 -<flag name="cancel-locks">Enable Cancel-Lock header functionality</flag>
83 -<flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> support</flag>
84 -</use>
85 + <!-- maintainer-needed -->
86 + <upstream>
87 + <doc>http://www.tin.org/bin/man.cgi?section=1&amp;topic=tin</doc>
88 + </upstream>
89 + <use>
90 + <flag name="cancel-locks">Enable Cancel-Lock header functionality</flag>
91 + <flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> support</flag>
92 + <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>
93 + <flag name="openssl" restrict="&gt;=net-nntp/tin-2.6.2">Prefer <pkg>dev-libs/openssl</pkg> as SSL/TLS provider (ineffective with USE=-ssl)</flag>
94 + <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>
95 + </use>
96 </pkgmetadata>
97 diff --git a/net-nntp/tin/tin-2.6.2.ebuild b/net-nntp/tin/tin-2.6.2.ebuild
98 new file mode 100644
99 index 0000000000..96f245218e
100 --- /dev/null
101 +++ b/net-nntp/tin/tin-2.6.2.ebuild
102 @@ -0,0 +1,121 @@
103 +# Copyright 1999-2022 Gentoo Authors
104 +# Distributed under the terms of the GNU General Public License v2
105 +
106 +EAPI=8
107 +
108 +inherit optfeature toolchain-funcs
109 +
110 +DESCRIPTION="A threaded NNTP and spool based UseNet newsreader"
111 +HOMEPAGE="http://www.tin.org/"
112 +SRC_URI="ftp://ftp.tin.org/pub/news/clients/tin/stable/${P}.tar.xz"
113 +
114 +LICENSE="BSD"
115 +SLOT="0"
116 +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
117 +IUSE="cancel-locks debug gnutls gpg libtls nls +openssl +pcre2 sasl socks5 ssl"
118 +REQUIRED_USE="
119 + ssl? (
120 + ^^ ( gnutls libtls openssl )
121 + )
122 +"
123 +
124 +RDEPEND="
125 + dev-libs/icu:=
126 + dev-libs/uulib
127 + sys-libs/ncurses:=
128 + virtual/libiconv
129 + cancel-locks? ( >=net-libs/canlock-3.0:= )
130 + gpg? ( app-crypt/gnupg )
131 + nls? ( virtual/libintl )
132 + pcre2? ( dev-libs/libpcre2:= )
133 + !pcre2? ( dev-libs/libpcre:3 )
134 + sasl? ( virtual/gsasl )
135 + socks5? ( net-proxy/dante )
136 + ssl? (
137 + gnutls? ( net-libs/gnutls:= )
138 + libtls? ( dev-libs/libretls:= )
139 + openssl? ( dev-libs/openssl:= )
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 + elif use openssl; then
185 + myeconfargs+=( --with-nntps=openssl )
186 + else
187 + eerror "We can't be here because of REQUIRED_USE."
188 + fi
189 + fi
190 +
191 + myeconfargs+=(
192 + # set default paths for utilities
193 + --with-editor="${EPREFIX}"/usr/libexec/editor
194 + --with-gpg="${EPREFIX}"/usr/bin/gpg
195 + --with-ispell="${EPREFIX}"/usr/bin/aspell
196 + --with-mailer="${EPREFIX}"/bin/mail
197 + --with-sum="${EPREFIX}"/usr/bin/sum
198 +
199 + # set default paths for directories
200 + --with-libdir="${EPREFIX}"/var/lib/news
201 + --with-spooldir="${EPREFIX}"/var/spool/news
202 + )
203 +
204 + econf "${myeconfargs[@]}"
205 +}
206 +
207 +src_compile() {
208 + # To build from the root dir you have to call `make build`, not just `make`.
209 + emake build
210 +}
211 +
212 +src_install() {
213 + default
214 +
215 + emake DESTDIR="${D}" install_sysdefs
216 + emake -C src DESTDIR="${D}" install_nls_man
217 +
218 + dodoc doc/{*.sample,*.txt}
219 +}
220 +
221 +pkg_postinst() {
222 + optfeature "spell checker support" app-text/aspell
223 +}
224 --
225 2.39.0

Replies

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