[packages/tomoe] - fix ruby packaging - rel 11

baggins baggins at pld-linux.org
Thu Jun 13 13:09:00 CEST 2013


commit 22d315e6cc4607c87cc1803c5ef8fda059c41f0f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Jun 13 13:08:50 2013 +0200

    - fix ruby packaging
    - rel 11

 tomoe-ruby.patch | 29 +++++++++++++++++++++++++++--
 tomoe.spec       | 14 +++++++++-----
 2 files changed, 36 insertions(+), 7 deletions(-)
---
diff --git a/tomoe.spec b/tomoe.spec
index e3de774..c865afb 100644
--- a/tomoe.spec
+++ b/tomoe.spec
@@ -8,7 +8,7 @@ Summary:	Handwritten input system for Japanese and Chinese
 Summary(pl.UTF-8):	System wprowadzania pisma ręcznego dla japońskiego i chińskiego
 Name:		tomoe
 Version:	0.6.0
-Release:	10
+Release:	11
 License:	LGPL v2+
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/tomoe/%{name}-%{version}.tar.gz
@@ -19,6 +19,7 @@ Patch2:		%{name}-svn-libs.patch
 Patch3:		%{name}-glib2.32.patch
 Patch4:		%{name}-ruby.patch
 Patch5:		%{name}-format.patch
+Patch6:		am.patch
 URL:		http://tomoe.sourceforge.jp/
 BuildRequires:	apr-util-devel
 BuildRequires:	autoconf >= 2.57
@@ -178,6 +179,7 @@ Plik nagłówkowy biblioteki Ruby/Tomoe.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %{__sed} -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' data/xml2est.rb
 
@@ -190,6 +192,8 @@ export CFLAGS="%{rpmcflags} -I/usr/include/apr-util"
 %configure \
 	UNZIP=/usr/bin/unzip \
 	%{!?with_static_libs:--disable-static} \
+	%{?with_ruby:--with-ruby-bindingdir=%{ruby_vendorarchdir}} \
+	%{?with_ruby:--with-ruby-libdir=%{ruby_vendorlibdir}} \
 	--enable-gtk-doc \
 	--with-html-dir=%{_gtkdocdir} \
 	--with-svn-lib=%{_libdir}
@@ -206,7 +210,7 @@ install -d $RPM_BUILD_ROOT%{_datadir}/tomoe/dict
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tomoe/module/{dict,recognizer}/*.{a,la}
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tomoe.{a,la}
-%{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/tomoe.{a,la}}
+%{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/tomoe.{a,la}}
 
 %if %{without ruby}
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/tomoe/xml2est.rb
@@ -281,10 +285,10 @@ rm -rf $RPM_BUILD_ROOT
 %files -n ruby-tomoe
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_datadir}/tomoe/xml2est.rb
-%attr(755,root,root) %{ruby_sitearchdir}/tomoe.so
-%{ruby_sitelibdir}/tomoe.rb
+%attr(755,root,root) %{ruby_vendorarchdir}/tomoe.so
+%{ruby_vendorlibdir}/tomoe.rb
 
 %files -n ruby-tomoe-devel
 %defattr(644,root,root,755)
-%{ruby_sitearchdir}/rbtomoe.h
+%{ruby_vendorarchdir}/rbtomoe.h
 %endif
diff --git a/tomoe-ruby.patch b/tomoe-ruby.patch
index 04ba72f..aef91a2 100644
--- a/tomoe-ruby.patch
+++ b/tomoe-ruby.patch
@@ -5,7 +5,7 @@
    changequote(<<, >>)
    for var_name in archdir sitearchdir CFLAGS LIBRUBYARG libdir \
 -                  sitelibdir sitearchdir; do
-+                  sitelibdir sitearchdir rubyhdrdir sitehdrdir arch; do
++                  vendorlibdir vendorarchdir rubyhdrdir sitehdrdir arch; do
      rbconfig_tmp=`$rbconfig "print Config::CONFIG['$var_name']"`
      eval "rbconfig_$var_name=\"$rbconfig_tmp\""
    done
@@ -15,10 +15,35 @@
 -  RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_archdir "
 -  RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_sitearchdir "
 +  RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_archdir -I$rbconfig_rubyhdrdir -I$rbconfig_archhdrdir"
-+  RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_sitearchdir -I$rbconfig_sitehdrdir"
++  RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_vendorarchdir -I$rbconfig_vendorhdrdir"
    RUBY_CFLAGS="$RUBY_CFLAGS $rbconfig_CFLAGS "
    RUBY_LIBS="$rbconfig_LIBRUBYARG"
    RUBY_LDFLAGS="-L$rbconfig_libdir"
+@@ -69,7 +69,7 @@
+ 
+   AC_MSG_CHECKING([where to install Ruby binding])
+   AC_CACHE_VAL([cv_ruby_archdir],
+-               [cv_ruby_archdir="$rbconfig_sitearchdir"])
++               [cv_ruby_archdir="$rbconfig_vendorarchdir"])
+   AC_ARG_WITH([ruby-bindingdir],
+                 AS_HELP_STRING([--with-ruby-bindingdir=EXTDIR],
+                                [install Ruby bindings in EXTDIR
+@@ -80,13 +80,13 @@
+ 
+   AC_MSG_CHECKING([where to install Ruby scripts])
+   AC_CACHE_VAL([cv_ruby_sitedir],
+-               [cv_ruby_sitedir="$rbconfig_sitelibdir"])
++               [cv_ruby_sitedir="$rbconfig_vendorlibdir"])
+   AC_ARG_WITH([ruby-libdir],
+                AS_HELP_STRING([--with-ruby-libdir=LIBDIR],
+                               [install Ruby scripts for bindings in LIBDIR
+                                (default is same as ruby's one)]),
+                [ruby_libdir="$withval"],
+-               [ruby_libdir="$cv_ruby_sitedir"])
++               [ruby_libdir="$cv_ruby_vendordir"])
+   AC_MSG_RESULT([$ruby_libdir])
+ 
+   AC_SUBST(ruby_bindingdir)
 --- tomoe-0.6.0/bindings/ruby/tomoe-rb-char.c.orig	2007-06-06 02:44:38.000000000 +0200
 +++ tomoe-0.6.0/bindings/ruby/tomoe-rb-char.c	2012-11-12 21:20:44.718863156 +0100
 @@ -13,7 +13,7 @@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tomoe.git/commitdiff/22d315e6cc4607c87cc1803c5ef8fda059c41f0f



More information about the pld-cvs-commit mailing list