[packages/openbabel] - updated to 2.3.2 - fixed building perl and python bindings
baggins
baggins at pld-linux.org
Sun Jan 19 19:11:45 CET 2014
commit 0f986b5a952acc9dab32d5a05826e10b3d2f076b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jan 19 19:11:25 2014 +0100
- updated to 2.3.2
- fixed building perl and python bindings
cmake-fix.patch | 17 +++++++++++++++++
openbabel.spec | 17 +++++++++++++----
python-build.patch | 30 ++++++++++++++++++++++++++++++
3 files changed, 60 insertions(+), 4 deletions(-)
---
diff --git a/openbabel.spec b/openbabel.spec
index 803b958..acb40f7 100644
--- a/openbabel.spec
+++ b/openbabel.spec
@@ -3,14 +3,16 @@
Summary: A cross-platform chemistry program and library designed to convert file formats
Summary(pl.UTF-8): Międzyplatformowy program chemiczny i biblioteka do konwersji formatów plików
Name: openbabel
-Version: 2.3.1
-Release: 4
+Version: 2.3.2
+Release: 1
License: GPL v2
Group: Libraries
Source0: http://downloads.sourceforge.net/openbabel/%{name}-%{version}.tar.gz
-# Source0-md5: 1f029b0add12a3b55582dc2c832b04f8
+# Source0-md5: 9b0007560d9d838b40ab4ad06daf5610
Patch0: %{name}-prefix.patch
Patch1: ruby-gcc-no-option.patch
+Patch2: cmake-fix.patch
+Patch3: python-build.patch
URL: http://openbabel.sourceforge.net/
BuildRequires: cairo-devel
BuildRequires: cmake >= 2.6.0
@@ -107,6 +109,8 @@ Wiązanie języka Ruby do biblioteki OpenBabel.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p0
%build
%cmake . \
@@ -125,6 +129,10 @@ rm -rf $RPM_BUILD_ROOT
RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \
DESTDIR=$RPM_BUILD_ROOT
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/*.py $RPM_BUILD_ROOT%{py_sitedir}
+
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
%clean
@@ -172,6 +180,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/obprop.1*
%{_mandir}/man1/obrotamer.1*
%{_mandir}/man1/obrotate.1*
+%{_mandir}/man1/obspectrophore.1*
%{_mandir}/man1/roundtrip.1*
%files devel
@@ -186,7 +195,7 @@ rm -rf $RPM_BUILD_ROOT
%files gui
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/obgui
-%{_mandir}/man1/OBGUI.1*
+%{_mandir}/man1/obgui.1*
%files -n perl-Chemistry-OpenBabel
%defattr(644,root,root,755)
diff --git a/cmake-fix.patch b/cmake-fix.patch
new file mode 100644
index 0000000..1a118f9
--- /dev/null
+++ b/cmake-fix.patch
@@ -0,0 +1,17 @@
+--- openbabel-2.3.2/scripts/CMakeLists.txt~ 2012-10-03 21:08:52.000000000 +0200
++++ openbabel-2.3.2/scripts/CMakeLists.txt 2014-01-18 18:02:07.812085094 +0100
+@@ -222,14 +222,6 @@
+ endif (NOT WIN32)
+ endif (RUN_SWIG)
+
+- add_library(bindings_perl MODULE ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp)
+- target_link_libraries(bindings_perl ${PERL_LIBRARY} ${BABEL_LIBRARY} ${PERL_EXTRA_LINK_FLAGS})
+- set_target_properties(bindings_perl PROPERTIES
+- PREFIX ""
+- OUTPUT_NAME OpenBabel)
+- add_dependencies(bindings_perl openbabel)
+- install(TARGETS bindings_perl LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+- install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm DESTINATION ${LIB_INSTALL_DIR})
+
+ set(PERL_INSTALLDIRS_TEXT "")
+ if (OBPERL_INSTALLDIRS)
diff --git a/python-build.patch b/python-build.patch
new file mode 100644
index 0000000..a4304ad
--- /dev/null
+++ b/python-build.patch
@@ -0,0 +1,30 @@
+--- scripts/CMakeLists.txt.orig 2012-10-04 05:08:52.000000000 +1000
++++ scripts/CMakeLists.txt 2012-10-15 15:48:42.051537351 +1000
+@@ -91,7 +91,7 @@
+ PREFIX ""
+ SUFFIX .so )
+ add_dependencies(bindings_python openbabel)
+- install(TARGETS bindings_python LIBRARY DESTINATION ${LIB_INSTALL_DIR})
++ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${openbabel_BINARY_DIR}/scripts/python/setup.py install --root=\$ENV{DESTDIR}/ WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts)" LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py DESTINATION ${LIB_INSTALL_DIR})
+ install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py DESTINATION ${LIB_INSTALL_DIR})
+ else(NOT WIN32)
+--- scripts/python/setup.py.orig 2011-09-16 04:45:02.000000000 +1000
++++ scripts/python/setup.py 2012-10-15 15:24:30.659979953 +1000
+@@ -16,6 +16,7 @@
+ obExtension = Extension('_openbabel',
+ [os.path.join(srcdir, "openbabel-python.cpp")],
+ include_dirs=[os.path.join(srcdir, "..", "..", "include"),
++ os.path.join("..", "..", "include"),
+ os.path.join("..", "include")],
+ library_dirs=[os.path.join(srcdir, "..", "..", "lib"),
+ os.path.join(srcdir, "..", "..", "lib64"),
+@@ -24,7 +24,7 @@
+ )
+
+ if "build" in sys.argv:
+- shutil.copyfile(os.path.join(srcdir, "pybel_py%dx.py" % sys.version_info[0]), "pybel.py")
++ shutil.copyfile(os.path.join(srcdir, "pybel.py"), "pybel.py")
+ shutil.copyfile(os.path.join(srcdir, "openbabel.py"), "openbabel.py")
+
+ setup(name='openbabel',
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openbabel.git/commitdiff/0f986b5a952acc9dab32d5a05826e10b3d2f076b
More information about the pld-cvs-commit
mailing list