mozc: fix build with platform not have atomic8_*
This commit is contained in:
parent
568bc837cd
commit
73e49657f8
2 changed files with 155 additions and 0 deletions
150
srcpkgs/mozc/patches/latomic.patch
Normal file
150
srcpkgs/mozc/patches/latomic.patch
Normal file
|
@ -0,0 +1,150 @@
|
||||||
|
Index: mozc/src/gui/gui.gyp
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/gui/gui.gyp.orig
|
||||||
|
+++ mozc/src/gui/gui.gyp
|
||||||
|
@@ -790,6 +790,13 @@
|
||||||
|
'tool/mozc_tool_main_noqt.cc',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
+ ['use_libatomic==1', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [
|
||||||
|
+ '-latomic',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
# For Mac, ConfigDialog is the host app for necessary frameworks.
|
||||||
|
['OS=="win"', {
|
||||||
|
'product_name': '<(tool_product_name_win)',
|
||||||
|
Index: mozc/src/gyp/defines.gypi
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/gyp/defines.gypi.orig
|
||||||
|
+++ mozc/src/gyp/defines.gypi
|
||||||
|
@@ -68,6 +68,9 @@
|
||||||
|
# use_libibus represents if ibus library is used or not.
|
||||||
|
# This option is only for Linux.
|
||||||
|
'use_libibus%': '0',
|
||||||
|
+
|
||||||
|
+ # use_libatomic represents if libatomic is required or not
|
||||||
|
+ 'use_libatomic%': '0',
|
||||||
|
},
|
||||||
|
'target_defaults': {
|
||||||
|
'defines': [
|
||||||
|
Index: mozc/src/renderer/renderer.gyp
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/renderer/renderer.gyp.orig
|
||||||
|
+++ mozc/src/renderer/renderer.gyp
|
||||||
|
@@ -592,6 +592,15 @@
|
||||||
|
'../base/base.gyp:crash_report_handler',
|
||||||
|
'mozc_renderer_lib',
|
||||||
|
],
|
||||||
|
+ 'conditions': [
|
||||||
|
+ ['use_libatomic==1', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [
|
||||||
|
+ '-latomic',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
+ ],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'target_name': 'gtk_renderer_test',
|
||||||
|
Index: mozc/src/server/server.gyp
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/server/server.gyp.orig
|
||||||
|
+++ mozc/src/server/server.gyp
|
||||||
|
@@ -55,6 +55,13 @@
|
||||||
|
'mozc_server_lib',
|
||||||
|
],
|
||||||
|
'conditions': [
|
||||||
|
+ ['use_libatomic==1', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [
|
||||||
|
+ '-latomic',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
['OS=="mac"', {
|
||||||
|
'product_name': '<(branding)Converter',
|
||||||
|
'sources': [
|
||||||
|
Index: mozc/src/unix/emacs/emacs.gyp
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/unix/emacs/emacs.gyp.orig
|
||||||
|
+++ mozc/src/unix/emacs/emacs.gyp
|
||||||
|
@@ -46,6 +46,15 @@
|
||||||
|
'../../protocol/protocol.gyp:config_proto',
|
||||||
|
'mozc_emacs_helper_lib',
|
||||||
|
],
|
||||||
|
+ 'conditions': [
|
||||||
|
+ ['use_libatomic==1', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [
|
||||||
|
+ '-latomic',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
+ ],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'target_name': 'mozc_emacs_helper_lib',
|
||||||
|
Index: mozc/src/unix/fcitx/fcitx.gyp
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/unix/fcitx/fcitx.gyp.orig
|
||||||
|
+++ mozc/src/unix/fcitx/fcitx.gyp
|
||||||
|
@@ -98,6 +98,15 @@
|
||||||
|
'defines': [
|
||||||
|
'LOCALEDIR="/usr/share/locale/"',
|
||||||
|
],
|
||||||
|
+ 'conditions': [
|
||||||
|
+ ['use_libatomic==1', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [
|
||||||
|
+ '-latomic',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
+ ],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}, {
|
||||||
|
Index: mozc/src/unix/fcitx5/fcitx5.gyp
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/unix/fcitx5/fcitx5.gyp.orig
|
||||||
|
+++ mozc/src/unix/fcitx5/fcitx5.gyp
|
||||||
|
@@ -105,6 +105,15 @@
|
||||||
|
'defines': [
|
||||||
|
'FCITX_GETTEXT_DOMAIN="fcitx5-mozc"',
|
||||||
|
],
|
||||||
|
+ 'conditions': [
|
||||||
|
+ ['use_libatomic==1', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [
|
||||||
|
+ '-latomic',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
+ ],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}, {
|
||||||
|
Index: mozc/src/unix/ibus/ibus.gyp
|
||||||
|
===================================================================
|
||||||
|
--- mozc/src/unix/ibus/ibus.gyp.orig
|
||||||
|
+++ mozc/src/unix/ibus/ibus.gyp
|
||||||
|
@@ -239,6 +239,15 @@
|
||||||
|
'ibus_mozc_lib',
|
||||||
|
'ibus_mozc_metadata',
|
||||||
|
],
|
||||||
|
+ 'conditions': [
|
||||||
|
+ ['use_libatomic==1', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [
|
||||||
|
+ '-latomic',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
+ ],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'target_name': 'ibus_mozc_test',
|
|
@ -37,6 +37,10 @@ if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
||||||
broken="Does not build"
|
broken="Does not build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||||
|
makedepends+=" libatomic-devel"
|
||||||
|
fi
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
mv mozc-* mozc
|
mv mozc-* mozc
|
||||||
|
|
||||||
|
@ -63,6 +67,7 @@ do_configure() {
|
||||||
document_dir=/usr/share/licenses/${pkgname}
|
document_dir=/usr/share/licenses/${pkgname}
|
||||||
use_libprotobuf=1
|
use_libprotobuf=1
|
||||||
use_libzinnia=1
|
use_libzinnia=1
|
||||||
|
${XBPS_TARGET_NO_ATOMIC8:+use_libatomic=1}
|
||||||
" python3 build_mozc.py gyp --target_platform=Linux
|
" python3 build_mozc.py gyp --target_platform=Linux
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue