+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools
-
-MY_P="${P^^[crf]}"
-
-DESCRIPTION="Yet Another CRF toolkit for segmenting/labelling sequential data"
-HOMEPAGE="https://taku910.github.io/crfpp/"
-SRC_URI="mirror://sourceforge/crfpp/${MY_P}.tar.gz"
-
-LICENSE="|| ( BSD LGPL-2.1 )"
-SLOT="0"
-KEYWORDS="amd64 x86 ~x86-fbsd"
-IUSE="examples static-libs"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-automake-1.13.patch
- "${FILESDIR}"/${P}-c++11.patch
- "${FILESDIR}"/${P}-gcc46.patch
-)
-HTML_DOCS=( doc/. )
-
-src_prepare() {
- sed -i \
- -e "/CFLAGS/s/-O3/${CFLAGS}/" \
- -e "/CXXFLAGS/s/-O3/${CXXFLAGS}/" \
- configure.in
-
- default
- mv configure.{in,ac} || die
- eautoreconf
-}
-
-src_configure() {
- econf $(use_enable static-libs static)
-}
-
-src_test() {
- local d
- for d in example/*; do
- cd "${d}"
- ./exec.sh || die "failed test in ${d}"
- cd - >/dev/null
- done
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- einstalldocs
-
- if use examples; then
- docompress -x /usr/share/doc/${PF}/example
- insinto /usr/share/doc/${PF}
- doins -r example
- fi
-
- if ! use static-libs; then
- find "${ED}" -name "*.la" -type f -delete || die
- fi
-}
+++ /dev/null
---- a/feature_index.cpp
-+++ b/feature_index.cpp
-@@ -34,8 +34,9 @@
- 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
-+ (std::string(key),
-+ std::make_pair(maxid_, static_cast<unsigned int>(1))));
- int n = maxid_;
- maxid_ += (key[0] == 'U' ? y_.size() : y_.size() * y_.size());
- return n;
-@@ -171,7 +172,7 @@
- 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;
-@@ -264,9 +265,10 @@
- size_t size = tokenize(line, "\t ", column, 2);
- CHECK_FALSE(size == 2) << "format error: " << filename1;
-
-- dic_.insert(std::make_pair<std::string, std::pair<int, unsigned int> >
-- (column[1],
-- std::make_pair<int, unsigned int>(std::atoi(column[0]), 1)));
-+ dic_.insert(std::make_pair
-+ (std::string(column[1]),
-+ std::make_pair(std::atoi(column[0]),
-+ static_cast<unsigned int>(1))));
- }
-
- std::vector<double> alpha;