commit:     065fb013c767a2f6b3229091b64e92199270c78a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 27 00:32:34 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 27 00:32:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=065fb013

sci-libs/dmlc-core: update EAPI 6 -> 8

Closes: https://bugs.gentoo.org/833305
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...0719.ebuild => dmlc-core-0_p20170719-r1.ebuild} | 45 +++++++++++++---------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/sci-libs/dmlc-core/dmlc-core-0_p20170719.ebuild 
b/sci-libs/dmlc-core/dmlc-core-0_p20170719-r1.ebuild
similarity index 72%
rename from sci-libs/dmlc-core/dmlc-core-0_p20170719.ebuild
rename to sci-libs/dmlc-core/dmlc-core-0_p20170719-r1.ebuild
index c8f88ae4220d..991dc719c890 100644
--- a/sci-libs/dmlc-core/dmlc-core-0_p20170719.ebuild
+++ b/sci-libs/dmlc-core/dmlc-core-0_p20170719-r1.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
 
-inherit toolchain-funcs cmake-utils
+inherit cmake toolchain-funcs
 
 DESCRIPTION="Common bricks library for building distributed machine learning"
 HOMEPAGE="https://github.com/dmlc/dmlc-core";
@@ -12,10 +12,11 @@ if [[ ${PV} == *9999* ]] ; then
        EGIT_REPO_URI="https://github.com/dmlc/${PN}.git";
        inherit git-r3
 else
-       EGIT_COMMIT="54db57d5d1b2a7b93319053011802888b827a539"
+       MY_COMMIT="54db57d5d1b2a7b93319053011802888b827a539"
        inherit vcs-snapshot
+       SRC_URI="https://github.com/dmlc/dmlc-core/archive/${MY_COMMIT}.tar.gz 
-> ${P}.tar.gz"
+
        KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-       
SRC_URI="https://github.com/dmlc/dmlc-core/archive/${EGIT_COMMIT}.tar.gz -> 
${P}.tar.gz"
 fi
 
 LICENSE="Apache-2.0"
@@ -28,9 +29,11 @@ RESTRICT="!test? ( test )"
 
 RDEPEND="net-misc/curl[ssl]"
 DEPEND="${RDEPEND}
-       doc? ( app-doc/doxygen )
-       test? ( dev-cpp/gtest )
-"
+       test? ( dev-cpp/gtest )"
+BDEPEND="doc? (
+               app-doc/doxygen
+               dev-texlive/texlive-fontutils
+       )"
 
 PATCHES=( "${FILESDIR}"/${PN}-install-dirs.patch )
 
@@ -43,13 +46,15 @@ pkg_setup() {
 }
 
 src_prepare() {
-       cmake-utils_src_prepare
-       # respect user flags (SSE2 does nothing more than adding -msse2)
-       # also doc install everything so remove
+       cmake_src_prepare
+
+       # Respect user flags (SSE2 does nothing more than adding -msse2)
+       # Also doc installs everything, so remove
        sed -e '/-O3/d' \
                -e '/check_cxx.*SSE2/d' \
                -i CMakeLists.txt || die
-       # all these hacks below to allow testing
+
+       # All these hacks below to allow testing
        sed -e 's|-O3||' -e 's|-lm|-lm -L$(LD_LIBRARY_PATH) -ldmlc|g' -i 
Makefile || die
        sed -e "s|libdmlc.a||g" \
                -i test/dmlc_test.mk test/unittest/dmlc_unittest.mk || die
@@ -66,15 +71,16 @@ src_prepare() {
 
 src_configure() {
        local mycmakeargs=(
-               -DBUILD_SHARED_LIBS=ON
-               -DUSE_S3="$(usex s3)"
-               -DUSE_OPENMP="$(usex openmp)"
+               -DUSE_S3=$(usex s3)
+               -DUSE_OPENMP=$(usex openmp)
        )
-       cmake-utils_src_configure
+
+       cmake_src_configure
 }
 
 src_compile() {
-       cmake-utils_src_compile
+       cmake_src_compile
+
        if use doc; then
                doxygen doc/Doxyfile || die
        fi
@@ -82,13 +88,16 @@ src_compile() {
 
 src_test() {
        tc-export CXX
-       export LD_LIBRARY_PATH="${BUILD_DIR}"
+       export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}"
+
        emake test
+
        test/unittest/dmlc_unittest || die
 }
 
 src_install() {
-       cmake-utils_src_install
+       cmake_src_install
+
        if use doc; then
                dodoc -r doc/doxygen/html
                docompress -x /usr/share/doc/${PF}/html

Reply via email to