summaryrefslogtreecommitdiffstats
path: root/japanese/gjiten/Makefile
blob: e18e4885896dfb27965aa26f61c645550b9f6752 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# New ports collection makefile for: 	gjiten
# Date created: 			2012-09-03
# Whom: 				Stephane Lapie <stephane.lapie@darkbsd.org>
#
# $FreeBSD$
#

PORTNAME=	gjiten
PORTVERSION=	2.6
CATEGORIES=	japanese gnome
MASTER_SITES=	http://gjiten.sourceforge.net/

MAINTAINER=	stephane.lapie@darkbsd.org
COMMENT=	Japanese dictionary program for GNOME

OPTIONS_DEFINE=	UTF8 KANJIPAD DOCS NLS
UTF8_DESC=	Use UTF-8 edict dictionaries
KANJIPAD_DESC=	Use Kanjipad

USE_GNOME=	gtk20 gconf2 libglade libgnomeui
USE_GMAKE=	yes
INSTALLS_OMF=	yes
GNU_CONFIGURE=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

PORTDOCS=	gjiten-doc.ja.html
MAN1=		gjiten.1
GCONF_SCHEMAS=	gjiten-dicfiles.schemas gjiten.schemas

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES+=		gettext
PLIST_SUB+=	NLS=""
.else
PLIST_SUB+=	NLS="@comment "
MAKE_ENV+=	USE_NLS=no
.endif

.if ${PORT_OPTIONS:MUTF8}
EDICT_DIR=	${LOCALBASE}/share/dict/edict-utf-8
EDICT_FILE=	${EDICT_DIR}/edict
RUN_DEPENDS+=	${EDICT_FILE}:${PORTSDIR}/japanese/edict-utf-8
.else
EDICT_DIR=	${LOCALBASE}/share/dict/edict
EDICT_FILE=	${EDICT_DIR}/edict
RUN_DEPENDS+=	${EDICT_FILE}:${PORTSDIR}/japanese/edict
BUILD_DEPENDS+=	${LOCALBASE}/bin/iconv:${PORTSDIR}/converters/libiconv
.endif

DICTIONARIES=	kanjidic edict compdic
GJITEN_DICS=	${DATADIR}/dics/

.if ${PORT_OPTIONS:MKANJIPAD}
RUN_DEPENDS+=	${LOCALBASE}/bin/kanjipad:${PORTSDIR}/japanese/kanjipad
.endif

BUILD_DEPENDS+=	${LOCALBASE}/bin/xmlto:${PORTSDIR}/textproc/xmlto

post-install:
.if ${PORT_OPTIONS:MDOCS}
	@${INSTALL} -d ${DOCSDIR}
.for f in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/help/ja/${f} ${DOCSDIR}
.endfor
.endif
	@${INSTALL} -d ${GJITEN_DICS}
.if ${PORT_OPTIONS:MUTF8}
.for f in ${DICTIONARIES}
	${INSTALL_DATA} ${EDICT_DIR}/${f} ${GJITEN_DICS}
.endfor
.else
.for f in ${DICTIONARIES}
	${LOCALBASE}/bin/iconv -c -f EUC-JP -t UTF-8 ${EDICT_DIR}/${f} > ${GJITEN_DICS}/${f}
.endfor
.endif
	-@update-desktop-database

.include <bsd.port.mk>
OpenPOWER on IntegriCloud