From 4e78b1f4dc9f0e74e3ff31f483eab0cfda8c9ded Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Mon, 22 Feb 2016 01:20:32 +0100 Subject: [PATCH] update to current Git master HEAD - fix narrowing conversion compilation error --- .gitignore | 1 + openbabel-narrowing-conversion.patch | 33 ++++++++++++++++++++++++++++ openbabel.spec | 11 +++++++--- sources | 2 +- 4 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 openbabel-narrowing-conversion.patch diff --git a/.gitignore b/.gitignore index 642c26d..b438aa5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ openbabel-2.0.2.tar.gz /openbabel-2.3.2.tar.gz /openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d.tar.gz /openbabel-a345105b28173eb7da14ecd1e5beebe94140c6d7.tar.gz +/openbabel-3a63a9849f8d9719c5989c43875d51be50c53019.tar.gz diff --git a/openbabel-narrowing-conversion.patch b/openbabel-narrowing-conversion.patch new file mode 100644 index 0000000..5524bec --- /dev/null +++ b/openbabel-narrowing-conversion.patch @@ -0,0 +1,33 @@ +diff -up openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/pngformat.cpp.nc openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/pngformat.cpp +--- openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/pngformat.cpp.nc 2016-02-16 23:47:25.000000000 +0100 ++++ openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/pngformat.cpp 2016-02-18 19:01:40.509752461 +0100 +@@ -218,7 +218,7 @@ bool PNGFormat::ReadMolecule(OBBase* pOb + _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 -up openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/yasaraformat.cpp.nc openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/yasaraformat.cpp +--- openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/yasaraformat.cpp.nc 2016-02-16 23:47:25.000000000 +0100 ++++ openbabel-3a63a9849f8d9719c5989c43875d51be50c53019/src/formats/yasaraformat.cpp 2016-02-18 23:22:23.786793588 +0100 +@@ -472,7 +472,7 @@ bool YOBFormat::WriteMolecule(OBBase* pO + + // 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* pO + 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); diff --git a/openbabel.spec b/openbabel.spec index 004221a..3f533a4 100644 --- a/openbabel.spec +++ b/openbabel.spec @@ -1,4 +1,4 @@ -%global commit a345105b28173eb7da14ecd1e5beebe94140c6d7 +%global commit 3a63a9849f8d9719c5989c43875d51be50c53019 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %{!?perl_vendorarch:%global perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)} @@ -9,7 +9,7 @@ Name: openbabel Version: 2.3.90 -Release: 0.9.20150402git%{shortcommit}%{?dist} +Release: 0.9.20160216git%{shortcommit}%{?dist} Summary: Chemistry software file format converter License: GPLv2 Group: Applications/File @@ -30,6 +30,7 @@ Patch7: openbabel-ruby19-vendorarch.patch # - aarch64 (#1094513) # Upstream bugs: https://sourceforge.net/p/openbabel/bugs/927/ https://sourceforge.net/p/openbabel/bugs/945/ Patch8: openbabel-disable-tests-some-arches.patch +Patch9: openbabel-narrowing-conversion.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: eigen3-devel @@ -136,6 +137,7 @@ Ruby wrapper for the Open Babel library. %ifarch %{power64} s390 s390x armv7hl aarch64 %patch8 -p1 -b .some_arches %endif +%patch9 -p1 -b .nc convert src/GUI/babel.xpm -transparent white babel.png # Remove duplicate html files @@ -158,6 +160,7 @@ done -DENABLE_VERSIONED_FORMATS=false \ -DRUN_SWIG=true \ -DENABLE_TESTS:BOOL=ON \ + -DOPTIMIZE_NATIVE=OFF \ . make VERBOSE=1 %{?_smp_mflags} @@ -220,9 +223,11 @@ make test %{ruby_vendorarchdir}/openbabel.so %changelog -* Thu Feb 18 2016 Dominik Mierzejewski - 2.3.90-0.9.20150402gita345105 +* Thu Feb 18 2016 Dominik Mierzejewski - 2.3.90-0.9.20160216git3a63a984 - drop redundant BuildRoot and defattr - fix macro usage +- update to current Git master HEAD +- fix narrowing conversion compilation error * Thu Feb 04 2016 Fedora Release Engineering - 2.3.90-0.8.20150402gita345105 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 6e3f47c..869dd14 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2d139c1f2adbd101ccfcb4ade7c7c6d2 openbabel-a345105b28173eb7da14ecd1e5beebe94140c6d7.tar.gz +2392a79f894ea395dc2e7922e0dd3fa1 openbabel-3a63a9849f8d9719c5989c43875d51be50c53019.tar.gz