devil: fix build with gcc5

This commit is contained in:
Juergen Buchmueller 2016-09-02 06:45:37 +02:00
parent 448eddbe58
commit de95a07c03
1 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'devil'
pkgname=devil
version=1.7.8
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-ILU --enable-ILUT --with-examples"
hostmakedepends="automake libtool pkg-config"
@ -27,6 +27,17 @@ pre_configure() {
-i ${wrksrc}/src-IL/src/il_icon.c
}
post_configure() {
local _gccver
# Disable RESTRICT_KEYWORD for gcc5
_gccver=$(gcc --version|awk '/^gcc / { print $3 }')
if [ "${_gccver%%.*}" -gt 4 ]; then
sed -i include/IL/config.h \
-e's;#define RESTRICT_KEYWORD.*;#undef RESTRICT_KEYWORD;'
fi
}
devil-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"