From 3e2bc54d883ae8ff7469116aec2ecccd71454a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 4 Dec 2019 10:54:53 +0100 Subject: [PATCH] openbabel: upgrade 2.4.1 -> 3.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should build without python2 Signed-off-by: Andreas Müller --- .../0001-Workaround-xdr-linker-error.patch | 30 ++++++++++ ...01-take-care-for-ARM-s-unsigned-char.patch | 58 ------------------- .../{openbabel_2.4.1.bb => openbabel_git.bb} | 12 ++-- 3 files changed, 37 insertions(+), 63 deletions(-) create mode 100644 recipes-misc/recipes-chemistry/openbabel/files/0001-Workaround-xdr-linker-error.patch delete mode 100644 recipes-misc/recipes-chemistry/openbabel/files/0001-take-care-for-ARM-s-unsigned-char.patch rename recipes-misc/recipes-chemistry/openbabel/{openbabel_2.4.1.bb => openbabel_git.bb} (64%) diff --git a/recipes-misc/recipes-chemistry/openbabel/files/0001-Workaround-xdr-linker-error.patch b/recipes-misc/recipes-chemistry/openbabel/files/0001-Workaround-xdr-linker-error.patch new file mode 100644 index 00000000..ddc59198 --- /dev/null +++ b/recipes-misc/recipes-chemistry/openbabel/files/0001-Workaround-xdr-linker-error.patch @@ -0,0 +1,30 @@ +From fce5f3a38a62dd4927adaa8372b73eedeeffbe46 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 3 Dec 2019 19:25:03 +0100 +Subject: [PATCH] Workaround xdr linker error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 33bf2da29..178231b62 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -224,7 +224,6 @@ check_include_file(conio.h HAVE_CONIO_H) + check_include_file(sys/time.h HAVE_SYS_TIME_H) + check_include_file(time.h HAVE_TIME_H) + check_include_file(strings.h HAVE_STRINGS_H) +-check_include_file(rpc/xdr.h HAVE_RPC_XDR_H) + check_include_file(regex.h HAVE_REGEX_H) + check_include_file_cxx(sstream HAVE_SSTREAM) + +-- +2.21.0 + diff --git a/recipes-misc/recipes-chemistry/openbabel/files/0001-take-care-for-ARM-s-unsigned-char.patch b/recipes-misc/recipes-chemistry/openbabel/files/0001-take-care-for-ARM-s-unsigned-char.patch deleted file mode 100644 index d36bf3aa..00000000 --- a/recipes-misc/recipes-chemistry/openbabel/files/0001-take-care-for-ARM-s-unsigned-char.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 52851a453a1da3452d55e44f13323389b3a689c2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Fri, 16 Dec 2016 18:39:34 +0100 -Subject: [PATCH] take care for ARM's unsigned char -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Stolen from [1] - -[1] http://pkgs.fedoraproject.org/cgit/rpms/openbabel.git/tree/openbabel-narrowing-conversion.patch - -Upstream-Status: Pending - -Signed-off-by: Andreas Müller ---- - src/formats/pngformat.cpp | 2 +- - src/formats/yasaraformat.cpp | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/formats/pngformat.cpp b/src/formats/pngformat.cpp -index 49bff17..375d42c 100644 ---- a/src/formats/pngformat.cpp -+++ b/src/formats/pngformat.cpp -@@ -218,7 +218,7 @@ bool PNGFormat::ReadMolecule(OBBase* pOb, OBConversion* pConv) - _count=0; - _hasInputPngFile=true; - } -- const char pngheader[] = {-119,80,78,71,13,10,26,10,0}; -+ const signed char pngheader[] = {-119,80,78,71,13,10,26,10,0}; - char readbytes[9]; - ifs.read(readbytes, 8); - -diff --git a/src/formats/yasaraformat.cpp b/src/formats/yasaraformat.cpp -index cfc0a53..5a4d413 100644 ---- a/src/formats/yasaraformat.cpp -+++ b/src/formats/yasaraformat.cpp -@@ -472,7 +472,7 @@ bool YOBFormat::WriteMolecule(OBBase* pOb, OBConversion* pConv) - - // bool hetatom; - char buffer[32],/*resname[4],*/atomname[5]; -- char double1[8]={0,0,0,0,0,0,-16,0x3f}; -+ const signed char double1[8]={0,0,0,0,0,0,-16,0x3f}; - // char *str; - int i,j,/*m,q,*/pos; - int /*resno,chainNum,link,linktype,*/atoms,element,links/*,chain*/; -@@ -500,7 +500,7 @@ bool YOBFormat::WriteMolecule(OBBase* pOb, OBConversion* pConv) - 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(reinterpret_cast(double1),8); - else ofs.write(buffer,8); } } - storeint32le(buffer,MOB_INFOEND); - storeint32le(&buffer[4],MOB_INFOENDSIZE); --- -2.5.5 - diff --git a/recipes-misc/recipes-chemistry/openbabel/openbabel_2.4.1.bb b/recipes-misc/recipes-chemistry/openbabel/openbabel_git.bb similarity index 64% rename from recipes-misc/recipes-chemistry/openbabel/openbabel_2.4.1.bb rename to recipes-misc/recipes-chemistry/openbabel/openbabel_git.bb index 73c25150..60667753 100644 --- a/recipes-misc/recipes-chemistry/openbabel/openbabel_2.4.1.bb +++ b/recipes-misc/recipes-chemistry/openbabel/openbabel_git.bb @@ -9,15 +9,17 @@ DEPENDS = " \ cairo \ libxml2 \ zlib \ + libtirpc \ " SRC_URI = " \ - ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ + git://github.com/openbabel/openbabel.git \ + file://0001-Workaround-xdr-linker-error.patch \ file://openbabel-gui.desktop \ - file://0001-take-care-for-ARM-s-unsigned-char.patch \ " -SRC_URI[md5sum] = "d9defcd7830b0592fece4fe54a137b99" -SRC_URI[sha256sum] = "204136582cdfe51d792000b20202de8950218d617fd9c6e18cee36706a376dfc" +SRCREV = "49f9cfb32bd0bc6ea440639d338123eb27accbe2" +S = "${WORKDIR}/git" +PV = "3.0.0" do_install_append() { install -d ${D}${datadir}/applications @@ -27,4 +29,4 @@ do_install_append() { convert.im7 ${S}/src/GUI/babel.xpm -transparent white ${D}${datadir}/pixmaps/babel.png } -FILES_${PN} += "${libdir}/cmake" +FILES_${PN}-dev += "${libdir}/cmake"