app-text/crf++: update to EAPI 6
authorAkinori Hattori <hattya@gentoo.org>
Sun, 17 Dec 2017 09:11:14 +0000 (18:11 +0900)
committerAkinori Hattori <hattya@gentoo.org>
Sun, 17 Dec 2017 09:18:36 +0000 (18:18 +0900)
Package-Manager: Portage-2.3.13, Repoman-2.3.4

app-text/crf++/crf++-0.54.ebuild
app-text/crf++/crf++-0.58.ebuild

index 40689e9a48f1b3637f44667c4d17091c23cd282c..cd0706716eb346ddd11774f6a8d6da27c38d17ca 100644 (file)
@@ -1,10 +1,12 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="3"
-inherit autotools eutils
+EAPI="6"
+
+inherit autotools
+
+MY_P="${P^^[crf]}"
 
-MY_P="${P/crf/CRF}"
 DESCRIPTION="Yet Another CRF toolkit for segmenting/labelling sequential data"
 HOMEPAGE="https://taku910.github.io/crfpp/"
 SRC_URI="mirror://sourceforge/crfpp/${MY_P}.tar.gz"
@@ -16,45 +18,48 @@ IUSE="examples static-libs"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-automake-1.13.patch
+       "${FILESDIR}"/${P}-c++11.patch
+       "${FILESDIR}"/${P}-gcc46.patch
+)
+HTML_DOCS=( doc/. )
+
 src_prepare() {
        sed -i \
                -e "/CFLAGS/s/-O3/${CFLAGS}/" \
                -e "/CXXFLAGS/s/-O3/${CXXFLAGS}/" \
-               configure.in || die
-
-       epatch "${FILESDIR}"/${PN}-automake-1.13.patch
-       epatch "${FILESDIR}"/${P}-c++11.patch
-       # bug #365921
-       epatch "${FILESDIR}/${P}-gcc46.patch"
+               configure.in
 
+       default
+       mv configure.{in,ac} || die
        eautoreconf
 }
 
 src_configure() {
-       econf $(use_enable static-libs static) || die
+       econf $(use_enable static-libs static)
 }
 
 src_test() {
-       for task in example/* ; do
-               (
-                       cd "${task}"
-                       ./exec.sh || die "failed test in ${task}"
-               )
+       local d
+       for d in example/*; do
+               cd "${d}"
+               ./exec.sh || die "failed test in ${d}"
+               cd - >/dev/null
        done
 }
 
 src_install() {
-       emake DESTDIR="${D}" install || die
+       emake DESTDIR="${D}" install
+       einstalldocs
 
-       if ! use static-libs ; then
-               find "${ED}" -name "*.la" -type f -delete || die
+       if use examples; then
+               docompress -x /usr/share/doc/${PF}/example
+               insinto /usr/share/doc/${PF}
+               doins -r example
        fi
 
-       dodoc AUTHORS README || die
-       dohtml -r doc/* || die
-
-       if use examples ; then
-               insinto /usr/share/doc/${PF}
-               doins -r example || die
+       if ! use static-libs; then
+               find "${ED}" -name "*.la" -type f -delete || die
        fi
 }
index 9f0bb22fa51ed9b9bf23dff2c5d2b012dae38f81..09adecd384f6a920b430de0d1e8da8e58419e807 100644 (file)
@@ -1,10 +1,12 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="3"
-inherit autotools eutils
+EAPI="6"
+
+inherit autotools
+
+MY_P="${P^^[crf]}"
 
-MY_P="${P/crf/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"
@@ -16,42 +18,44 @@ IUSE="examples static-libs"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=( "${FILESDIR}"/${PN}-automake-1.13.patch )
+HTML_DOCS=( doc/. )
+
 src_prepare() {
        sed -i \
                -e "/CFLAGS/s/-O3/${CFLAGS}/" \
                -e "/CXXFLAGS/s/-O3/${CXXFLAGS}/" \
-               configure.in || die
-
-       epatch "${FILESDIR}"/${PN}-automake-1.13.patch
+               configure.in
 
+       default
+       mv configure.{in,ac} || die
        eautoreconf
 }
 
 src_configure() {
-       econf $(use_enable static-libs static) || die
+       econf $(use_enable static-libs static)
 }
 
 src_test() {
-       for task in example/* ; do
-               (
-                       cd "${task}"
-                       ./exec.sh || die "failed test in ${task}"
-               )
+       local d
+       for d in example/*; do
+               cd "${d}"
+               ./exec.sh || die "failed test in ${d}"
+               cd - >/dev/null
        done
 }
 
 src_install() {
-       emake DESTDIR="${D}" install || die
+       emake DESTDIR="${D}" install
+       einstalldocs
 
-       if ! use static-libs ; then
-               find "${ED}" -name "*.la" -type f -delete || die
+       if use examples; then
+               docompress -x /usr/share/doc/${PF}/example
+               insinto /usr/share/doc/${PF}
+               doins -r example
        fi
 
-       dodoc AUTHORS README || die
-       dohtml -r doc/* || die
-
-       if use examples ; then
-               insinto /usr/share/doc/${PF}
-               doins -r example || die
+       if ! use static-libs; then
+               find "${ED}" -name "*.la" -type f -delete || die
        fi
 }