Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

8
textproc/yamcha/DESCR Normal file
View File

@@ -0,0 +1,8 @@
YamCha is a generic, customizable, and open source text chunker oriented toward
a lot of NLP tasks, such as POS tagging, Named Entity Recognition, base NP
chunking, and Text Chunking. YamCha is using a state-of-the-art machine learning
algorithm called Support Vector Machines (SVMs), first introduced by Vapnik in
1995.
YamCha is exactly the same system which performed the best in the CoNLL2000
Shared Task, Chunking and BaseNP Chunking task.

23
textproc/yamcha/Makefile Normal file
View File

@@ -0,0 +1,23 @@
# $NetBSD: Makefile,v 1.7 2013/05/31 12:42:24 wiz Exp $
#
.include "Makefile.common"
PKGREVISION= 4
CATEGORIES= devel
COMMENT= Yet Another Multipurpose CHunk Annotator
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_LANGUAGES= c c++
USE_TOOLS+= perl:run gzip:run
CONFIGURE_ENV+= ac_cv_path_GZIP=${TOOLS_PATH.gzip:Q}
CONFIGURE_ARGS+= --with-perl5=${PERL5:Q}
CONFIGURE_ARGS+= --with-svm-learn=${BUILDLINK_PREFIX.TinySVM}/bin/svm_learn
TEST_TARGET= check
.include "../../math/TinySVM/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,15 @@
# $NetBSD: Makefile.common,v 1.1.1.1 2010/05/19 12:08:02 obache Exp $
# used by textproc/p5-yamcha/Makefile
# used by textproc/py-yamcha/Makefile
# used by textproc/ruby-yamcha/Makefile
DISTNAME= yamcha-0.33
CATEGORIES= textproc
MASTER_SITES= http://www.chasen.org/~taku/software/yamcha/src/
DISTINFO_FILE= ${.CURDIR}/../../textproc/yamcha/distinfo
PATCHDIR= ${.CURDIR}/../../textproc/yamcha/patches
MAINTAINER?= obache@NetBSD.org
HOMEPAGE= http://www.chasen.org/~taku/software/yamcha/
LICENSE= gnu-lgpl-v2.1

20
textproc/yamcha/PLIST Normal file
View File

@@ -0,0 +1,20 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2010/05/19 12:08:02 obache Exp $
bin/yamcha
bin/yamcha-config
bin/yamcha-mkmodel
include/yamcha.h
lib/libyamcha.la
libexec/yamcha/Makefile
libexec/yamcha/PKE.pm
libexec/yamcha/PKI.pm
libexec/yamcha/mkdarts
libexec/yamcha/mkmodel
libexec/yamcha/mkparam
libexec/yamcha/mksvmdata
libexec/yamcha/mktrie
libexec/yamcha/pkemine
libexec/yamcha/selecttag
libexec/yamcha/showse
libexec/yamcha/svm_learn_wrapper
libexec/yamcha/zipmodel
man/man1/yamcha.1

View File

@@ -0,0 +1,14 @@
# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/05/19 12:08:02 obache Exp $
BUILDLINK_TREE+= yamcha
.if !defined(YAMCHA_BUILDLINK3_MK)
YAMCHA_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.yamcha+= yamcha>=0.33
BUILDLINK_PKGSRCDIR.yamcha?= ../../textproc/yamcha
.include "../../math/TinySVM/buildlink3.mk"
.endif # YAMCHA_BUILDLINK3_MK
BUILDLINK_TREE+= -yamcha

11
textproc/yamcha/distinfo Normal file
View File

@@ -0,0 +1,11 @@
$NetBSD: distinfo,v 1.6 2013/05/09 15:07:59 joerg Exp $
SHA1 (yamcha-0.33.tar.gz) = 4ee6d8150557761f86fcb8af118636b7c23920c0
RMD160 (yamcha-0.33.tar.gz) = ac21fa16a45efa40775d426cd6229f612a7aa21e
Size (yamcha-0.33.tar.gz) = 488670 bytes
SHA1 (patch-aa) = 16120e3f052a1046ee360bbe449d95dfdb6a3990
SHA1 (patch-configure) = c8ad42d53eb50ce6aab60dda1c7c953d927b9468
SHA1 (patch-libexec_mkdarts.cpp) = 7fb2dfae8f6b312530f0774f9e8f227b98fdfd5e
SHA1 (patch-libexec_mktrie.cpp) = 4816974718c57819902b4b947a69ffafe82b98a9
SHA1 (patch-libexec_pkemine.cpp) = 09fcb52d2b652676b277cb9f148a9d799324bf45
SHA1 (patch-src_param.cpp) = 4fe2da167ce0de0c88153fe545c04efba1b585c7

View File

@@ -0,0 +1,36 @@
$NetBSD: patch-aa,v 1.1 2010/09/12 02:04:21 taca Exp $
Use modern Ruby's API.
--- ruby/YamCha_wrap.cpp.orig 2004-09-20 09:43:22.000000000 +0000
+++ ruby/YamCha_wrap.cpp
@@ -769,7 +769,11 @@ struct timeval rb_time_timeval(VALUE);
#ifdef __cplusplus
extern "C" {
#endif
+#ifdef HAVE_RUBY_IO_H
+#include "ruby/io.h"
+#else
#include "rubyio.h"
+#endif
#ifdef __cplusplus
}
#endif
@@ -844,7 +848,7 @@ _wrap_new_Chunker(int argc, VALUE *argv,
if (TYPE(argv[0]) != T_ARRAY) {
SWIG_exception(SWIG_ValueError, "Expected an array");
}
- arg1 = RARRAY(argv[0])->len;
+ arg1 = RARRAY_LEN(argv[0]);
if (arg1 == 0) {
SWIG_exception(SWIG_ValueError, "List must contain at least 1 element");
}
@@ -855,7 +859,7 @@ _wrap_new_Chunker(int argc, VALUE *argv,
free(arg2);
SWIG_exception(SWIG_ValueError, "List items must be strings");
}
- arg2[i] = STR2CSTR(s);
+ arg2[i] = StringValuePtr(s);
}
arg2[i] = 0;
}

View File

@@ -0,0 +1,32 @@
$NetBSD: patch-configure,v 1.2 2013/05/09 15:07:59 joerg Exp $
--- configure.orig 2005-09-03 02:33:48.000000000 +0000
+++ configure
@@ -20169,6 +20169,7 @@ if test $ac_cv_lib_m_pow = yes; then
M_LIBS="-lm"
fi
+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
@@ -20230,6 +20231,7 @@ echo "${ECHO_T}$ac_cv_lib_stdcpp_main" >
if test $ac_cv_lib_stdcpp_main = yes; then
STDCPP_LIBS="-lstdc++"
fi
+fi
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -20250,11 +20252,6 @@ echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
- if test "$host_vendor" = "sun" ; then
- { { echo "$as_me:$LINENO: error: \"SUN make does not work for building TinySVM. Please install GNU make\"" >&5
-echo "$as_me: error: \"SUN make does not work for building TinySVM. Please install GNU make\"" >&2;}
- { (exit 1); exit 1; }; }
- fi
fi
if test -n "$GCC"; then

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-libexec_mkdarts.cpp,v 1.1 2011/03/23 09:19:39 obache Exp $
* require <cstdlib> header for atoi(3).
--- libexec/mkdarts.cpp.orig 2004-03-12 17:12:13.000000000 +0000
+++ libexec/mkdarts.cpp
@@ -23,6 +23,7 @@
#include <cstdio>
#include <cstring>
+#include <cstdlib>
#include <iostream>
#include <fstream>
#include <string>

View File

@@ -0,0 +1,36 @@
$NetBSD: patch-libexec_mktrie.cpp,v 1.1 2012/10/03 14:40:23 marino Exp $
1) Fix segfault bug - bad char cast
2) There is a duplicate delete; "is" was previously freed already.
--- libexec/mktrie.cpp.orig 2004-09-20 09:59:16.000000000 +0000
+++ libexec/mktrie.cpp
@@ -111,13 +111,16 @@ int main (int argc, char **argv)
column.clear();
tokenize<std::string> ((const char*)buf, std::back_inserter(column));
if (column.empty()) continue;
- unsigned int *tmp = new unsigned int [column.size()-1];
- for (unsigned int i = 0; i < (column.size()-1); i++)
- tmp[i] = atoi (column[i+1].c_str());
+ string tmp;
+ for (unsigned int i = 0; i < (column.size()-1); i++) {
+ char hexbuf[10]; // assume string(UINT32_MAX).size -> 9
+ snprintf(hexbuf, sizeof(hexbuf), "%09x", atoi (column[i+1].c_str()));
+ tmp = tmp + hexbuf;
+ }
feature f;
- f.f = (unsigned char *)tmp; // cast
+ f.f = (unsigned char *)strdup(tmp.c_str());
f.id = atoi (column[0].c_str());
- f.len = 4*(column.size()-1);
+ f.len = tmp.size();
fv.push_back (f);
}
@@ -145,6 +148,4 @@ int main (int argc, char **argv)
std::cerr << "FATAL: cannot save " << argv[2] << std::endl;
return -1;
}
-
- if (file != "-") delete is;
}

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-libexec_pkemine.cpp,v 1.1 2012/10/03 14:40:23 marino Exp $
Fix segfault bug - "is" equals std::cin when infile == "-". This delete
command was intended for allocated std::instream object.
--- libexec/pkemine.cpp.orig 2004-03-12 17:12:13.000000000 +0000
+++ libexec/pkemine.cpp
@@ -250,7 +250,7 @@ int main (int argc, char **argv)
PKEMine pkemine (sigma, minsup, maxpat);
pkemine.run (*is, os);
- if (infile == "-") delete is;
+ if (infile != "-") delete is;
return 0;
}

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-src_param.cpp,v 1.1 2011/03/23 09:19:39 obache Exp $
* require <cstring> header for strlen(3) and strncmp(3).
--- src/param.cpp.orig 2005-09-05 14:50:59.000000000 +0000
+++ src/param.cpp
@@ -24,6 +24,7 @@
#include <fstream>
#include <strstream>
#include <cstdio>
+#include <cstring>
#include "param.h"
#include "common.h"