|
|
第一次写这个,参考的是 arch 的pkgbuild文件。
http://bbs.linuxsir.cn/thread333052.html
scim-sunpinyin-080520.ebuild
- #Copyright 1999-2004 Gentoo Technologies, Inc.
- # Distributed under the terms of the GNU General Public License v2
- # $Header:$
- inherit eutils
- DESCRIPTION="SunPinyin is a SLM (Statistical Language Model) based IME"
- HOMEPAGE="http://www.opensolaris.org/os/project/input-method/"
- SRC_URI="http://www.opensolaris.org/os/project/input-method/files/inputmethod-repo-snapshot-${PV}.tar.bz2 \
- http://src.opensolaris.org/source/raw/nv-g11n/inputmethod/sunpinyin/ime/data/lm_sc.t3g.i386 \
- http://src.opensolaris.org/source/raw/nv-g11n/inputmethod/sunpinyin/ime/data/pydict_sc.bin.i386"
- RESTRICT="nomirror"
- KEYWORDS="x86"
- SLOT="0"
- LICENSE="GPL"
- IUSE=""
- DEPEND="app-i18n/scim"
- PROVIDE=""
- S=${WORKDIR}/inputmethod-repo-snapshot-${PV}/sunpinyin/ime
- src_unpack() {
- unpack inputmethod-repo-snapshot-${PV}.tar.bz2
- cp ${DISTDIR}/lm_sc.t3g.i386 ${S}/data
- cp ${DISTDIR}/pydict_sc.bin.i386 ${S}/data
- cd ${S}
- ${EPATCH_OPTS}="-p2 -i"
- epatch ${FILESDIR}/ic_history.h.diff
- }
- src_compile() {
- ./autogen.sh --prefix=/usr \
- --enable-scim \
- --disable-cle \
- --disable-debug || die 'Configure faild'
- emake || die 'Make faild'
- }
- src_install() {
- emake DESTDIR="${D}" install || die "Install failed"
- }
复制代码
files/ic_history.h.diff
- --- sunpinyin/ime/src/ic_history.h.orig 2008-05-21 00:03:35.000000000 +0800
- +++ sunpinyin/ime/src/ic_history.h 2008-06-28 02:50:18.000000000 +0800
- @@ -39,7 +39,8 @@
- #define _SUNPINYIN_CONTEXT_HISTORY_H
-
- #include "portability.h"
- -
- +#include <stdio.h>
- +#include <stdlib.h>
- #include <map>
- #include <deque>
- #include <set>
复制代码 |
|