SUMMARY="An input method for Chinese, Japanese and Korean"
DESCRIPTION="
BeCJK was an input method for legacy BeOS, now works on Haiku.
" 

HOMEPAGE="https://bitbucket.org/Haiku-cn/becjk"
SOURCE_URI="hg+https://bitbucket.org/Haiku-cn/becjk"

COPYRIGHT="2001-2002 Anthony Lee <anthonylee@eLong.com>"
LICENSE="GNU LGPL v2"
REVISION="2"
ARCHITECTURES="x86_gcc2 ?x86"

PROVIDES="
	BeCJK = $portVersion
	addon:BeCJK = $portVersion
	lib:libbesavager = $portVersion
	"

REQUIRES="
	haiku
	"
BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:python
	cmd:scons
	cmd:gcc
	cmd:ld
	"

PATCHES="becjk-1.0.1.patchset"

BUILD()
{
	scons -Q
}

INSTALL()
{
	mkdir -p $libDir
	mkdir -p $dataDir/BeCJK/dicts/
	mkdir -p $addOnsDir/input_server/methods/

	cp generated/lib/besavager/*.so $libDir/
	cp generated/data/BeCJK/dicts/* $dataDir/BeCJK/dicts/
	cp generated/add-ons/input_server/methods/BeCJK $addOnsDir/input_server/methods/
}
