diff options
author | Eli Schwartz <eschwartz93@gmail.com> | 2024-06-26 11:08:19 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-27 04:15:58 +0100 |
commit | 48474b54b9c34c9d16b53a2cdb9d731813cecf0f (patch) | |
tree | 935d28ba8bdf4c1b29cd5eaeae00600561fd1b01 /app-text | |
parent | sci-chemistry/chemex: fix mysterious overdependency on tomli (diff) | |
download | gentoo-48474b54b9c34c9d16b53a2cdb9d731813cecf0f.tar.gz gentoo-48474b54b9c34c9d16b53a2cdb9d731813cecf0f.tar.bz2 gentoo-48474b54b9c34c9d16b53a2cdb9d731813cecf0f.zip |
app-text/spellutils: add patch to successfully eautoreconf
It uses a heavily vintage autoconf 2.13 in the dist tarball, while
simultaneously packed with gettextize bombs. It fails to configure under
Modern C compilers. Simply regenerating the build system solves all
this.
Bonus: there's a patch that patches a gettext input, which is no longer
used or needed. It dates back to at least the import of ::gentoo into
git.
Closes: https://bugs.gentoo.org/871537
Closes: https://bugs.gentoo.org/906253
Closes: https://github.com/gentoo/gentoo/pull/37307
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/spellutils/files/0001-allow-running-modern-autoreconf.patch | 52 | ||||
-rw-r--r-- | app-text/spellutils/spellutils-0.7-r1.ebuild | 68 |
2 files changed, 120 insertions, 0 deletions
diff --git a/app-text/spellutils/files/0001-allow-running-modern-autoreconf.patch b/app-text/spellutils/files/0001-allow-running-modern-autoreconf.patch new file mode 100644 index 000000000000..629647b661cf --- /dev/null +++ b/app-text/spellutils/files/0001-allow-running-modern-autoreconf.patch @@ -0,0 +1,52 @@ +From afd4a8c7b29f812621caaa44c5dff3549cbde2ee Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Wed, 26 Jun 2024 10:44:56 -0400 +Subject: [PATCH] allow running modern autoreconf + +The release tarball uses autoconf 2.13 and the configure.in uses things +that no longer work. +--- + Makefile.am | 2 +- + configure.in | 8 +++++--- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 3eecd1a..e21e0c3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,7 +2,7 @@ + + AUTOMAKE_OPTIONS = foreign + +-SUBDIRS = intl po ++SUBDIRS = po + + bin_PROGRAMS = pospell newsbody + +diff --git a/configure.in b/configure.in +index 9730ada..26ffd1a 100644 +--- a/configure.in ++++ b/configure.in +@@ -1,6 +1,7 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT(pospell.c) +-AM_INIT_AUTOMAKE(spellutils, 0.7) ++AC_INIT([spellutils],[0.7]) ++AC_CONFIG_SRCDIR([pospell.c]) ++AM_INIT_AUTOMAKE + AM_CONFIG_HEADER(config.h) + + dnl Set of available languages. +@@ -22,7 +23,8 @@ AC_TYPE_SIZE_T + AC_TYPE_PID_T + + dnl internationalization macros +-AM_GNU_GETTEXT ++AM_GNU_GETTEXT([external]) ++AM_GNU_GETTEXT_VERSION([@GETTEXT_VERSION@]) + if test "x$prefix" != xNONE; then + LOCALEDIR=$prefix/share/locale + else +-- +2.44.2 + diff --git a/app-text/spellutils/spellutils-0.7-r1.ebuild b/app-text/spellutils/spellutils-0.7-r1.ebuild new file mode 100644 index 000000000000..2476f946d2d3 --- /dev/null +++ b/app-text/spellutils/spellutils-0.7-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools toolchain-funcs + +DESCRIPTION="spellutils includes 'newsbody' (useful for spellchecking in mails, etc.)" +HOMEPAGE="http://home.worldonline.dk/byrial/spellutils/" +SRC_URI="http://home.worldonline.dk/byrial/spellutils/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86" +IUSE="nls" + +DEPEND="nls? ( virtual/libintl )" +RDEPEND="${DEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" + +DOCS=( NEWS README ) + +PATCHES=( + "${FILESDIR}"/0001-allow-running-modern-autoreconf.patch +) + +src_prepare() { + default + + # This is a filthy hack born of the fact that gettext is absolutely insane. + # It requires you specify exactly which version of gettext you have installed + # at the time of dist, and the tool to automatically update this explicitly reads + # from /dev/tty "so that gettextize cannot be abused by non-interactive tools." + # + # The gettext docs do, of course, claim this is entirely optional and only + # needed if you run autopoint. They neglect to mention that running + # autopoint is mandatory. Failure to do so produces this: + # + # configure.ac:11: installing './compile' + # configure.ac:26: error: required file './config.rpath' not found + # Makefile.am: installing './depcomp' + # + # and the call stack points back to -- you guessed it -- AM_GNU_GETTEXT. + # Which internally requires config.rpath, a file that is explicitly copied + # over by autopoint. + # + # AM_GNU_GETTEXT helpfully points out in code, rather than in docs: + # + # configure.ac: warning: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION + # + # Perhaps what is meant by "The use of this macro is optional; only the + # autopoint program makes use of it" is that you can deliver a `make dist` + # tarball that isn't built from publicly distributed versions of + # configure.ac, since you can add the macro, run autoreconf, then delete + # the macro and rerun autoreconf. It is a very funny definition of optional. + local gettext_version=$(gettextize --version | awk '/GNU gettext-tools/{print $NF}' || die) + sed -i "s/@GETTEXT_VERSION@/${gettext_version}/" configure.in || die + eautoreconf + cp po/Makevars.template po/Makevars || die +} + +src_configure() { + econf $(use_enable nls) +} + +src_compile() { + emake CC="$(tc-getCC)" +} |