1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

Update to 0.59 (latest commit)

- Change MASTER_SITES to GitHub, where upstream moved
- Apply some patches from the GitHub Pull Requests to make the port build
  (upstream seems to lost some files while migrating to GitHub) and patch
  some bugs
- Set licenses
- Upstream does not tag releases on GitHub, so it's all guessing what the
  real version is. 0.59 is what I found in the source code.
- Install examples; they are useful to test if the port is working
- Remove old patches, they are no longer needed
- Update WWW
This commit is contained in:
Mateusz Piotrowski 2020-09-22 20:43:19 +00:00
parent fbc199c7c7
commit 6df5387bc4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=549633
4 changed files with 33 additions and 30 deletions

View File

@ -2,18 +2,37 @@
# $FreeBSD$
PORTNAME= crf++
PORTVERSION= 0.54
PORTREVISION= 1
# 0.59 as defined in
# https://github.com/taku910/crfpp/commit/d78526835e4cfcc4822156724edda8a3839327c2
DISTVERSION= 0.59
CATEGORIES= science math
MASTER_SITES= SF/crfpp/crfpp/${PORTVERSION}
DISTNAME= CRF++-${PORTVERSION}
PATCH_SITES= https://patch-diff.githubusercontent.com/raw/taku910/crfpp/pull/:pr
PATCHFILES= 15.patch:-p1:pr \
16.patch:-p1:pr
MAINTAINER= ports@FreeBSD.org
COMMENT= Yet Another CRF toolkit
LICENSE= BSD3CLAUSE LGPL21+
LICENSE_COMB= dual
LICENS_BSD3CLAUSE= ${WRKSRC}/BSD
LICENS_LGPLv21+ = ${WRKSRC}/LGPL
USES= libtool
USE_GITHUB= yes
GH_ACCOUNT= taku910
GH_PROJECT= crfpp
GH_TAGNAME= 1dc92a606f874a4fe52603803364cc1d90f952fb
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
USES= libtool
USE_LDCONFIG= yes
PORTEXAMPLES= JapaneseNE basenp chunking seg
OPTIONS_DEFINE= EXAMPLES
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAPLESDIR}
(cd ${WRKSRC}/example && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.mk>

View File

@ -1,2 +1,7 @@
SHA256 (CRF++-0.54.tar.gz) = 8dab6e9ab71212b3d223588f6855384f2b29dada0a30d450266f8990ced63354
SIZE (CRF++-0.54.tar.gz) = 809008
TIMESTAMP = 1600806136
SHA256 (taku910-crfpp-0.59-1dc92a606f874a4fe52603803364cc1d90f952fb_GH0.tar.gz) = 7f70e4113dd93caa34091e7f2df03ff75370934e3450c3a3b0d0a4afb11c8bd4
SIZE (taku910-crfpp-0.59-1dc92a606f874a4fe52603803364cc1d90f952fb_GH0.tar.gz) = 864713
SHA256 (15.patch) = eaf3408fcadf281eba05735af830acf82950a8da82e7cc565750a8e4d31d5480
SIZE (15.patch) = 2376
SHA256 (16.patch) = 5f27e76c8efac6c1fd4ac41c5925bda5b5c0063801a6a65fe311ff676e53cd1b
SIZE (16.patch) = 98664

View File

@ -1,21 +0,0 @@
--- feature_index.cpp.orig 2018-09-01 10:26:57 UTC
+++ feature_index.cpp
@@ -34,8 +34,7 @@ int EncoderFeatureIndex::getID(const char *key) {
std::map <std::string, std::pair<int, unsigned int> >::iterator
it = dic_.find(key);
if (it == dic_.end()) {
- dic_.insert(std::make_pair<std::string, std::pair<int, unsigned int> >
- (key, std::make_pair<int, unsigned int>(maxid_, 1)));
+ dic_.insert(std::make_pair(key, std::make_pair(maxid_, 1)));
int n = maxid_;
maxid_ += (key[0] == 'U' ? y_.size() : y_.size() * y_.size());
return n;
@@ -171,7 +170,7 @@ void EncoderFeatureIndex::shrink(size_t freq) {
const std::string &key = it->first;
if (it->second.second >= freq) {
- old2new.insert(std::make_pair<int, int>(it->second.first, new_maxid));
+ old2new.insert(std::make_pair(it->second.first, new_maxid));
it->second.first = new_maxid;
new_maxid += (key[0] == 'U' ? y_.size() : y_.size() * y_.size());
++it;

View File

@ -5,4 +5,4 @@ designed for generic purpose and will be applied to
a variety of NLP tasks, such as Named Entity Recognition,
Information Extraction and Text Chunking.
WWW: http://chasen.org/~taku/software/CRF++/
WWW: https://taku910.github.io/crfpp/