diff -Nru mozc-1.3.975.102/debian/changelog mozc-1.3.975.102/debian/changelog --- mozc-1.3.975.102/debian/changelog 2012-03-06 12:31:13.000000000 +0900 +++ mozc-1.3.975.102/debian/changelog 2012-09-11 02:20:06.000000000 +0900 @@ -1,3 +1,10 @@ +mozc (1.3.975.102-2ubuntu0.1) precise-proposed; urgency=low + + * debian/patches/open-preferences.patch: add metadata to open + preferences from ibus-setup, LP: #1037876 + + -- Nobuto MURATA Tue, 11 Sep 2012 02:19:43 +0900 + mozc (1.3.975.102-2) unstable; urgency=low * Update Standards-Version to 3.9.3. diff -Nru mozc-1.3.975.102/debian/control mozc-1.3.975.102/debian/control --- mozc-1.3.975.102/debian/control 2012-03-06 12:31:13.000000000 +0900 +++ mozc-1.3.975.102/debian/control 2012-09-11 02:19:23.000000000 +0900 @@ -1,7 +1,8 @@ Source: mozc Section: utils Priority: optional -Maintainer: Nobuhiro Iwamatsu +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Nobuhiro Iwamatsu Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), libibus-1.0-dev (>= 1.2) | libibus-dev (>= 1.2), libcurl4-openssl-dev, pkg-config, diff -Nru mozc-1.3.975.102/debian/patches/open-preferences.patch mozc-1.3.975.102/debian/patches/open-preferences.patch --- mozc-1.3.975.102/debian/patches/open-preferences.patch 1970-01-01 09:00:00.000000000 +0900 +++ mozc-1.3.975.102/debian/patches/open-preferences.patch 2012-09-11 02:19:23.000000000 +0900 @@ -0,0 +1,101 @@ +## Description: add metadata to open preferences from ibus-setup +## cherry-pick from upstream +## Origin: upstream +## Bug: http://code.google.com/p/mozc/issues/detail?id=169 +## Bug-Ubuntu: https://launchpad.net/bugs/1037876 +Index: mozc-1.3.975.102/unix/ibus/gen_mozc_xml.py +=================================================================== +--- mozc-1.3.975.102.orig/unix/ibus/gen_mozc_xml.py 2012-09-11 01:36:44.405724968 +0900 ++++ mozc-1.3.975.102/unix/ibus/gen_mozc_xml.py 2012-09-11 01:36:45.713731456 +0900 +@@ -38,6 +38,7 @@ + __author__ = "yusukes" + + import optparse ++import os + import sys + + # Information to generate part of mozc.xml. %s will be replaced with +@@ -114,7 +115,7 @@ + element_name) + + +-def OutputXml(product_name, component, engine_common, engines): ++def OutputXml(product_name, component, engine_common, engines, setup_arg): + """Outputs a XML data for ibus-daemon. + + Args: +@@ -134,6 +135,8 @@ + print '' + for key in engine_common: + OutputXmlElement(product_name, key, engine_common[key]) ++ if setup_arg: ++ OutputXmlElement(product_name, 'setup', ' '.join(setup_arg)) + for key in engines: + OutputXmlElement(product_name, key, engines[key][i]) + print '' +@@ -183,8 +186,16 @@ + parser.add_option('--branding', dest='branding', default=None, + help='GoogleJapaneseInput for the ChromeOS official build. ' + 'Otherwise, Mozc.') ++ parser.add_option('--server_dir', dest='server_dir', default='', ++ help='The absolute directory path to be installed the ' ++ 'server executable.') + (options, unused_args) = parser.parse_args() + ++ setup_arg = [] ++ if options.platform == 'Linux': ++ setup_arg.append(os.path.join(options.server_dir, 'mozc_tool')) ++ setup_arg.append('--mode=config_dialog') ++ + if options.output_cpp: + OutputCpp(PRODUCT_NAMES[options.branding], IBUS_COMPONENT_PROPS, + IBUS_ENGINE_COMMON_PROPS, +@@ -192,7 +203,8 @@ + else: + OutputXml(PRODUCT_NAMES[options.branding], IBUS_COMPONENT_PROPS, + IBUS_ENGINE_COMMON_PROPS, +- IBUS_ENGINES_PROPS[options.platform]) ++ IBUS_ENGINES_PROPS[options.platform], ++ setup_arg) + return 0 + + if __name__ == '__main__': +Index: mozc-1.3.975.102/unix/ibus/ibus.gyp +=================================================================== +--- mozc-1.3.975.102.orig/unix/ibus/ibus.gyp 2012-09-11 01:36:44.397724935 +0900 ++++ mozc-1.3.975.102/unix/ibus/ibus.gyp 2012-09-11 01:36:45.713731456 +0900 +@@ -94,6 +94,7 @@ + './gen_mozc_xml.py', + '--platform=Linux', + '--branding=Mozc', ++ '--server_dir=<(server_dir)', + ], + }], + ], +Index: mozc-1.3.975.102/build_mozc.py +=================================================================== +--- mozc-1.3.975.102.orig/build_mozc.py 2012-09-11 01:36:45.657731177 +0900 ++++ mozc-1.3.975.102/build_mozc.py 2012-09-11 01:47:19.412873807 +0900 +@@ -455,6 +455,12 @@ + # TODO(yukawa): Remove this option when Zinnia can be built on Windows with + # enabling Unicode. + use_zinnia_default = True ++ ++ parser.add_option('--server_dir', dest='server_dir', ++ default='/usr/lib/mozc', ++ help='A path to the directory to be installed server ' ++ 'executable. This option is only available for Linux.') ++ + if IsWindows(): + # Zinnia on Windows cannot be enabled because of compile error. + use_zinnia_default = False +@@ -693,6 +699,9 @@ + command_line.extend([ + '-D', 'language_define=LANGUAGE_%s' % options.language.upper()]) + ++ command_line.extend([ ++ '-D', 'server_dir=%s' % os.path.abspath(options.server_dir)]) ++ + # Add options.gypdir/pylib to PYTHONPATH so gyp uses its own library modules, + # otherwise gyp can use ones of a different version. + original_python_path = os.environ.get('PYTHONPATH', '') diff -Nru mozc-1.3.975.102/debian/patches/series mozc-1.3.975.102/debian/patches/series --- mozc-1.3.975.102/debian/patches/series 2012-03-06 12:31:13.000000000 +0900 +++ mozc-1.3.975.102/debian/patches/series 2012-09-11 02:19:23.000000000 +0900 @@ -5,3 +5,4 @@ add_tegaki_ui_ibus_mozc.patch bug107_request_surrounding_text.patch bug117_fix_ftbfs_ibus1.4.0.patch +open-preferences.patch