R: sanitize Makeconf flags

Closes #4692.
This commit is contained in:
Christian Neukirchen 2016-08-30 14:42:05 +02:00
parent decc4969d6
commit d4a2f43248
1 changed files with 8 additions and 1 deletions

View File

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