From d32022e7301aef2b3f52f6b7a3de81c6e03ffcaf Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 21 Nov 2022 01:03:25 +0000 Subject: gentoo auto-resync : 21:11:2022 - 01:03:25 --- app-text/bact/Manifest | 5 +-- app-text/bact/bact-0.13-r1.ebuild | 34 -------------------- app-text/bact/bact-0.13-r2.ebuild | 30 +++++++++++++++++ app-text/bact/files/bact-0.13-cpp14.patch | 48 +++++++++++++++++++++++++++- app-text/bact/files/bact-0.13-makefile.patch | 38 ++++++++++++++++++++++ 5 files changed, 118 insertions(+), 37 deletions(-) delete mode 100644 app-text/bact/bact-0.13-r1.ebuild create mode 100644 app-text/bact/bact-0.13-r2.ebuild create mode 100644 app-text/bact/files/bact-0.13-makefile.patch (limited to 'app-text/bact') diff --git a/app-text/bact/Manifest b/app-text/bact/Manifest index ad527d2baf7e..98f178990c3b 100644 --- a/app-text/bact/Manifest +++ b/app-text/bact/Manifest @@ -1,4 +1,5 @@ -AUX bact-0.13-cpp14.patch 1686 BLAKE2B 7e5778ea93bab4841658c3004ecae139fb10324b3ac612c61522eeae748bb2e2c6488670d9a718c6c1bd09d99d83afa306225ad9a403fdd88182fb1bdab3bf68 SHA512 c61d19a2aab85f8597ea40548ef4e2984aa20b44a7ef1c7d5b45d10ef38956cd614844ed5bee0e770a7cfe7f9c8778e491e0ead2585653a57676b4b33dad9204 +AUX bact-0.13-cpp14.patch 2947 BLAKE2B 1fc614aac3fbdacd8320f8b3629ef751d99c89b523b9ef8e43f7b535c18609ce66aa43aeb6560401f5eb2f18ff77fffba099b63025cccc8b7cfdebe26f1531d1 SHA512 21c1d68b1aea93ad98feb5c965931521100c8997c7cc64ab771cc3b6b6c3ce385aee750415b34e08f627e778bcfd11c25c0ef2fc7933306d073ecfa46b01cada +AUX bact-0.13-makefile.patch 1144 BLAKE2B 476096704ed088318d46a53b3e908722257241d82441542f9a33c22a383cbe90e99dd48ea5c12e0c987e8663ea6ae7b8cee51d9f406b9e62c70d2bfb7140f8b9 SHA512 afb59e8d06119adfed150895fc88810e240420f34826e6010f6ba9400f6a1839da8140a40f78861977600a88ac75ffb51c98369671de63c286cdbfccfb73b9ac DIST bact-0.13.tar.gz 230681 BLAKE2B a12ebfb52db0baa83d95a6d32b18324ea1c1b795fe92e6fd0409e54ed9f82e8a9e4497ffa1e97e9844edbcefb78ae1ad8d7a77c8c7e69688f18991e4f74391db SHA512 ba531c41d93e60699d9a06bd1d1df71f6fb1559c1cccd86756a88bcf72279065d3c565cbb1664444cb74fa25a3472d77682419fe9efa8881d73b23f0bcddb9f8 -EBUILD bact-0.13-r1.ebuild 674 BLAKE2B bd1c74b187a60055ecec93ee624e6dac4170225420c8f651d56b00d25db34eb74e5390f7d766277a166d458cc0590fcb4690e3f2e0d1e5661cc09c0ac3d69a68 SHA512 b1601d1110fdd875cc2236c3ca2b19dc74e60d2da66307c84f8537115fb33d608a1b01a28dd124a5a14cd2805902dc99d11b11463bea09ec5c1a5bbce0cd0085 +EBUILD bact-0.13-r2.ebuild 588 BLAKE2B de46dc828870e1d145f7be68895b5b31acc6d7a352142e6688b0c92b910f042c031f346516585931b6b0269d616cf969e9ded52c850e3f6f1f2ccb30deff564a SHA512 8e2284d7281d72e088265108f18ce50bd40abc836eb5d37a3607755cbfcfe9dcf9a9b56431348c892b12c76bef7dadb87953d81fd9d93fb68d7c253ca0abfd86 MISC metadata.xml 491 BLAKE2B d4c7c3592ae1c78ed34fb23e03606e1e9bd063c24cb9218ed28e0ecc74f32ee7709f53e6379f1bbb34f65786a47a7a0fc1fb5f14cc36630f44dade91d77e7bf0 SHA512 f61141e1b33d73ad3fad346950bd7ee971b340e50d4edb34d3cc83c3f321aba7dcd994829056e02dac97bf106de220db879b4c14b6cf610ce103dd4eca356497 diff --git a/app-text/bact/bact-0.13-r1.ebuild b/app-text/bact/bact-0.13-r1.ebuild deleted file mode 100644 index aaf872d9bd2b..000000000000 --- a/app-text/bact/bact-0.13-r1.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# 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/bact-0.13-r2.ebuild b/app-text/bact/bact-0.13-r2.ebuild new file mode 100644 index 000000000000..8c6381a627b2 --- /dev/null +++ b/app-text/bact/bact-0.13-r2.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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" + +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-cpp14.patch +) + +src_configure() { + tc-export CXX +} + +src_install() { + dobin bact_learn bact_mkmodel bact_classify + + HTML_DOCS=( index.html bact.css ) + einstalldocs +} diff --git a/app-text/bact/files/bact-0.13-cpp14.patch b/app-text/bact/files/bact-0.13-cpp14.patch index fa083c223b12..a0f6edda1eed 100644 --- a/app-text/bact/files/bact-0.13-cpp14.patch +++ b/app-text/bact/files/bact-0.13-cpp14.patch @@ -1,6 +1,7 @@ Fix C++14 compilation errors -- since C++11 make_pair is resolved to make_pair(T1&&, T2&&). Types should be deduced. -Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=594312 + +Bug: https://bugs.gentoo.org/594312 --- a/bact_classify.cpp +++ b/bact_classify.cpp @@ -42,3 +43,48 @@ Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=594312 ary.push_back ((Darts::DoubleArray::key_type *)it->first.c_str()); alpha.push_back (a); } +--- a/darts.h ++++ b/darts.h +@@ -394,10 +394,10 @@ + { + if (! len) len = LengthFunc() (key); + +- register ArrayType b = array[pos].base; +- register ArrayUType p; ++ ArrayType b = array[pos].base; ++ ArrayUType p; + +- for (register size_t i = 0; i < len; ++i) { ++ for (size_t i = 0; i < len; ++i) { + p = b + (NodeUType)(key[i]) + 1; + if ((ArrayUType)b == array[p].check) b = array[p].base; + else return -2; +@@ -414,8 +414,8 @@ + { + if (! len) len = LengthFunc() (key); + +- register ArrayType b = array[pos].base; +- register ArrayUType p; ++ ArrayType b = array[pos].base; ++ ArrayUType p; + + for (; pos2 < len; ++pos2) { + p = b + (NodeUType)(key[pos2]) + 1; +@@ -437,12 +437,12 @@ + { + if (! len) len = LengthFunc() (key); + +- register ArrayType b = array[pos].base; +- register size_t num = 0; +- register ArrayType n; +- register ArrayUType p; ++ ArrayType b = array[pos].base; ++ size_t num = 0; ++ ArrayType n; ++ ArrayUType p; + +- for (register size_t i = 0; i < len; ++i) { ++ for (size_t i = 0; i < len; ++i) { + p = b; // + 0; + n = array[p].base; + if ((ArrayUType) b == array[p].check && n < 0) result[num++] = -n-1; diff --git a/app-text/bact/files/bact-0.13-makefile.patch b/app-text/bact/files/bact-0.13-makefile.patch new file mode 100644 index 000000000000..d27879559d1d --- /dev/null +++ b/app-text/bact/files/bact-0.13-makefile.patch @@ -0,0 +1,38 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,6 @@ +-CXX = c++ + VERSION = 0.13 +-CXXFLAGS = -O3 -Wall -Wno-deprecated ++CXXFLAGS += -Wall -Wno-deprecated + EXECPREFIX = +-LDFLAGS = + TARGETS1 = bact_learn${EXEC_PREFIX} + TARGETS2 = bact_classify${EXEC_PREFIX} + TARGETS3 = bact_mkmodel${EXEC_PREFIX} +@@ -10,14 +8,11 @@ + + all: bact_learn bact_mkmodel bact_classify + +-bact_learn: bact_learn.o ${OBJ} +- ${CXX} ${CFLAGS} ${LDFLAGS} -o ${TARGETS1} ${OBJ} bact_learn.o ${LDFLAGS} ++bact_learn: ${OBJ} + +-bact_classify: bact_classify.o ${OBJ} +- ${CXX} ${CFLAGS} ${LDFLAGS} -o ${TARGETS2} ${OBJ} bact_classify.o ${LDFLAGS} ++bact_classify: ${OBJ} + +-bact_mkmodel: bact_mkmodel.o ${OBJ} +- ${CXX} ${CFLAGS} ${LDFLAGS} -o ${TARGETS3} ${OBJ} bact_mkmodel.o ${LDFLAGS} ++bact_mkmodel: ${OBJ} + + clean: + rm -f *.o ${TARGETS1} ${TARGETS2} ${TARGETS3} core *~ *.tar.gz *.exe core* med.model* jp.model* +@@ -33,7 +28,6 @@ + scp bact-${VERSION}.tar.gz index.html bact.css chasen.org:public_html/software/bact/ + + check: +-test: + ./bact_learn -T1000 med.train med.model + ./bact_mkmodel -i med.model -o med.model.bin -O med.model.O + ./bact_classify med.test med.model.bin -- cgit v1.2.3