public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/mozc/files/, app-i18n/mozc/
Date: Thu,  5 Oct 2017 18:57:33 +0000 (UTC)	[thread overview]
Message-ID: <1507229830.2e39fb4302b42981b5eee984cdccc933a44692b1.floppym@gentoo> (raw)

commit:     2e39fb4302b42981b5eee984cdccc933a44692b1
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Oct  5 18:24:51 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Oct  5 18:57:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e39fb43

app-i18n/mozc: Disable check for jsoncpp.pc with USE="-test".

Bug: https://bugs.gentoo.org/633458

 .../mozc-2.20.2673.102-system_libraries.patch      | 254 +++++++++++++++++----
 app-i18n/mozc/mozc-2.20.2673.102.ebuild            |   2 +
 app-i18n/mozc/mozc-9999.ebuild                     |   2 +
 3 files changed, 210 insertions(+), 48 deletions(-)

diff --git a/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch b/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch
index dd6e57717d1..2b2828b7999 100644
--- a/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch
+++ b/app-i18n/mozc/files/mozc-2.20.2673.102-system_libraries.patch
@@ -1,12 +1,26 @@
+--- /src/gyp/defines.gypi
++++ /src/gyp/defines.gypi
+@@ -71,6 +71,12 @@
+     # use_libibus represents if ibus library is used or not.
+     # This option is only for Linux.
+     'use_libibus%': '0',
++
++    # use_libgtest represents if gtest library is used or not.
++    'use_libgtest%': '0',
++
++    # use_libjsoncpp represents if jsoncpp library is used or not.
++    'use_libjsoncpp%': '0',
+   },
+   'target_defaults': {
+     'defines': [
 --- /src/net/jsoncpp.gyp
 +++ /src/net/jsoncpp.gyp
-@@ -31,31 +31,25 @@
+@@ -31,32 +31,57 @@
    'targets': [
      {
        'target_name': 'jsoncpp',
 -      'type': 'static_library',
-+      'type': 'none',
-       'variables': {
+-      'variables': {
 -        'jsoncpp_root': '<(third_party_dir)/jsoncpp',
 -        'jsoncpp_srcs': [
 -          '<(jsoncpp_root)/src/lib_json/json_reader.cpp',
@@ -14,11 +28,61 @@
 -          '<(jsoncpp_root)/src/lib_json/json_writer.cpp',
 -        ],
 -        'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'],
-         'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
-       },
+-        'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
+-      },
 -      'defines': [
 -        '<@(jsoncpp_additional_macros)',
--      ],
++      'conditions': [
++        ['use_libjsoncpp==1', {
++          'type': 'none',
++          'variables': {
++            'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
++          },
++          'all_dependent_settings': {
++            'defines': [
++              '<@(jsoncpp_additional_macros)',
++            ],
++            'cflags': [
++              '<!@(pkg-config --cflags jsoncpp)',
++            ],
++            'link_settings': {
++              'libraries': [
++                '<!@(pkg-config --libs-only-l jsoncpp)',
++              ],
++              'ldflags': [
++                '<!@(pkg-config --libs-only-L jsoncpp)',
++              ],
++            }
++          },
++        }, {
++          'type': 'static_library',
++          'variables': {
++            'jsoncpp_root': '<(third_party_dir)/jsoncpp',
++            'jsoncpp_srcs': [
++              '<(jsoncpp_root)/src/lib_json/json_reader.cpp',
++              '<(jsoncpp_root)/src/lib_json/json_value.cpp',
++              '<(jsoncpp_root)/src/lib_json/json_writer.cpp',
++            ],
++            'jsoncpp_include_dirs': ['<(jsoncpp_root)/include'],
++            'jsoncpp_additional_macros': ['JSON_USE_EXCEPTION=0'],
++          },
++          'defines': [
++            '<@(jsoncpp_additional_macros)',
++          ],
++          'sources': [
++            '<@(jsoncpp_srcs)',
++            'jsoncpp.h',
++          ],
++          'include_dirs': [
++            '<@(jsoncpp_include_dirs)',
++          ],
++          'all_dependent_settings': {
++            'defines': [
++              '<@(jsoncpp_additional_macros)',
++            ],
++          },
++        }],
+       ],
 -      'sources': [
 -        '<@(jsoncpp_srcs)',
 -        'jsoncpp.h',
@@ -26,24 +90,14 @@
 -      'include_dirs': [
 -        '<@(jsoncpp_include_dirs)',
 -      ],
-       'all_dependent_settings': {
-         'defines': [
-           '<@(jsoncpp_additional_macros)',
-         ],
-+        'cflags': [
-+          '<!@(pkg-config --cflags jsoncpp)',
-+        ],
-+        'link_settings': {
-+          'libraries': [
-+            '<!@(pkg-config --libs-only-l jsoncpp)',
-+          ],
-+          'ldflags': [
-+            '<!@(pkg-config --libs-only-L jsoncpp)',
-+          ],
-+        }
-       },
+-      'all_dependent_settings': {
+-        'defines': [
+-          '<@(jsoncpp_additional_macros)',
+-        ],
+-      },
      },
    ],
+ }
 --- /src/net/jsoncpp.h
 +++ /src/net/jsoncpp.h
 @@ -35,7 +35,7 @@
@@ -57,26 +111,32 @@
  
 --- /src/testing/testing.gyp
 +++ /src/testing/testing.gyp
-@@ -53,14 +53,12 @@
+@@ -53,76 +53,111 @@
    'targets': [
      {
        'target_name': 'testing',
 -      'type': 'static_library',
-+      'type': 'none',
-       'variables': {
-         'gtest_defines': [
-           'GTEST_LANG_CXX11=1',
-           'GTEST_HAS_TR1_TUPLE=0',  # disable tr1 tuple in favor of C++11 tuple.
-         ],
+-      'variables': {
+-        'gtest_defines': [
+-          'GTEST_LANG_CXX11=1',
+-          'GTEST_HAS_TR1_TUPLE=0',  # disable tr1 tuple in favor of C++11 tuple.
+-        ],
 -        'gtest_dir': '<(third_party_dir)/gtest/googletest',
 -        'gmock_dir': '<(third_party_dir)/gtest/googlemock',
-         'conditions': [
-           ['_toolset=="target" and target_platform=="Android"', {
-             'gtest_defines': [
-@@ -75,53 +73,15 @@
-           }],
-         ],
-       },
+-        'conditions': [
+-          ['_toolset=="target" and target_platform=="Android"', {
+-            'gtest_defines': [
+-              'GTEST_HAS_RTTI=0',  # Android NDKr7 requires this.
+-              'GTEST_HAS_CLONE=0',
+-              'GTEST_HAS_GLOBAL_WSTRING=0',
+-              'GTEST_HAS_POSIX_RE=0',
+-              'GTEST_HAS_STD_WSTRING=0',
+-              'GTEST_OS_LINUX=1',
+-              'GTEST_OS_LINUX_ANDROID=1',
+-            ],
+-          }],
+-        ],
+-      },
 -      'sources': [
 -        '<(gmock_dir)/src/gmock-cardinalities.cc',
 -        '<(gmock_dir)/src/gmock-internal-utils.cc',
@@ -100,34 +160,132 @@
 -      'defines': [
 -        '<@(gtest_defines)',
 -      ],
-       'all_dependent_settings': {
-         'defines': [
-           '<@(gtest_defines)',
-         ],
+-      'all_dependent_settings': {
+-        'defines': [
+-          '<@(gtest_defines)',
+-        ],
 -        'include_dirs': [
 -          '<(gmock_dir)/include',
 -          '<(gtest_dir)/include',
 -        ],
 -      },
--      'conditions': [
+       'conditions': [
 -        ['(_toolset=="target" and compiler_target=="clang") or '
 -         '(_toolset=="host" and compiler_host=="clang")', {
 -          'cflags': [
 -            '-Wno-missing-field-initializers',
 -            '-Wno-unused-private-field',
-+        'link_settings': {
-+          'libraries': [
-+            '-lgmock -lgtest',
++        ['use_libgtest==1', {
++          'type': 'none',
++          'variables': {
++            'gtest_defines': [
++              'GTEST_LANG_CXX11=1',
++              'GTEST_HAS_TR1_TUPLE=0',  # disable tr1 tuple in favor of C++11 tuple.
++            ],
++            'conditions': [
++              ['_toolset=="target" and target_platform=="Android"', {
++                'gtest_defines': [
++                  'GTEST_HAS_RTTI=0',  # Android NDKr7 requires this.
++                  'GTEST_HAS_CLONE=0',
++                  'GTEST_HAS_GLOBAL_WSTRING=0',
++                  'GTEST_HAS_POSIX_RE=0',
++                  'GTEST_HAS_STD_WSTRING=0',
++                  'GTEST_OS_LINUX=1',
++                  'GTEST_OS_LINUX_ANDROID=1',
++                ],
++              }],
++            ],
++          },
++          'all_dependent_settings': {
++            'defines': [
++              '<@(gtest_defines)',
++            ],
++            'link_settings': {
++              'libraries': [
++                '-lgmock -lgtest',
++              ],
++            },
++          },
++        }, {
++          'type': 'static_library',
++          'variables': {
++            'gtest_defines': [
++              'GTEST_LANG_CXX11=1',
++              'GTEST_HAS_TR1_TUPLE=0',  # disable tr1 tuple in favor of C++11 tuple.
++            ],
++            'gtest_dir': '<(third_party_dir)/gtest/googletest',
++            'gmock_dir': '<(third_party_dir)/gtest/googlemock',
++            'conditions': [
++              ['_toolset=="target" and target_platform=="Android"', {
++                'gtest_defines': [
++                  'GTEST_HAS_RTTI=0',  # Android NDKr7 requires this.
++                  'GTEST_HAS_CLONE=0',
++                  'GTEST_HAS_GLOBAL_WSTRING=0',
++                  'GTEST_HAS_POSIX_RE=0',
++                  'GTEST_HAS_STD_WSTRING=0',
++                  'GTEST_OS_LINUX=1',
++                  'GTEST_OS_LINUX_ANDROID=1',
++                ],
++              }],
++            ],
++          },
++          'sources': [
++            '<(gmock_dir)/src/gmock-cardinalities.cc',
++            '<(gmock_dir)/src/gmock-internal-utils.cc',
++            '<(gmock_dir)/src/gmock-matchers.cc',
++            '<(gmock_dir)/src/gmock-spec-builders.cc',
++            '<(gmock_dir)/src/gmock.cc',
++            '<(gtest_dir)/src/gtest-death-test.cc',
++            '<(gtest_dir)/src/gtest-filepath.cc',
++            '<(gtest_dir)/src/gtest-port.cc',
++            '<(gtest_dir)/src/gtest-printers.cc',
++            '<(gtest_dir)/src/gtest-test-part.cc',
++            '<(gtest_dir)/src/gtest-typed-test.cc',
++            '<(gtest_dir)/src/gtest.cc',
++          ],
++          'include_dirs': [
++            '<(gmock_dir)',
++            '<(gmock_dir)/include',
++            '<(gtest_dir)',
++            '<(gtest_dir)/include',
++          ],
++          'defines': [
++            '<@(gtest_defines)',
            ],
--        }],
--      ],
++          'all_dependent_settings': {
++            'defines': [
++              '<@(gtest_defines)',
++            ],
++            'include_dirs': [
++              '<(gmock_dir)/include',
++              '<(gtest_dir)/include',
++            ],
++          },
++          'conditions': [
++            ['(_toolset=="target" and compiler_target=="clang") or '
++             '(_toolset=="host" and compiler_host=="clang")', {
++              'cflags': [
++                '-Wno-missing-field-initializers',
++                '-Wno-unused-private-field',
++              ],
++            }],
++          ],
++          'xcode_settings': {
++            # Remove the force included file.  This is not necessary for third
++            # party libraries, and it causes a build error.
++            'OTHER_CFLAGS!' : [
++              '-include base/namespace.h',
++            ],
++          },
+         }],
+       ],
 -      'xcode_settings': {
 -        # Remove the force included file.  This is not necessary for third
 -        # party libraries, and it causes a build error.
 -        'OTHER_CFLAGS!' : [
 -          '-include base/namespace.h',
 -        ],
-+        },
-       },
+-      },
      },
      {
+       'target_name': 'gen_mozc_data_dir_header',

diff --git a/app-i18n/mozc/mozc-2.20.2673.102.ebuild b/app-i18n/mozc/mozc-2.20.2673.102.ebuild
index a5b640dac27..017f643d86c 100644
--- a/app-i18n/mozc/mozc-2.20.2673.102.ebuild
+++ b/app-i18n/mozc/mozc-2.20.2673.102.ebuild
@@ -156,7 +156,9 @@ src_configure() {
 		gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown)
 	fi
 
+	gyp_arguments+=(-D use_libgtest=$(usex test 1 0))
 	gyp_arguments+=(-D use_libibus=$(usex ibus 1 0))
+	gyp_arguments+=(-D use_libjsoncpp=$(usex test 1 0))
 	gyp_arguments+=(-D use_libprotobuf=1)
 	gyp_arguments+=(-D use_libzinnia=1)
 	gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0))

diff --git a/app-i18n/mozc/mozc-9999.ebuild b/app-i18n/mozc/mozc-9999.ebuild
index 686839da1c0..75b207ea2ec 100644
--- a/app-i18n/mozc/mozc-9999.ebuild
+++ b/app-i18n/mozc/mozc-9999.ebuild
@@ -156,7 +156,9 @@ src_configure() {
 		gyp_arguments+=(-D compiler_host=unknown -D compiler_target=unknown)
 	fi
 
+	gyp_arguments+=(-D use_libgtest=$(usex test 1 0))
 	gyp_arguments+=(-D use_libibus=$(usex ibus 1 0))
+	gyp_arguments+=(-D use_libjsoncpp=$(usex test 1 0))
 	gyp_arguments+=(-D use_libprotobuf=1)
 	gyp_arguments+=(-D use_libzinnia=1)
 	gyp_arguments+=(-D enable_gtk_renderer=$(usex renderer 1 0))


             reply	other threads:[~2017-10-05 18:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 18:57 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-11-01 20:54 [gentoo-commits] repo/gentoo:master commit in: app-i18n/mozc/files/, app-i18n/mozc/ Mike Gilbert
2018-04-16 18:29 Mike Gilbert
2019-05-05 19:05 Mike Gilbert
2019-12-29 19:33 Mike Gilbert
2019-12-29 19:33 Mike Gilbert
2020-12-27 18:39 Mike Gilbert
2022-01-29 15:20 Yixun Lan
2023-09-25 17:22 Nick Sarnie
2023-09-26 22:45 Nick Sarnie
2024-01-14  0:41 Yixun Lan
2024-08-28  4:47 WANG Xuerui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507229830.2e39fb4302b42981b5eee984cdccc933a44692b1.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox