commit: 6aff85369909ec04e1370741a006d65ca3827a01 Author: Petr Vaněk <arkamar <AT> atlas <DOT> cz> AuthorDate: Mon Apr 3 11:14:21 2023 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Tue Apr 4 09:01:43 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6aff8536
qmail.eclass: Patch make-makelib.sh only if it is present Some packages use qmail_set_cc function but they don't contain make-makelib.sh script. However, recent addition of || die to the sed patching this file is newly triggering build failure. This commit addresses the problem by checking if the script is available. Closes: https://bugs.gentoo.org/902009 Closes: https://bugs.gentoo.org/902019 Fixes: fd4e88c55e34 ("qmail.eclass: remove EAPI 6") Closes: https://github.com/gentoo/gentoo/pull/30456 Closes: https://github.com/gentoo/gentoo/pull/30205 Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz> Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> eclass/qmail.eclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass index d527eb5f79d5..0e47aa55fa25 100644 --- a/eclass/qmail.eclass +++ b/eclass/qmail.eclass @@ -92,7 +92,12 @@ qmail_set_cc() { echo "${cc} ${CFLAGS} ${CPPFLAGS}" > ./conf-cc || die 'Patching conf-cc failed.' echo "${ld} ${LDFLAGS}" > ./conf-ld || die 'Patching conf-ld failed.' - sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh || die + + # This function is used also by sys-apps/ucspi-tcp and sys-process/daemontools-encore + # but they don't have make-makelib.sh script, see bugs #902009 and #902019 + if [[ -f make-makelib.sh ]]; then + sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh || die + fi } genqmail_src_unpack() {
