From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.126.187]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Tlbzv-0006ud-S1 for ptxdist@pengutronix.de; Thu, 20 Dec 2012 10:01:05 +0100 From: Bernhard Sessler Date: Thu, 20 Dec 2012 10:00:49 +0100 Message-Id: <1355994049-23045-1-git-send-email-bernhard.sessler@corscience.de> Subject: [ptxdist] [PATCH] anthy: Add new package Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Anthy is a system providing a Japanese input method. It converts Hiragana text to Kana Kanji mixed text. Signed-off-by: Bernhard Sessler --- ...uild-system-for-cross-compilation-support.patch | 395 +++++++++++++++++++++ patches/anthy-9100h/autogen.sh | 1 + patches/anthy-9100h/series | 1 + rules/anthy.in | 8 + rules/anthy.make | 68 ++++ 5 files changed, 473 insertions(+) create mode 100644 patches/anthy-9100h/0001-Updated-build-system-for-cross-compilation-support.patch create mode 120000 patches/anthy-9100h/autogen.sh create mode 100644 patches/anthy-9100h/series create mode 100644 rules/anthy.in create mode 100644 rules/anthy.make diff --git a/patches/anthy-9100h/0001-Updated-build-system-for-cross-compilation-support.patch b/patches/anthy-9100h/0001-Updated-build-system-for-cross-compilation-support.patch new file mode 100644 index 0000000..cedab39 --- /dev/null +++ b/patches/anthy-9100h/0001-Updated-build-system-for-cross-compilation-support.patch @@ -0,0 +1,395 @@ +From a090465e2898a4479c9025bac22b45a2813e7452 Mon Sep 17 00:00:00 2001 +From: Bernhard Sessler +Date: Tue, 18 Dec 2012 16:48:24 +0100 +Subject: [PATCH] Updated build system for cross compilation support + +Signed-off-by: Bernhard Sessler +--- + calctrans/Makefile.am | 61 ++++++++++++++++++++++++++++++++++++++++++---- + configure.ac | 65 ++++++++++++++++++++++++++++++++++++++++---------- + depgraph/Makefile.am | 50 +++++++++++++++++++++++++++++++++++--- + mkanthydic/Makefile.am | 55 ++++++++++++++++++++++++++++++++++++++---- + mkworddic/Makefile.am | 54 ++++++++++++++++++++++++++++++++++++++--- + 5 files changed, 257 insertions(+), 28 deletions(-) + +diff --git a/calctrans/Makefile.am b/calctrans/Makefile.am +index 571b0d2..7e66e1f 100644 +--- a/calctrans/Makefile.am ++++ b/calctrans/Makefile.am +@@ -1,15 +1,66 @@ ++CC = @CC_FOR_BUILD@ ++ + EXTRA_DIST =\ + corpus.0.txt corpus.1.txt corpus.2.txt\ + corpus.3.txt corpus.4.txt corpus.5.txt\ + corpus_info weak_words + + noinst_PROGRAMS = calctrans proccorpus +-INCLUDES = -I$(top_srcdir)/ ++INCLUDES = -I$(top_srcdir)/ -DSRCDIR=\"$(srcdir)\" -DCONF_DIR=\"$(sysconfdir)\" ++ ++common_SOURCES = ../src-splitter/wordlist.c \ ++ ../src-splitter/metaword.c \ ++ ../src-splitter/depgraph.c \ ++ ../src-splitter/splitter.c \ ++ ../src-splitter/evalborder.c \ ++ ../src-splitter/compose.c \ ++ ../src-splitter/wordborder.h \ ++ ../src-splitter/lattice.c \ ++ ../src-splitter/segclass.c \ ++ ../src-ordering/candswap.c \ ++ ../src-ordering/candsort.c \ ++ ../src-ordering/commit.c \ ++ ../src-ordering/relation.c \ ++ ../src-ordering/infosort.c \ ++ ../src-ordering/candhistory.c \ ++ ../src-ordering/sorter.h \ ++ ../src-diclib/diclib.c \ ++ ../src-diclib/file_dic.c \ ++ ../src-diclib/filemap.c \ ++ ../src-diclib/xstr.c \ ++ ../src-diclib/xchar.c \ ++ ../src-diclib/alloc.c \ ++ ../src-diclib/conf.c \ ++ ../src-diclib/logger.c \ ++ ../src-diclib/ruleparser.c \ ++ ../src-diclib/diclib_inner.h \ ++ ../src-diclib/e2u.h \ ++ ../src-diclib/u2e.h \ ++ ../src-worddic/dic_util.c \ ++ ../src-worddic/feature_set.c \ ++ ../src-worddic/mem_dic.c \ ++ ../src-worddic/record.c \ ++ ../src-worddic/texttrie.c \ ++ ../src-worddic/word_dic.c \ ++ ../src-worddic/wtype.c \ ++ ../src-worddic/ext_ent.c \ ++ ../src-worddic/matrix.c \ ++ ../src-worddic/priv_dic.c \ ++ ../src-worddic/textdict.c \ ++ ../src-worddic/use_dic.c \ ++ ../src-worddic/word_lookup.c \ ++ ../src-main/context.c \ ++ ../src-main/main.c \ ++ ../src-util/convdb.c ++ ++calctrans_SOURCES = calctrans.c \ ++ input_set.c \ ++ input_set.h \ ++ corpus.c \ ++ $(common_SOURCES) + +-calctrans_SOURCES = calctrans.c input_set.c input_set.h corpus.c +-calctrans_LDADD = ../src-main/libanthy.la ../src-worddic/libanthydic.la -lm +-proccorpus_SOURCES = proccorpus.c +-proccorpus_LDADD = ../src-util/libconvdb.la ../src-main/libanthy.la ../src-worddic/libanthydic.la ++proccorpus_SOURCES = proccorpus.c \ ++ $(common_SOURCES) + + dict_source_files = anthy.cand_info anthy.trans_info anthy.corpus_array anthy.corpus_bucket anthy.weak_words + +diff --git a/configure.ac b/configure.ac +index eb87297..bcb5396 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,15 +1,41 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT(src-main/main.c) ++AC_INIT ++AC_CONFIG_SRCDIR([src-main/main.c]) + + AM_INIT_AUTOMAKE(anthy, 9100h) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS([config.h]) + + dnl Checks for programs. + AC_PROG_CC + AC_PROG_CPP +-AM_PROG_LIBTOOL ++LT_INIT + AM_PATH_LISPDIR + ++if test x"$cross_compiling" = xyes; then ++ AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) ++else ++ CC_FOR_BUILD="$CC" ++fi ++ ++# Set compilers to use when building for the build system in a cross compile build ++# Fallback to the system compilers ++if test "x$CXX_FOR_BUILD" = "x" ; then ++ CXX_FOR_BUILD="${CXX}" ++fi ++AC_SUBST([CXX_FOR_BUILD]) ++ ++if test "x$CC_FOR_BUILD" = "x" ; then ++ CC_FOR_BUILD="${CC}" ++fi ++AC_SUBST([CC_FOR_BUILD]) ++ ++if test "x$CPPFLAGS_FOR_BUILD" = "x" ; then ++ CPPFLAGS_FOR_BUILD="${CPPFLAGS}" ++fi ++AC_SUBST([CPPFLAGS_FOR_BUILD]) ++ ++AC_CHECK_LIB([m], [sqrt]) ++ + AM_CONDITIONAL(ELISP, test x$lispdir != x) + + dnl without emacs. install-lispLISP does mkdir /anthy +@@ -20,13 +46,26 @@ lispdir="$lispdir/anthy" + + test -z "$GCC" || CFLAGS="$CFLAGS -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long" + +-AC_OUTPUT(Makefile +- src-diclib/Makefile src-worddic/Makefile +- src-splitter/Makefile src-ordering/Makefile +- src-main/Makefile src-util/Makefile +- anthy/Makefile +- depgraph/Makefile mkanthydic/Makefile mkworddic/Makefile +- mkworddic/dict.args test/Makefile +- alt-cannadic/Makefile +- doc/Makefile calctrans/Makefile +- anthy-conf anthy-test-conf anthy.spec anthy.pc) ++AC_CONFIG_FILES([ ++ Makefile ++ src-diclib/Makefile ++ src-worddic/Makefile ++ src-splitter/Makefile ++ src-ordering/Makefile ++ src-main/Makefile ++ src-util/Makefile ++ anthy/Makefile ++ depgraph/Makefile ++ mkanthydic/Makefile ++ mkworddic/Makefile ++ mkworddic/dict.args ++ test/Makefile ++ alt-cannadic/Makefile ++ doc/Makefile ++ calctrans/Makefile ++ anthy-conf ++ anthy-test-conf ++ anthy.spec ++ anthy.pc ++ ]) ++AC_OUTPUT +diff --git a/depgraph/Makefile.am b/depgraph/Makefile.am +index 94e75b4..d6b2355 100644 +--- a/depgraph/Makefile.am ++++ b/depgraph/Makefile.am +@@ -1,17 +1,61 @@ ++CC = @CC_FOR_BUILD@ ++ + # Files + DEPWORDS = master.depword noun.depword v.depword \ + av.depword a.depword\ + ajv.depword noun-variant.depword \ + fix.depword conjugate.depword \ + conjugate.table +-INCLUDES = -I$(top_srcdir)/ -DSRCDIR=\"$(srcdir)\" ++INCLUDES = -I$(top_srcdir)/ -DSRCDIR=\"$(srcdir)\" -DCONF_DIR=\"$(sysconfdir)\" + CLEANFILES = anthy.dep + EXTRA_DIST = indepword.txt $(DEPWORDS) + + # Generate the dictionary + noinst_PROGRAMS = mkdepgraph +-mkdepgraph_SOURCES = mkdepgraph.c +-mkdepgraph_LDADD = ../src-main/libanthy.la ../src-worddic/libanthydic.la ++mkdepgraph_SOURCES = mkdepgraph.c \ ++ ../src-splitter/wordlist.c \ ++ ../src-splitter/metaword.c \ ++ ../src-splitter/depgraph.c \ ++ ../src-splitter/splitter.c \ ++ ../src-splitter/evalborder.c \ ++ ../src-splitter/compose.c \ ++ ../src-splitter/wordborder.h \ ++ ../src-splitter/lattice.c \ ++ ../src-splitter/segclass.c \ ++ ../src-ordering/candswap.c \ ++ ../src-ordering/candsort.c \ ++ ../src-ordering/commit.c \ ++ ../src-ordering/relation.c \ ++ ../src-ordering/infosort.c \ ++ ../src-ordering/candhistory.c \ ++ ../src-ordering/sorter.h \ ++ ../src-diclib/diclib.c \ ++ ../src-diclib/file_dic.c \ ++ ../src-diclib/filemap.c \ ++ ../src-diclib/xstr.c \ ++ ../src-diclib/xchar.c \ ++ ../src-diclib/alloc.c \ ++ ../src-diclib/conf.c \ ++ ../src-diclib/logger.c \ ++ ../src-diclib/ruleparser.c \ ++ ../src-diclib/diclib_inner.h \ ++ ../src-diclib/e2u.h \ ++ ../src-diclib/u2e.h \ ++ ../src-worddic/dic_util.c \ ++ ../src-worddic/feature_set.c \ ++ ../src-worddic/mem_dic.c \ ++ ../src-worddic/record.c \ ++ ../src-worddic/texttrie.c \ ++ ../src-worddic/word_dic.c \ ++ ../src-worddic/wtype.c \ ++ ../src-worddic/ext_ent.c \ ++ ../src-worddic/matrix.c \ ++ ../src-worddic/priv_dic.c \ ++ ../src-worddic/textdict.c \ ++ ../src-worddic/use_dic.c \ ++ ../src-worddic/word_lookup.c \ ++ ../src-main/context.c \ ++ ../src-main/main.c + + anthy.dep : mkdepgraph $(DEPWORDS) + ./mkdepgraph +diff --git a/mkanthydic/Makefile.am b/mkanthydic/Makefile.am +index dfabff6..4626bdb 100644 +--- a/mkanthydic/Makefile.am ++++ b/mkanthydic/Makefile.am +@@ -1,15 +1,62 @@ ++CC = @CC_FOR_BUILD@ ++ + # Files + noinst_SCRIPTS = + CLEANFILES = anthy.dic +-INCLUDES = -I$(top_srcdir)/ -DSRCDIR=\"$(srcdir)\" ++INCLUDES = -I$(top_srcdir)/ -DSRCDIR=\"$(srcdir)\" -DCONF_DIR=\"$(sysconfdir)\" + + noinst_PROGRAMS = mkfiledic +-mkfiledic_SOURCES = mkfiledic.c +-mkfiledic_LDADD = ../src-diclib/libdiclib.la ++ ++common_SOURCES = ../src-splitter/wordlist.c \ ++ ../src-splitter/metaword.c \ ++ ../src-splitter/depgraph.c \ ++ ../src-splitter/splitter.c \ ++ ../src-splitter/evalborder.c \ ++ ../src-splitter/compose.c \ ++ ../src-splitter/wordborder.h \ ++ ../src-splitter/lattice.c \ ++ ../src-splitter/segclass.c \ ++ ../src-ordering/candswap.c \ ++ ../src-ordering/candsort.c \ ++ ../src-ordering/commit.c \ ++ ../src-ordering/relation.c \ ++ ../src-ordering/infosort.c \ ++ ../src-ordering/candhistory.c \ ++ ../src-ordering/sorter.h \ ++ ../src-diclib/diclib.c \ ++ ../src-diclib/file_dic.c \ ++ ../src-diclib/filemap.c \ ++ ../src-diclib/xstr.c \ ++ ../src-diclib/xchar.c \ ++ ../src-diclib/alloc.c \ ++ ../src-diclib/conf.c \ ++ ../src-diclib/logger.c \ ++ ../src-diclib/ruleparser.c \ ++ ../src-diclib/diclib_inner.h \ ++ ../src-diclib/e2u.h \ ++ ../src-diclib/u2e.h \ ++ ../src-worddic/dic_util.c \ ++ ../src-worddic/feature_set.c \ ++ ../src-worddic/mem_dic.c \ ++ ../src-worddic/record.c \ ++ ../src-worddic/texttrie.c \ ++ ../src-worddic/word_dic.c \ ++ ../src-worddic/wtype.c \ ++ ../src-worddic/ext_ent.c \ ++ ../src-worddic/matrix.c \ ++ ../src-worddic/priv_dic.c \ ++ ../src-worddic/textdict.c \ ++ ../src-worddic/use_dic.c \ ++ ../src-worddic/word_lookup.c \ ++ ../src-main/context.c \ ++ ../src-main/main.c \ ++ ../src-util/convdb.c ++ ++mkfiledic_SOURCES = mkfiledic.c \ ++ $(common_SOURCES) + + anthy.dic : mkfiledic ../mkworddic/anthy.wdic ../depgraph/anthy.dep ../calctrans/anthy.cand_info ../calctrans/anthy.trans_info ../calctrans/anthy.corpus_array ../calctrans/anthy.corpus_bucket + ./mkfiledic + +- + # To install + pkgdata_DATA = anthy.dic +diff --git a/mkworddic/Makefile.am b/mkworddic/Makefile.am +index 09e1295..2627013 100644 +--- a/mkworddic/Makefile.am ++++ b/mkworddic/Makefile.am +@@ -1,11 +1,13 @@ + ## $Id: Makefile.am,v 1.10 2002/11/05 15:38:58 yusuke Exp $ + ++CC = @CC_FOR_BUILD@ ++ + # Files + noinst_SCRIPTS = + EXTRA_DICS = base.t extra.t compound.t name.t adjust.t utf8.t tankanji.t + ZIPCODE_DICT = zipcode.t + CANNADIC_DIST = gcanna.ctd gcannaf.ctd +-INCLUDES = -I$(top_srcdir)/ ++INCLUDES = -I$(top_srcdir)/ -DCONF_DIR=\"$(sysconfdir)\" + # HOKUTODIC_DIST = hokuto.t + # You can get it from + # http://winnie.kuis.kyoto-u.ac.jp/members/ri/hokuto/dic/index.html +@@ -27,8 +29,54 @@ DIC_FILES = @top_srcdir@/alt-cannadic/gcanna.ctd \ + + # Generate the dictionary + noinst_PROGRAMS = mkworddic +-mkworddic_SOURCES = mkdic.c writewords.c mkudic.c calcfreq.c mkdic.h +-mkworddic_LDADD = ../src-worddic/libanthydic.la ++mkworddic_SOURCES = mkdic.c \ ++ writewords.c \ ++ mkudic.c \ ++ calcfreq.c \ ++ mkdic.h \ ++ ../src-diclib/diclib.c \ ++ ../src-diclib/file_dic.c \ ++ ../src-diclib/filemap.c \ ++ ../src-diclib/xstr.c \ ++ ../src-diclib/xchar.c \ ++ ../src-diclib/alloc.c \ ++ ../src-diclib/conf.c \ ++ ../src-diclib/logger.c \ ++ ../src-diclib/ruleparser.c \ ++ ../src-diclib/diclib_inner.h \ ++ ../src-diclib/e2u.h \ ++ ../src-diclib/u2e.h \ ++ ../src-ordering/candswap.c \ ++ ../src-ordering/candsort.c \ ++ ../src-ordering/commit.c \ ++ ../src-ordering/relation.c \ ++ ../src-ordering/infosort.c \ ++ ../src-ordering/candhistory.c \ ++ ../src-ordering/sorter.h \ ++ ../src-splitter/wordlist.c \ ++ ../src-splitter/metaword.c \ ++ ../src-splitter/depgraph.c \ ++ ../src-splitter/splitter.c \ ++ ../src-splitter/evalborder.c \ ++ ../src-splitter/compose.c \ ++ ../src-splitter/wordborder.h \ ++ ../src-splitter/lattice.c \ ++ ../src-splitter/segclass.c \ ++ ../src-worddic/dic_util.c \ ++ ../src-worddic/feature_set.c \ ++ ../src-worddic/mem_dic.c \ ++ ../src-worddic/record.c \ ++ ../src-worddic/texttrie.c \ ++ ../src-worddic/word_dic.c \ ++ ../src-worddic/wtype.c \ ++ ../src-worddic/ext_ent.c \ ++ ../src-worddic/matrix.c \ ++ ../src-worddic/priv_dic.c \ ++ ../src-worddic/textdict.c \ ++ ../src-worddic/use_dic.c \ ++ ../src-worddic/word_lookup.c \ ++ ../src-main/context.c \ ++ ../src-main/main.c + + noinst_DATA = anthy.wdic + +-- +1.8.0 + diff --git a/patches/anthy-9100h/autogen.sh b/patches/anthy-9100h/autogen.sh new file mode 120000 index 0000000..9f8a4cb --- /dev/null +++ b/patches/anthy-9100h/autogen.sh @@ -0,0 +1 @@ +../autogen.sh \ No newline at end of file diff --git a/patches/anthy-9100h/series b/patches/anthy-9100h/series new file mode 100644 index 0000000..ce49ef8 --- /dev/null +++ b/patches/anthy-9100h/series @@ -0,0 +1 @@ +0001-Updated-build-system-for-cross-compilation-support.patch diff --git a/rules/anthy.in b/rules/anthy.in new file mode 100644 index 0000000..ed0fcda --- /dev/null +++ b/rules/anthy.in @@ -0,0 +1,8 @@ +## SECTION=system_libraries + +config ANTHY + tristate + prompt "anthy" + help + Anthy is a system for Japanese input method. + It converts Hiragana text to Kana Kanji mixed text. diff --git a/rules/anthy.make b/rules/anthy.make new file mode 100644 index 0000000..ed3be10 --- /dev/null +++ b/rules/anthy.make @@ -0,0 +1,68 @@ +# -*-makefile-*- +# +# Copyright (C) 2012 by Bernhard Sessler +# Corscience GmbH & Co. KG , Germany +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_ANTHY) += anthy + +# +# Paths and names +# +ANTHY_BASE := anthy +ANTHY_VERSION := 9100h +ANTHY_MD5 := 1f558ff7ed296787b55bb1c6cf131108 +ANTHY := $(ANTHY_BASE)-$(ANTHY_VERSION) +ANTHY_SUFFIX := tar.gz +ANTHY_URL := http://osdn.dl.sourceforge.jp/$(ANTHY_BASE)/37536/$(ANTHY).$(ANTHY_SUFFIX) +ANTHY_SOURCE := $(SRCDIR)/$(ANTHY).$(ANTHY_SUFFIX) +ANTHY_DIR := $(BUILDDIR)/$(ANTHY) +ANTHY_LICENSE := LGPLv2.1 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +ANTHY_AUTOCONF := $(CROSS_AUTOCONF_USR) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/anthy.targetinstall: + @$(call targetinfo) + + @$(call install_init, anthy) + @$(call install_fixup, anthy,PRIORITY,optional) + @$(call install_fixup, anthy,SECTION,base) + @$(call install_fixup, anthy,AUTHOR,"Bernhard Sessler ") + @$(call install_fixup, anthy,DESCRIPTION,missing) + + @$(call install_lib, anthy, 0, 0, 0644, libanthydic) + @$(call install_lib, anthy, 0, 0, 0644, libanthyinput) + @$(call install_lib, anthy, 0, 0, 0644, libanthy) + + @$(call install_copy, anthy, 0, 0, 0755, -, /usr/bin/anthy-agent) + @$(call install_copy, anthy, 0, 0, 0755, -, /usr/bin/anthy-dic-tool) + + @$(call install_copy, anthy, 0, 0, 0755, -, \ + /usr/bin/anthy-morphological-analyzer) + + @$(call install_alternative, anthy, 0, 0, 0644, /etc/anthy-conf) + + @$(call install_tree, anthy, 0, 0, \ + $(ANTHY_PKGDIR)/usr/share/anthy, /usr/share/anthy) + + @$(call install_finish, anthy) + + @$(call touch) + +# vim: syntax=make -- 1.8.0 -- ptxdist mailing list ptxdist@pengutronix.de