Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/lynx/
Date: Wed, 27 Jan 2021 08:28:53
Message-Id: 1611736122.f311f22b27bf4a70aaa5e28491e3867acceca366.slyfox@gentoo
1 commit: f311f22b27bf4a70aaa5e28491e3867acceca366
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 27 08:28:29 2021 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 27 08:28:42 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f311f22b
7
8 www-client/lynx: use cert trust store for USE=gnutls
9
10 lynx[gnutls] uses gnutls openssl compatibility API.
11 The compatibility API is not intended to be a close implementation.
12 Specifically it does not configure any default SSL stores and just
13 uses NULL by default (no store).
14
15 The change embeds default trust store path matching Gentoo's
16 gnutls (and openssl) default:
17 /etc/ssl/certs/ca-certificates.crt
18
19 Reported-by: Thomas Deutschmann
20 Closes: https://bugs.gentoo.org/604526
21 Package-Manager: Portage-3.0.14, Repoman-3.0.2
22 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
23
24 www-client/lynx/lynx-2.9.0_pre6-r1.ebuild | 105 ++++++++++++++++++++++++++++++
25 1 file changed, 105 insertions(+)
26
27 diff --git a/www-client/lynx/lynx-2.9.0_pre6-r1.ebuild b/www-client/lynx/lynx-2.9.0_pre6-r1.ebuild
28 new file mode 100644
29 index 00000000000..cdd4dff446f
30 --- /dev/null
31 +++ b/www-client/lynx/lynx-2.9.0_pre6-r1.ebuild
32 @@ -0,0 +1,105 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +case ${PV} in
39 + *_pre*) MY_P="${PN}${PV/_pre/dev.}" ;;
40 + *_rc*) MY_P="${PN}${PV/_rc/pre.}" ;;
41 + *_p*|*) MY_P="${PN}${PV/_p/rel.}" ;;
42 +esac
43 +
44 +DESCRIPTION="An excellent console-based web browser with ssl support"
45 +HOMEPAGE="https://lynx.invisible-island.net/"
46 +SRC_URI="https://invisible-mirror.net/archives/lynx/tarballs/${MY_P}.tar.bz2"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
51 +IUSE="bzip2 cjk gnutls idn ipv6 nls ssl unicode libressl"
52 +
53 +RDEPEND="
54 + sys-libs/ncurses:0=[unicode?]
55 + sys-libs/zlib
56 + nls? ( virtual/libintl )
57 + ssl? (
58 + !gnutls? (
59 + !libressl? ( dev-libs/openssl:0= )
60 + libressl? ( dev-libs/libressl:= )
61 + )
62 + gnutls? (
63 + dev-libs/libgcrypt:0=
64 + >=net-libs/gnutls-2.6.4:=
65 + )
66 + )
67 + bzip2? ( app-arch/bzip2 )
68 + idn? ( net-dns/libidn:0= )
69 +"
70 +
71 +DEPEND="${RDEPEND}
72 + nls? ( sys-devel/gettext )
73 + virtual/pkgconfig"
74 +
75 +S=${WORKDIR}/${MY_P}
76 +
77 +PATCHES=(
78 + "${FILESDIR}"/${PN}-2.8.6-mint.patch
79 + "${FILESDIR}"/${PN}-2.8.9_p1-parallel.patch
80 +)
81 +
82 +src_configure() {
83 + local myconf=(
84 + --enable-nested-tables
85 + --enable-cgi-links
86 + --enable-persistent-cookies
87 + --enable-prettysrc
88 + --enable-nsl-fork
89 + --enable-file-upload
90 + --enable-read-eta
91 + --enable-color-style
92 + --enable-scrollbar
93 + --enable-included-msgs
94 + --enable-externs
95 + --with-zlib
96 + $(use_enable nls)
97 + $(use_enable idn idna)
98 + $(use_enable ipv6)
99 + $(use_enable cjk)
100 + $(use_enable unicode japanese-utf8)
101 + $(use_with bzip2 bzlib)
102 + --with-screen=$(usex unicode ncursesw ncurses)
103 + )
104 + if use ssl; then
105 + myconf+=(
106 + --with-$(usex gnutls gnutls ssl)="${EPREFIX}/usr"
107 + )
108 + fi
109 +
110 + econf "${myconf[@]}"
111 +
112 + # Compared to openssl gnutls-openssl API does not use
113 + # default trust store: bug #604526.
114 + sed -e \
115 + "s|#define SSL_CERT_FILE NULL|#define SSL_CERT_FILE \"${EPREFIX}/etc/ssl/certs/ca-certificates.crt\"|" \
116 + -i userdefs.h || die
117 +}
118 +
119 +src_compile() {
120 + # generating translation files in parallel is currently broken
121 + use nls && emake -C po -j1
122 + emake
123 +}
124 +
125 +src_install() {
126 + emake install DESTDIR="${D}"
127 +
128 + sed -i "s|^HELPFILE.*$|HELPFILE:file://localhost/usr/share/doc/${PF}/lynx_help/lynx_help_main.html|" \
129 + "${ED}"/etc/lynx.cfg || die "lynx.cfg not found"
130 + if use unicode ; then
131 + sed -i '/^#CHARACTER_SET:/ c\CHARACTER_SET:utf-8' \
132 + "${ED}"/etc/lynx.cfg || die "lynx.cfg not found"
133 + fi
134 +
135 + dodoc CHANGES COPYHEADER PROBLEMS README
136 + dodoc -r docs lynx_help
137 +}