commit:     e96ff3984641ca1eec5926ca89cfa51209433cc1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  9 04:53:40 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  9 04:54:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e96ff398

net-libs/libaxc: run tests in parallel, respect CC in src_test too

- Run tests in parallel (fixed upstream in 0.3.5)
- Respect CC in src_test
- Shift src_test to be above src_install (so it matches the order they're
called in)
- As a bonus, shift pkgconfig to BDEPEND.

Note that test failures seem to be ignored in the upstream Makefile.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/libaxc/libaxc-0.3.6.ebuild | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/net-libs/libaxc/libaxc-0.3.6.ebuild 
b/net-libs/libaxc/libaxc-0.3.6.ebuild
index 6fe97dd4c07..013ce8f510c 100644
--- a/net-libs/libaxc/libaxc-0.3.6.ebuild
+++ b/net-libs/libaxc/libaxc-0.3.6.ebuild
@@ -23,9 +23,9 @@ RDEPEND="
        "
 DEPEND="
        ${RDEPEND}
-       virtual/pkgconfig
        test? ( dev-util/cmocka )
        "
+BDEPEND="virtual/pkgconfig"
 
 S="${WORKDIR}"/${MY_P}
 RESTRICT="!test? ( test )"
@@ -48,24 +48,26 @@ src_compile() {
        emake "${make_args[@]}"
 }
 
+src_test() {
+       # TODO: Test failures seem to be ignored in the upstream Makefile?
+       # e.g. https://github.com/gkdr/axc/blob/master/Makefile#L154
+       emake CC="$(tc-getCC)" test
+}
+
 src_install() {
        emake DESTDIR="${D}" PREFIX=/usr install
 
        # Respect libdir other than /usr/lib, e.g. /usr/lib64
        local libdir="$(get_libdir)"
        if [[ ${libdir} != lib ]]; then
-               mv "${D}"/usr/{lib,${libdir}} || die
+               mv "${ED}"/usr/{lib,${libdir}} || die
                sed "s|^libdir=.*|libdir=\${prefix}/${libdir}|" \
-                               -i "${D}/usr/${libdir}/pkgconfig/libaxc.pc" || 
die
+                               -i "${ED}/usr/${libdir}/pkgconfig/libaxc.pc" || 
die
        fi
 
        einstalldocs
 
        if ! use static-libs ; then
-               rm "${D}/usr/${libdir}/libaxc.a" || die
+               rm "${ED}/usr/${libdir}/libaxc.a" || die
        fi
 }
-
-src_test() {
-       emake -j1 test
-}

Reply via email to