summaryrefslogtreecommitdiff
path: root/app-text/bact
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/bact')
-rw-r--r--app-text/bact/Manifest6
-rw-r--r--app-text/bact/bact-0.13-r1.ebuild34
-rw-r--r--app-text/bact/files/bact-0.13-cpp14.patch44
-rw-r--r--app-text/bact/metadata.xml11
4 files changed, 95 insertions, 0 deletions
diff --git a/app-text/bact/Manifest b/app-text/bact/Manifest
new file mode 100644
index 000000000000..218044aff549
--- /dev/null
+++ b/app-text/bact/Manifest
@@ -0,0 +1,6 @@
+AUX bact-0.13-cpp14.patch 1686 SHA256 d60243b8ab3d467505d779a47ab49bffbc5955f053eb1b23613cc7369182206e SHA512 c61d19a2aab85f8597ea40548ef4e2984aa20b44a7ef1c7d5b45d10ef38956cd614844ed5bee0e770a7cfe7f9c8778e491e0ead2585653a57676b4b33dad9204 WHIRLPOOL 1e88e95f4a5256dc0622a549c1771b630240a277d96f506fbb3a02dc6237127d481f67f9251bc487b975f7464bcafe3767e4a34a77614820be3d931f622c54af
+DIST bact-0.13.tar.gz 230681 SHA256 4aa55c30621afd3793bd15471b3c0d77d3b489051cbfb30a9f0640de8928ab40 SHA512 ba531c41d93e60699d9a06bd1d1df71f6fb1559c1cccd86756a88bcf72279065d3c565cbb1664444cb74fa25a3472d77682419fe9efa8881d73b23f0bcddb9f8 WHIRLPOOL a7157b6600f24c80aaa2dff5db1a8ce74085985b839c59f0020569073a8fb2b879ad2d8df0ea50fa46c62e05bac6d2588de1f8465b7d939677c57f360c6a7dde
+EBUILD bact-0.13-r1.ebuild 674 SHA256 5c36b726a3868713c41ae663a426cbb59151c021e1dcf73f8b84b6aec3098d38 SHA512 b1601d1110fdd875cc2236c3ca2b19dc74e60d2da66307c84f8537115fb33d608a1b01a28dd124a5a14cd2805902dc99d11b11463bea09ec5c1a5bbce0cd0085 WHIRLPOOL a68c4d75ce7e8e08d8137d34cccaa53b6054dc4e5a87a8f5621a4295ae17aff2adb665e1b1d242e9f96819b1648ac4148a1ee1402f9786daa2f9d70ecc33d8e7
+MISC ChangeLog 3001 SHA256 6cc71a863ae9e04b00637234e0f972be1b52b6d588d2e2dbb4ccc38a61c5eb80 SHA512 720f7f4cb6a6ce95aed2b54e0acfaccd708585e856843025d1952501e0f22ff4c7a5b28c973c53aaf9c88a02ff8a1cdae887c0f30bbef20682abe92e71f48bd1 WHIRLPOOL 8a7c06f5d9b34b226ab92da77a6724ded39aa8cacbbcab43c9adacb6a2dc85b59cfbcdda612ed4423b3f4d5f5746a234ea2f4430759d879f9f0c4f7970f13f33
+MISC ChangeLog-2015 1033 SHA256 c542712203af0d4a6f9911bc9b8d7b93d9293d649501de2d57649a1da39c113d SHA512 57a4b8a5d2dcc3a52ff2e06daac422dc6943ee4e3dc1c135a331d748f886fb5f8b1512c58b42bbc621c725f1488f994867510f1597428120e2b5182a9a1c0dbb WHIRLPOOL 70db63051b72b3b5fb3e0b7e38a7e881660e851a61b29119034922c0bee4ec5d997af9ff9f93bd2c8eb234514a4b8084ceb200a74f213bc281fb5fc72491a971
+MISC metadata.xml 490 SHA256 cac297ed0fff3b075662617dacefea3d0e3f1d4977dbbaa09f7ec4bbcdb2166f SHA512 0772c6cc2a90788091a69e6b3ca315e5b74e3ee93b7f5f857ce30c588bde689464ca87629ef5c4c8911920eb18e2dcb9eda3d915e6d9a52aacb3f039760fc31a WHIRLPOOL 1356c1df27220a58ffe97b725f5f92963d7e29452dd46ceb2da963983363fb857eb1a579d272e766e321d201d696fd9800f979102e3453f111bbda26d00d4215
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 &amp; 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>