Browse Source

mozc 0.13.499.102-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@2063 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 13 years ago
parent
commit
7af4435f60

+ 16 - 0
m/mozc/ibus-mozc-0.11.0-fix-compile-w-i386.patch

@@ -0,0 +1,16 @@
+--- src/base/mutex.cc.orig	2010-05-14 22:31:30.000000000 +0900
++++ src/base/mutex.cc	2010-05-14 22:36:49.000000000 +0900
+@@ -51,8 +51,12 @@
+ inline int InterlockedCompareExchange(volatile int *target,
+                                       int new_value,
+                                       int old_value) {
++// chagne required minimum version from 4.1 to 4.4 to avoid
++// build error for Vine Linux 5 as a workaround.
++// (it has gcc-4.1.2 but march=i386, 
++//  but __sync_val_compare_and_swap needs cpu >= i486) 
+ #if defined(__GNUC__) && \
+-        (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && \
++        (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && \
+         !defined(__arm__)
+   // Use GCC's extention (Note: ARM GCC doesn't have this function.)
+   // http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html

+ 16 - 0
m/mozc/mozc-init.el

@@ -0,0 +1,16 @@
+;;
+;; mozc-init.el
+;;
+;;      for Vine Linux with emacsen-common
+;;       <iwai@alib.jp>
+
+(defcustom vine-default-mozc t
+  "A boolean for vine-default-mozc"
+  :type 'boolean)
+
+(add-hook 'vine-default-setup-hook
+          (lambda()
+            (if vine-default-mozc
+                (require 'vine-default-mozc))))
+
+;;; end of file

+ 35 - 0
m/mozc/mozc-install.sh

@@ -0,0 +1,35 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/mozc
+
+FLAVOR=$1
+PACKAGE=mozc
+
+FLAGS="${SITEFLAG} -q -batch -f batch-byte-compile"
+
+ELDIR="/usr/share/emacs/site-lisp/${PACKAGE}"
+ELCDIR="/usr/share/${FLAVOR}/site-lisp/${PACKAGE}"
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
+
+SOURCES="mozc.el"
+
+case "${FLAVOR}" in
+    emacs)
+    ;;
+    *) 
+    echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
+    install -m 755 -d ${ELCDIR}
+    cd ${ELDIR}
+    cp *.el ${ELCDIR}
+    FILES="${SOURCES}"
+    cd ${ELCDIR}
+    ${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
+    rm -f ${SOURCES}
+    gzip -9 ${ELCDIR}/CompilationLog
+
+    ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
+    echo " done."
+    ;;
+esac
+
+exit 0 ;

+ 32 - 0
m/mozc/mozc-remove.sh

@@ -0,0 +1,32 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/mozc
+
+FLAVOR=$1
+PACKAGE=mozc
+STARTDIR=/etc/${FLAVOR}/site-start.d
+STARTFILE="${PACKAGE}-init.el"
+
+if [ "X${FLAVOR}" = "X" ]; then
+    echo Need argument to determin FLAVOR of emacs;
+    exit 1
+fi
+
+if [ "X${PACKAGE}" = "X" ]; then
+    echo Internal error: need package name;
+    exit 1;
+fi
+
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+case "${FLAVOR}" in
+    emacs)
+    ;;
+    *)
+    echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
+    rm -rf ${ELCDIR}
+    rm -f ${STARTDIR}/95${STARTFILE}*
+    echo " done."
+    ;;
+esac
+
+exit 0

+ 75 - 3
m/mozc/mozc-vl.spec

@@ -1,7 +1,8 @@
-%define		ver	0.13.464.102
+%define		ver	0.13.499.102
 %define		rel	1
 
 %define		scim_dir		%(pkg-config --variable=moduledir scim)
+%define		mozc_el			mozc-el
 
 Name:		mozc
 Summary:	Japanese Input Method Editor designed for multi-platform
@@ -14,7 +15,13 @@ URL:		http://code.google.com/p/mozc/
 
 Source0:	http://mozc.googlecode.com/files/%{name}-%{version}.tar.bz2
 ## svn debian/copyright
-Source1:	mozc-copyright	
+Source1:	mozc-copyright
+# for mozc-el
+Source2:	%{name}-install.sh
+Source3:	%{name}-remove.sh
+Source4:	vine-default-%{name}.el
+Source5:	%{name}-init.el
+
 
 # Vine Lunux
 Source10:	README.vine
@@ -102,6 +109,20 @@ tool and about dialog.
 %description utils-gui -l ja
 Mozc GUI ユーティリティー。設定ツールやユーザ辞書ツールなどが含まれます。
 
+%package -n %{mozc_el}
+Summary:	Emacs Lisp frontend for Mozc
+Summary(ja): 	Mozc 用 Emacs Lisp フロントエンド
+Group: 		Applications/Editors/Emacs
+BuildRequires: 	emacs
+Requires(post,preun): emacsen, emacsen-common >= 0.1
+Requires:	mozc-server = %{version}-%{release}
+
+%description -n %{mozc_el}
+Emacs Lisp frontend for Mozc
+
+%description -n %{mozc_el} -l ja
+Mozc のための Emacs-lisp フロントエンド
+
 %prep
 %setup -q
 %{__cp} -p %{SOURCE1} COPYING
@@ -116,7 +137,8 @@ Mozc GUI ユーティリティー。設定ツールやユーザ辞書ツール
 %{__python} build_mozc.py build_tools -c Release
 %{__python} build_mozc.py build -c Release unix/ibus/ibus.gyp:ibus_mozc \
 	    unix/scim/scim.gyp:scim_mozc unix/scim/scim.gyp:scim_mozc_setup \
-	    server/server.gyp:mozc_server gui/gui.gyp:mozc_tool
+	    unix/emacs/emacs.gyp:mozc_emacs_helper server/server.gyp:mozc_server \
+            gui/gui.gyp:mozc_tool
 
 %install
 %{__rm} -rf %{buildroot}
@@ -169,6 +191,18 @@ Mozc GUI ユーティリティー。設定ツールやユーザ辞書ツール
 # mozc_tool
 %{__cp} -p %{output_dir}/mozc_tool %{buildroot}%{_libexecdir}
 
+# mozc-el
+%{__cp} -p %{output_dir}/mozc_emacs_helper %{buildroot}%{_libexecdir}
+mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{name}/packages
+mkdir -p %{buildroot}%{emacsen_pkgdir}/install
+mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
+cp -p unix/emacs/mozc.el %{SOURCE4} %{SOURCE5} %{buildroot}%{_datadir}/emacs/site-lisp/%{name}
+#
+# install script (bytecompile el and install elc , remove)
+#
+%_installemacsenscript %{name} %{SOURCE2}
+
+%_removeemacsenscript  %{name} %{SOURCE3}
 
 # install document
 %{__cp} %{SOURCE10} .
@@ -176,6 +210,31 @@ Mozc GUI ユーティリティー。設定ツールやユーザ辞書ツール
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
+%post -n %{mozc_el}
+#
+# bytecompile and install
+#
+if [ "$1" = 2 ]; then
+
+%_emacsenPackageRemove %{name}
+
+fi
+
+%_addemacsenlist %{name}
+
+%_emacsenPackageInstall %{name}
+
+
+%preun -n %{mozc_el}
+if [ "$1" = 0 ]; then
+
+%_emacsenPackageRemove %{name}
+
+%_removeemacsenlist %{name}
+
+fi
+
 %files
 %defattr(-,root,root)
 %doc COPYING README.vine
@@ -206,7 +265,20 @@ rm -rf $RPM_BUILD_ROOT
 %{scim_dir}/IMEngine/mozc.so
 %{_datadir}/scim/icons/*.png
 
+%files -n %{mozc_el}
+%defattr(-,root,root)
+%doc COPYING
+%{_libexecdir}/mozc_emacs_helper
+%{_datadir}/emacs/site-lisp/%{name}
+%{emacsen_pkgdir}/install/%{name}
+%{emacsen_pkgdir}/remove/%{name}
+
+
 %changelog
+* Mon Oct 11 2010 IWAI, Masaharu <iwai@alib.jp> 0.13.499.102-1
+- new upstream release
+- new elisp sub-package: mozc-el: upstream released
+
 * Fri Sep 10 2010 IWAI, Masaharu <iwai@alib.jp> 0.13.464.102-1
 - new upstream release
 

+ 26 - 0
m/mozc/vine-default-mozc.el

@@ -0,0 +1,26 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  -*- coding: utf-8-unix -*-
+;;  FSF Emacs 23 用 Vine Linux mozc 設定
+;;     <iwai@alib.jp>
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; mozc の設定
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(if (or (equal emacs-ime "mozc-el")
+        (equal emacs-ime "mozc"))
+(progn
+  (require 'mozc)
+
+  (setq mozc-helper-program-name "/usr/libexec/mozc_emacs_helper")
+  (set-language-environment "Japanese")
+  (setq default-input-method "japanese-mozc")
+
+))
+
+(provide 'vine-default-mozc)
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End: