summaryrefslogtreecommitdiff
path: root/x11/mlterm/Makefile
blob: 1f487fd7f55e974d1c12e0949e13a97d5c8e152d (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# New ports collection makefile for:	mlterm
# Date created:		9 December 2001
# Whom:			MANTANI Nobutaka <nobutaka@nobutaka.com>
#
# $FreeBSD$
#

PORTNAME=	mlterm
PORTVERSION=	2.9.4
PORTREVISION=	1
CATEGORIES=	x11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	nobutaka@FreeBSD.org
COMMENT=	Multilingual X11 terminal emulator

LIB_DEPENDS=	Xft.2:${PORTSDIR}/x11-fonts/libXft

USE_XORG=	sm
USE_GNOME=	gtk20 lthack
USE_AUTOTOOLS=	libtool:15
LIBTOOLFILES=	configure kiklib/configure mkf/configure
USE_PERL5_BUILD=yes
CONFIGURE_ARGS=	--with-imagelib=gdk-pixbuf --enable-utmp \
		--with-tools="mlclient,mlconfig,mlterm-menu,mlcc,w3mmlconfig" \
		--with-type-engines="xcore,xft"
CONFIGURE_ENV=	LIBS=-L${LOCALBASE}/lib CFLAGS=-I${LOCALBASE}/include

OPTIONS=	FRIBIDI	"Use Fribidi for BiDi rendering" off \
		UIM "uim support (experimental)" off \
		M17NLIB "m17n library support (experimental)" off \
		IIIMF "IIIMF support (experimental)" off \
		SCIM "SCIM support (experimental)" off

.include <bsd.port.pre.mk>

.if defined(WITH_FRIBIDI)
CONFIGURE_ARGS+=	--enable-fribidi
LIB_DEPENDS+=	fribidi.0:${PORTSDIR}/converters/fribidi
.else
CONFIGURE_ARGS+=	--disable-fribidi
.endif

.if defined(WITH_UIM)
CONFIGURE_ARGS+=	--enable-uim
MAKE_ENV=	LIBS_LOCAL=-L${LOCALBASE}/lib
LIB_DEPENDS+=	uim.6:${PORTSDIR}/textproc/uim
PLIST_SUB+=	UIM=""
.else
CONFIGURE_ARGS+=	--disable-uim
PLIST_SUB+=	UIM="@comment "
.endif

.if defined(WITH_M17NLIB)
CONFIGURE_ARGS+=	--enable-m17nlib
MAKE_ENV=	LIBS_LOCAL=-L${LOCALBASE}/lib
LIB_DEPENDS+=	m17n.3:${PORTSDIR}/devel/m17n-lib
PLIST_SUB+=	M17NLIB=""
.else
CONFIGURE_ARGS+=	--disable-m17nlib
PLIST_SUB+=	M17NLIB="@comment "
.endif

.if defined(WITH_IIIMF)
.if ${OSVERSION} < 500043
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-inputmethod:iiimf:im_iiimf.c
.endif

CONFIGURE_ARGS+=	--enable-iiimf
CONFIGURE_ENV=	LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" CFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/iiim"
LIB_DEPENDS+=	iiimcf.3:${PORTSDIR}/textproc/iiimf-client-lib
PLIST_SUB+=	IIIMF=""
.else
CONFIGURE_ARGS+=	--disable-iiimf
PLIST_SUB+=	IIIMF="@comment "
.endif

.if defined(WITH_SCIM)
CONFIGURE_ARGS+=	--enable-scim
MAKE_ENV=	LIBS_LOCAL=-L${LOCALBASE}/lib
LIB_DEPENDS+=	scim-1.0.10:${PORTSDIR}/textproc/scim
PLIST_SUB+=	SCIM=""
.else
CONFIGURE_ARGS+=	--disable-scim
PLIST_SUB+=	SCIM="@comment "
.endif

USE_LDCONFIG=	yes
USE_GETTEXT=	yes

MAN1=	mlterm.1 mlclient.1

post-patch:
	@${REINPLACE_CMD} -e "s,echo aout,echo elf,g" ${WRKSRC}/configure \
		${WRKSRC}/kiklib/configure ${WRKSRC}/mkf/configure

post-configure:
	@${CP} ${LIBTOOL} ${WRKSRC}
	@${REINPLACE_CMD} -e "s,@CGI_BIN@,${PREFIX}/libexec/w3mmlconfig," \
		${WRKSRC}/tool/w3mmlconfig/mlconfig.cgi

post-install:
	(cd ${WRKSRC}/tool/w3mmlconfig; ${MAKE} install)
.if !defined(NOPORTDOCS)
	${MKDIR} ${PREFIX}/share/doc/ja/mlterm
	${INSTALL_DATA} ${WRKSRC}/doc/ja/README.ja ${PREFIX}/share/doc/ja/mlterm
.endif

.include <bsd.port.post.mk>