* [gentoo-commits] repo/gentoo:master commit in: app-text/crf++/, app-text/crf++/files/
@ 2017-12-17 9:19 Akinori Hattori
0 siblings, 0 replies; 2+ messages in thread
From: Akinori Hattori @ 2017-12-17 9:19 UTC (permalink / raw
To: gentoo-commits
commit: 96c854b1573f21c577f0dada5b24f7813bcf16f3
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 09:04:05 2017 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 09:18:34 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96c854b1
app-text/crf++: fix build with >=sys-devel/gcc-6
Package-Manager: Portage-2.3.13, Repoman-2.3.4
app-text/crf++/crf++-0.54.ebuild | 3 ++-
app-text/crf++/files/crf++-0.54-c++11.patch | 37 +++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/app-text/crf++/crf++-0.54.ebuild b/app-text/crf++/crf++-0.54.ebuild
index 204eda15114..e282ca87c96 100644
--- a/app-text/crf++/crf++-0.54.ebuild
+++ b/app-text/crf++/crf++-0.54.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="3"
@@ -22,6 +22,7 @@ src_prepare() {
-e "/CXXFLAGS/s/-O3/${CXXFLAGS}/" \
configure.in || die
+ epatch "${FILESDIR}"/${P}-c++11.patch
# bug #365921
epatch "${FILESDIR}/${P}-gcc46.patch"
diff --git a/app-text/crf++/files/crf++-0.54-c++11.patch b/app-text/crf++/files/crf++-0.54-c++11.patch
new file mode 100644
index 00000000000..a71cd9071eb
--- /dev/null
+++ b/app-text/crf++/files/crf++-0.54-c++11.patch
@@ -0,0 +1,37 @@
+--- 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/crf++/, app-text/crf++/files/
@ 2022-11-20 23:56 David Seifert
0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2022-11-20 23:56 UTC (permalink / raw
To: gentoo-commits
commit: 9ac73bf83b7c5fbdeadab0ddb508b6c88a69461f
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 20 23:55:54 2022 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 20 23:55:54 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ac73bf8
app-text/crf++: update EAPI 6 -> 8
Signed-off-by: David Seifert <soap <AT> gentoo.org>
.../{crf++-0.58.ebuild => crf++-0.58-r1.ebuild} | 33 ++++++----------------
app-text/crf++/files/crf++-0.58-autotools.patch | 23 +++++++++++++++
app-text/crf++/files/crf++-automake-1.13.patch | 10 -------
3 files changed, 32 insertions(+), 34 deletions(-)
diff --git a/app-text/crf++/crf++-0.58.ebuild b/app-text/crf++/crf++-0.58-r1.ebuild
similarity index 52%
rename from app-text/crf++/crf++-0.58.ebuild
rename to app-text/crf++/crf++-0.58-r1.ebuild
index f14ffbc4defd..c10b4b472085 100644
--- a/app-text/crf++/crf++-0.58.ebuild
+++ b/app-text/crf++/crf++-0.58-r1.ebuild
@@ -1,59 +1,44 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=8
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://gentoo/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
+SRC_URI="mirror://gentoo/${P^^}.tar.gz"
+S="${WORKDIR}/${P^^}"
LICENSE="|| ( BSD LGPL-2.1 )"
SLOT="0"
KEYWORDS="amd64 x86"
-IUSE="examples static-libs"
+IUSE="examples"
-PATCHES=( "${FILESDIR}"/${PN}-automake-1.13.patch )
+PATCHES=( "${FILESDIR}"/${P}-autotools.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}"
+ pushd "${d}" >/dev/null || die
./exec.sh || die "failed test in ${d}"
- cd - >/dev/null
+ popd >/dev/null || die
done
}
src_install() {
- emake DESTDIR="${D}" install
- einstalldocs
+ default
if use examples; then
dodoc -r example
docompress -x /usr/share/doc/${PF}/example
fi
- if ! use static-libs; then
- find "${ED}" -name "*.la" -type f -delete || die
- fi
+ find "${ED}" -name '*.la' -type f -delete || die
}
diff --git a/app-text/crf++/files/crf++-0.58-autotools.patch b/app-text/crf++/files/crf++-0.58-autotools.patch
new file mode 100644
index 000000000000..df3584432bbe
--- /dev/null
+++ b/app-text/crf++/files/crf++-0.58-autotools.patch
@@ -0,0 +1,23 @@
+--- a/configure.in
++++ b/configure.in
+@@ -49,10 +49,8 @@
+ dnl
+ dnl check gcc
+ dnl
+-if test -n "$GCC"; then
+- CFLAGS="-O3 -Wall";
+- CXXFLAGS="-O3 -Wall";
+-fi
++CFLAGS="${CFLAGS} -Wall"
++CXXFLAGS="${CXXFLAGS} -Wall"
+
+ AC_DEFUN(ADD_CC_FLAG, [
+ AC_MSG_CHECKING(whether ${CC-cc} accepts $1)
+@@ -285,6 +283,6 @@
+ AC_MSG_RESULT([yes])
+
+ AC_SUBST(datarootdir)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AC_OUTPUT([Makefile Makefile.msvc swig/version.h])
+
diff --git a/app-text/crf++/files/crf++-automake-1.13.patch b/app-text/crf++/files/crf++-automake-1.13.patch
deleted file mode 100644
index afff7edc0707..000000000000
--- a/app-text/crf++/files/crf++-automake-1.13.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/configure.in
-+++ b/configure.in
-@@ -240,6 +240,6 @@
- AC_MSG_RESULT([yes])
-
- AC_SUBST(datarootdir)
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
- AC_OUTPUT([Makefile Makefile.msvc swig/version.h])
-
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-20 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-17 9:19 [gentoo-commits] repo/gentoo:master commit in: app-text/crf++/, app-text/crf++/files/ Akinori Hattori
-- strict thread matches above, loose matches on Subject: below --
2022-11-20 23:56 David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox