Hello community,

here is the log from the commit of package avogadro for openSUSE:Factory 
checked in at 2013-03-14 16:52:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/avogadro (Old)
 and      /work/SRC/openSUSE:Factory/.avogadro.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "avogadro", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/avogadro/avogadro.changes        2013-03-08 
09:07:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.avogadro.new/avogadro.changes   2013-03-14 
16:52:57.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Feb  5 01:12:27 UTC 2013 - [email protected]
+
+- added MopacAuxReaderFix.patch to avoid crash when loading aux.
+- fixed build on SLES
+- split off python package
+  (also use sitearch for arch-dependent files)
+
+-------------------------------------------------------------------

New:
----
  MopacAuxReaderFix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ avogadro.spec ++++++
--- /var/tmp/diff_new_pack.qJ8i5T/_old  2013-03-14 16:52:59.000000000 +0100
+++ /var/tmp/diff_new_pack.qJ8i5T/_new  2013-03-14 16:52:59.000000000 +0100
@@ -28,14 +28,19 @@
 Source2:        baselibs.conf
 # PATCH-FIX-UPSTREAM return at least some value in a bool function
 Patch0:         avogadro-1.1.0-no-return-in-nonvoid-function.patch
+# PATCH-FIX-UPSTREAM avoid crash when loading aux - see 
https://github.com/cryos/avogadro/commit/a4050e8a3f70ddc2bcc75a5b00d26416964b7275.patch
+Patch1:         MopacAuxReaderFix.patch
 BuildRequires:  boost-devel
 BuildRequires:  cmake
 BuildRequires:  docbook-utils
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  glew-devel
+%if 0%{?suse_version} > 1220
+BuildRequires:  glu-devel
+%endif
 BuildRequires:  libeigen2-devel
-BuildRequires:  libopenbabel-devel >= 2.2.3
+BuildRequires:  libopenbabel-devel >= 2.3.1
 BuildRequires:  libqt4-devel >= 4.5.1
 BuildRequires:  python-devel
 BuildRequires:  python-numpy-devel
@@ -82,18 +87,31 @@
 This package contains files to develop applications using
 Avogadros libraries.
 
+%package -n python-avogadro
+Summary:        A python wrapper to avogadro
+Group:          Development/Languages/Python
+Requires:       python-numpy
+Requires:       python-sip
+
+%description -n python-avogadro
+This package contains the python wrapper to Avogadro.
+
+Avogadro is an advanced molecular editor designed
+for cross-platform use in computational chemistry,
+molecular modeling, bioinformatics, materials science,
+and related areas. It offers flexible rendering and
+a powerful plugin architecture.
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 mkdir -p build
 cd build
 export SUSE_ASNEEDED=0
 cmake  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-       -DCMAKE_C_FLAGS="%{optflags}" \
-       -DCMAKE_CXX_FLAGS="%{optflags}" \
-       -DCMAKE_VERBOSE_MAKEFILE=TRUE \
        -DENABLE_GLSL=ON \
 %if "%{_lib}" == "lib64"
         -DLIB_SUFFIX=64 \
@@ -108,7 +126,7 @@
 
 %install
 cd build
-%make_install
+%makeinstall
 
 mkdir -p %{buildroot}/%{_datadir}/qt4/mkspecs/
 mv %{buildroot}%{_prefix}/features %{buildroot}/%{_datadir}/qt4/mkspecs/
@@ -130,8 +148,10 @@
 # icon
 install -D -m644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
 %if "%{_lib}" == "lib64"
-       mkdir -p %{buildroot}%{python_sitelib}
-       find %{buildroot} -name 'Avogadro.so' | xargs mv -t 
%{buildroot}%{python_sitelib}/
+       mkdir -p %{buildroot}%{python_sitearch}
+       if [ ! -e %{buildroot}%{python_sitearch}/Avogadro.so ]; then
+           find %{buildroot} -name 'Avogadro.so' | xargs mv -t 
%{buildroot}%{python_sitearch}/
+        fi
        find %{buildroot}%{_lib} -name "python*" |xargs rm -rf
 %endif
 %fdupes %{buildroot}%{_datadir}/libavogadro/shaders/
@@ -161,8 +181,6 @@
 %dir %{_libdir}/avogadro/1_1/extensions
 %dir %{_libdir}/avogadro/1_1/tools
 %{_libdir}/avogadro/1_1/*/*.so
-# installed with python support
-%{python_sitelib}/Avogadro.so
 %dir %{_datadir}/libavogadro/engineScripts
 %dir %{_datadir}/libavogadro/extensionScripts
 %{_datadir}/libavogadro/engineScripts/wireframe.py
@@ -175,15 +193,20 @@
 %dir %{_libdir}/avogadro/1_1/cmake
 %{_libdir}/libavogadro.so
 %{_libdir}/libavogadro_OpenQube.so
-%{_libdir}/pkgconfig/avogadro.pc
 
 %{_libdir}/avogadro/1_1/cmake/*
 %{_libdir}/avogadro/1_1/*.cmake
 %{_libdir}/avogadro/*.cmake
+%{_libdir}/pkgconfig/*.pc
 %{_datadir}/qt4/mkspecs/features/avogadro.prf
 
 %files -n libavogadro1
 %defattr(-,root,root,-)
 %{_libdir}/*.so.*
 
+%files -n python-avogadro
+%defattr(-,root,root,-)
+# installed with python support
+%{python_sitearch}/Avogadro.so
+
 %changelog

++++++ MopacAuxReaderFix.patch ++++++
>From 933ae95d4e759cd83387fc16596fe6bb8df69dd2 Mon Sep 17 00:00:00 2001
From: "David C. Lonie" <[email protected]>
Date: Sun, 3 Feb 2013 11:17:05 -0500
Subject: [PATCH] Mark basis set as invalid if no atoms parsed from MOPAC .aux
 file.

Change-Id: I6cfcf6cb65aa8f4ac4457e25ce7d36b2bcc46c12
---
 libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp 
b/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp
index 275428a..a7f8f4d 100644
--- a/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp
+++ b/libavogadro/src/extensions/surfaces/openqube/mopacaux.cpp
@@ -122,6 +122,11 @@ void MopacAux::processLine()
 
 void MopacAux::load(SlaterSet* basis)
 {
+  if (m_atomPos.size() == 0) {
+    qWarning() << "No atoms found in .aux file. Bailing out.";
+    basis->setIsValid(false);
+    return;
+  }
   // Now load up our basis set
   basis->addAtoms(m_atomPos);
   basis->addSlaterIndices(m_atomIndex);
@@ -140,10 +145,12 @@ void MopacAux::load(SlaterSet* basis)
       mol.addAtom(m_atomPos[i], m_atomNums[i]);
     }
   }
-  else
+  else {
     qWarning() << "Number of atomic numbers (" << m_atomNums.size()
                << ") does not equal the number of atomic positions ("
                << m_atomPos.size() << "). Not populating molecule.";
+    basis->setIsValid(false);
+  }
 }
 
 vector<int> MopacAux::readArrayI(unsigned int n)
-- 
1.7.10


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to