From 01a332bf7081063c6524af4973fab0d319dd776c Mon Sep 17 00:00:00 2001 From: "Marty E. Plummer" Date: Fri, 19 Oct 2018 04:40:33 -0500 Subject: [PATCH] app-text/scdoc: fix cross-compile, prefix install. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-compiling (tested with a crossdev musl toolchain via `PORTAGE_CONFIGROOT=/usr/x86_64-pc-linux-musl ebuild scdoc-1.3.1.ebuild ...` currently fails because VERSION is not defined. Installing in prefix fails due to files being installed outside of the prefix. Pass PREFIX="${EPREFIX}/usr" on emake call. Tested via building with `ebuild scdoc-1.3.1.ebuild ...` while inside a prefix. Signed-off-by: Marty E. Plummer Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Michał Górny --- app-text/scdoc/scdoc-1.3.1.ebuild | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app-text/scdoc/scdoc-1.3.1.ebuild b/app-text/scdoc/scdoc-1.3.1.ebuild index c5d56d74dfee5..c8999bc805328 100644 --- a/app-text/scdoc/scdoc-1.3.1.ebuild +++ b/app-text/scdoc/scdoc-1.3.1.ebuild @@ -18,23 +18,21 @@ src_prepare() { sed -e 's/-Werror//' \ -e 's/CFLAGS=/CFLAGS+=/' \ - -e '/^PREFIX/s@=.*$@=/usr@' \ -i Makefile || die 'Failed to patch Makefile' } src_compile() { - MY_HS="./scdoc" + local MY_HS="./scdoc" if tc-is-cross-compiler; then tc-export_build_env MY_HS="./hostscdoc" - MAKEOPTS+=" HOST_SCDOC=./hostscdoc" - emake scdoc OUTDIR="${S}/.build.host" CC=$(tc-getBUILD_CC) \ - CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" + emake scdoc HOST_SCDOC="./hostscdoc" OUTDIR="${S}/.build.host" CC="$(tc-getBUILD_CC)" \ + CFLAGS="${BUILD_CFLAGS} -DVERSION='\"${PV}\"'" LDFLAGS="${BUILD_LDFLAGS}" mv scdoc hostscdoc || die 'Failed to rename host scdoc' fi - emake LDFLAGS="${LDFLAGS}" HOST_SCDOC="${MY_HS}" + emake LDFLAGS="${LDFLAGS}" PREFIX="${EPREFIX}/usr" HOST_SCDOC="${MY_HS}" } src_install() { - emake DESTDIR="${D}" HOST_SCDOC="${MY_HS}" install + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" HOST_SCDOC="${MY_HS}" install }