1 |
commit: 466d6e07e72b21538a8fd6a03ebefec90347ebae |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 12 17:43:31 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 12 18:04:16 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=466d6e07 |
7 |
|
8 |
www-client/w3m: fix configure tests with Clang 15 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
.../w3m-0.5.3_p20220429-clang-15-configure.patch | 26 ++++ |
13 |
www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild | 135 +++++++++++++++++++++ |
14 |
2 files changed, 161 insertions(+) |
15 |
|
16 |
diff --git a/www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch b/www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..c9543cb64955 |
19 |
--- /dev/null |
20 |
+++ b/www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch |
21 |
@@ -0,0 +1,26 @@ |
22 |
+https://github.com/tats/w3m/pull/248 |
23 |
+ |
24 |
+From cecac3d8a177362fc27c8a109ac23a8760e74a10 Mon Sep 17 00:00:00 2001 |
25 |
+From: Sam James <sam@g.o> |
26 |
+Date: Mon, 12 Sep 2022 18:41:28 +0100 |
27 |
+Subject: [PATCH] acinclude.m4: fix configure tests broken with Clang 15 |
28 |
+ (implicit function declarations) |
29 |
+ |
30 |
+Clang 15 makes implicit function declarations fatal by default which |
31 |
+leads to some configure tests silently failing/returning |
32 |
+the wrong result. |
33 |
+ |
34 |
+Signed-off-by: Sam James <sam@g.o> |
35 |
+--- a/acinclude.m4 |
36 |
++++ b/acinclude.m4 |
37 |
+@@ -904,7 +904,8 @@ AC_DEFUN([AC_W3M_SIGSETJMP], |
38 |
+ [AC_SUBST(HAVE_SIGSETJMP) |
39 |
+ AC_MSG_CHECKING(for sigsetjmp) |
40 |
+ AC_TRY_COMPILE( |
41 |
+-[#include <setjmp.h>], |
42 |
++[#include <setjmp.h> |
43 |
++ #include <stdlib.h>], |
44 |
+ [ jmp_buf env; |
45 |
+ if (sigsetjmp(env, 1) != 0) { exit(0); } siglongjmp(env, 1);], |
46 |
+ [have_sigsetjmp="yes"; AC_DEFINE(HAVE_SIGSETJMP)], |
47 |
+ |
48 |
|
49 |
diff --git a/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild b/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild |
50 |
new file mode 100644 |
51 |
index 000000000000..5793a2a9b5a5 |
52 |
--- /dev/null |
53 |
+++ b/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild |
54 |
@@ -0,0 +1,135 @@ |
55 |
+# Copyright 1999-2022 Gentoo Authors |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+ |
58 |
+EAPI=8 |
59 |
+ |
60 |
+inherit autotools prefix toolchain-funcs |
61 |
+ |
62 |
+MY_P="${P/_p/+git}" |
63 |
+MY_PV="${PV/_p/+git}" |
64 |
+ |
65 |
+DESCRIPTION="Text based WWW browser, supports tables and frames" |
66 |
+HOMEPAGE="https://github.com/tats/w3m" |
67 |
+SRC_URI="https://github.com/tats/w3m/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz" |
68 |
+S="${WORKDIR}/${P/_p/-git}" |
69 |
+ |
70 |
+LICENSE="w3m" |
71 |
+SLOT="0" |
72 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
73 |
+IUSE="fbcon gdk-pixbuf gpm imlib l10n_ja lynxkeymap nls nntp ssl unicode X xface" |
74 |
+ |
75 |
+REQUIRED_USE=" |
76 |
+ fbcon? ( ?? ( gdk-pixbuf imlib ) ) |
77 |
+ X? ( ?? ( gdk-pixbuf imlib ) ) |
78 |
+" |
79 |
+ |
80 |
+RDEPEND=" |
81 |
+ dev-libs/boehm-gc:= |
82 |
+ sys-libs/ncurses:0= |
83 |
+ sys-libs/zlib |
84 |
+ gdk-pixbuf? ( |
85 |
+ x11-libs/gdk-pixbuf |
86 |
+ X? ( x11-libs/gdk-pixbuf-xlib ) |
87 |
+ ) |
88 |
+ !gdk-pixbuf? ( |
89 |
+ imlib? ( media-libs/imlib2[X?] ) |
90 |
+ ) |
91 |
+ gpm? ( sys-libs/gpm ) |
92 |
+ ssl? ( dev-libs/openssl:0= ) |
93 |
+ X? ( |
94 |
+ x11-base/xorg-proto |
95 |
+ x11-libs/libXdmcp |
96 |
+ x11-libs/libXext |
97 |
+ ) |
98 |
+ xface? ( media-libs/compface ) |
99 |
+" |
100 |
+DEPEND="${RDEPEND}" |
101 |
+BDEPEND=" |
102 |
+ sys-devel/gettext |
103 |
+ virtual/pkgconfig |
104 |
+" |
105 |
+ |
106 |
+PATCHES=( |
107 |
+ "${FILESDIR}"/${PN}-0.5.3_p20210102-restore-gettext-macro.patch |
108 |
+ "${FILESDIR}"/${PN}-0.5.3_p20210102-fix-configure-gettext.patch |
109 |
+ "${FILESDIR}"/${PN}-0.5.3_p20220429-clang-15-configure.patch |
110 |
+) |
111 |
+ |
112 |
+src_prepare() { |
113 |
+ default |
114 |
+ |
115 |
+ sed -i "/^AR=/s:ar:$(tc-getAR):" {.,${PN}img,libwc}/Makefile.in || die |
116 |
+ hprefixify acinclude.m4 |
117 |
+ |
118 |
+ AT_NOEAUTOHEADER="yes" AT_M4DIR="m4" eautoreconf |
119 |
+} |
120 |
+ |
121 |
+src_configure() { |
122 |
+ local myconf=() |
123 |
+ local image imagelib |
124 |
+ |
125 |
+ if use gdk-pixbuf ; then |
126 |
+ imagelib="gtk3" |
127 |
+ elif use imlib ; then |
128 |
+ imagelib="imlib2" |
129 |
+ fi |
130 |
+ if [[ -n "${imagelib}" ]] ; then |
131 |
+ use X && image="${image}${image:+,}x11" |
132 |
+ use fbcon && image="${image}${image:+,}fb" |
133 |
+ fi |
134 |
+ # emacs-w3m doesn't like "--enable-m17n --disable-unicode," |
135 |
+ # so we better enable or disable both. Default to enable |
136 |
+ # m17n and unicode, see bug #47046. |
137 |
+ if use l10n_ja ; then |
138 |
+ myconf+=( --enable-japanese=$(usex unicode U E) ) |
139 |
+ else |
140 |
+ myconf+=( --with-charset=$(usex unicode UTF-8 US-ASCII) ) |
141 |
+ fi |
142 |
+ # lynxkeymap IUSE flag. bug #49397 |
143 |
+ myconf+=( --enable-keymap=$(usex lynxkeymap lynx ${PN}) ) |
144 |
+ |
145 |
+ econf \ |
146 |
+ $(use_enable gpm mouse) \ |
147 |
+ $(use_enable nls) \ |
148 |
+ $(use_enable nntp) \ |
149 |
+ $(use_enable ssl digest-auth) \ |
150 |
+ $(use_enable xface) \ |
151 |
+ $(use_with ssl) \ |
152 |
+ --enable-image=${image:-no} \ |
153 |
+ --enable-m17n \ |
154 |
+ --enable-unicode \ |
155 |
+ --with-browser="${EPREFIX}/usr/bin/xdg-open" \ |
156 |
+ --with-editor="${EPREFIX}/usr/bin/vi" \ |
157 |
+ --with-imagelib="${imagelib:-no}" \ |
158 |
+ --with-mailer="${EPREFIX}/bin/mail" \ |
159 |
+ --without-migemo \ |
160 |
+ --with-termlib=yes \ |
161 |
+ "${myconf[@]}" |
162 |
+} |
163 |
+ |
164 |
+src_install() { |
165 |
+ default |
166 |
+ |
167 |
+ insinto /etc/${PN} |
168 |
+ newins "${FILESDIR}"/${PN}.mailcap mailcap |
169 |
+ |
170 |
+ insinto /usr/share/${PN}/Bonus |
171 |
+ doins Bonus/{*.{cgi,rb},html*,makeref} |
172 |
+ |
173 |
+ docinto en |
174 |
+ dodoc doc/{HISTORY,README,keymap,menu}* |
175 |
+ newdoc Bonus/README.eng README.Bonus |
176 |
+ docinto html/en |
177 |
+ dodoc doc/*.html |
178 |
+ |
179 |
+ docinto de |
180 |
+ dodoc doc-de/README* |
181 |
+ docinto html/de |
182 |
+ dodoc doc-de/*.html |
183 |
+ |
184 |
+ docinto ja |
185 |
+ dodoc doc-jp/{HISTORY,README,keymap,menu}* |
186 |
+ newdoc Bonus/README README.Bonus |
187 |
+ docinto html/ja |
188 |
+ dodoc doc-jp/*.html |
189 |
+} |