summaryrefslogtreecommitdiff
path: root/japanese/kon2-16dot/Makefile
blob: 46afb60ff09f51822e7b2db0bfe836f3b72c9a23 (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Created by: Makoto Matsushita <matusita@jp.freebsd.org>

PORTNAME=	kon2
PORTVERSION=	0.3
PORTREVISION=	7
# '+=' is for slave ports
CATEGORIES+=	japanese
MASTER_SITES=	PORTS_JP
PKGNAMESUFFIX=	-${KONFONT}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
		k14.bdf 7x14rk.bdf \
		jiskan16.bdf 8x16rk.bdf
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

# '+=' is for slave ports
MAINTAINER=	ports@FreeBSD.org
COMMENT=	Kanji On Console -- Display kanji characters on your own console

ONLY_FOR_ARCHS=	i386 amd64

PORTDOCS=	README README.FreeBSD
SUB_LIST=	KON16FONT=${KON16FONT} \
		KON14FONT=${KON14FONT}

USES=		cpe
CPE_VENDOR=	ishikawa_mutsumi

CONFLICTS_INSTALL=	ja-kon2-*dot # bin/fld

OPTIONS_DEFINE=	DOCS

# XXX Static libraries with PIE are currently unsupported.
MAKE_ARGS+=	WITHOUT_PIE=true

.include <bsd.port.pre.mk>

.if !defined(KONFONT)
KONFONT=16dot
KON16FONT=Startup
.elif (${KONFONT} == "14dot")
KON14FONT=Startup
.elif (${KONFONT} != "16dot")
.BEGIN:
	@${ECHO} "Error: \$${KONFONT} (\"${KONFONT}\") should be either \"14dot\" or \"16dot\"."
	@${FALSE}
.endif

post-patch:
	cd ${WRKSRC} && \
		${INSTALL_MAN} doc/kon.1 src/kon.1.in && \
		${INSTALL_DATA} kon.cfg.FreeBSD kon.cfg.FreeBSD.in

${WRKSRC}/.config::
	(${ECHO_CMD} "DISTDIR = ${DISTDIR}"; \
	 ${ECHO_CMD} "TOPDIR = ${PREFIX}"; \
	 ${ECHO_CMD} "S_TOPDIR = ${STAGEDIR}${PREFIX}"; \
	 ${CAT} ${FILESDIR}/dotconfig; \
	) > ${WRKSRC}/.config

pre-configure: ${WRKSRC}/.config

do-configure:
	cd ${WRKSRC} && ${MAKE} -f Makefile.FreeBSD config

post-configure:
	cd ${WRKSRC} &&	\
		for F in kon.cfg.FreeBSD src/kon.1; do \
			${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
			    < $${F}.in > $${F}; \
		done

post-install:
	${INSTALL_MAN} ${WRKSRC}/src/kon.1 ${STAGEDIR}${MANPREFIX}/man/ja/man1
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.post.mk>