From 506cf4396879595144994b196fe9b036a684eb6f Mon Sep 17 00:00:00 2001 From: newbluemoon Date: Thu, 4 Jan 2018 11:04:36 +0100 Subject: [PATCH] openbabel: update to 2.4.1 / unbreak arm* and aarch64* --- common/shlibs | 2 +- srcpkgs/openbabel/patches/unsigned_char.patch | 33 +++++++++++++++++++ srcpkgs/openbabel/template | 12 +++---- 3 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 srcpkgs/openbabel/patches/unsigned_char.patch diff --git a/common/shlibs b/common/shlibs index f00b932a5c..aabe1ec25b 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2621,7 +2621,7 @@ libMonoSupportW.so mono-4.0.1.44_2 libmono-btls-shared.so mono-5.2.0.215_1 libxcb-xrm.so.0 xcb-util-xrm-1.0_1 libinchi.so.0 openbabel-2.3.2_1 -libopenbabel.so.4 openbabel-2.3.2_1 +libopenbabel.so.5 openbabel-2.4.1_1 libavogadro.so.1 avogadro-1.2.0_1 libavogadro_OpenQube.so.0 avogadro-1.2.0_1 libcourier-unicode.so.4 courier-unicode-2.0_1 diff --git a/srcpkgs/openbabel/patches/unsigned_char.patch b/srcpkgs/openbabel/patches/unsigned_char.patch new file mode 100644 index 0000000000..15fedf1235 --- /dev/null +++ b/srcpkgs/openbabel/patches/unsigned_char.patch @@ -0,0 +1,33 @@ +https://github.com/openbabel/openbabel/commit/ee11c98a655296550710db1207b294f00e168216 + +--- src/formats/pngformat.cpp.orig 2016-09-21 21:55:37.000000000 +0200 ++++ src/formats/pngformat.cpp 2018-01-04 08:22:33.377616730 +0100 +@@ -218,7 +218,7 @@ + _count=0; + _hasInputPngFile=true; + } +- const char pngheader[] = {-119,80,78,71,13,10,26,10,0}; ++ const unsigned char pngheader[] = {137,80,78,71,13,10,26,10,0}; + char readbytes[9]; + ifs.read(readbytes, 8); + +--- src/formats/yasaraformat.cpp.orig 2016-09-21 21:55:37.000000000 +0200 ++++ src/formats/yasaraformat.cpp 2018-01-04 09:00:45.636003936 +0100 +@@ -472,7 +472,7 @@ + + // bool hetatom; + char buffer[32],/*resname[4],*/atomname[5]; +- char double1[8]={0,0,0,0,0,0,-16,0x3f}; ++ unsigned char double1[8]={0,0,0,0,0,0,0xf,0x3f}; + // char *str; + int i,j,/*m,q,*/pos; + int /*resno,chainNum,link,linktype,*/atoms,element,links/*,chain*/; +@@ -500,7 +500,7 @@ + mem_set(buffer,0,8); + for (i=0;i<4;i++) + { for (j=0;j<4;j++) +- { if (i==j) ofs.write(double1,8); ++ { if (i==j) ofs.write((char*)double1,8); + else ofs.write(buffer,8); } } + storeint32le(buffer,MOB_INFOEND); + storeint32le(&buffer[4],MOB_INFOENDSIZE); diff --git a/srcpkgs/openbabel/template b/srcpkgs/openbabel/template index c0da3725b6..2f5fb065cb 100644 --- a/srcpkgs/openbabel/template +++ b/srcpkgs/openbabel/template @@ -1,22 +1,18 @@ # Template file for 'openbabel' pkgname=openbabel -version=2.4.0 -revision=2 +version=2.4.1 +revision=1 _ver=${version//./-} wrksrc=${pkgname}-${pkgname}-${_ver} build_style=cmake -hostmakedepends="pkg-config eigen" +hostmakedepends="pkg-config eigen3.2" makedepends="cairo-devel libxml2-devel wxWidgets-devel" short_desc="The Open Source Chemistry Toolbox" maintainer="Diogo Leal " license="GPL-2" homepage="http://openbabel.org" distfiles="https://github.com/openbabel/openbabel/archive/openbabel-${_ver}.tar.gz" -checksum=b210cc952ce1ecab6efaf76708d3bd179c9b0f0d73fe8bd1e0c934df7391a82a - -case $XBPS_TARGET_MACHINE in - arm*|aarch64*) broken="error: narrowing conversion of '-16' from 'int' to 'char' inside { }";; -esac +checksum=594c7f8a83f3502381469d643f7b185882da1dd4bc2280c16502ef980af2a776 if [ -n "${CROSS_BUILD}" ]; then hostmakedepends+=" python"