avogadro: fix build with glibc>=2.25

This commit is contained in:
Alessio Sergi 2017-04-21 18:14:12 +02:00
parent 2213aa5acb
commit bc4e9d48ef
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,18 @@
--- libavogadro/src/extensions/symmetry/libmsym/src/orbital.c.orig
+++ libavogadro/src/extensions/symmetry/libmsym/src/orbital.c
@@ -67,13 +67,13 @@
}
case 2 : {
//o->v = dpolynomial[m+l];
- char *d = (signbit(m) == 1 ? "-" : "+");
+ char *d = (signbit(m*1.0) == 1 ? "-" : "+");
snprintf(o->name, sizeof(o->name), "%dd%d%s",n,abs(m),d);
break;
}
default : {
char t = 'f' - 3 + l;
- char *d = (signbit(m) == 1 ? "-" : "+");
+ char *d = (signbit(m*1.0) == 1 ? "-" : "+");
snprintf(o->name, sizeof(o->name), "%d%c%d%s",n,t,abs(m),d);
}
}

View file

@ -14,6 +14,9 @@ homepage="http://avogadro.cc"
distfiles="https://github.com/cryos/avogadro/archive/${version}.tar.gz"
checksum=6453e36e8ae3e61655cbe062df6d6fa6b2409122c7b5abc0a6f1d410a181640b
pre_build() {
sed -i 's|_BSD_SOURCE|_DEFAULT_SOURCE|g' CMakeLists.txt
}
post_install() {
rm -rf ${DESTDIR}/usr/features
}