mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
parent
9194c5e28d
commit
c30f09e040
8 changed files with 176 additions and 0 deletions
1
srcpkgs/emacs-mozc
Symbolic link
1
srcpkgs/emacs-mozc
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
mozc
|
1
srcpkgs/ibus-mozc
Symbolic link
1
srcpkgs/ibus-mozc
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
mozc
|
7
srcpkgs/mozc/emacs-mozc.INSTALL.msg
Normal file
7
srcpkgs/mozc/emacs-mozc.INSTALL.msg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
To enable Mozc mode, add this to your ~/.emacs.d/init.el file:
|
||||||
|
|
||||||
|
(set-language-environment "Japanese")
|
||||||
|
(require 'mozc) ; or (load-file "/path/to/mozc.el")
|
||||||
|
(setq default-input-method "japanese-mozc")
|
||||||
|
|
||||||
|
C-\ is bound to `toggle-input-method' by default.
|
7
srcpkgs/mozc/ibus-mozc.INSTALL.msg
Normal file
7
srcpkgs/mozc/ibus-mozc.INSTALL.msg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
ibus-mozc always starts up in Direct Input mode. If you prefer Hiragana
|
||||||
|
mode by default, set the IBUS_MOZC_DEFAULT_HIRAGANA environment variable
|
||||||
|
for ibus-daemon, e.g.:
|
||||||
|
|
||||||
|
IBUS_MOZC_DEFAULT_HIRAGANA= ibus-daemon --xim -d
|
||||||
|
|
||||||
|
This is a Void Linux extension.
|
40
srcpkgs/mozc/patches/cross.patch
Normal file
40
srcpkgs/mozc/patches/cross.patch
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
--- mozc/src/gyp/common.gypi
|
||||||
|
+++ mozc/src/gyp/common.gypi
|
||||||
|
@@ -444,12 +444,12 @@
|
||||||
|
}],
|
||||||
|
['target_platform=="Linux"', {
|
||||||
|
'make_global_settings': [
|
||||||
|
- ['AR', '<!(which ar)'],
|
||||||
|
- ['CC', '<!(which clang)'],
|
||||||
|
- ['CXX', '<!(which clang++)'],
|
||||||
|
- ['LD', '<!(which ld)'],
|
||||||
|
- ['NM', '<!(which nm)'],
|
||||||
|
- ['READELF', '<!(which readelf)'],
|
||||||
|
+ ['AR', '<!(which ${AR_target:-ar})'],
|
||||||
|
+ ['CC', '<!(which ${CC_target:-cc})'],
|
||||||
|
+ ['CXX', '<!(which ${CXX_target:-c++})'],
|
||||||
|
+ ['LD', '<!(which ${LD_target:-ld})'],
|
||||||
|
+ ['NM', '<!(which ${NM_target:-nm})'],
|
||||||
|
+ ['READELF', '<!(which ${READELF_target:-readelf})'],
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['target_platform=="Android"', {
|
||||||
|
@@ -494,12 +494,12 @@
|
||||||
|
['LD', '<(ndk_bin_dir)/<(toolchain_prefix)-ld'],
|
||||||
|
['NM', '<(ndk_bin_dir)/<(toolchain_prefix)-nm'],
|
||||||
|
['READELF', '<(ndk_bin_dir)/<(toolchain_prefix)-readelf'],
|
||||||
|
- ['AR.host', '<!(which ar)'],
|
||||||
|
- ['CC.host', '<!(which clang)'],
|
||||||
|
- ['CXX.host', '<!(which clang++)'],
|
||||||
|
- ['LD.host', '<!(which ld)'],
|
||||||
|
- ['NM.host', '<!(which nm)'],
|
||||||
|
- ['READELF.host', '<!(which readelf)'],
|
||||||
|
+ ['AR.host', '<!(which ${AR:-ar})'],
|
||||||
|
+ ['CC.host', '<!(which ${CC:-cc})'],
|
||||||
|
+ ['CXX.host', '<!(which ${CXX:-c++})'],
|
||||||
|
+ ['LD.host', '<!(which ${LD:-ld})'],
|
||||||
|
+ ['NM.host', '<!(which ${NM:-nm})'],
|
||||||
|
+ ['READELF.host', '<!(which ${READELF:-readelf})'],
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
],
|
20
srcpkgs/mozc/patches/default_hiragana_from_environment.patch
Normal file
20
srcpkgs/mozc/patches/default_hiragana_from_environment.patch
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- mozc/src/unix/ibus/property_handler.cc
|
||||||
|
+++ mozc/src/unix/ibus/property_handler.cc
|
||||||
|
@@ -40,6 +40,8 @@
|
||||||
|
#include "unix/ibus/mozc_engine_property.h"
|
||||||
|
#include "unix/ibus/path_util.h"
|
||||||
|
|
||||||
|
+#include <cstdlib>
|
||||||
|
+
|
||||||
|
// On Gnome Shell with IBus 1.5, new property named "symbol" is used to
|
||||||
|
// represent the mode indicator on the system panel. Note that "symbol" does
|
||||||
|
// not exist in IBus 1.4.x.
|
||||||
|
@@ -80,7 +82,7 @@ bool GetDisabled(IBusEngine *engine) {
|
||||||
|
// On IBus 1.4.x, IBus expects that an IME should always be turned on and
|
||||||
|
// IME on/off keys are handled by IBus itself rather than each IME.
|
||||||
|
#if IBUS_CHECK_VERSION(1, 5, 0)
|
||||||
|
-const bool kActivatedOnLaunch = false;
|
||||||
|
+const bool kActivatedOnLaunch = !!::std::getenv("IBUS_MOZC_DEFAULT_HIRAGANA");
|
||||||
|
#else
|
||||||
|
const bool kActivatedOnLaunch = true;
|
||||||
|
#endif // IBus>=1.5.0
|
10
srcpkgs/mozc/patches/no-parallel.patch
Normal file
10
srcpkgs/mozc/patches/no-parallel.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- mozc/src/build_mozc.py
|
||||||
|
+++ mozc/src/build_mozc.py
|
||||||
|
@@ -728,6 +728,7 @@ def GypMain(options, unused_args):
|
||||||
|
gyp_options.extend(['--generator-output=.'])
|
||||||
|
short_basename = GetBuildShortBaseName(target_platform)
|
||||||
|
gyp_options.extend(['-G', 'output_dir=%s' % short_basename])
|
||||||
|
+ gyp_options.extend(['--no-parallel']) # Parallel generation requires writable /dev/shm
|
||||||
|
|
||||||
|
# Enable cross-compile
|
||||||
|
# TODO(yukawa): Enable GYP_CROSSCOMPILE for Windows.
|
90
srcpkgs/mozc/template
Normal file
90
srcpkgs/mozc/template
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
# Template file for 'mozc'
|
||||||
|
pkgname=mozc
|
||||||
|
version=2.20.2677.102
|
||||||
|
revision=1
|
||||||
|
hostmakedepends="ninja pkg-config protobuf-devel python qt5-devel"
|
||||||
|
makedepends="gtk+-devel ibus-devel libzinnia-devel protobuf-devel qt5-devel"
|
||||||
|
depends="tegaki-zinnia-japanese>=0.3"
|
||||||
|
maintainer="Matthias von Faber <mvf@gmx.eu>"
|
||||||
|
homepage="https://github.com/google/mozc"
|
||||||
|
license="3-clause-BSD"
|
||||||
|
short_desc="Japanese IME (Open Source version of Google Japanese Input)"
|
||||||
|
build_wrksrc="mozc/src"
|
||||||
|
create_wrksrc=yes
|
||||||
|
distfiles="
|
||||||
|
https://github.com/google/mozc/archive/fc687ac2266c54f0c2f58b4c482486618d68786f.tar.gz
|
||||||
|
https://github.com/bnoordhuis/gyp/archive/4ec6c4e3a94bd04a6da2858163d40b2429b8aad1.tar.gz
|
||||||
|
https://github.com/hiroyuki-komatsu/japanese-usage-dictionary/archive/e5b3425575734c323e1d947009dd74709437b684.tar.gz
|
||||||
|
"
|
||||||
|
checksum="
|
||||||
|
04749ecfe9a2a039ccb6aae75baee04a7164682470fb9f272eedff803826a55d
|
||||||
|
009992eae3393ba7b2d2ba6249dbb3ac44157313f10e8add4d3086aef772c04b
|
||||||
|
0b6efee0eebac2c1a8eeea333278aa40fcef7846bba9a379962c6e567e7e3dc1
|
||||||
|
"
|
||||||
|
|
||||||
|
post_extract() {
|
||||||
|
ln -s mozc-* mozc
|
||||||
|
|
||||||
|
# symlink "submodules" into place
|
||||||
|
for _src_dest in gyp japanese-usage-dictionary:japanese_usage_dictionary; do
|
||||||
|
_src=${_src_dest%:*}
|
||||||
|
_dst=mozc/src/third_party/${_src_dest#*:}
|
||||||
|
rmdir $_dst
|
||||||
|
ln -sr $_src-* $_dst
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
*-musl) sed -i -e 's|PTHREAD_MUTEX_RECURSIVE_NP|PTHREAD_MUTEX_RECURSIVE|g' base/mutex.cc ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
GYP_DEFINES="
|
||||||
|
document_dir=/usr/share/licenses/${pkgname}
|
||||||
|
use_libprotobuf=1
|
||||||
|
use_libzinnia=1
|
||||||
|
" python build_mozc.py gyp --target_platform=Linux
|
||||||
|
python build_mozc.py build -c Release \
|
||||||
|
server/server.gyp:mozc_server \
|
||||||
|
gui/gui.gyp:mozc_tool \
|
||||||
|
unix/emacs/emacs.gyp:mozc_emacs_helper \
|
||||||
|
unix/ibus/ibus.gyp:ibus_mozc \
|
||||||
|
renderer/renderer.gyp:mozc_renderer
|
||||||
|
|
||||||
|
sed -i 's|/usr/libexec/|/usr/lib/ibus-mozc/|g' out_linux/Release/gen/unix/ibus/mozc.xml
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -D -m 755 out_linux/Release/mozc_server "${PKGDESTDIR}/usr/lib/mozc/mozc_server"
|
||||||
|
install -m 755 out_linux/Release/mozc_tool "${PKGDESTDIR}/usr/lib/mozc/mozc_tool"
|
||||||
|
|
||||||
|
head -n 29 server/mozc_server.cc > LICENSE
|
||||||
|
for i in LICENSE data/installer/*.html; do
|
||||||
|
vlicense "$i"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
ibus-mozc_package() {
|
||||||
|
short_desc="Mozc engine for IBus - Client of the Mozc input method"
|
||||||
|
depends="${sourcepkg}-${version}_${revision} ibus>=1.5.14"
|
||||||
|
pkg_install() {
|
||||||
|
install -D -m 755 out_linux/Release/ibus_mozc "${PKGDESTDIR}/usr/lib/ibus-mozc/ibus-engine-mozc"
|
||||||
|
install -D -m 644 out_linux/Release/gen/unix/ibus/mozc.xml "${PKGDESTDIR}/usr/share/ibus/component/mozc.xml"
|
||||||
|
install -D -m 644 data/images/unix/ime_product_icon_opensource-32.png "${PKGDESTDIR}/usr/share/ibus-mozc/product_icon.png"
|
||||||
|
for i in data/images/unix/ui-*.png; do
|
||||||
|
install -m 644 "$i" "${PKGDESTDIR}/usr/share/ibus-mozc/${i##*/ui-}"
|
||||||
|
done
|
||||||
|
install -D -m 755 out_linux/Release/mozc_renderer "${PKGDESTDIR}/usr/lib/mozc/mozc_renderer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
emacs-mozc_package() {
|
||||||
|
pkgdesc="Mozc for Emacs"
|
||||||
|
depends="${sourcepkg}-${version}_${revision} emacs"
|
||||||
|
pkg_install() {
|
||||||
|
install -D -m 755 out_linux/Release/mozc_emacs_helper "${PKGDESTDIR}/usr/bin/mozc_emacs_helper"
|
||||||
|
install -D -m 644 unix/emacs/mozc.el "${PKGDESTDIR}/usr/share/emacs/site-lisp/emacs-mozc/mozc.el"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue