summaryrefslogtreecommitdiff
path: root/japanese/jvim3/Makefile
blob: a80eaf213b51278dcf05b9d5d2e611364b463367 (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
111
112
113
114
115
116
117
118
119
120
121
122
# New ports collection makefile for:    jvim3
# Date created:         98/11/17
# Whom:                 Satoshi TAOKA <taoka@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	jvim
PORTVERSION=	3.0.j2.1a
PORTREVISION=	4
CATEGORIES=	japanese editors
MASTER_SITES=	ftp://ftp.vim.org/pub/vim/unix/ \
		http://hp.vector.co.jp/authors/VA003457/vim/vim3/2.1a/
DISTFILES=	vim-3.0.tar.gz jvim.2.1a.tar.gz

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Japanized Vim-3.0

EXTRA_PATCHES=	${WRKDIR}/${PORTNAME}.diff
WRKSRC=		${WRKDIR}/vim
BUILD_WRKSRC=	${WRKSRC}/src
INSTALL_WRKSRC=	${WRKSRC}/src
MAKEFILE=	makjunix.mak
ALL_TARGET=	# empty
PLIST_SUB=	VERSION=${PORTVERSION}
MAKE_ARGS=	FEPOPT='${FEPOPT}' \
		FEPLIBS="${FEPLIBS}" \
		FEPOBJS="${FEPOBJS}" \
		MACHINE="${MACHINE}" \
		CC="${CC}" \
		LIBS="${LIBS}"

MAN1=		jvim3.1

OPTIONS=	X11	"X11 support"				on \
		CANNA	"Canna support (via ONEW library)"	on \
		DIRECT_CANNA	"Canna support (direct)"	off \
		FREEWNN	"FreeWnn support (via ONEW library)"	on \
		WNN6	"Wnn6 support"				off \
		WNN7	"Wnn7 support"				off

PORTDOCS=	cygwin.txt differen.doc fepctrl.doc readme.doc \
		termcap.dos uganda.jp vim-jp.htm vim32.ini tutor.j

# -DUSE_X11 is the cause of a problem treating Japanese
MACHINE=	-DBSD_UNIX -DUSE_LOCALE
LIBS=		-ltermlib -L${PREFIX}/lib

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_X11)
USE_XORG=	x11
MACHINE+=	-DUSE_X11
CC+=		-I${LOCALBASE}/include
LIBS+=		-L${LOCALBASE}/lib -lX11
.endif

#  Direct connection to Canna
.if !defined(WITHOUT_DIRECT_CANNA)
INPUT_METHOD+=	direct_canna
LIB_DEPENDS+=	canna.1:${PORTSDIR}/japanese/canna-lib
FEPOPT+=	-DJP_DEF=\"EEE\" -DCANNA -DFEPCTRL
FEPLIBS=	-lcanna
FEPOBJS=	fepcanna.o
JVIM3RC=	"set fepctrl"
.else # !WITHOUT_DIRECT_CANNA

# Connection by using ONEW library
.if !defined(WITHOUT_CANNA)
INPUT_METHOD+=	canna
LIB_DEPENDS+=	canna.1:${PORTSDIR}/japanese/canna-lib
FEPLIBS+=	-L${LOCALBASE}/lib -lonew-canna -lcanna
FEPOPT+=	-DJP_DEF=\"EEE\" -DONEW -DFEPCTRL
FEPOBJS=	feponew.o
JVIM3RC=	"set fepctrl onewredraw"
.endif

.if !defined(WITHOUT_FREEWNN)
LIB_DEPENDS+=	jd.0:${PORTSDIR}/japanese/FreeWnn-lib
BUILD_DEPENDS+=	${LOCALBASE}/lib/libonew-freewnn.a:${PORTSDIR}/japanese/onew
FEPLIBS+=	-L${LOCALBASE}/lib -lonew-freewnn -ljd -lcrypt
FEPOPT+=	-DJP_DEF=\"EEE\" -DONEW -DFEPCTRL
FEPOBJS=	feponew.o
JVIM3RC=	"set fepctrl onewredraw"
.endif

.if !defined(WITHOUT_WNN6)
LIB_DEPENDS+=	jd.0:${PORTSDIR}/japanese/FreeWnn-lib
BUILD_DEPENDS+=	${LOCALBASE}/lib/libonew-wnn6.a:${PORTSDIR}/japanese/onew
FEPLIBS+=	-L${LOCALBASE}/lib -lonew-wnn6 -ljd -lcrypt
FEPOPT+=	-DJP_DEF=\"EEE\" -DONEW -DFEPCTRL
FEPOBJS=	feponew.o
JVIM3RC=	"set fepctrl onewredraw"
.endif

.if !defined(WITHOUT_WNN7)
LIB_DEPENDS+=	jd.0:${PORTSDIR}/japanese/FreeWnn-lib
BUILD_DEPENDS+=	${LOCALBASE}/lib/libonew-wnn7.a:${PORTSDIR}/japanese/onew
FEPLIBS+=	-L${LOCALBASE}/lib -lonew-wnn7 -ljd -lcrypt
FEPOPT+=	-DJP_DEF=\"EEE\" -DONEW -DFEPCTRL
FEPOBJS=	feponew.o
JVIM3RC=	"set fepctrl onewredraw"
.endif
.endif # !WITHOUT_DIRECT_CANNA

post-build:
	${CP} ${WRKSRC}/doc.j/tutor/tutor.j ${WRKSRC}/doc.j

post-install:
	${LN} -sf ${PREFIX}/bin/jvim3 ${PREFIX}/bin/jvim
	${INSTALL_PROGRAM} ${WRKSRC}/src/grep/grep ${PREFIX}/bin/jgrep
	${ECHO_CMD} "${JVIM3RC}" > ${WRKSRC}/jvim3rc.dist
	${INSTALL_DATA} ${WRKSRC}/jvim3rc.dist ${PREFIX}/etc/
.if !exists(${PREFIX}/etc/jvim3rc)
	${INSTALL_DATA} ${PREFIX}/etc/jvim3rc.dist ${PREFIX}/etc/jvim3rc
.endif
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	cd ${WRKSRC}/doc.j && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif

.include <bsd.port.post.mk>