<commit_before>DESCRIPTION = "Japanese input method plugin"
HOMEPAGE = "http://www.sikigami.com/nunome-Qtopia-1.0/"
SECTION = "opie/inputmethods"
PRIORITY = "optional"
LICENSE = "GPL"
RDEPENDS = "virtual/japanese-font"
PR = "r1"

SRC_URI = "${SOURCEFORGE_MIRROR}/gakusei/nunome-${PV}.tar.bz2 \
	file://timer.patch;patch=1 \
	file://nunome.patch;patch=1"
S = "${WORKDIR}/nunome"

inherit opie

EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=${S}/Nnmlib INCLUDEPATH+=${S}/ui LIBS+=-L${S}"
OE_QMAKE_CXXFLAGS := "${@oe_filter_out('-fno-rtti', '${OE_QMAKE_CXXFLAGS}', d)}"
PARALLEL_MAKE = ""

do_configure_prepend() {
	echo -e "TEMPLATE=subdirs\nSUBDIRS=Nnmlib server ui dicman ui" >nunome.pro
	pushd Nnmlib && qmake -project -t lib && popd
	pushd server && qmake -project && echo -e "LIBS+=-lNnmlib\nTARGET=server.bin" >> server.pro && popd
	pushd dicman && qmake -project && echo -e "LIBS+=-lnunome -lNnmlib\nTARGET=dicman.bin" >> dicman.pro && popd
	pushd ui && qmake -project -t lib && echo -e "LIBS+=-lNnmlib\nTARGET=nunome" >> ui.pro && popd
	find . -name "moc*"|xargs rm -f
	find . -name "Makefile"|xargs rm -f
}

do_install() {
	install -d ${D}${palmtopdir}/lib
	install -d ${D}${palmtopdir}/bin
	install -d ${D}${palmtopdir}/i18n/ja
	install -d ${D}${palmtopdir}/share/nunome

	oe_libinstall -so libNnmlib ${D}${palmtopdir}/lib
        install -m 644 nunome_uni.dic  		${D}${palmtopdir}/share/nunome
        install -m 755 server.bin        	${D}${palmtopdir}/bin/nnmsrv
        install -m 755 dicman.bin		${D}${palmtopdir}/bin/nnmDicman
        install -m 644 ui/nunome.qm		${D}${palmtopdir}/i18n/ja
        install -m 644 dicman/nnmDicman.qm  	${D}${palmtopdir}/i18n/ja
}
<commit_msg>nunome: move to the new opie location<commit_after>DESCRIPTION = "Japanese input method plugin"
HOMEPAGE = "http://www.sikigami.com/nunome-Qtopia-1.0/"
SECTION = "opie/inputmethods"
PRIORITY = "optional"
LICENSE = "GPL"
RDEPENDS = "virtual/japanese-font"
PR = "r3"

SRC_URI = "${SOURCEFORGE_MIRROR}/gakusei/nunome-${PV}.tar.bz2 \
	file://timer.patch;patch=1 \
	file://nunome.patch;patch=1"
S = "${WORKDIR}/nunome"

inherit opie

EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=${S}/Nnmlib INCLUDEPATH+=${S}/ui LIBS+=-L${S}"
OE_QMAKE_CXXFLAGS := "${@oe_filter_out('-fno-rtti', '${OE_QMAKE_CXXFLAGS}', d)}"
PARALLEL_MAKE = ""

do_configure_prepend() {
	sed -i -e 's,/opt/QtPalmtop/bin/,${bindir}/,g' "${S}/ui/nunome.h"
	sed -i -e 's,/opt/QtPalmtop/,${palmtopdir}/,g' "${S}/ui/nunome.h"
	echo -e "TEMPLATE=subdirs\nSUBDIRS=Nnmlib server ui dicman ui" >nunome.pro
	pushd Nnmlib && qmake -project -t lib && popd
	pushd server && qmake -project && echo -e "LIBS+=-lNnmlib\nTARGET=server.bin" >> server.pro && popd
	pushd dicman && qmake -project && echo -e "LIBS+=-lnunome -lNnmlib\nTARGET=dicman.bin" >> dicman.pro && popd
	pushd ui && qmake -project -t lib && echo -e "LIBS+=-lNnmlib\nTARGET=nunome" >> ui.pro && popd
	find . -name "moc*"|xargs rm -f
	find . -name "Makefile"|xargs rm -f
}

do_install() {
	install -d ${D}${palmtopdir}/lib
	install -d ${D}${bindir}
	install -d ${D}${palmtopdir}/i18n/ja
	install -d ${D}${palmtopdir}/share/nunome

	oe_libinstall -so libNnmlib ${D}${palmtopdir}/lib
        install -m 644 nunome_uni.dic  		${D}${palmtopdir}/share/nunome
        install -m 755 server.bin        	${D}${bindir}/nnmsrv
        install -m 755 dicman.bin		${D}${bindir}/nnmDicman
        install -m 644 ui/nunome.qm		${D}${palmtopdir}/i18n/ja
        install -m 644 dicman/nnmDicman.qm  	${D}${palmtopdir}/i18n/ja
}

{'fraction_non_alphanumeric': 0.18678489702517162, 'fraction_numerical': 0.015446224256292907, 'mean_word_length': 3.9322990126939352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7126540', 'n_tokens_mistral': 1596, 'n_tokens_neox': 1539, 'n_words': 280}