[PyQuante/el5/master] Fix build.

Jussi Lehtola jussilehtola at fedoraproject.org
Sat Jan 22 22:02:58 UTC 2011


commit 9691ae5325f1bdbea803bf648b207512c74830e7
Author: Jussi Lehtola <jussilehtola at fedoraproject.org>
Date:   Sun Jan 23 00:02:51 2011 +0200

    Fix build.

 PyQuante.spec |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/PyQuante.spec b/PyQuante.spec
index 8cc68fd..ff0f659 100644
--- a/PyQuante.spec
+++ b/PyQuante.spec
@@ -7,6 +7,14 @@
 %filter_setup
 }
 
+%ifnarch ppc ppc64
+# Use libint by default
+%global _libint 1 
+%else
+# Don't use libint on ppc architectures
+%global _libint 0
+%endif
+
 Name:		PyQuante
 Version:	1.6.4
 Release:	1%{?dist}
@@ -17,16 +25,20 @@ URL:		http://pyquante.sourceforge.net/
 Source0:	http://downloads.sourceforge.net/pyquante/%{name}-%{version}.tar.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Link against system libint
 Patch0:		PyQuante-libint.patch
 
 BuildRequires:	python-devel
 BuildRequires:	python-setuptools
 BuildRequires:	numpy
+%if %{_libint}
 BuildRequires:	libint-devel
+%endif
 
 Requires:	numpy
 Requires:	openbabel
 
+
 %description
 PyQuante is an open-source suite of programs for developing quantum chemistry
 methods. The program is written in the Python programming language, but has
@@ -41,6 +53,7 @@ tedium of having to write every low-level routine.
 You might want to install PyQuante-libint as well, which speeds up the
 calculation of two-electron integrals.
 
+%if %{_libint}
 %package libint
 Summary:	Libint integration to PyQuante
 Group:		Applications/Engineering
@@ -51,18 +64,22 @@ License:	GPLv2+
 This package contains integration of PyQuante with the libint library for
 computing two-electron integrals. It is much faster than the normal routines in
 PyQuante.
-
+%endif
 
 %prep
 %setup -q
-%patch0 -p1 -b .sharedlib
+%patch0 -p1 -b .libint
 # Get rid of spurious attributes
 chmod 644 LICENSE Src/{cints.c,chgp.c,crys.c,crys.h}
 # Get rid of spurious files
 rm -rf Tests/.gdb_history
 
 %build
+%if %{_libint}
 python -c 'import setuptools; execfile("setup.py")' build --enable-libint
+%else
+python -c 'import setuptools; execfile("setup.py")' build
+%endif
 
 %install
 rm -rf %{buildroot}
@@ -84,12 +101,16 @@ cd Tests
 %doc LICENSE README
 %{python_sitearch}/%{name}/
 %{python_sitearch}/%{name}-%{version}-py*.egg-info
+%if %{_libint}
 # libint library goes into a different package due to different licensing
 %exclude %{python_sitearch}/%{name}/clibint.so
+%endif
 
+%if %{_libint}
 %files libint
 %defattr(-,root,root,-)
 %{python_sitearch}/%{name}/clibint.so
+%endif
 
 %changelog
 * Sat Jan 22 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1.6.4-1


More information about the scm-commits mailing list