dev-build/icmake: make AR, RANLIB overrideable, fix on prefix

Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Part-of: https://github.com/gentoo/gentoo/pull/42687
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alexey Sokolov 2025-06-22 09:26:57 +01:00 committed by Sam James
parent ad74ff1636
commit 5c63bc104e
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 21 additions and 3 deletions

View File

@ -0,0 +1,17 @@
https://gitlab.com/fbb-git/icmake/-/merge_requests/12
diff --git a/scripts/ib/staticlibrary b/scripts/ib/staticlibrary
index f051569..e33084f 100644
--- a/scripts/ib/staticlibrary
+++ b/scripts/ib/staticlibrary
@@ -4,8 +4,8 @@ void static_library()
if (g_compiled)
{
- system("ar cr ../lib" LIBRARY + ".a *" OBJ_EXT);
- system("ranlib ../lib" LIBRARY + ".a");
+ system("${AR:-ar} cr ../lib" LIBRARY + ".a *" OBJ_EXT);
+ system("${RANLIB:-ar} ../lib" LIBRARY + ".a");
system("rm *" OBJ_EXT);
}
}

View File

@ -1,7 +1,7 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit toolchain-funcs flag-o-matic
@ -18,6 +18,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-9.00.00-ar.patch
"${FILESDIR}"/${PN}-9.02.02-verbose-build.patch
"${FILESDIR}"/${PN}-9.03.01-compressed-docs.patch
"${FILESDIR}"/${PN}-9.03.01-ar.patch
)
src_prepare() {
@ -43,5 +44,5 @@ src_compile() {
}
src_install() {
./icm_install all "${ED}" || die
./icm_install all "${D}" || die
}