From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8D16E158020 for ; Sun, 20 Nov 2022 23:56:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE921E096F; Sun, 20 Nov 2022 23:56:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 94051E096F for ; Sun, 20 Nov 2022 23:56:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BD7883409EB for ; Sun, 20 Nov 2022 23:56:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 56CEF757 for ; Sun, 20 Nov 2022 23:56:04 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1668988552.43494336a4a3b54200d3b480ea64a2bc472bdb46.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/bact/, app-text/bact/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/bact/bact-0.13-r1.ebuild app-text/bact/bact-0.13-r2.ebuild app-text/bact/files/bact-0.13-cpp14.patch app-text/bact/files/bact-0.13-makefile.patch X-VCS-Directories: app-text/bact/files/ app-text/bact/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 43494336a4a3b54200d3b480ea64a2bc472bdb46 X-VCS-Branch: master Date: Sun, 20 Nov 2022 23:56:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 29b31b50-f65d-4cb2-9635-23a3f2fb263c X-Archives-Hash: f0ed39d2153378ce5a3b5ffe61de933e commit: 43494336a4a3b54200d3b480ea64a2bc472bdb46 Author: David Seifert gentoo org> AuthorDate: Sun Nov 20 23:55:52 2022 +0000 Commit: David Seifert gentoo org> CommitDate: Sun Nov 20 23:55:52 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43494336 app-text/bact: update EAPI 6 -> 8 Signed-off-by: David Seifert gentoo.org> .../{bact-0.13-r1.ebuild => bact-0.13-r2.ebuild} | 24 +++++------ app-text/bact/files/bact-0.13-cpp14.patch | 48 +++++++++++++++++++++- app-text/bact/files/bact-0.13-makefile.patch | 38 +++++++++++++++++ 3 files changed, 95 insertions(+), 15 deletions(-) diff --git a/app-text/bact/bact-0.13-r1.ebuild b/app-text/bact/bact-0.13-r2.ebuild similarity index 58% rename from app-text/bact/bact-0.13-r1.ebuild rename to app-text/bact/bact-0.13-r2.ebuild index aaf872d9bd2b..8c6381a627b2 100644 --- a/app-text/bact/bact-0.13-r1.ebuild +++ b/app-text/bact/bact-0.13-r2.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit toolchain-funcs @@ -12,23 +12,19 @@ SRC_URI="http://chasen.org/~taku/software/bact/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" -RDEPEND="" -DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-cpp14.patch +) -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_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