fix shared_ptr usage with gcc 5+ (#1318062)

This commit is contained in:
Dominik Mierzejewski 2016-04-07 10:19:06 +02:00
parent 7249506091
commit 34b1453e9b
2 changed files with 20 additions and 1 deletions

12
openbabel-gcc5.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up openbabel-2.3.2/include/openbabel/shared_ptr.h.gcc5 openbabel-2.3.2/include/openbabel/shared_ptr.h
--- openbabel-2.3.2/include/openbabel/shared_ptr.h.gcc5 2011-10-12 22:24:02.000000000 +0200
+++ openbabel-2.3.2/include/openbabel/shared_ptr.h 2016-04-07 02:58:06.688221894 +0200
@@ -21,7 +21,7 @@ GNU General Public License for more deta
#define shared_ptr boost::shared_ptr
#else
#include <memory>
- #if __GNUC__ == 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
+ #if __GNUC__ >= 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
#include <tr1/memory>
#endif
using std::tr1::shared_ptr;

View File

@ -10,7 +10,7 @@
Name: openbabel
Version: 2.3.2
Release: 11%{beta_ver}%{?dist}
Release: 12%{beta_ver}%{?dist}
Summary: Chemistry software file format converter
License: GPLv2
Group: Applications/File
@ -39,6 +39,9 @@ Patch7: openbabel-2.3.1-ruby19-vendorarch.patch
Patch8: openbabel-disable-tests-some-arches.patch
# Remove deprecated usage on ruby 22
Patch10: openbabel-2.3.1-ruby22-remove-deprecated-usage.patch
# Fix shared_ptr usage with gcc 5+
# https://bugzilla.redhat.com/show_bug.cgi?id=1318062
Patch11: openbabel-gcc5.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
BuildRequires: desktop-file-utils
@ -154,6 +157,7 @@ Ruby wrapper for the Open Babel library.
%patch8 -p1 -b .some_arches
%endif
%patch10 -p1 -b .rbconfig
%patch11 -p1 -b .gcc5
chmod 644 src/formats/{fchk,genbank,mmcif}format.cpp
chmod 644 src/math/align.cpp
chmod 644 include/openbabel/{graphsym.h,math/align.h}
@ -258,6 +262,9 @@ make test
%{ruby_vendorarchdir}/openbabel.so
%changelog
* Thu Apr 07 2016 Dominik Mierzejewski <rpm@greysector.net> 2.3.2-12
- fix shared_ptr usage with gcc 5+ (#1318062)
* Tue Jan 27 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.3.2-11
- Unify patches which disable tests on ppc64, s390(x), arm and enable
result also for aarch64. rhbugs: #1108103 #1094491 #1094513