From d4a2f43248e51bf19a20ed7231263ea91a5187ea Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 30 Aug 2016 14:42:05 +0200 Subject: [PATCH] R: sanitize Makeconf flags Closes #4692. --- srcpkgs/R/template | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/srcpkgs/R/template b/srcpkgs/R/template index df2befaf9d0..8b32850b89b 100644 --- a/srcpkgs/R/template +++ b/srcpkgs/R/template @@ -1,7 +1,7 @@ # Template file for 'R' pkgname=R version=3.3.1 -revision=1 +revision=2 nocross=yes build_style=gnu-configure configure_args="--docdir=/usr/share/doc/R rdocdir=/usr/share/doc/R @@ -26,3 +26,10 @@ pre_configure() { export R_PDFVIEWER=/usr/bin/xdg-open export FFLAGS="$CFLAGS" } + +post_install() { + # Sanitize Makeconf flags + sed -i -e 's/^\(CFLAGS\|CXXFLAGS\|CXX1XFLAGS\|FFLAGS\|SAFE_FFLAGS\) = .*/\1 = -O2 -g $(LTO)/' \ + -e 's/^LDFLAGS = .*/LDFLAGS =/' \ + $DESTDIR/usr/lib/R/etc/Makeconf +}