One issue is in src_install to not respect EPREFIX. Another issue is in src_compile to not use correct toolchain, but make builtins CC=cc and AR=ar instead.
Created attachment 575464 [details, diff] [PATCH] dev-libs/libutf8proc: respect CC, AR, EPREFIX Replacing the values for CC,AR,EPREFIX in src_configure right into each Makefile allows to use default functions for src_compile, src_test and src_install.
Ok to push with revbump?
Please wait, I'm looking at this.
I'll fix this in a less "sed"-y way soon, but I have to rebuild my prefix environment first.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42a0f06960a3e1c51c6b3a8841c20118d5c2753c commit 42a0f06960a3e1c51c6b3a8841c20118d5c2753c Author: Virgil Dupras <vdupras@gentoo.org> AuthorDate: 2019-05-07 13:58:40 +0000 Commit: Virgil Dupras <vdupras@gentoo.org> CommitDate: 2019-05-07 13:58:40 +0000 dev-libs/libutf8proc: fix build on Prefix Closes: https://bugs.gentoo.org/685266 Signed-off-by: Virgil Dupras <vdupras@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 dev-libs/libutf8proc/files/libutf8proc-2.3.0-tests-nofetch.patch | 2 +- .../{libutf8proc-2.3.0.ebuild => libutf8proc-2.3.0-r1.ebuild} | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-)
Thanks! But although that does work for me, src_test still would use "cc" rather than "$(tc-getCC)", because bench/Makefile does set 'CC=cc'. Note the difference to toplevel Makefile using 'CC?=gcc', where 'tc-export CC' would have helped because of the '?='. So you may want to add something like this as well: src_test() { emake check CC=$(tc-getCC) }
Yes, I see. But from what I've tried, tests on Prefix are broken because the unicode-data package isn't prefix-aware.
Well, this was not about testing in Prefix but Gentoo mainline, where it uses CC=cc. And despite missing keywords, app-i18n/unicode-data-12.0.0 seems to merge fine in Prefix.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f96357cd60b47e290acf6e0fa0cad0e98ee1d323 commit f96357cd60b47e290acf6e0fa0cad0e98ee1d323 Author: Virgil Dupras <vdupras@gentoo.org> AuthorDate: 2019-05-07 18:04:14 +0000 Commit: Virgil Dupras <vdupras@gentoo.org> CommitDate: 2019-05-07 18:05:02 +0000 dev-libs/libutf8proc: use proper toolchain during tests Bug: https://bugs.gentoo.org/685266 Signed-off-by: Virgil Dupras <vdupras@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 dev-libs/libutf8proc/libutf8proc-2.3.0-r1.ebuild | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
Nice! One syntactic nit though: $@ needs to be quoted as "$@" to work as expected. And a cosmetic one: IIRC, we should use "my_fun" names rather than "_fun", no?