From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BB11F139694 for ; Sat, 5 Aug 2017 14:48:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6DB80E0D29; Sat, 5 Aug 2017 14:48:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3278CE0D29 for ; Sat, 5 Aug 2017 14:48:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F2D653417ED for ; Sat, 5 Aug 2017 14:47:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB41275F3 for ; Sat, 5 Aug 2017 14:47:57 +0000 (UTC) From: "Akinori Hattori" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Akinori Hattori" Message-ID: <1501944453.07b233477e357598c0910816ace3855422a37a83.hattya@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/tomoe/, app-i18n/tomoe/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-i18n/tomoe/files/tomoe-ruby19.patch app-i18n/tomoe/tomoe-0.6.0-r3.ebuild X-VCS-Directories: app-i18n/tomoe/files/ app-i18n/tomoe/ X-VCS-Committer: hattya X-VCS-Committer-Name: Akinori Hattori X-VCS-Revision: 07b233477e357598c0910816ace3855422a37a83 X-VCS-Branch: master Date: Sat, 5 Aug 2017 14:47:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a408e7e1-cff6-43c7-b307-a204d816b8eb X-Archives-Hash: 153880018a1ab216f4c7b8196bb478f7 commit: 07b233477e357598c0910816ace3855422a37a83 Author: Akinori Hattori gentoo org> AuthorDate: Sat Aug 5 14:46:24 2017 +0000 Commit: Akinori Hattori gentoo org> CommitDate: Sat Aug 5 14:47:33 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07b23347 app-i18n/tomoe: fix build with >=dev-lang/ruby-1.9 Package-Manager: Portage-2.3.6, Repoman-2.3.1 app-i18n/tomoe/files/tomoe-ruby19.patch | 84 +++++++++++++++++++++++++++++ app-i18n/tomoe/tomoe-0.6.0-r3.ebuild | 93 +++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) diff --git a/app-i18n/tomoe/files/tomoe-ruby19.patch b/app-i18n/tomoe/files/tomoe-ruby19.patch new file mode 100644 index 00000000000..bca6aa807f0 --- /dev/null +++ b/app-i18n/tomoe/files/tomoe-ruby19.patch @@ -0,0 +1,84 @@ +--- a/bindings/ruby/tomoe-rb-char.c ++++ b/bindings/ruby/tomoe-rb-char.c +@@ -2,6 +2,10 @@ + + #define _SELF(obj) RVAL2TCHR(obj) + ++#ifndef RSTRING_LEN ++# define RSTRING_LEN(s) (RSTRING(s)->len) ++#endif ++ + static VALUE + tc_initialize(int argc, VALUE *argv, VALUE self) + { +@@ -13,7 +17,7 @@ + if (NIL_P(xml)) { + chr = tomoe_char_new(); + } else { +- chr = tomoe_char_new_from_xml_data(RVAL2CSTR(xml), RSTRING(xml)->len); ++ chr = tomoe_char_new_from_xml_data(RVAL2CSTR(xml), RSTRING_LEN(xml)); + } + + G_INITIALIZE(self, chr); +--- a/macros/ruby.m4 ++++ b/macros/ruby.m4 +@@ -28,13 +28,18 @@ + + changequote(<<, >>) + for var_name in archdir sitearchdir CFLAGS LIBRUBYARG libdir \ +- sitelibdir sitearchdir; do +- rbconfig_tmp=`$rbconfig "print Config::CONFIG['$var_name']"` ++ sitelibdir rubyhdrdir rubyarchhdrdir; do ++ rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` + eval "rbconfig_$var_name=\"$rbconfig_tmp\"" + done + changequote([, ]) + +- RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_archdir " ++ if test "x$rbconfig_rubyhdrdir" = "x"; then ++ RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_archdir " ++ else ++ RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_rubyhdrdir " ++ RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_rubyarchhdrdir " ++ fi + RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_sitearchdir " + RUBY_CFLAGS="$RUBY_CFLAGS $rbconfig_CFLAGS " + RUBY_LIBS="$rbconfig_LIBRUBYARG" +--- a/module/dict/tomoe-dict-ruby.c ++++ b/module/dict/tomoe-dict-ruby.c +@@ -52,6 +52,13 @@ + #define TOMOE_IS_DICT_RUBY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOMOE_TYPE_DICT_RUBY)) + #define TOMOE_DICT_RUBY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TOMOE_TYPE_DICT_RUBY, TomoeDictRubyClass)) + ++#ifndef RARRAY_LEN ++# define RARRAY_LEN(a) (RARRAY(a)->len) ++#endif ++#ifndef RARRAY_PTR ++# define RARRAY_PTR(a) (RARRAY(a)->ptr) ++#endif ++ + enum { + PROP_0, + PROP_FILENAME, +@@ -209,7 +216,7 @@ + ruby_script (PACKAGE); + ruby_set_argv (1, argv); + +- if (RARRAY(rb_load_path)->len == 0) { ++ if (RARRAY_LEN(rb_load_path) == 0) { + ruby_init_loadpath (); + } + } +@@ -405,10 +412,10 @@ + + rb_results = rb_funcall (dict->rb_dict, rb_intern ("search"), + 1, GOBJ2RVAL (query)); +- len = RARRAY (rb_results)->len; ++ len = RARRAY_LEN(rb_results); + for (i = len; i; i--) { + results = g_list_prepend (results, +- RVAL2TCND (RARRAY (rb_results)->ptr[i])); ++ RVAL2TCND (RARRAY_PTR(rb_results)[i])); + } + return results; + } diff --git a/app-i18n/tomoe/tomoe-0.6.0-r3.ebuild b/app-i18n/tomoe/tomoe-0.6.0-r3.ebuild new file mode 100644 index 00000000000..be597455715 --- /dev/null +++ b/app-i18n/tomoe/tomoe-0.6.0-r3.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_COMPAT=( python2_7 ) +USE_RUBY="ruby22 ruby23" + +inherit autotools ltprune python-single-r1 ruby-single + +DESCRIPTION="Japanese handwriting recognition engine" +HOMEPAGE="http://tomoe.osdn.jp/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="hyperestraier mysql python ruby ${USE_RUBY//ruby/ruby_targets_ruby} static-libs subversion" +RESTRICT="test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) + ruby? ( || ( ${USE_RUBY//ruby/ruby_targets_ruby} ) )" + +_ruby_set_globals() { + local ruby + for ruby in ${USE_RUBY}; do + RUBY_USEDEP="${RUBY_USEDEP}ruby_targets_${ruby}?," + done + RUBY_USEDEP="${RUBY_USEDEP%,}" +} +_ruby_set_globals +unset -f _ruby_set_globals + +RDEPEND="dev-libs/glib:2 + hyperestraier? ( app-text/hyperestraier ) + mysql? ( virtual/libmysqlclient ) + python? ( + ${PYTHON_DEPS} + dev-python/pygobject:2[${PYTHON_USEDEP}] + dev-python/pygtk:2[${PYTHON_USEDEP}] + ) + ruby? ( + ${RUBY_DEPS} + dev-ruby/ruby-glib2[${RUBY_USEDEP}] + ) + subversion? ( dev-vcs/subversion )" +DEPEND="${RDEPEND} + dev-util/gtk-doc-am + dev-util/intltool + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-gentoo.patch + "${FILESDIR}"/${PN}-export-symbols.patch + "${FILESDIR}"/${PN}-glib-2.32.patch + "${FILESDIR}"/${PN}-ruby19.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + sed -i \ + -e "s/use_est=yes/use_est=$(usex hyperestraier)/" \ + -e "s/use_mysql=yes/use_mysql=$(usex mysql)/" \ + configure.ac + + sed -i "s/use_svn=yes/use_svn=$(usex subversion)/" macros/svn.m4 + + default + eautoreconf +} + +src_configure() { + local ruby + for ruby in ${RUBY_TARGETS_PREFERENCE}; do + if use ruby_targets_${ruby}; then + break + fi + done + + econf \ + $(use_enable ruby dict-ruby) \ + $(use_enable static-libs static) \ + $(use_with python python "") \ + $(use_with ruby ruby "$(type -p ${ruby})") \ + --with-svn-include="${EPREFIX}"/usr/include \ + --with-svn-lib="${EPREFIX}"/usr/$(get_libdir) +} + +src_install() { + default + prune_libtool_files --modules +}