app-misc/ondir: honour CFLAGS, LD and LDFLAGS.

Closes: https://bugs.gentoo.org/722338
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
This commit is contained in:
Patrice Clement
2020-06-21 09:45:03 +02:00
parent 8fab97203d
commit a6e815bba4

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -22,15 +22,17 @@ src_prepare() {
default
sed -i \
-e "s:\(/man/.*$\):/share\1:g" \
-e "s:-g:${CFLAGS}:" Makefile || die "sed Makefile failed"
-e "s#^CFLAGS=\(.*\)#CFLAGS= \1 ${CFLAGS}#g;" \
-e "s#^LDFLAGS=\(.*\)#LDFLAGS= \1 ${LDFLAGS}#g;" \
-i Makefile || die "sed Makefile failed"
}
src_compile() {
emake \
CC="$(tc-getCC)" \
LD="$(tc-getCC)" \
PREFIX="${EPREFIX}/usr" \
CONF="${EPREFIX}/etc/ondirrc" \
LDFLAGS="${LDFLAGS}"
CONF="${EPREFIX}/etc/ondirrc"
}
src_install() {