pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/inputmethod mozc: Fix build under NetBSD/i386 and use ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/61fab97d3d42
branches:  trunk
changeset: 447804:61fab97d3d42
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sat Feb 27 04:19:46 2021 +0000

description:
mozc: Fix build under NetBSD/i386 and use external protobuf library

* Include mk/atomic64.mk to add -march=i586 to CFLAGS and pass
  CFLAGS to gyp. Fix PR pkg/56025 in another way.
* Use external devel/protobuf to avoid internal protobuf build.
  So bump PKGREVISION.
* dictionary/pos_matcher.h does not generated before its use sometimes.
  Generate it explicitly with
  dictionary/dictionary_base.gyp:text_dictionary_loader target
  for mozc-server.

diffstat:

 inputmethod/fcitx5-mozc/Makefile.common                     |   6 +-
 inputmethod/fcitx5-mozc/distinfo                            |   5 +-
 inputmethod/fcitx5-mozc/patches/patch-gyp_common.gypi       |  22 ++++++++++--
 inputmethod/fcitx5-mozc/patches/patch-protobuf_protobuf.gyp |  17 ++++++++++
 inputmethod/ibus-mozc/Makefile                              |   3 +-
 inputmethod/mozc-elisp/Makefile                             |   3 +-
 inputmethod/mozc-renderer/Makefile                          |   3 +-
 inputmethod/mozc-server/Makefile                            |   4 +-
 inputmethod/mozc-server/Makefile.common                     |   6 ++-
 inputmethod/mozc-server/distinfo                            |   5 +-
 inputmethod/mozc-server/patches/patch-gyp_common.gypi       |  22 ++++++++++--
 inputmethod/mozc-server/patches/patch-protobuf_protobuf.gyp |  17 ++++++++++
 inputmethod/mozc-tool/Makefile                              |   3 +-
 13 files changed, 92 insertions(+), 24 deletions(-)

diffs (truncated from 333 to 300 lines):

diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/fcitx5-mozc/Makefile.common
--- a/inputmethod/fcitx5-mozc/Makefile.common   Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/fcitx5-mozc/Makefile.common   Sat Feb 27 04:19:46 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.1 2021/02/17 15:29:51 ryoon Exp $
+# $NetBSD: Makefile.common,v 1.2 2021/02/27 04:19:46 ryoon Exp $
 # used by inputmethod/fcitx-mozc/Makefile
 #
 
@@ -60,15 +60,15 @@
 # Maybe fix this later.
 BUILDLINK_TRANSFORM+=  rm:-Werror=char-subscripts
 
-#              GYP_DEFINES="use_libprotobuf=1"
 do-configure:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+               GYP_DEFINES="use_libprotobuf=1" \
                ${PYTHONBIN} build_mozc.py \
                gyp \
                --gypdir=${LOCALBASE}/bin
 
 .include "../../devel/glib2/buildlink3.mk"
-#.include "../../devel/protobuf/buildlink3.mk"
+.include "../../devel/protobuf/buildlink3.mk"
 # gmock is not used yet...
 #.include "../../devel/gmock/buildlink3.mk"
 .include "../../inputmethod/zinnia/buildlink3.mk"
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/fcitx5-mozc/distinfo
--- a/inputmethod/fcitx5-mozc/distinfo  Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/fcitx5-mozc/distinfo  Sat Feb 27 04:19:46 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2021/02/17 15:29:51 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2021/02/27 04:19:46 ryoon Exp $
 
 SHA1 (fcitx-mozc-2.26.4276.100.tar.xz) = d9b245a065a317b196816ff41cf52fc2fe3ff728
 RMD160 (fcitx-mozc-2.26.4276.100.tar.xz) = 1bd5ce4ec04d4be15840651cb570900b3dcb3e01
@@ -32,12 +32,13 @@
 SHA1 (patch-gui_qt__rcc.gypi) = d38a849fe8e81672eb441a41936f454d8e45ff5c
 SHA1 (patch-gui_qt__uic.gypi) = 7dd69ee109e81f0e70f2866b77555412518b4844
 SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = 218e3706b819855814ba8871504fc7ccb4e40b23
-SHA1 (patch-gyp_common.gypi) = 18e03490d6758ce49f4b79eb1259409cd440faba
+SHA1 (patch-gyp_common.gypi) = 6b9019c92a1b0f404feffb8b5a38b00caaeaf80a
 SHA1 (patch-gyp_directories.gypi) = eea985113aac5b99bf3c12267ad754817eef5dcc
 SHA1 (patch-ipc_ipc__path__manager.cc) = cd1352bd5333f1ed755dcf6221f931fcd0a936d3
 SHA1 (patch-ipc_ipc__path__manager__test.cc) = 1b83b513383f184f5ab5a56cce734b7934998533
 SHA1 (patch-ipc_named__event.cc) = 8be0b1e5c4675e5b238e07b63e395dbed3c2d125
 SHA1 (patch-ipc_unix__ipc.cc) = d5d86910ca610015103a309bba8d6392d96f6ce6
+SHA1 (patch-protobuf_protobuf.gyp) = bb1c9684881199936abb8acd73948d1cb174a1ea
 SHA1 (patch-renderer_renderer.gyp) = 83493259d6b8cd9ab6871512bebc9616d72132d1
 SHA1 (patch-session_session.cc) = 3ae2c8dd056aae4c92d9dbfdac53d9c45261aad2
 SHA1 (patch-session_session__test.cc) = 7396e2f4931257d8a33087b1bed5418a038fefa1
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/fcitx5-mozc/patches/patch-gyp_common.gypi
--- a/inputmethod/fcitx5-mozc/patches/patch-gyp_common.gypi     Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/fcitx5-mozc/patches/patch-gyp_common.gypi     Sat Feb 27 04:19:46 2021 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-gyp_common.gypi,v 1.1 2021/02/17 15:29:51 ryoon Exp $
+$NetBSD: patch-gyp_common.gypi,v 1.2 2021/02/27 04:19:46 ryoon Exp $
 
 * NetBSD support
 
 --- gyp/common.gypi.orig       2021-02-15 05:04:33.000000000 +0000
 +++ gyp/common.gypi
-@@ -93,6 +93,13 @@
+@@ -93,6 +93,14 @@
        '-fstack-protector',
        '--param=ssp-buffer-size=4',
      ],
@@ -14,11 +14,12 @@
 +      '-fPIC',
 +      '-D_NETBSD_SOURCE',
 +      '-fno-exceptions',
++      '<!(echo $CFLAGS)',
 +    ],
      # mac_cflags will be used in Mac.
      # Xcode 4.5 which we are currently using does not support ssp-buffer-size.
      # TODO(horo): When we can use Xcode 4.6 which supports ssp-buffer-size,
-@@ -128,6 +135,12 @@
+@@ -128,6 +136,12 @@
          'compiler_host': 'clang',
          'compiler_host_version_int': 304,  # Clang 3.4 or higher
        }],
@@ -31,7 +32,18 @@
      ],
    },
    'target_defaults': {
-@@ -318,6 +331,24 @@
+@@ -137,8 +151,8 @@
+       'mac_debug_optimization%': '0',    # Use -O0 unless overridden
+ 
+       # Extra cflags for gcc
+-      'release_extra_cflags%': ['-O2'],
+-      'debug_extra_cflags%': ['-O0', '-g'],
++      'release_extra_cflags%': ['-O2', '<!(echo $CFLAGS)', ],
++      'debug_extra_cflags%': ['-O0', '-g', '<!(echo $CFLAGS)', ],
+     },
+     'configurations': {
+       'Debug': {
+@@ -318,6 +332,24 @@
            }],
          ],
        }],
@@ -56,7 +68,7 @@
        ['OS=="mac"', {
          'defines': [
            '__APPLE__',
-@@ -410,7 +441,7 @@
+@@ -410,7 +442,7 @@
      ],
    },
    'conditions': [
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/fcitx5-mozc/patches/patch-protobuf_protobuf.gyp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/fcitx5-mozc/patches/patch-protobuf_protobuf.gyp       Sat Feb 27 04:19:46 2021 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-protobuf_protobuf.gyp,v 1.1 2021/02/27 04:19:46 ryoon Exp $
+
+* Pass LDFLAGS from pkgsrc.
+  Fix -lprotobuf is not found error.
+
+--- protobuf/protobuf.gyp.orig 2021-02-15 05:04:33.000000000 +0000
++++ protobuf/protobuf.gyp
+@@ -156,6 +156,9 @@
+             'libraries': [
+               '-lprotobuf',
+             ],
++            'ldflags': [
++              '<!(echo $LDFLAGS)',
++            ],
+           },
+         },
+         {  # else
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/ibus-mozc/Makefile
--- a/inputmethod/ibus-mozc/Makefile    Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/ibus-mozc/Makefile    Sat Feb 27 04:19:46 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.64 2021/02/15 14:50:22 ryoon Exp $
+# $NetBSD: Makefile,v 1.65 2021/02/27 04:19:46 ryoon Exp $
 
 PKGNAME=       ibus-${DISTNAME}
+PKGREVISION=   1
 
 INSTALLATION_DIRS+=    libexec share/ibus share/ibus/component \
                        share/ibus-mozc
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/mozc-elisp/Makefile
--- a/inputmethod/mozc-elisp/Makefile   Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/mozc-elisp/Makefile   Sat Feb 27 04:19:46 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.53 2021/02/15 14:50:23 ryoon Exp $
+# $NetBSD: Makefile,v 1.54 2021/02/27 04:19:46 ryoon Exp $
 
 PKGNAME=       ${EMACS_PKGNAME_PREFIX}${DISTNAME:S/mozc-/mozc-elisp-/}
+PKGREVISION=   1
 CATEGORIES=    inputmethod editors
 
 EMACS_MODULES= base leim
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/mozc-renderer/Makefile
--- a/inputmethod/mozc-renderer/Makefile        Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/mozc-renderer/Makefile        Sat Feb 27 04:19:46 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.45 2021/02/15 14:50:23 ryoon Exp $
+# $NetBSD: Makefile,v 1.46 2021/02/27 04:19:46 ryoon Exp $
 
 PKGNAME=       ${DISTNAME:S/mozc-/mozc-renderer-/}
+PKGREVISION=   1
 
 CONFLICTS+=    ibus-mozc<=1.13.1651.102
 
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/mozc-server/Makefile
--- a/inputmethod/mozc-server/Makefile  Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/mozc-server/Makefile  Sat Feb 27 04:19:46 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.62 2021/02/15 14:50:23 ryoon Exp $
+# $NetBSD: Makefile,v 1.63 2021/02/27 04:19:46 ryoon Exp $
 
 PKGNAME=       ${DISTNAME:S/mozc-/mozc-server-/}
+PKGREVISION=   1
 
 INSTALLATION_DIRS+=    libexec
 
@@ -8,6 +9,7 @@
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
                ${PYTHONBIN} build_mozc.py build \
                -c ${MOZC_BUILD_MODE} \
+                       dictionary/dictionary_base.gyp:text_dictionary_loader \
                        server/server.gyp:mozc_server
 
 do-install:
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/mozc-server/Makefile.common
--- a/inputmethod/mozc-server/Makefile.common   Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/mozc-server/Makefile.common   Sat Feb 27 04:19:46 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.33 2021/02/17 00:14:25 ryoon Exp $
+# $NetBSD: Makefile.common,v 1.34 2021/02/27 04:19:46 ryoon Exp $
 # used by inputmethod/ibus-mozc/Makefile
 # used by inputmethod/mozc-elisp/Makefile
 # used by inputmethod/mozc-server/Makefile
@@ -76,12 +76,13 @@
 
 do-configure:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+               GYP_DEFINES="use_libprotobuf=1" \
                ${PYTHONBIN} build_mozc.py \
                gyp \
                --gypdir=${LOCALBASE}/bin
 
 .include "../../devel/glib2/buildlink3.mk"
-#.include "../../devel/protobuf/buildlink3.mk"
+.include "../../devel/protobuf/buildlink3.mk"
 # gmock is not used yet...
 #.include "../../devel/gmock/buildlink3.mk"
 .include "../../inputmethod/zinnia/buildlink3.mk"
@@ -90,4 +91,5 @@
 .include "../../x11/qt5-qtbase/buildlink3.mk"
 
 .include "../../lang/python/tool.mk"
+.include "../../mk/atomic64.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/mozc-server/distinfo
--- a/inputmethod/mozc-server/distinfo  Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/mozc-server/distinfo  Sat Feb 27 04:19:46 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.23 2021/02/15 14:50:23 ryoon Exp $
+$NetBSD: distinfo,v 1.24 2021/02/27 04:19:46 ryoon Exp $
 
 SHA1 (mozc-2.26.4282.100.tar.xz) = aacec607aec52145ba66c993f9c02ae2d1a5948c
 RMD160 (mozc-2.26.4282.100.tar.xz) = b2f9f6fc129811b25640d4ae5582ab324b6bf2a4
@@ -33,12 +33,13 @@
 SHA1 (patch-gui_qt__rcc.gypi) = d38a849fe8e81672eb441a41936f454d8e45ff5c
 SHA1 (patch-gui_qt__uic.gypi) = 7dd69ee109e81f0e70f2866b77555412518b4844
 SHA1 (patch-gui_word__register__dialog_word__register__dialog.cc) = 218e3706b819855814ba8871504fc7ccb4e40b23
-SHA1 (patch-gyp_common.gypi) = 18e03490d6758ce49f4b79eb1259409cd440faba
+SHA1 (patch-gyp_common.gypi) = 6b9019c92a1b0f404feffb8b5a38b00caaeaf80a
 SHA1 (patch-gyp_directories.gypi) = eea985113aac5b99bf3c12267ad754817eef5dcc
 SHA1 (patch-ipc_ipc__path__manager.cc) = cd1352bd5333f1ed755dcf6221f931fcd0a936d3
 SHA1 (patch-ipc_ipc__path__manager__test.cc) = 1b83b513383f184f5ab5a56cce734b7934998533
 SHA1 (patch-ipc_named__event.cc) = 8be0b1e5c4675e5b238e07b63e395dbed3c2d125
 SHA1 (patch-ipc_unix__ipc.cc) = d5d86910ca610015103a309bba8d6392d96f6ce6
+SHA1 (patch-protobuf_protobuf.gyp) = bb1c9684881199936abb8acd73948d1cb174a1ea
 SHA1 (patch-renderer_renderer.gyp) = 83493259d6b8cd9ab6871512bebc9616d72132d1
 SHA1 (patch-session_session.cc) = 3ae2c8dd056aae4c92d9dbfdac53d9c45261aad2
 SHA1 (patch-session_session__test.cc) = 7396e2f4931257d8a33087b1bed5418a038fefa1
diff -r 864aed8efc18 -r 61fab97d3d42 inputmethod/mozc-server/patches/patch-gyp_common.gypi
--- a/inputmethod/mozc-server/patches/patch-gyp_common.gypi     Fri Feb 26 21:48:09 2021 +0000
+++ b/inputmethod/mozc-server/patches/patch-gyp_common.gypi     Sat Feb 27 04:19:46 2021 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-gyp_common.gypi,v 1.10 2021/02/15 14:50:23 ryoon Exp $
+$NetBSD: patch-gyp_common.gypi,v 1.11 2021/02/27 04:19:46 ryoon Exp $
 
 * NetBSD support
 
 --- gyp/common.gypi.orig       2021-02-15 05:04:33.000000000 +0000
 +++ gyp/common.gypi
-@@ -93,6 +93,13 @@
+@@ -93,6 +93,14 @@
        '-fstack-protector',
        '--param=ssp-buffer-size=4',
      ],
@@ -14,11 +14,12 @@
 +      '-fPIC',
 +      '-D_NETBSD_SOURCE',
 +      '-fno-exceptions',
++      '<!(echo $CFLAGS)',
 +    ],
      # mac_cflags will be used in Mac.
      # Xcode 4.5 which we are currently using does not support ssp-buffer-size.
      # TODO(horo): When we can use Xcode 4.6 which supports ssp-buffer-size,
-@@ -128,6 +135,12 @@
+@@ -128,6 +136,12 @@
          'compiler_host': 'clang',
          'compiler_host_version_int': 304,  # Clang 3.4 or higher
        }],
@@ -31,7 +32,18 @@
      ],
    },
    'target_defaults': {
-@@ -318,6 +331,24 @@
+@@ -137,8 +151,8 @@
+       'mac_debug_optimization%': '0',    # Use -O0 unless overridden
+ 
+       # Extra cflags for gcc
+-      'release_extra_cflags%': ['-O2'],
+-      'debug_extra_cflags%': ['-O0', '-g'],
++      'release_extra_cflags%': ['-O2', '<!(echo $CFLAGS)', ],
++      'debug_extra_cflags%': ['-O0', '-g', '<!(echo $CFLAGS)', ],
+     },
+     'configurations': {
+       'Debug': {
+@@ -318,6 +332,24 @@
            }],
          ],
        }],
@@ -56,7 +68,7 @@
        ['OS=="mac"', {
          'defines': [
            '__APPLE__',
-@@ -410,7 +441,7 @@
+@@ -410,7 +442,7 @@
      ],
    },
    'conditions': [



Home | Main Index | Thread Index | Old Index