net-mail/mailfront: respect AR, RANLIB and LDFLAGS

Closes: https://bugs.gentoo.org/727834
Closes: https://bugs.gentoo.org/792249
Closes: https://bugs.gentoo.org/792252
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
This commit is contained in:
Petr Vaněk 2024-08-07 13:00:30 +02:00
parent 241de46624
commit 8af93c014c
No known key found for this signature in database
GPG Key ID: 351D91B6D7DF9E50

View File

@ -19,13 +19,26 @@ RDEPEND="${DEPEND}
virtual/qmail
net-libs/cvm"
src_prepare() {
default
local sed_args=(
# make compilation more verbose
-e '/exec/ {h;s/exec/echo/g;G}'
# replace AR and be more verbose, bug #792249
-e "/ar cr/ {h;s/ar/echo &/;G;s:ar:$(tc-getAR):g}"
# replace RANLIB and be more verbose, bug #792252
-e "/ranlib/ {h;s/ranlib/echo &/;G;s:ranlib:$(tc-getRANLIB):g}"
)
sed -i "${sed_args[@]}" Makefile || die
}
src_configure() {
echo "${EPREFIX}/var/qmail" > conf-qmail || die
echo "/var/qmail/bin" > conf-bin || die
echo "/usr/$(get_libdir)/mailfront" > conf-modules || die
echo "/usr/include" > conf-include || die
echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
echo "$(tc-getCC) ${CFLAGS} -fPIC -shared" > conf-ccso || die
echo "$(tc-getCC) ${CFLAGS} -fPIC -shared ${LDFLAGS}" > conf-ccso || die
echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
}