summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2013-05-22 13:14:29 +0000
committerobache <obache@pkgsrc.org>2013-05-22 13:14:29 +0000
commitfd9740bafcf5ba9a509c587c74d205fc356afcde (patch)
tree2e396e5f68460a7589763fa580bf664fe5975fb4
parentf6822b24768cc7d7ec7d95a25966c9347ff23b0a (diff)
downloadpkgsrc-fd9740bafcf5ba9a509c587c74d205fc356afcde.tar.gz
Update cabocha to 0.66.
ChaSen is not supported anymore, using MeCab. and use CRF++ instead of YamCha.
-rw-r--r--textproc/cabocha/Makefile21
-rw-r--r--textproc/cabocha/Makefile.common11
-rw-r--r--textproc/cabocha/PLIST29
-rw-r--r--textproc/cabocha/buildlink3.mk7
-rw-r--r--textproc/cabocha/distinfo13
-rw-r--r--textproc/cabocha/hacks.mk15
-rw-r--r--textproc/cabocha/options.mk19
-rw-r--r--textproc/cabocha/patches/patch-aa27
-rw-r--r--textproc/cabocha/patches/patch-ab24
-rw-r--r--textproc/cabocha/patches/patch-configure20
-rw-r--r--textproc/cabocha/patches/patch-src_cabocha.h32
-rw-r--r--textproc/cabocha/patches/patch-src_common.h14
-rw-r--r--textproc/p5-cabocha/Makefile3
-rw-r--r--textproc/py-cabocha/Makefile3
-rw-r--r--textproc/ruby-cabocha/Makefile13
15 files changed, 54 insertions, 197 deletions
diff --git a/textproc/cabocha/Makefile b/textproc/cabocha/Makefile
index f666611cf82..2a2a2663161 100644
--- a/textproc/cabocha/Makefile
+++ b/textproc/cabocha/Makefile
@@ -1,18 +1,16 @@
-# $NetBSD: Makefile,v 1.3 2012/10/25 06:55:43 asau Exp $
+# $NetBSD: Makefile,v 1.4 2013/05/22 13:14:29 obache Exp $
#
.include "Makefile.common"
COMMENT= Yet another Japanese Dependency Structure Analyzer
-PKGREVISION= 1
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_LANGUAGES= c c++
-USE_TOOLS+= gmake perl:run gzcat
+USE_TOOLS+= gmake
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+= --with-perl=${PERL5:Q}
INSTALL_MAKE_FLAGS+= confdir=${PREFIX}/share/examples
@@ -20,15 +18,8 @@ CONF_FILES= share/examples/cabocharc ${PKG_SYSCONFDIR}/cabocharc
TEST_TARGET= check
-BUILD_DEPENDS+= nkf-[0-9]*:../../converters/nkf
-
-# using zcat to extract .gz
-SUBST_CLASSES+= zcat
-SUBST_STAGE.zcat= post-configure
-SUBST_FILES.zcat= model/Makefile
-SUBST_SED.zcat= -e 's|zcat|${TOOLS_CMDLINE_GZCAT}|g'
-
-.include "options.mk"
-
-.include "../../textproc/yamcha/buildlink3.mk"
+BUILDLINK_API_DEPENDS.crfpp+= CRF++>=0.55
+.include "../../textproc/CRF++/buildlink3.mk"
+BUILDLINK_API_DEPENDS.mecab+= mecab>=0.993
+.include "../../textproc/mecab/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/cabocha/Makefile.common b/textproc/cabocha/Makefile.common
index 0b47ef21d21..2c804ca00aa 100644
--- a/textproc/cabocha/Makefile.common
+++ b/textproc/cabocha/Makefile.common
@@ -1,15 +1,16 @@
-# $NetBSD: Makefile.common,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+# $NetBSD: Makefile.common,v 1.2 2013/05/22 13:14:29 obache Exp $
# used by textproc/p5-cabocha/Makefile
# used by textproc/py-cabocha/Makefile
# used by textproc/ruby-cabocha/Makefile
-DISTNAME= cabocha-0.53
+DISTNAME= cabocha-0.66
CATEGORIES= textproc
-MASTER_SITES= http://www.chasen.org/~taku/software/cabocha/src/
+MASTER_SITES= http://cabocha.googlecode.com/files/
+EXTRACT_SUFX= .tar.bz2
DISTINFO_FILE= ${.CURDIR}/../../textproc/cabocha/distinfo
PATCHDIR= ${.CURDIR}/../../textproc/cabocha/patches
MAINTAINER= obache@NetBSD.org
-HOMEPAGE= http://www.chasen.org/~taku/software/cabocha/
-LICENSE= gnu-lgpl-v2.1
+HOMEPAGE= http://code.google.com/p/cabocha/
+LICENSE= modified-bsd
diff --git a/textproc/cabocha/PLIST b/textproc/cabocha/PLIST
index f9edc1c8a6d..643845a2acf 100644
--- a/textproc/cabocha/PLIST
+++ b/textproc/cabocha/PLIST
@@ -1,19 +1,22 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+@comment $NetBSD: PLIST,v 1.2 2013/05/22 13:14:29 obache Exp $
bin/cabocha
bin/cabocha-config
include/cabocha.h
-lib/cabocha/model/CRL-IREX-ne.model
-lib/cabocha/model/CRL-IREX-ne.txtmodel.gz
-lib/cabocha/model/IPA-chunker.model
-lib/cabocha/model/IPA-chunker.txtmodel.gz
-lib/cabocha/model/IPA-dep-A+P.model
-lib/cabocha/model/IPA-dep-A+P.txtmodel.gz
-lib/cabocha/model/IPA-dep.model
-lib/cabocha/model/IPA-dep.txtmodel.gz
+lib/cabocha/model/chunk.ipa.model
+lib/cabocha/model/chunk.juman.model
+lib/cabocha/model/chunk.unidic.model
+lib/cabocha/model/dep-tournament.ipa.model
+lib/cabocha/model/dep-tournament.juman.model
+lib/cabocha/model/dep-tournament.unidic.model
+lib/cabocha/model/dep.ipa.model
+lib/cabocha/model/dep.juman.model
+lib/cabocha/model/dep.unidic.model
+lib/cabocha/model/ne.ipa.model
+lib/cabocha/model/ne.juman.model
+lib/cabocha/model/ne.unidic.model
lib/libcabocha.la
-libexec/cabocha/KyotoCorpus.pm
-libexec/cabocha/Makefile
-libexec/cabocha/kc2cabocha.pl
-libexec/cabocha/kc2juman.pl
+libexec/cabocha/cabocha-learn
+libexec/cabocha/cabocha-model-index
+libexec/cabocha/cabocha-system-eval
man/man1/cabocha.1
share/examples/cabocharc
diff --git a/textproc/cabocha/buildlink3.mk b/textproc/cabocha/buildlink3.mk
index 606af77d1df..dfff19801e7 100644
--- a/textproc/cabocha/buildlink3.mk
+++ b/textproc/cabocha/buildlink3.mk
@@ -1,14 +1,15 @@
-# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2013/05/22 13:14:29 obache Exp $
BUILDLINK_TREE+= cabocha
.if !defined(CABOCHA_BUILDLINK3_MK)
CABOCHA_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.cabocha+= cabocha>=0.53
+BUILDLINK_API_DEPENDS.cabocha+= cabocha>=0.66
BUILDLINK_PKGSRCDIR.cabocha?= ../../textproc/cabocha
-.include "../../textproc/yamcha/buildlink3.mk"
+.include "../../textproc/CRF++/buildlink3.mk"
+.include "../../textproc/mecab/buildlink3.mk"
.endif # CABOCHA_BUILDLINK3_MK
BUILDLINK_TREE+= -cabocha
diff --git a/textproc/cabocha/distinfo b/textproc/cabocha/distinfo
index ce1363ed006..cc24887ee29 100644
--- a/textproc/cabocha/distinfo
+++ b/textproc/cabocha/distinfo
@@ -1,10 +1,5 @@
-$NetBSD: distinfo,v 1.5 2013/05/09 15:07:58 joerg Exp $
+$NetBSD: distinfo,v 1.6 2013/05/22 13:14:29 obache Exp $
-SHA1 (cabocha-0.53.tar.gz) = 6b8903aa6843887bb669d9d5baea8a0eae320d80
-RMD160 (cabocha-0.53.tar.gz) = 39b637adc8b882542ecc3b6df34d8f6b99be3e38
-Size (cabocha-0.53.tar.gz) = 11552551 bytes
-SHA1 (patch-aa) = cb868fa8b88180ed5f84d55796d042e5774862af
-SHA1 (patch-ab) = 3dcaae627c12a8ffc3595177768445335c5a3bd4
-SHA1 (patch-configure) = be6ea41b105f3d4c78b240cfc2ec8de6b604713f
-SHA1 (patch-src_cabocha.h) = 85bbf0da32677b7d4a33f1ef8d9aa7915fa1da1f
-SHA1 (patch-src_common.h) = 33a84611497ff0d98a6d9d9abaf0cd3ff60c3a83
+SHA1 (cabocha-0.66.tar.bz2) = 33172b7973239a53d98eabbd309f70d88e36c94c
+RMD160 (cabocha-0.66.tar.bz2) = 23bd1ac45ca9a065c91f223542f61ddf18d97dfd
+Size (cabocha-0.66.tar.bz2) = 111166592 bytes
diff --git a/textproc/cabocha/hacks.mk b/textproc/cabocha/hacks.mk
new file mode 100644
index 00000000000..19339f7badc
--- /dev/null
+++ b/textproc/cabocha/hacks.mk
@@ -0,0 +1,15 @@
+# $NetBSD: hacks.mk,v 1.1 2013/05/22 13:14:29 obache Exp $
+
+.if !defined(CABOCHA_HACKS_MK)
+CABOCHA_HACKS_MK= # defined
+
+# No TLS support on NetBSD<6
+.if !empty(MACHINE_PLATFORM:MNetBSD-[0-5].*-*)
+PKG_HACKS+= netbsd5-disable_tls
+SUBST_CLASSES+= disable_tls
+SUBST_STAGE.disable_tls= pre-configure
+SUBST_FILES.disable_tls= configure
+SUBST_SED.disable_tls= -e 's/enable_tls=yes/enable_tls=no/'
+.endif
+
+.endif
diff --git a/textproc/cabocha/options.mk b/textproc/cabocha/options.mk
deleted file mode 100644
index 1bf3fb254e6..00000000000
--- a/textproc/cabocha/options.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# $NetBSD: options.mk,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
-#
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.cabocha
-PKG_OPTIONS_NONEMPTY_SETS= ma
-PKG_OPTIONS_SET.ma= chasen mecab
-PKG_SUGGESTED_OPTIONS= chasen
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mchasen)
-CONFIGURE_ARGS+= --with-morphological-analyzer=chasen
-.include "../../textproc/chasen/buildlink3.mk"
-.endif
-
-.if !empty(PKG_OPTIONS:Mmecab)
-CONFIGURE_ARGS+= --with-morphological-analyzer=mecab
-.include "../../textproc/mecab/buildlink3.mk"
-.endif
diff --git a/textproc/cabocha/patches/patch-aa b/textproc/cabocha/patches/patch-aa
deleted file mode 100644
index 7434f39d861..00000000000
--- a/textproc/cabocha/patches/patch-aa
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2010/05/19 12:16:25 obache Exp $
-
---- python/CaboCha_wrap.cxx.orig 2005-07-21 13:31:23.000000000 +0000
-+++ python/CaboCha_wrap.cxx
-@@ -1206,7 +1206,7 @@ type_error:
- obj = pyobj;
- if (PyCFunction_Check(obj)) {
- /* here we get the method pointer for callbacks */
-- char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
-+ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
- c = doc ? strstr(doc, "swig_ptr: ") : 0;
- if (c) {
- c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
-@@ -3260,11 +3260,11 @@ extern "C" {
- swig_type_info **types_initial) {
- size_t i;
- for (i = 0; methods[i].ml_name; ++i) {
-- char *c = methods[i].ml_doc;
-+ const char *c = methods[i].ml_doc;
- if (c && (c = strstr(c, "swig_ptr: "))) {
- int j;
- swig_const_info *ci = 0;
-- char *name = c + 10;
-+ const char *name = c + 10;
- for (j = 0; const_table[j].type; ++j) {
- if (strncmp(const_table[j].name, name,
- strlen(const_table[j].name)) == 0) {
diff --git a/textproc/cabocha/patches/patch-ab b/textproc/cabocha/patches/patch-ab
deleted file mode 100644
index 01b77bc605c..00000000000
--- a/textproc/cabocha/patches/patch-ab
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2010/09/12 01:59:39 taca Exp $
-
-Use modern Ruby's API.
-
---- swig/arg.i.orig 2002-11-10 19:02:39.000000000 +0000
-+++ swig/arg.i
-@@ -95,7 +95,7 @@
- if (TYPE($input) != T_ARRAY) {
- SWIG_exception(SWIG_ValueError, "Expected an array");
- }
-- $1 = RARRAY($input)->len;
-+ $1 = RARRAY_LEN($input);
- if ($1 == 0) {
- SWIG_exception(SWIG_ValueError, "List must contain at least 1 element");
- }
-@@ -106,7 +106,7 @@
- delete [] $2;
- SWIG_exception(SWIG_ValueError, "List items must be strings");
- }
-- $2[i] = STR2CSTR(s);
-+ $2[i] = StringValuePtr(s);
- }
- $2[i] = 0;
- }
diff --git a/textproc/cabocha/patches/patch-configure b/textproc/cabocha/patches/patch-configure
deleted file mode 100644
index dce95a226be..00000000000
--- a/textproc/cabocha/patches/patch-configure
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-configure,v 1.1 2013/05/09 15:07:59 joerg Exp $
-
---- configure.orig 2013-05-09 15:00:15.000000000 +0000
-+++ configure
-@@ -20635,6 +20635,7 @@ CABOCHA_DEFAULT_RC="$sysconfdir/cabochar
- CABOCHA_TXTMODEL_LIST=`(cd model; echo *.txtmodel.gz)`
- CABOCHA_MODEL_LIST=`(cd model; echo *.txtmodel.gz | sed s/.txtmodel.gz/.model/g)`
-
-+if false; then
- echo "$as_me:$LINENO: checking for main in -lstdc++" >&5
- echo $ECHO_N "checking for main in -lstdc++... $ECHO_C" >&6
- if test "${ac_cv_lib_stdcpp_main+set}" = set; then
-@@ -20696,6 +20697,7 @@ echo "${ECHO_T}$ac_cv_lib_stdcpp_main" >
- if test $ac_cv_lib_stdcpp_main = yes; then
- STDCPP_LIBS="-lstdc++"
- fi
-+fi
-
- LIBS="$YAMCHA_LIBS $STDCPP_LIBS $LIBS"
- CABOCHA_LIBS="$LIBS"
diff --git a/textproc/cabocha/patches/patch-src_cabocha.h b/textproc/cabocha/patches/patch-src_cabocha.h
deleted file mode 100644
index dd7c30a909c..00000000000
--- a/textproc/cabocha/patches/patch-src_cabocha.h
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-src_cabocha.h,v 1.1 2012/04/22 20:31:30 joerg Exp $
-
-Do not include C++ headers in a extern "C" block.
-
---- src/cabocha.h.orig 2012-04-20 16:25:56.000000000 +0000
-+++ src/cabocha.h
-@@ -24,12 +24,6 @@
- #ifndef _CABOCHA_CABOCHA_H
- #define _CABOCHA_CABOCHA_H
-
--#ifdef __cplusplus
--
--/* for C */
--extern "C" {
--#endif
--
- #ifdef _WIN32
- # ifdef DLL_EXPORT
- # define CABOCHA_DLL_EXTERN __declspec(dllexport)
-@@ -50,6 +44,12 @@ extern "C" {
- #include <string.h>
- #endif
-
-+#ifdef __cplusplus
-+
-+/* for C */
-+extern "C" {
-+#endif
-+
- typedef struct _cabocha_t cabocha_t;
-
- typedef void cabocha_tree_t;
diff --git a/textproc/cabocha/patches/patch-src_common.h b/textproc/cabocha/patches/patch-src_common.h
deleted file mode 100644
index 7ea598d0df2..00000000000
--- a/textproc/cabocha/patches/patch-src_common.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-src_common.h,v 1.1 2011/04/14 11:40:39 obache Exp $
-
-* require <cstring> for strlen(3).
-
---- src/common.h.orig 2005-12-24 12:30:35.000000000 +0000
-+++ src/common.h
-@@ -47,6 +47,7 @@ Copyright (C) 2001-2004 Taku Kudo, All r
- #include <set>
- #include <stdexcept>
- #include <algorithm>
-+#include <cstring>
-
- namespace CaboCha
- {
diff --git a/textproc/p5-cabocha/Makefile b/textproc/p5-cabocha/Makefile
index 08ba13be463..f5f13a3e9e4 100644
--- a/textproc/p5-cabocha/Makefile
+++ b/textproc/p5-cabocha/Makefile
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.5 2012/10/25 06:56:43 asau Exp $
+# $NetBSD: Makefile,v 1.6 2013/05/22 13:14:29 obache Exp $
#
.include "../../textproc/cabocha/Makefile.common"
PKGNAME= p5-${DISTNAME}
-PKGREVISION= 3
COMMENT= CaboCha perl module
diff --git a/textproc/py-cabocha/Makefile b/textproc/py-cabocha/Makefile
index dc2ab66a132..cf2fa1234d5 100644
--- a/textproc/py-cabocha/Makefile
+++ b/textproc/py-cabocha/Makefile
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2012/10/25 06:56:48 asau Exp $
+# $NetBSD: Makefile,v 1.4 2013/05/22 13:14:30 obache Exp $
#
.include "../../textproc/cabocha/Makefile.common"
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION= 1
CATEGORIES+= python
COMMENT= CaboCha python module
diff --git a/textproc/ruby-cabocha/Makefile b/textproc/ruby-cabocha/Makefile
index dd14d0a0946..209aa2a4d0c 100644
--- a/textproc/ruby-cabocha/Makefile
+++ b/textproc/ruby-cabocha/Makefile
@@ -1,29 +1,18 @@
-# $NetBSD: Makefile,v 1.5 2013/01/25 12:56:41 obache Exp $
+# $NetBSD: Makefile,v 1.6 2013/05/22 13:14:30 obache Exp $
#
.include "../../textproc/cabocha/Makefile.common"
-PKGREVISION= 1
CATEGORIES+= ruby
COMMENT= CaboCha ruby module
-BUILD_DEPENDS+= swig-1.[0-9]*:../../devel/swig
-
USE_LANGUAGES= c c++
USE_RUBY_EXTCONF= yes
RUBY_EXTCONF_SUBDIRS= ruby
-CABOCHA_LIBS_CMD= ${BUILDLINK_PREFIX.cabocha}/bin/cabocha-config --libs
-
-pre-configure:
- ${RUN} cd ${WRKSRC}/swig; ${SETENV} ${CONFIGURE_ENV} make ruby;
- ${SED} -e "s|@CABOCHA_LIBS@|`${CABOCHA_LIBS_CMD}`|g" \
- ${WRKSRC}/ruby/extconf.rb.in > ${WRKSRC}/ruby/extconf.rb
-
BUILDLINK_API_DEPENDS.cabocha+= cabocha>=${PKGVERSION_NOREV}
-
.include "../../textproc/cabocha/buildlink3.mk"
.include "../../lang/ruby/modules.mk"
.include "../../mk/bsd.pkg.mk"