* [gentoo-commits] repo/gentoo:master commit in: dev-libs/hyphen/files/, dev-libs/hyphen/
@ 2023-04-14 0:31 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-04-14 0:31 UTC (permalink / raw
To: gentoo-commits
commit: e3910765cb67fe9cc3ce9237337862058a868eae
Author: orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Mar 27 21:19:22 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 14 00:28:59 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3910765
dev-libs/hyphen: Fix the build with mawk
mawk: ./lig.awk: line 44: function gensub never defined
Closes: https://bugs.gentoo.org/903656
Upstream-Commit: https://github.com/hunspell/hyphen/commit/3d05509b7ce8c350f4476830b00241025eeae329
Upstream-PR: https://github.com/hunspell/hyphen/pull/12
Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/30374
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/hyphen/files/hyphen-2.8.8-mawk.patch | 47 +++++++++++++++++++++++++++
dev-libs/hyphen/hyphen-2.8.8-r1.ebuild | 8 +++--
2 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/dev-libs/hyphen/files/hyphen-2.8.8-mawk.patch b/dev-libs/hyphen/files/hyphen-2.8.8-mawk.patch
new file mode 100644
index 000000000000..a378db8d40ae
--- /dev/null
+++ b/dev-libs/hyphen/files/hyphen-2.8.8-mawk.patch
@@ -0,0 +1,47 @@
+https://github.com/hunspell/hyphen/commit/3d05509b7ce8c350f4476830b00241025eeae329
+https://github.com/hunspell/hyphen/pull/12
+
+From 3d05509b7ce8c350f4476830b00241025eeae329 Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip.chimento@gmail.com>
+Date: Sat, 12 Nov 2016 00:36:06 -0800
+Subject: [PATCH] More portable awk script
+
+gensub() is specific to gawk, this uses gsub() instead in order to build
+on platforms that don't have gawk such as macOS.
+---
+ lig.awk | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/lig.awk b/lig.awk
+index 6737170..4ea5e46 100644
+--- a/lig.awk
++++ b/lig.awk
+@@ -24,14 +24,20 @@ c=b
+ c!=b { print c }
+
+ /f[1-9]?$/ {
+- print gensub("f[1-9]?$", "ff", "g", b);
+- if (c!=b) print gensub("f[1-9]?$", "ff", "g", c);
+-
+- print gensub("f[1-9]?$", "fi", "g", b);
+- if (c!=b) print gensub("f[1-9]?$", "fi", "g", c);
+-
+- print gensub("f[1-9]?$", "fl", "g", b);
+- if (c!=b) print gensub("f[1-9]?$", "fl", "g", c);
++ out=b; gsub("f[1-9]?$", "ff", out); print out
++ if (c!=b) {
++ out=c; gsub("f[1-9]?$", "ff", out); print out
++ }
++
++ out=b; gsub("f[1-9]?$", "fi", out); print out
++ if (c!=b) {
++ out=c; gsub("f[1-9]?$", "fi", out); print out
++ }
++
++ out=b; gsub("f[1-9]?$", "fl", out); print out
++ if (c!=b) {
++ out=c; gsub("f[1-9]?$", "fl", out); print out
++ }
+ }
+
+
diff --git a/dev-libs/hyphen/hyphen-2.8.8-r1.ebuild b/dev-libs/hyphen/hyphen-2.8.8-r1.ebuild
index ec59ef06c25d..71a0749c09dc 100644
--- a/dev-libs/hyphen/hyphen-2.8.8-r1.ebuild
+++ b/dev-libs/hyphen/hyphen-2.8.8-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
DESCRIPTION="ALTLinux hyphenation library"
HOMEPAGE="http://hunspell.github.io/"
@@ -18,6 +18,10 @@ BDEPEND="dev-lang/perl"
DOCS=( AUTHORS ChangeLog NEWS README{,.nonstandard,.hyphen,.compound} THANKS TODO )
+PATCHES=(
+ "${FILESDIR}"/${P}-mawk.patch
+)
+
src_configure() {
econf $(use_enable static-libs static)
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-14 0:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 0:31 [gentoo-commits] repo/gentoo:master commit in: dev-libs/hyphen/files/, dev-libs/hyphen/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox