diff options
author | Marty E. Plummer <hanetzer@startmail.com> | 2018-10-19 04:40:33 -0500 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-10-22 22:23:20 +0200 |
commit | 01a332bf7081063c6524af4973fab0d319dd776c (patch) | |
tree | 584e9f8502f350b2a8f9fe018d1bbbf2465f6f28 /app-text/scdoc | |
parent | app-text/scdoc: point at new location for source tarball (diff) | |
download | gentoo-01a332bf7081063c6524af4973fab0d319dd776c.tar.gz gentoo-01a332bf7081063c6524af4973fab0d319dd776c.tar.bz2 gentoo-01a332bf7081063c6524af4973fab0d319dd776c.zip |
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@startmail.com>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text/scdoc')
-rw-r--r-- | app-text/scdoc/scdoc-1.3.1.ebuild | 12 |
1 files 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 c5d56d74dfee..c8999bc80532 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 } |