diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-text/bact | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-text/bact')
-rw-r--r-- | app-text/bact/Manifest | 4 | ||||
-rw-r--r-- | app-text/bact/bact-0.13-r1.ebuild | 34 | ||||
-rw-r--r-- | app-text/bact/files/bact-0.13-cpp14.patch | 44 | ||||
-rw-r--r-- | app-text/bact/metadata.xml | 11 |
4 files changed, 93 insertions, 0 deletions
diff --git a/app-text/bact/Manifest b/app-text/bact/Manifest new file mode 100644 index 000000000000..82640310457d --- /dev/null +++ b/app-text/bact/Manifest @@ -0,0 +1,4 @@ +AUX bact-0.13-cpp14.patch 1686 BLAKE2B 7e5778ea93bab4841658c3004ecae139fb10324b3ac612c61522eeae748bb2e2c6488670d9a718c6c1bd09d99d83afa306225ad9a403fdd88182fb1bdab3bf68 SHA512 c61d19a2aab85f8597ea40548ef4e2984aa20b44a7ef1c7d5b45d10ef38956cd614844ed5bee0e770a7cfe7f9c8778e491e0ead2585653a57676b4b33dad9204 +DIST bact-0.13.tar.gz 230681 BLAKE2B a12ebfb52db0baa83d95a6d32b18324ea1c1b795fe92e6fd0409e54ed9f82e8a9e4497ffa1e97e9844edbcefb78ae1ad8d7a77c8c7e69688f18991e4f74391db SHA512 ba531c41d93e60699d9a06bd1d1df71f6fb1559c1cccd86756a88bcf72279065d3c565cbb1664444cb74fa25a3472d77682419fe9efa8881d73b23f0bcddb9f8 +EBUILD bact-0.13-r1.ebuild 674 BLAKE2B bd1c74b187a60055ecec93ee624e6dac4170225420c8f651d56b00d25db34eb74e5390f7d766277a166d458cc0590fcb4690e3f2e0d1e5661cc09c0ac3d69a68 SHA512 b1601d1110fdd875cc2236c3ca2b19dc74e60d2da66307c84f8537115fb33d608a1b01a28dd124a5a14cd2805902dc99d11b11463bea09ec5c1a5bbce0cd0085 +MISC metadata.xml 490 BLAKE2B 05ec5b2e6e36ce38ecf95b8de0bbfe657db17da01e930b0d7b65e0dd672752a28a9670388277ed51bb2a21590c49f4e8364db305e171842ce775eafd1cfc0c29 SHA512 0772c6cc2a90788091a69e6b3ca315e5b74e3ee93b7f5f857ce30c588bde689464ca87629ef5c4c8911920eb18e2dcb9eda3d915e6d9a52aacb3f039760fc31a diff --git a/app-text/bact/bact-0.13-r1.ebuild b/app-text/bact/bact-0.13-r1.ebuild new file mode 100644 index 000000000000..aaf872d9bd2b --- /dev/null +++ b/app-text/bact/bact-0.13-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Boosting Algorithm for Classification of Trees" +HOMEPAGE="http://chasen.org/~taku/software/bact/" +SRC_URI="http://chasen.org/~taku/software/bact/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="" +DEPEND="${RDEPEND}" + +HTML_DOCS=( index.html bact.css ) +PATCHES=( "${FILESDIR}/${P}-cpp14.patch" ) + +src_compile() { + emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_test() { + emake test +} + +src_install() { + dobin bact_learn bact_mkmodel bact_classify + einstalldocs +} diff --git a/app-text/bact/files/bact-0.13-cpp14.patch b/app-text/bact/files/bact-0.13-cpp14.patch new file mode 100644 index 000000000000..fa083c223b12 --- /dev/null +++ b/app-text/bact/files/bact-0.13-cpp14.patch @@ -0,0 +1,44 @@ +Fix C++14 compilation errors -- since C++11 make_pair<T1,T2> is resolved to +make_pair(T1&&, T2&&). Types should be deduced. +Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=594312 + +--- a/bact_classify.cpp ++++ b/bact_classify.cpp +@@ -86,7 +86,7 @@ + if (id == -2) continue; + if (id != -1) { + if (userule) +- rules.insert (std::make_pair <std::string, double> (item, alpha[id])); ++ rules.insert (std::make_pair(item, alpha[id])); + result.push_back (id); + } + project (item, size+1, newdepth, l, new_trie_pos, new_str_pos); +@@ -138,7 +138,7 @@ + if (id == -2) continue; + if (id >= 0) { + if (userule) +- rules.insert (std::make_pair <std::string, double> (tree[i].val.key(), alpha[id])); ++ rules.insert (std::make_pair(tree[i].val.key(), alpha[id])); + result.push_back (id); + } + project (tree[i].val.key(), 1, 0, i, 0, 0); +@@ -158,7 +158,7 @@ + + for (std::map <std::string, double>::iterator it = rules.begin(); + it != rules.end(); ++it) +- tmp.push_back (std::make_pair <std::string, double> (it->first, it->second)); ++ tmp.push_back (std::make_pair(it->first, it->second)); + + std::sort (tmp.begin(), tmp.end(), pair_2nd_cmp<std::string, double>()); + +--- a/bact_mkmodel.cpp ++++ b/bact_mkmodel.cpp +@@ -111,7 +111,7 @@ + + for (std::map<std::string, double>::iterator it = rules.begin(); it != rules.end(); ++it) { + double a = it->second / alpha_sum; +- ary2.push_back (std::make_pair <const char*, double>(it->first.c_str(), a)); ++ ary2.push_back (std::make_pair(it->first.c_str(), a)); + ary.push_back ((Darts::DoubleArray::key_type *)it->first.c_str()); + alpha.push_back (a); + } diff --git a/app-text/bact/metadata.xml b/app-text/bact/metadata.xml new file mode 100644 index 000000000000..38a3b6a3c089 --- /dev/null +++ b/app-text/bact/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <longdescription lang="en"> + BACT is an implementation of [Kudo & Matsumoto 2004], and is + designed to handle the tree classification problem. The important + characteristic is that the input example x is represented not as a + numerical feature vector (bag-of-words) but a labeled ordered tree. + </longdescription> +</pkgmetadata> |