aboutsummaryrefslogtreecommitdiff
path: root/japanese/jvim3
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2014-03-14 14:38:50 +0000
committerHiroki Sato <hrs@FreeBSD.org>2014-03-14 14:38:50 +0000
commitec04db7b67379fd7b70331d42f169c48bfc52b73 (patch)
tree00f3b1e962607a17328a5c8ff2f80e5d5461c572 /japanese/jvim3
parentaa7e15f7d5555bcc558e32fce48f577ffd3f820e (diff)
downloadports-ec04db7b67379fd7b70331d42f169c48bfc52b73.tar.gz
ports-ec04db7b67379fd7b70331d42f169c48bfc52b73.zip
Notes
Diffstat (limited to 'japanese/jvim3')
-rw-r--r--japanese/jvim3/Makefile67
-rw-r--r--japanese/jvim3/files/patch-src-makjunix.mak17
-rw-r--r--japanese/jvim3/files/patch-src-unix.h11
-rw-r--r--japanese/jvim3/pkg-plist2
4 files changed, 50 insertions, 47 deletions
diff --git a/japanese/jvim3/Makefile b/japanese/jvim3/Makefile
index 9bbdc2ea04ad..0e50da5cd81c 100644
--- a/japanese/jvim3/Makefile
+++ b/japanese/jvim3/Makefile
@@ -3,6 +3,7 @@
PORTNAME= jvim
PORTVERSION= 3.0.j2.1b
+PORTREVISION= 1
CATEGORIES= japanese editors
MASTER_SITES= ftp://ftp.vim.org/pub/vim/unix/ \
http://hp.vector.co.jp/authors/VA003457/vim/vim3/2.1b/
@@ -11,8 +12,6 @@ DISTFILES= vim-3.0.tar.gz jvim.2.1b.tar.gz
MAINTAINER= hrs@FreeBSD.org
COMMENT= Japanized Vim-3.0
-BROKEN= Fails to install
-
EXTRA_PATCHES= ${WRKDIR}/${PORTNAME}.diff
WRKSRC= ${WRKDIR}/vim
BUILD_WRKSRC= ${WRKSRC}/src
@@ -25,53 +24,48 @@ MAKE_ARGS= FEPOPT='${FEPOPT}' \
FEPOBJS="${FEPOBJS}" \
LIBS="${LIBS}"
-MAN1= jvim3.1
-
OPTIONS_DEFINE= X11
-OPTIONS_DEFAULT=X11 FREEWNN
+OPTIONS_DEFAULT=X11 FREEWNN_CANNA
OPTIONS_RADIO= FEP
-OPTIONS_RADIO_FEP= CANNA DIRECT_CANNA WNN6 WNN7 FREEWNN
+OPTIONS_RADIO_FEP= FREEWNN_CANNA DIRECT_CANNA WNN6 WNN7
FEP_DESC= Japanese FrontEnd Processor
-CANNA_DESC= Canna support (via ONEW library)
DIRECT_CANNA_DESC= Canna support (direct)
-FREEWNN_DESC= FreeWnn support (via ONEW library)
+FREEWNN_CANNA_DESC= Canna and FreeWnn support (via ONEW library)
WNN6_DESC= Wnn6 support
WNN7_DESC= Wnn7 support
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
CPPFLAGS+= -DBSD_UNIX -DUSE_LOCALE
LIBS= -ltermlib -L${PREFIX}/lib
-NO_STAGE= yes
+X11_USE= XORG=x11
+X11_CPPFLAGS+= -DUSE_X11 -I${LOCALBASE}/include
+
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MX11}
-USE_XORG= x11
-CPPFLAGS+= -DUSE_X11 -I${LOCALBASE}/include
-LIBS+= -L${LOCALBASE}/lib -lX11
+LIBS+= -lX11 -L${LOCALBASE}/lib
.endif
.if ${PORT_OPTIONS:MDIRECT_CANNA} || \
- ${PORT_OPTIONS:MCANNA} || \
- ${PORT_OPTIONS:MFREEWNN} || \
+ ${PORT_OPTIONS:MFREEWNN_CANNA} || \
${PORT_OPTIONS:MWNN6} || \
${PORT_OPTIONS:MWNN7}
FEPOPT+= -DJP_DEF=\"EEE\" -DFEPCTRL
.endif
# Direct connection to Canna
+DIRECT_CANNA_LIB_DEPENDS+= libcanna.so:${PORTSDIR}/japanese/canna-lib
.if ${PORT_OPTIONS:MDIRECT_CANNA}
-LIB_DEPENDS+= canna.1:${PORTSDIR}/japanese/canna-lib
FEPOPT+= -DCANNA
FEPLIBS= -lcanna -L${LOCALBASE}/lib
FEPOBJS= fepcanna.o
JVIM3RC= "set fepctrl"
.endif
-.if ${PORT_OPTIONS:MFREEWNN} || \
+.if ${PORT_OPTIONS:MFREEWNN_CANNA} || \
${PORT_OPTIONS:MWNN6} || \
${PORT_OPTIONS:MWNN7} || \
${PORT_OPTIONS:MCANNA}
@@ -81,27 +75,22 @@ JVIM3RC= "set fepctrl onewredraw"
.endif
# Connection by using ONEW library
-.if ${PORT_OPTIONS:MCANNA}
-LIB_DEPENDS+= canna.1:${PORTSDIR}/japanese/canna-lib
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libonew-canna.a:${PORTSDIR}/japanese/onew
-FEPLIBS+= -lonew-canna -lcanna
-.endif
-
-.if ${PORT_OPTIONS:MFREEWNN}
-LIB_DEPENDS+= jd.0:${PORTSDIR}/japanese/FreeWnn-lib
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libonew-freewnn.a:${PORTSDIR}/japanese/onew
-FEPLIBS+= -lonew-freewnn -ljd -lcrypt
+FREEWNN_CANNA_LIB_DEPENDS= libjd.so:${PORTSDIR}/japanese/FreeWnn-lib \
+ libcanna.so:${PORTSDIR}/japanese/canna-lib
+FREEWNN_CANNA_BUILD_DEPENDS= ${LOCALBASE}/lib/libonew-canna+freewnn.a:${PORTSDIR}/japanese/onew
+.if ${PORT_OPTIONS:MFREEWNN_CANNA}
+FEPLIBS+= -lonew-canna+freewnn -lcanna -ljd -lcrypt
.endif
+WNN6_LIB_DEPENDS= libjd.so:${PORTSDIR}/japanese/FreeWnn-lib
+WNN6_BUILD_DEPENDS= ${LOCALBASE}/lib/libonew-wnn6.a:${PORTSDIR}/japanese/onew
.if ${PORT_OPTIONS:MWNN6}
-LIB_DEPENDS+= jd.0:${PORTSDIR}/japanese/FreeWnn-lib
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libonew-wnn6.a:${PORTSDIR}/japanese/onew
FEPLIBS+= -lonew-wnn6 -ljd -lcrypt
.endif
+WNN7_LIB_DEPENDS= libjd.so:${PORTSDIR}/japanese/FreeWnn-lib
+WNN7_BUILD_DEPENDS= ${LOCALBASE}/lib/libonew-wnn7.a:${PORTSDIR}/japanese/onew
.if ${PORT_OPTIONS:MWNN7}
-LIB_DEPENDS+= jd.0:${PORTSDIR}/japanese/FreeWnn-lib
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libonew-wnn7.a:${PORTSDIR}/japanese/onew
FEPLIBS+= -lonew-wnn7 -ljd -lcrypt
.endif
@@ -109,16 +98,12 @@ 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
+ ${LN} -sf jvim3 ${STAGEDIR}${PREFIX}/bin/jvim
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/grep/grep \
+ ${STAGEDIR}${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 ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- cd ${WRKSRC}/doc.j && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
-.endif
+ ${INSTALL_DATA} ${WRKSRC}/jvim3rc.dist ${STAGEDIR}${PREFIX}/etc/
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/doc.j && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/japanese/jvim3/files/patch-src-makjunix.mak b/japanese/jvim3/files/patch-src-makjunix.mak
index 6b4473df0e9a..04b60f200fda 100644
--- a/japanese/jvim3/files/patch-src-makjunix.mak
+++ b/japanese/jvim3/files/patch-src-makjunix.mak
@@ -1,6 +1,6 @@
---- src/makjunix.mak.orig 2013-05-04 03:51:13.000000000 +0900
-+++ src/makjunix.mak 2013-05-04 03:52:09.000000000 +0900
-@@ -72,16 +72,17 @@
+--- src/makjunix.mak.orig 2014-03-14 23:13:33.000000000 +0900
++++ src/makjunix.mak 2014-03-14 23:20:30.000000000 +0900
+@@ -72,19 +72,20 @@
### Prefix for location of files
@@ -8,7 +8,8 @@
+PREFIX?= /usr/local
### Location of binary
- BINLOC = $(PREFIX)/bin
+-BINLOC = $(PREFIX)/bin
++BINLOC = $(DESTDIR)$(PREFIX)/bin
### Name of target
-TARGET = vim
@@ -17,10 +18,14 @@
### Location of man page
-MANLOC = $(PREFIX)/man/man1
+MAN1PREFIX?= ${PREFIX}
-+MANLOC = $(MAN1PREFIX)/man/man1
++MANLOC = $(DESTDIR)$(MAN1PREFIX)/man/man1
### Location of help file
- HELPLOC = $(PREFIX)/lib
+-HELPLOC = $(PREFIX)/lib
++HELPLOC = $(DESTDIR)$(PREFIX)/lib
+
+ ### Program to run on installed binary
+ STRIP = strip
@@ -100,7 +101,7 @@
MANFILE = ../doc/vim.1
diff --git a/japanese/jvim3/files/patch-src-unix.h b/japanese/jvim3/files/patch-src-unix.h
new file mode 100644
index 000000000000..6dccd0ee3a14
--- /dev/null
+++ b/japanese/jvim3/files/patch-src-unix.h
@@ -0,0 +1,11 @@
+--- src/unix.h.orig 2013-09-05 04:16:52.000000000 +0900
++++ src/unix.h 2013-09-05 04:18:11.000000000 +0900
+@@ -104,7 +104,7 @@
+ # define strrchr(ptr, c) rindex((ptr), (c))
+ #endif
+
+-#if defined(BSD_UNIX) && !defined(__bsdi__) && !defined(linux) && !defined(__GNU__)
++#if defined(BSD_UNIX) && !defined(__FreeBSD__) && !defined(__bsdi__) && !defined(linux) && !defined(__GNU__)
+ # define memset(ptr, c, size) bsdmemset((ptr), (c), (size))
+ char *bsdmemset __ARGS((char *, int, long));
+ #endif
diff --git a/japanese/jvim3/pkg-plist b/japanese/jvim3/pkg-plist
index 60512d877771..93fadca8bd52 100644
--- a/japanese/jvim3/pkg-plist
+++ b/japanese/jvim3/pkg-plist
@@ -1,7 +1,9 @@
+@comment $FreeBSD$
bin/jvim
bin/jvim3
bin/jgrep
lib/jvim3.hlp
+man/man1/jvim3.1.gz
@unexec if cmp -s %D/etc/jvim3rc %D/etc/jvim3rc.dist; then rm -f %D/etc/jvim3rc; fi
etc/jvim3rc.dist
@exec if [ ! -f %D/etc/jvim3rc ]; then cp %D/etc/jvim3rc.dist %D/etc/jvim3rc; fi