commit: 01a332bf7081063c6524af4973fab0d319dd776c Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com> AuthorDate: Fri Oct 19 09:40:33 2018 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon Oct 22 20:23:20 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01a332bf
app-text/scdoc: fix cross-compile, prefix install. 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 <hanetzer <AT> startmail.com> Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> 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 c5d56d74dfe..c8999bc8053 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 }