public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/w3m/files/, www-client/w3m/
Date: Mon, 12 Sep 2022 18:04:21 +0000 (UTC)	[thread overview]
Message-ID: <1663005856.466d6e07e72b21538a8fd6a03ebefec90347ebae.sam@gentoo> (raw)

commit:     466d6e07e72b21538a8fd6a03ebefec90347ebae
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 17:43:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 18:04:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=466d6e07

www-client/w3m: fix configure tests with Clang 15

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../w3m-0.5.3_p20220429-clang-15-configure.patch   |  26 ++++
 www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild       | 135 +++++++++++++++++++++
 2 files changed, 161 insertions(+)

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
new file mode 100644
index 000000000000..c9543cb64955
--- /dev/null
+++ b/www-client/w3m/files/w3m-0.5.3_p20220429-clang-15-configure.patch
@@ -0,0 +1,26 @@
+https://github.com/tats/w3m/pull/248
+
+From cecac3d8a177362fc27c8a109ac23a8760e74a10 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 12 Sep 2022 18:41:28 +0100
+Subject: [PATCH] acinclude.m4: fix configure tests broken with Clang 15
+ (implicit function declarations)
+
+Clang 15 makes implicit function declarations fatal by default which
+leads to some configure tests silently failing/returning
+the wrong result.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -904,7 +904,8 @@ AC_DEFUN([AC_W3M_SIGSETJMP],
+ [AC_SUBST(HAVE_SIGSETJMP)
+ AC_MSG_CHECKING(for sigsetjmp)
+ AC_TRY_COMPILE(
+-[#include <setjmp.h>],
++[#include <setjmp.h>
++ #include <stdlib.h>],
+ [ jmp_buf env;
+    if (sigsetjmp(env, 1) != 0) { exit(0); } siglongjmp(env, 1);],
+ [have_sigsetjmp="yes"; AC_DEFINE(HAVE_SIGSETJMP)],
+

diff --git a/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild b/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild
new file mode 100644
index 000000000000..5793a2a9b5a5
--- /dev/null
+++ b/www-client/w3m/w3m-0.5.3_p20220429-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools prefix toolchain-funcs
+
+MY_P="${P/_p/+git}"
+MY_PV="${PV/_p/+git}"
+
+DESCRIPTION="Text based WWW browser, supports tables and frames"
+HOMEPAGE="https://github.com/tats/w3m"
+SRC_URI="https://github.com/tats/w3m/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${P/_p/-git}"
+
+LICENSE="w3m"
+SLOT="0"
+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"
+IUSE="fbcon gdk-pixbuf gpm imlib l10n_ja lynxkeymap nls nntp ssl unicode X xface"
+
+REQUIRED_USE="
+	fbcon? ( ?? ( gdk-pixbuf imlib ) )
+	X? ( ?? ( gdk-pixbuf imlib ) )
+"
+
+RDEPEND="
+	dev-libs/boehm-gc:=
+	sys-libs/ncurses:0=
+	sys-libs/zlib
+	gdk-pixbuf? (
+		x11-libs/gdk-pixbuf
+		X? ( x11-libs/gdk-pixbuf-xlib )
+	)
+	!gdk-pixbuf? (
+		imlib? ( media-libs/imlib2[X?] )
+	)
+	gpm? ( sys-libs/gpm )
+	ssl? ( dev-libs/openssl:0= )
+	X? (
+		x11-base/xorg-proto
+		x11-libs/libXdmcp
+		x11-libs/libXext
+	)
+	xface? ( media-libs/compface )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	sys-devel/gettext
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.5.3_p20210102-restore-gettext-macro.patch
+	"${FILESDIR}"/${PN}-0.5.3_p20210102-fix-configure-gettext.patch
+	"${FILESDIR}"/${PN}-0.5.3_p20220429-clang-15-configure.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i "/^AR=/s:ar:$(tc-getAR):" {.,${PN}img,libwc}/Makefile.in || die
+	hprefixify acinclude.m4
+
+	AT_NOEAUTOHEADER="yes" AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+	local myconf=()
+	local image imagelib
+
+	if use gdk-pixbuf ; then
+		imagelib="gtk3"
+	elif use imlib ; then
+		imagelib="imlib2"
+	fi
+	if [[ -n "${imagelib}" ]] ; then
+		use X     && image="${image}${image:+,}x11"
+		use fbcon && image="${image}${image:+,}fb"
+	fi
+	# emacs-w3m doesn't like "--enable-m17n --disable-unicode,"
+	# so we better enable or disable both. Default to enable
+	# m17n and unicode, see bug #47046.
+	if use l10n_ja ; then
+		myconf+=( --enable-japanese=$(usex unicode U E) )
+	else
+		myconf+=( --with-charset=$(usex unicode UTF-8 US-ASCII) )
+	fi
+	# lynxkeymap IUSE flag. bug #49397
+	myconf+=( --enable-keymap=$(usex lynxkeymap lynx ${PN}) )
+
+	econf \
+		$(use_enable gpm mouse) \
+		$(use_enable nls) \
+		$(use_enable nntp) \
+		$(use_enable ssl digest-auth) \
+		$(use_enable xface) \
+		$(use_with ssl) \
+		--enable-image=${image:-no} \
+		--enable-m17n \
+		--enable-unicode \
+		--with-browser="${EPREFIX}/usr/bin/xdg-open" \
+		--with-editor="${EPREFIX}/usr/bin/vi" \
+		--with-imagelib="${imagelib:-no}" \
+		--with-mailer="${EPREFIX}/bin/mail" \
+		--without-migemo \
+		--with-termlib=yes \
+		"${myconf[@]}"
+}
+
+src_install() {
+	default
+
+	insinto /etc/${PN}
+	newins "${FILESDIR}"/${PN}.mailcap mailcap
+
+	insinto /usr/share/${PN}/Bonus
+	doins Bonus/{*.{cgi,rb},html*,makeref}
+
+	docinto en
+	dodoc doc/{HISTORY,README,keymap,menu}*
+	newdoc Bonus/README.eng README.Bonus
+	docinto html/en
+	dodoc doc/*.html
+
+	docinto de
+	dodoc doc-de/README*
+	docinto html/de
+	dodoc doc-de/*.html
+
+	docinto ja
+	dodoc doc-jp/{HISTORY,README,keymap,menu}*
+	newdoc Bonus/README README.Bonus
+	docinto html/ja
+	dodoc doc-jp/*.html
+}


             reply	other threads:[~2022-09-12 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 18:04 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-25 22:01 [gentoo-commits] repo/gentoo:master commit in: www-client/w3m/files/, www-client/w3m/ Sam James
2018-04-16 18:29 Mike Gilbert
2018-04-03 13:32 Akinori Hattori
2018-04-03 13:32 Akinori Hattori
2016-12-04 15:05 Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1663005856.466d6e07e72b21538a8fd6a03ebefec90347ebae.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox