summaryrefslogtreecommitdiff
blob: b076cfe87a808054c1ed998faed9172d4cc1c636 (plain)
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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="6"

MY_P="FreeWnn-${PV/_alpha/-a0}"

DESCRIPTION="Network-Extensible Kana-to-Kanji Conversion System"
HOMEPAGE="http://freewnn.sourceforge.jp/ http://www.freewnn.org/"
SRC_URI="mirror://sourceforge.jp/${PN}/59257/${MY_P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
IUSE="ipv6"

DEPEND="virtual/libcrypt:="
RDEPEND="${DEPEND}"

S="${WORKDIR}/${MY_P}"

PATCHES=(
	"${FILESDIR}"/${P}-parallel-build.patch
	"${FILESDIR}"/${PN}-Wformat-security.patch
)
DOCS="ChangeLog* CONTRIBUTORS"

src_prepare() {
	default

	sed -i \
		-e "s/WNNOWNER = wnn/WNNOWNER = root/" \
		-e "s/@INSTPGMFLAGS@//" \
		makerule.mk.in

	# bug #542534
	sed -i \
		-e "s/egrep -v/egrep -av/" \
		PubdicPlus/Makefile.in \
		Wnn/pubdicplus/Makefile.in \
		cWnn/[ct]dic/Makefile.in \
		kWnn/kdic/Makefile.in
}

src_configure() {
	econf \
		$(use_with ipv6) \
		--disable-cWnn \
		--disable-kWnn
}

src_install() {
	emake DESTDIR="${D}" install install.man
	einstalldocs

	newinitd "${FILESDIR}"/${PN}.initd ${PN}
}