tagoh pushed to mozc (master). "Build with the proper compiler options to get the debugging information. (#1219594)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon May 11 11:15:36 UTC 2015


From 58a0065621209d2b6d9c30ecdf617ef70439af8b Mon Sep 17 00:00:00 2001
From: Akira TAGOH <tagoh at redhat.com>
Date: Mon, 11 May 2015 20:15:03 +0900
Subject: Build with the proper compiler options to get the debugging
 information. (#1219594)


diff --git a/mozc-build-ninja.patch b/mozc-build-ninja.patch
new file mode 100644
index 0000000..c4d6ecc
--- /dev/null
+++ b/mozc-build-ninja.patch
@@ -0,0 +1,12 @@
+diff -pruN mozc-2.16.2068.102.orig/build_mozc.py mozc-2.16.2068.102/build_mozc.py
+--- mozc-2.16.2068.102.orig/build_mozc.py	2015-03-02 17:26:43.000000000 +0900
++++ mozc-2.16.2068.102/build_mozc.py	2015-03-02 18:46:24.928023986 +0900
+@@ -1012,7 +1012,7 @@ def BuildOnLinux(options, targets, unuse
+         CanonicalTargetToGypFileAndTargetName(target))
+     target_names.append(target_name)
+ 
+-  ninja = 'ninja'
++  ninja = 'ninja-build'
+ 
+   if hasattr(options, 'android_device'):
+     # Only for android testing.
diff --git a/mozc-build-verbosely.patch b/mozc-build-verbosely.patch
index c4d6ecc..6f59079 100644
--- a/mozc-build-verbosely.patch
+++ b/mozc-build-verbosely.patch
@@ -1,12 +1,11 @@
-diff -pruN mozc-2.16.2068.102.orig/build_mozc.py mozc-2.16.2068.102/build_mozc.py
---- mozc-2.16.2068.102.orig/build_mozc.py	2015-03-02 17:26:43.000000000 +0900
-+++ mozc-2.16.2068.102/build_mozc.py	2015-03-02 18:46:24.928023986 +0900
-@@ -1012,7 +1012,7 @@ def BuildOnLinux(options, targets, unuse
-         CanonicalTargetToGypFileAndTargetName(target))
-     target_names.append(target_name)
+diff -pruN mozc-2.17.2077.102.orig/build_mozc.py mozc-2.17.2077.102/build_mozc.py
+--- mozc-2.17.2077.102.orig/build_mozc.py	2015-04-30 10:26:40.504718394 +0900
++++ mozc-2.17.2077.102/build_mozc.py	2015-05-08 11:16:27.651718394 +0900
+@@ -1022,6 +1022,7 @@ def BuildOnLinux(options, targets, unuse
+                                          GetMozcVersion().GetTargetPlatform())
+   make_command = ninja
+   build_args = ['-j %s' % options.jobs,
++                '-v',
+                 '-C', '%s/%s' % (short_basename, options.configuration)]
+   RunOrDie([make_command] + build_args + target_names)
  
--  ninja = 'ninja'
-+  ninja = 'ninja-build'
- 
-   if hasattr(options, 'android_device'):
-     # Only for android testing.
diff --git a/mozc.spec b/mozc.spec
index cb14706..f45610c 100644
--- a/mozc.spec
+++ b/mozc.spec
@@ -3,7 +3,7 @@
 
 Name:		mozc
 Version:	2.17.2077.102
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	A Japanese Input Method Editor (IME) designed for multi-platform
 
 Group:		System Environment/Libraries
@@ -40,9 +40,10 @@ Source1:	mozc-init.el
 Source2:	http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip
 Source3:	http://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip
 Source4:	ibus-setup-mozc-jp.desktop
-Patch0:		mozc-build-verbosely.patch
+Patch0:		mozc-build-ninja.patch
 ## to avoid undefined symbols with clang.
 Patch1:		mozc-build-gcc.patch
+Patch2:		mozc-build-verbosely.patch
 
 BuildRequires:	python gettext
 BuildRequires:	libstdc++-devel zlib-devel libxcb-devel protobuf-devel protobuf-c glib2-devel qt-devel zinnia-devel gtk2-devel
@@ -139,16 +140,25 @@ to use mozc with XEmacs.
 
 %prep
 %setup -q -c -n %{name}-%{version} -a 2 -a 3
-%patch0 -p1 -b .0-build-verbosely
+%patch0 -p1 -b .0-ninja
 %patch1 -p1 -b .1-gcc
+%patch2 -p1 -b .2-verbose
 (cd data/dictionary_oss;
 python ../../dictionary/gen_zip_code_seed.py --zip_code=../../KEN_ALL.CSV --jigyosyo=../../JIGYOSYO.CSV >> dictionary09.txt;
 )
 
 
 %build
-echo $RPM_OPT_FLAGS
-GYP_DEFINES="compiler_target=gcc use_libprotobuf=1 zinnia_model_file=/usr/share/zinnia/model/tomoe/handwriting-ja.model ibus_mozc_path=%{_libexecdir}/ibus-engine-mozc ibus_mozc_icon_path=%{_datadir}/ibus-mozc/product_icon.png" python build_mozc.py gyp --gypdir=%{_bindir} --server_dir=%{_libexecdir}/mozc
+# replace compiler flags to build with the proper debugging information
+t=`mktemp /tmp/mozc.gyp-XXXXXXXX`
+opts=$(for i in $RPM_OPT_FLAGS; do
+	echo "i \\"
+	echo "\"$i\","
+done)
+sed -ne "/'linux_cflags':/{p;n;p;:a;/[[:space:]]*\],/{\
+$opts
+p;b b};n;b a;};{p};:b" gyp/common.gypi > $t && mv $t gyp/common.gypi || exit 1
+GYP_DEFINES="use_libprotobuf=1 zinnia_model_file=/usr/share/zinnia/model/tomoe/handwriting-ja.model ibus_mozc_path=%{_libexecdir}/ibus-engine-mozc ibus_mozc_icon_path=%{_datadir}/ibus-mozc/product_icon.png" python build_mozc.py gyp --gypdir=%{_bindir} --server_dir=%{_libexecdir}/mozc
 python build_mozc.py build -c Release unix/ibus/ibus.gyp:ibus_mozc unix/emacs/emacs.gyp:mozc_emacs_helper server/server.gyp:mozc_server gui/gui.gyp:mozc_tool renderer/renderer.gyp:mozc_renderer
 
 
@@ -266,6 +276,9 @@ EOF
 %{_xemacs_sitelispdir}/%{pkg}/*.el
 
 %changelog
+* Mon May 11 2015 Akira TAGOH <tagoh at redhat.com> - 2.17.2077.102-3
+- Build with the proper compiler options to get the debugging information. (#1219594)
+
 * Wed Apr 29 2015 Kalev Lember <kalevlember at gmail.com> - 2.17.2077.102-2
 - Rebuilt for protobuf soname bump
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/mozc.git/commit/?h=master&id=58a0065621209d2b6d9c30ecdf617ef70439af8b


More information about the scm-commits mailing list