1 |
commit: 01a332bf7081063c6524af4973fab0d319dd776c |
2 |
Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com> |
3 |
AuthorDate: Fri Oct 19 09:40:33 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 22 20:23:20 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01a332bf |
7 |
|
8 |
app-text/scdoc: fix cross-compile, prefix install. |
9 |
|
10 |
Cross-compiling (tested with a crossdev musl toolchain via |
11 |
`PORTAGE_CONFIGROOT=/usr/x86_64-pc-linux-musl ebuild scdoc-1.3.1.ebuild ...` |
12 |
currently fails because VERSION is not defined. |
13 |
|
14 |
Installing in prefix fails due to files being installed outside of the |
15 |
prefix. Pass PREFIX="${EPREFIX}/usr" on emake call. |
16 |
|
17 |
Tested via building with `ebuild scdoc-1.3.1.ebuild ...` while inside a |
18 |
prefix. |
19 |
|
20 |
Signed-off-by: Marty E. Plummer <hanetzer <AT> startmail.com> |
21 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
22 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
23 |
|
24 |
app-text/scdoc/scdoc-1.3.1.ebuild | 12 +++++------- |
25 |
1 file changed, 5 insertions(+), 7 deletions(-) |
26 |
|
27 |
diff --git a/app-text/scdoc/scdoc-1.3.1.ebuild b/app-text/scdoc/scdoc-1.3.1.ebuild |
28 |
index c5d56d74dfe..c8999bc8053 100644 |
29 |
--- a/app-text/scdoc/scdoc-1.3.1.ebuild |
30 |
+++ b/app-text/scdoc/scdoc-1.3.1.ebuild |
31 |
@@ -18,23 +18,21 @@ src_prepare() { |
32 |
|
33 |
sed -e 's/-Werror//' \ |
34 |
-e 's/CFLAGS=/CFLAGS+=/' \ |
35 |
- -e '/^PREFIX/s@=.*$@=/usr@' \ |
36 |
-i Makefile || die 'Failed to patch Makefile' |
37 |
} |
38 |
|
39 |
src_compile() { |
40 |
- MY_HS="./scdoc" |
41 |
+ local MY_HS="./scdoc" |
42 |
if tc-is-cross-compiler; then |
43 |
tc-export_build_env |
44 |
MY_HS="./hostscdoc" |
45 |
- MAKEOPTS+=" HOST_SCDOC=./hostscdoc" |
46 |
- emake scdoc OUTDIR="${S}/.build.host" CC=$(tc-getBUILD_CC) \ |
47 |
- CFLAGS="${BUILD_CFLAGS}" LDFLAGS="${BUILD_LDFLAGS}" |
48 |
+ emake scdoc HOST_SCDOC="./hostscdoc" OUTDIR="${S}/.build.host" CC="$(tc-getBUILD_CC)" \ |
49 |
+ CFLAGS="${BUILD_CFLAGS} -DVERSION='\"${PV}\"'" LDFLAGS="${BUILD_LDFLAGS}" |
50 |
mv scdoc hostscdoc || die 'Failed to rename host scdoc' |
51 |
fi |
52 |
- emake LDFLAGS="${LDFLAGS}" HOST_SCDOC="${MY_HS}" |
53 |
+ emake LDFLAGS="${LDFLAGS}" PREFIX="${EPREFIX}/usr" HOST_SCDOC="${MY_HS}" |
54 |
} |
55 |
|
56 |
src_install() { |
57 |
- emake DESTDIR="${D}" HOST_SCDOC="${MY_HS}" install |
58 |
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" HOST_SCDOC="${MY_HS}" install |
59 |
} |