summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-29 17:50:47 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-29 17:53:32 -0500
commitcae0c8e14f6c43f8dcd94982cc3d977ae08da713 (patch)
treedf84f7d22391464bf8ca1deb227785bd7eb76b64 /sci-visualization
parentsys-block/flashbench: initial commit (diff)
downloadgentoo-cae0c8e14f6c43f8dcd94982cc3d977ae08da713.tar.gz
gentoo-cae0c8e14f6c43f8dcd94982cc3d977ae08da713.tar.bz2
gentoo-cae0c8e14f6c43f8dcd94982cc3d977ae08da713.zip
sci-visualization/gnuplot: fix cross-compile builds
The upstream build tries to set up CC_FOR_BUILD for building helper tools, but still mixes target compiler flags in which easily leads to failure.
Diffstat (limited to 'sci-visualization')
-rw-r--r--sci-visualization/gnuplot/gnuplot-4.6.5.ebuild9
-rw-r--r--sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild10
2 files changed, 19 insertions, 0 deletions
diff --git a/sci-visualization/gnuplot/gnuplot-4.6.5.ebuild b/sci-visualization/gnuplot/gnuplot-4.6.5.ebuild
index b5f2965c1104..3dd44b263b9f 100644
--- a/sci-visualization/gnuplot/gnuplot-4.6.5.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-4.6.5.ebuild
@@ -104,6 +104,13 @@ src_prepare() {
distributed separately; the gnuplot ebuild no longer installs it.
Emerge app-emacs/gnuplot-mode for Emacs support.'
has_version "${CATEGORY}/${PN}[emacs(-)]" && FORCE_PRINT_ELOG=1
+
+ # Make sure we don't mix build & host flags.
+ sed -i \
+ -e 's:@CPPFLAGS@:$(BUILD_CPPFLAGS):' \
+ -e 's:@CFLAGS@:$(BUILD_CFLAGS):' \
+ -e 's:@LDFLAGS@:$(BUILD_LDFLAGS):' \
+ docs/Makefile.in || die
}
src_configure() {
@@ -117,6 +124,8 @@ src_configure() {
fi
tc-export CC CXX #453174
+ tc-export_build_env BUILD_CC
+ export CC_FOR_BUILD=${BUILD_CC}
econf \
--without-pdf \
diff --git a/sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild b/sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild
index ad5b62d0097e..ed43ed58f61d 100644
--- a/sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild
@@ -104,6 +104,14 @@ src_prepare() {
mv configure.in configure.ac || die
eautoreconf
+
+ # Make sure we don't mix build & host flags.
+ sed -i \
+ -e 's:@CPPFLAGS@:$(BUILD_CPPFLAGS):' \
+ -e 's:@CFLAGS@:$(BUILD_CFLAGS):' \
+ -e 's:@LDFLAGS@:$(BUILD_LDFLAGS):' \
+ -e 's:@CC@:$(CC_FOR_BUILD):' \
+ docs/Makefile.in || die
}
src_configure() {
@@ -117,6 +125,8 @@ src_configure() {
fi
tc-export CC CXX #453174
+ tc-export_build_env BUILD_CC
+ export CC_FOR_BUILD=${BUILD_CC}
econf \
--without-pdf \