From 475c5bffb40366851374e119276562774f7557bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 13 Feb 2020 17:53:16 +0700 Subject: [PATCH] kakasi: fix cross compile --- srcpkgs/kakasi/patches/cross.patch | 36 ++++++++++++++++++++++++++++++ srcpkgs/kakasi/template | 12 ++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/kakasi/patches/cross.patch diff --git a/srcpkgs/kakasi/patches/cross.patch b/srcpkgs/kakasi/patches/cross.patch new file mode 100644 index 0000000000..43cc68eeb9 --- /dev/null +++ b/srcpkgs/kakasi/patches/cross.patch @@ -0,0 +1,36 @@ + Makefile.am | 4 +++- + configure.in | 4 ---- + 2 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 1278f28..1eda657 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -15,9 +15,11 @@ SUBDIRS = src lib man tests + + CLEANFILES = kanwadict + ++MKKANWA = src/mkkanwa$(EXEEXT) ++ + kanwadict: + if test -f kakasidict; then \ +- ITAIJIDICT="itaijidict" src/mkkanwa$(EXEEXT) $@ kakasidict; \ ++ ITAIJIDICT="itaijidict" $(MKKANWA) $@ kakasidict; \ + fi + + dist-hook: +diff --git a/configure.in b/configure.in +index e865b04..e2930b1 100644 +--- a/configure.in ++++ b/configure.in +@@ -84,10 +84,6 @@ AS_VAR_IF(utf8, "yes",[ + AM_ICONV + LIBS="$LIBICONV $LIBS" + AC_DEFINE(KAKASI_SUPPORT_UTF8, 1, [KAKASI_SUPPORT_UTF8]) +- AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], +- [if (iconv_open("EUC-JP", "UTF-8") == -1) exit(1);])], +- [], +- [AC_MSG_ERROR([can not use EUC-JP or UTF-8 encoding on iconv])]) + ]) + + dnl check gcc flags diff --git a/srcpkgs/kakasi/template b/srcpkgs/kakasi/template index 973bdd1d5e..1a4bc42eb4 100644 --- a/srcpkgs/kakasi/template +++ b/srcpkgs/kakasi/template @@ -3,13 +3,21 @@ pkgname=kakasi version=2.3.6 revision=2 build_style=gnu-configure +hostmakedepends="automake libtool gettext-devel" short_desc="Tool to convert Kanji characters to Hiragana, Katakana or Romaji" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="http://kakasi.namazu.org/" distfiles="http://kakasi.namazu.org/stable/kakasi-${version}.tar.gz" checksum=004276fd5619c003f514822d82d14ae83cd45fb9338e0cb56a44974b44961893 +patch_args=-Np1 -nocross="https://travis-ci.org/voidlinux/void-packages/jobs/378177805#L933 - https://travis-ci.org/voidlinux/void-packages/jobs/378177806#L933" +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" kakasi" + make_build_args+=" MKKANWA=/usr/bin/mkkanwa" +fi +pre_configure() { + NOCONFIGURE=1 autoreconf -fi + NOCONFIGURE=1 automake +}