From f5185acba6bb3dbee9eb65d5f266bbe4df46eef2 Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Feb 17 2016 15:10:41 +0000 Subject: fix build with gcc-6 (bug #1308250) - use license macro - drop unnecessary attr --- diff --git a/xdrawchem-gcc6.patch b/xdrawchem-gcc6.patch new file mode 100644 index 0000000..417ef55 --- /dev/null +++ b/xdrawchem-gcc6.patch @@ -0,0 +1,21 @@ +diff -up xdrawchem-1.9.9/xdrawchem/molecule_obmol.cpp.gcc6 xdrawchem-1.9.9/xdrawchem/molecule_obmol.cpp +--- xdrawchem-1.9.9/xdrawchem/molecule_obmol.cpp.gcc6 2005-11-30 03:55:06.000000000 +0100 ++++ xdrawchem-1.9.9/xdrawchem/molecule_obmol.cpp 2016-02-17 16:03:30.652748203 +0100 +@@ -198,7 +198,7 @@ OBMol * Molecule::convertToOBMol() { + atom.SetType( type ); + + if (!obmol->AddAtom(atom)) +- return(false); ++ return(NULL); + atom.Clear(); + } + +@@ -212,7 +212,7 @@ OBMol * Molecule::convertToOBMol() { + bst = tmp_bond->Stereo(); + if (bst == STEREO_UP) flag |= OB_WEDGE_BOND; + if (bst == STEREO_DOWN) flag |= OB_HASH_BOND; +- if (!obmol->AddBond(start,end,order,flag)) return(false); ++ if (!obmol->AddBond(start,end,order,flag)) return(NULL); + } + + obmol->EndModify(); diff --git a/xdrawchem.spec b/xdrawchem.spec index 48d3e20..62dbb1b 100644 --- a/xdrawchem.spec +++ b/xdrawchem.spec @@ -1,6 +1,6 @@ Name: xdrawchem Version: 1.9.9 -Release: 30%{?dist} +Release: 31%{?dist} Summary: 2D chemical structures drawing tool Source0: http://downloads.sourceforge.net/sourceforge/xdrawchem/%{name}-%{version}.tar.gz Source1: %{name}.desktop @@ -10,6 +10,7 @@ Patch2: %{name}-warn.patch Patch3: %{name}-include-header.patch Patch4: %{name}-link.patch Patch5: %{name}-duplicate-indexhtml.patch +Patch6: %{name}-gcc6.patch URL: http://xdrawchem.sourceforge.net/ License: GPLv2+ BuildRequires: desktop-file-utils @@ -34,6 +35,7 @@ XDrawChem and other chemistry applications. %patch3 -p1 -b .include %patch4 -p1 -b .l %patch5 -p1 -b .di +%patch6 -p1 -b .gcc6 # re-run autoconf to enable aarch64 support (bug #1019042) autoreconf -vif @@ -70,13 +72,19 @@ fi gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -%doc HISTORY.txt GPL.txt README.txt TODO.txt -%attr(755,root,root) %{_bindir}/xdrawchem +%license GPL.txt +%doc HISTORY.txt README.txt TODO.txt +%{_bindir}/xdrawchem %{_datadir}/xdrawchem %{_datadir}/applications/xdrawchem.desktop %{_datadir}/icons/hicolor/*/apps/xdrawchem.png %changelog +* Wed Feb 17 2016 Dominik Mierzejewski - 1.9.9-31 +- fix build with gcc-6 (bug #1308250) +- use license macro +- drop unnecessary attr + * Fri Feb 05 2016 Fedora Release Engineering - 1.9.9-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild