forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libpinyin-2.1.91.ebuild
61 lines (47 loc) · 1.36 KB
/
libpinyin-2.1.91.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
inherit autotools
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/libpinyin/libpinyin"
fi
LIBPINYIN_MODEL_VERSION="15"
DESCRIPTION="Libraries for handling of Hanyu Pinyin and Zhuyin Fuhao"
HOMEPAGE="https://github.com/libpinyin/libpinyin https://sourceforge.net/projects/libpinyin/"
if [[ "${PV}" == "9999" ]]; then
SRC_URI=""
else
SRC_URI="https://github.com/libpinyin/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
fi
SRC_URI+=" mirror://sourceforge/${PN}/models/model${LIBPINYIN_MODEL_VERSION}.text.tar.gz -> ${PN}-model${LIBPINYIN_MODEL_VERSION}.text.tar.gz"
LICENSE="GPL-3+"
SLOT="0/13"
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
IUSE=""
RDEPEND="dev-libs/glib:2
sys-libs/db:="
DEPEND="${RDEPEND}
virtual/pkgconfig"
src_unpack() {
if [[ "${PV}" == "9999" ]]; then
git-r3_src_unpack
else
unpack ${P}.tar.gz
fi
}
src_prepare() {
default
sed -e "/^\twget .*\/model${LIBPINYIN_MODEL_VERSION}\.text\.tar\.gz$/d" -i data/Makefile.am || die
ln -s "${DISTDIR}/${PN}-model${LIBPINYIN_MODEL_VERSION}.text.tar.gz" "data/model${LIBPINYIN_MODEL_VERSION}.text.tar.gz" || die
eautoreconf
}
src_configure() {
econf \
--enable-libzhuyin \
--disable-static
}
src_install() {
default
find "${D}" -name "*.la" -delete || die
}