summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2019-01-25 21:38:47 +0000
committerJames Le Cuirot <chewi@gentoo.org>2019-01-25 21:39:30 +0000
commit26d2abf134411ea9f80c5377c5609808663370c0 (patch)
tree2c32a0c0f29c3bb4c29d1d3038820961c6f7d656 /sys-apps/groff
parentdev-lang/lua: bump to 5.2.4 and 5.3.5, re-add upstream testsuite (diff)
downloadgentoo-26d2abf134411ea9f80c5377c5609808663370c0.tar.gz
gentoo-26d2abf134411ea9f80c5377c5609808663370c0.tar.bz2
gentoo-26d2abf134411ea9f80c5377c5609808663370c0.zip
sys-apps/groff: Fix cross-compiling following build file changes
Override the variables when calling make instead of changing the Makefiles. The comment in the Makefiles suggests that this is how upstream wants you to do it. Using ${EPREFIX} as before is not correct as this refer to the target prefix, not the build prefix. EAPI 7 provides ${BROOT} for this but for tools in the path, it is better to use type -P instead. groff is not in @system so there is no guarantee that it will actually be present on the build system. EAPI 7 did not include EAPI 5-hdepend's targetroot USE flag feature, which prevents us from putting groff in BDEPEND. The preferred approach is to do a native build in tandem with a cross build but this makes the ebuild more complex so I will attempt this in a separate fix. Closes: https://bugs.gentoo.org/674866 Package-Manager: Portage-2.3.58, Repoman-2.3.12 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'sys-apps/groff')
-rw-r--r--sys-apps/groff/groff-1.22.4.ebuild25
1 files changed, 12 insertions, 13 deletions
diff --git a/sys-apps/groff/groff-1.22.4.ebuild b/sys-apps/groff/groff-1.22.4.ebuild
index 8ec07c8c1ad7..3fa2e5096624 100644
--- a/sys-apps/groff/groff-1.22.4.ebuild
+++ b/sys-apps/groff/groff-1.22.4.ebuild
@@ -47,18 +47,6 @@ src_prepare() {
Makefile.in \
|| die "failed to modify Makefile.in"
- # Make sure we can cross-compile this puppy
- if tc-is-cross-compiler ; then
- sed -i \
- -e '/^GROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/groff:' \
- -e '/^TROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/troff:' \
- -e '/^GROFF_BIN_PATH=/s:=.*:=:' \
- -e '/^GROFF_BIN_DIR=/s:=.*:=:' \
- contrib/*/Makefile.sub \
- doc/Makefile.in \
- doc/Makefile.sub || die "cross-compile sed failed"
- fi
-
local pfx=$(usex prefix ' Prefix' '')
cat <<-EOF >> tmac/mdoc.local
.ds volume-operating-system Gentoo${pfx}
@@ -80,7 +68,18 @@ src_configure() {
}
src_compile() {
- emake AR="$(tc-getAR)"
+ if tc-is-cross-compiler ; then
+ local CROSS_ARGS=(
+ GROFFBIN="$(type -P groff)"
+ TROFFBIN="$(type -P troff)"
+ GROFF_BIN_DIR=
+ GROFF_BIN_PATH=
+ )
+ else
+ unset CROSS_ARGS
+ fi
+
+ emake AR="$(tc-getAR)" "${CROSS_ARGS[@]}"
}
src_install() {