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 +}