summaryrefslogtreecommitdiff
path: root/japanese/chasen
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-03-02 05:18:27 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-03-02 05:18:27 +0000
commit2c29ff0bf71dcbd147d5922ed2f5df9b10784673 (patch)
tree03ff3f368d76ab86372107deda94c4cc157c54fb /japanese/chasen
parentAdd ipv6 category and bump PORTREVISION. (diff)
Install the library and the headers as well.
Approved by: kuriyama (MAINTAINER)
Notes
Notes: svn path=/head/; revision=38951
Diffstat (limited to 'japanese/chasen')
-rw-r--r--japanese/chasen/Makefile9
-rw-r--r--japanese/chasen/files/Makefile.lib32
-rw-r--r--japanese/chasen/files/patch-aa37
-rw-r--r--japanese/chasen/pkg-plist8
4 files changed, 82 insertions, 4 deletions
diff --git a/japanese/chasen/Makefile b/japanese/chasen/Makefile
index 9fa57d9a24b4..0cd09664fd25 100644
--- a/japanese/chasen/Makefile
+++ b/japanese/chasen/Makefile
@@ -8,6 +8,7 @@
PORTNAME= chasen
PORTVERSION= 2.02
+PORTREVISION= 1
CATEGORIES= japanese
MASTER_SITES= ftp://ftp.aist-nara.ac.jp/pub/lab/nlp/tools/chasen/
DISTNAME= ${PORTNAME}-sys${PORTVERSION}-ipadic2.1
@@ -19,9 +20,11 @@ USE_PERL5= YES
MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
MAN3= Text::ChaSen.3
-WRKSRC= ${WRKDIR}/chasen-2.02
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+INSTALLS_SHLIB= yes
-do-configure:
+post-patch:
+ ${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}/lib/Makefile
post-build:
@${ECHO_MSG} "Making dictionaries"
@@ -33,5 +36,7 @@ post-build:
post-install:
@cd ${WRKSRC}/perl; ${SETENV} ${MAKE_ENV} ${MAKE} install
+ ${MKDIR} ${PREFIX}/include/chasen
+ @cd ${WRKSRC}/lib; ${SETENV} ${MAKE_ENV} ${MAKE} install
.include <bsd.port.mk>
diff --git a/japanese/chasen/files/Makefile.lib b/japanese/chasen/files/Makefile.lib
new file mode 100644
index 000000000000..b3e41cd1996e
--- /dev/null
+++ b/japanese/chasen/files/Makefile.lib
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+LIB= chasen
+SHLIB_MAJOR?= 0
+SHLIB_MINOR?= 0
+SRCS= connect.c getid.c grammar.c iotool.c katuyou.c zentohan.c lisp.c \
+ chalib.c parse.c init.c print.c \
+ pat.c patfile.c \
+ chfile.c select.c \
+ jfgets.c getopt.c
+INCS= chadic.h chalib.h pat.h sufary.h
+
+NOMAN= YES
+LIBDIR= ${LOCALBASE}/lib
+INCDIR= ${LOCALBASE}/include/chasen
+
+.include <bsd.lib.mk>
+
+# For FreeBSD 3.x or older
+.if !target(_includeinstall)
+_includeinstall:
+.if defined(INCS)
+.for header in ${INCS}
+ cd ${.CURDIR} && \
+ ${INSTALL} -C -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} \
+ ${header} ${DESTDIR}${INCDIR}
+
+.endfor
+.endif
+
+beforeinstall: _includeinstall
+.endif
diff --git a/japanese/chasen/files/patch-aa b/japanese/chasen/files/patch-aa
index 6904f729e55c..a1cfde037740 100644
--- a/japanese/chasen/files/patch-aa
+++ b/japanese/chasen/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile~ Wed Dec 29 01:12:01 1999
-+++ Makefile Sun Feb 27 00:10:30 2000
+--- Makefile.orig Wed Dec 29 01:12:01 1999
++++ Makefile Thu Mar 1 18:12:40 2001
@@ -9,8 +9,8 @@
#
@@ -22,3 +22,36 @@
MKDICDIR = $(LIBDIR)/mkchadic
DICDIR = $(LIBDIR)/dic
+@@ -42,7 +42,7 @@
+ SHELL = /bin/sh
+ DEFS = $(KOCHA) $(VGRAM) $(SJIS) $(NO_MMAP)
+ MAKE = make
+-MFLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" RM="$(RM)" \
++MFLAGS = CC="$(CC)" CFLAGS="$(CFLAGS) $(DEFS)" LDFLAGS="$(LDFLAGS)" RM="$(RM)" \
+ YACC="$(YACC)" CHASEN="$(CHASEN)" CCOUT="$(CCOUT)" \
+ NETLIBS="$(NETLIBS)" CHASEN_PORT="$(CHASEN_PORT)" \
+ RANLIB="$(RANLIB)"
+@@ -74,17 +74,17 @@
+ $(MAKE) VGRAM=
+
+ chasen::
+- cd lib; $(MAKE) $(MFLAGS) DEFS="$(DEFS)"
+- cd mkchadic; $(MAKE) $(MFLAGS) DEFS="$(DEFS)"
+- cd chasen; $(MAKE) $(MFLAGS) DEFS="$(DEFS)"
++ cd lib; $(MAKE) $(MFLAGS)
++ cd mkchadic; $(MAKE) $(MFLAGS)
++ cd chasen; $(MAKE) $(MFLAGS)
+
+ chasen.win::
+ cd lib
+- $(MAKE) $(MFLAGS) DEFS="$(DEFS)" win
++ $(MAKE) $(MFLAGS) win
+ cd ..\mkchadic
+- $(MAKE) $(MFLAGS) DEFS="$(DEFS)" win
++ $(MAKE) $(MFLAGS) win
+ cd ..\chasen
+- $(MAKE) $(MFLAGS) DEFS="$(DEFS)" win
++ $(MAKE) $(MFLAGS) win
+ cd ..
+
+ dic::
diff --git a/japanese/chasen/pkg-plist b/japanese/chasen/pkg-plist
index f56e2b6f9e64..a7bea876ebc3 100644
--- a/japanese/chasen/pkg-plist
+++ b/japanese/chasen/pkg-plist
@@ -1,5 +1,13 @@
@comment $NetBSD: PLIST,v 1.2 1999/06/07 09:54:39 sakamoto Exp $
bin/chasen
+include/chasen/chadic.h
+include/chasen/chalib.h
+include/chasen/pat.h
+include/chasen/sufary.h
+@dirrm include/chasen
+lib/libchasen.a
+lib/libchasen.so
+lib/libchasen.so.0
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Text/ChaSen.pm
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Text/ChaSen/.packlist
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Text/ChaSen/ChaSen.bs