commit:     555061fac3539bf3d0026d88d957ad5a1ed24beb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 16 05:25:21 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 16 05:26:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=555061fa

app-i18n/kakasi: fix configure w/ clang 16

Closes: https://bugs.gentoo.org/874654
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../kakasi/files/kakasi-2.3.6-configure-clang16.patch | 19 +++++++++++++++++++
 .../{kakasi-2.3.6.ebuild => kakasi-2.3.6-r1.ebuild}   | 15 ++++++++++++++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/app-i18n/kakasi/files/kakasi-2.3.6-configure-clang16.patch 
b/app-i18n/kakasi/files/kakasi-2.3.6-configure-clang16.patch
new file mode 100644
index 000000000000..7c6dd035f57c
--- /dev/null
+++ b/app-i18n/kakasi/files/kakasi-2.3.6-configure-clang16.patch
@@ -0,0 +1,19 @@
+https://src.fedoraproject.org/rpms/kakasi/raw/4756771349822d4ccd4d74a6ce70040ca57084cb/f/kakasi-configure-c99.patch
+https://bugs.gentoo.org/874654
+
+Avoid an implicit declaration of exit and build failures with future
+compilers which do not support implicit function declarations by
+default.
+
+--- a/configure.in
++++ b/configure.in
+@@ -85,7 +85,7 @@ AS_VAR_IF(utf8, "yes",[
+     LIBS="$LIBICONV $LIBS"
+     AC_DEFINE(KAKASI_SUPPORT_UTF8, 1, [KAKASI_SUPPORT_UTF8])
+     AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <iconv.h>],
+-                  [if (iconv_open("EUC-JP", "UTF-8") == -1) exit(1);])],
++                  [if (iconv_open("EUC-JP", "UTF-8") == -1) return 1;])],
+       [],
+       [AC_MSG_ERROR([can not use EUC-JP or UTF-8 encoding on iconv])])
+ ])
+

diff --git a/app-i18n/kakasi/kakasi-2.3.6.ebuild 
b/app-i18n/kakasi/kakasi-2.3.6-r1.ebuild
similarity index 80%
rename from app-i18n/kakasi/kakasi-2.3.6.ebuild
rename to app-i18n/kakasi/kakasi-2.3.6-r1.ebuild
index d7894efeacfb..8e5806c37964 100644
--- a/app-i18n/kakasi/kakasi-2.3.6.ebuild
+++ b/app-i18n/kakasi/kakasi-2.3.6-r1.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
 
+inherit autotools
+
 DESCRIPTION="Converts Japanese text between kanji, kana, and romaji"
 HOMEPAGE="http://kakasi.namazu.org/";
 SRC_URI="http://${PN}.namazu.org/stable/${P}.tar.gz";
@@ -14,6 +16,17 @@ IUSE="l10n_ja static-libs"
 
 DOCS=( AUTHORS ChangeLog {,O}NEWS README{,-ja} THANKS TODO 
doc/{ChangeLog.lib,JISYO,README.lib} )
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.3.6-configure-clang16.patch
+)
+
+src_prepare() {
+       default
+
+       # Clang 16 patch
+       eautoreconf
+}
+
 src_install() {
        default
        einstalldocs

Reply via email to