mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
113 lines
3.3 KiB
Bash
113 lines
3.3 KiB
Bash
SUMMARY="Japanese input method editor"
|
|
DESCRIPTION="A Japanese Input Method Editor (IME) designed for multi-platform. \
|
|
This is open source version."
|
|
HOMEPAGE="https://github.com/google/mozc"
|
|
COPYRIGHT="2010-2018 Google Inc."
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/hanya/mozc/releases/download/v$portVersion/mozc-v$portVersion.tar.bz2"
|
|
CHECKSUM_SHA256="7e79d1bb0f684e63afa90fbe7647eb9162395c65f03ae2350d4bc4c539338615"
|
|
SOURCE_DIR="mozc"
|
|
if [ "$effectiveTargetArchitecture" = x86 ]; then
|
|
PATCHES="mozc-$portVersion-x86.patch"
|
|
fi
|
|
zinniaTomoeVersion="0.6.0-20080911"
|
|
SOURCE_URI_2="https://downloads.sourceforge.net/zinnia/zinnia-tomoe-$zinniaTomoeVersion.tar.bz2"
|
|
CHECKSUM_SHA256_2="fd1a264b8aeea0ebec59e8c8765864a9543a75fb2dba349745bb3a3587790927"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
mozc$secondaryArchSuffix
|
|
addon:mozc
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libprotobuf$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libprotobuf$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:protoc$secondaryArchSuffix
|
|
cmd:python2
|
|
cmd:which
|
|
cmd:xres
|
|
"
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
BUILD_PREREQUIRES+="
|
|
cmd:g++
|
|
"
|
|
fi
|
|
|
|
BUILD()
|
|
{
|
|
cd src
|
|
|
|
GYP_DEFINES="document_dir=$dataDir/mozc \
|
|
zinnia_model_file=$dataDir/mozc/zinnia/handwriting-ja.model \
|
|
zinnia_tomoe_dir=$sourceDir2/zinnia-tomoe-$zinniaTomoeVersion \
|
|
enable_gtk_renderer=0 \
|
|
target_x86_gcc2=$targetArchitecture" \
|
|
$portPackageLinksDir/cmd~python2/bin/python2 build_mozc.py gyp \
|
|
--target_platform=Linux --variant=Haiku --noqt \
|
|
--server_dir=$dataDir/mozc
|
|
|
|
$portPackageLinksDir/cmd~python2/bin/python2 build_mozc.py build \
|
|
-c Release \
|
|
server/server.gyp:mozc_server \
|
|
emacs/emacs.gyp:mozc_emacs_helper \
|
|
input_method/input_method.gyp:mozc \
|
|
haiku_gui/haiku_gui.gyp:mozc_tool_haiku \
|
|
zinnia_model/zinnia_model.gyp:zinnia_model
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
MozcOutDir=src/out_linux/Release
|
|
MozcDataDir=$dataDir/mozc
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
InputMethodDir=$addOnsDir/../input_server/methods
|
|
else
|
|
InputMethodDir=$addOnsDir/input_server/methods
|
|
fi
|
|
mkdir -p $MozcDataDir
|
|
mkdir -p $MozcDataDir/zinnia
|
|
mkdir -p $MozcDataDir/images
|
|
mkdir -p $dataDir/locale/catalogs/x-vnd.Mozc-InputMethod
|
|
mkdir -p $dataDir/locale/catalogs/x-vnd.Mozc-MozcTool
|
|
mkdir -p $InputMethodDir
|
|
|
|
cp $MozcOutDir/mozc $InputMethodDir/mozc
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
cp $MozcOutDir/mozc_task $MozcDataDir/mozc_task
|
|
fi
|
|
cp $MozcOutDir/mozc_server $MozcDataDir/mozc_server
|
|
cp $MozcOutDir/mozc_tool_haiku $MozcDataDir/mozc_tool
|
|
cp $MozcOutDir/handwriting-ja.model \
|
|
$MozcDataDir/zinnia/handwriting-ja.model
|
|
cp $MozcOutDir/mozc_emacs_helper $MozcDataDir/mozc_emacs_helper
|
|
cp src/data/installer/credits_en.html $MozcDataDir/credits_en.html
|
|
cp src/data/images/product_icon_32bpp-128.png \
|
|
$MozcDataDir/images/product_icon_32bpp-128.png
|
|
|
|
cp $MozcOutDir/x-vnd.Mozc-InputMethod/* \
|
|
$dataDir/locale/catalogs/x-vnd.Mozc-InputMethod
|
|
cp $MozcOutDir/x-vnd.Mozc-MozcTool/* \
|
|
$dataDir/locale/catalogs/x-vnd.Mozc-MozcTool
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cd src
|
|
# Some tests fails with job > 1
|
|
python2 build_mozc.py runtests -c Release --test_jobs 1
|
|
}
|