[packages/openbabel] - updated to current git, 2.3.2 does not build with modern toolchain
baggins
baggins at pld-linux.org
Mon Nov 16 20:11:37 CET 2015
commit b6a15389fce860b9fd70dc711e8eefd0f4b64d0e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Nov 16 20:11:06 2015 +0100
- updated to current git, 2.3.2 does not build with modern toolchain
cmake-fix.patch | 17 -----------------
openbabel-prefix.patch | 17 +++++++++++++----
openbabel.spec | 39 +++++++++++++++++++++++----------------
perl-install.patch | 15 +++++++++++++++
plugindir.patch | 12 ++++++++++++
python-build.patch | 30 ------------------------------
python-x32.patch | 10 ----------
ruby-gcc-no-option.patch | 11 -----------
ruby-install.patch | 11 +++++++++++
swig-java.patch | 40 ++++++++++++++++++++++++++++++++++++++++
10 files changed, 114 insertions(+), 88 deletions(-)
---
diff --git a/openbabel.spec b/openbabel.spec
index f1bab2e..d89f17f 100644
--- a/openbabel.spec
+++ b/openbabel.spec
@@ -5,21 +5,22 @@
%bcond_without java # Java/JNI bindings
%bcond_with mono # .NET/C# bindings
#
+%define snap 2d45874
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.2
-Release: 7
+Version: 2.3.90
+Release: 1
License: GPL v2
Group: Libraries
-Source0: http://downloads.sourceforge.net/openbabel/%{name}-%{version}.tar.gz
-# Source0-md5: 9b0007560d9d838b40ab4ad06daf5610
+Source0: https://github.com/openbabel/openbabel/archive/%{snap}/%{name}-%{version}-%{snap}.tar.gz
+# Source0-md5: 32f083d63a0a17f1871a831edad3a912
Patch0: %{name}-prefix.patch
-Patch1: ruby-gcc-no-option.patch
-Patch2: cmake-fix.patch
-Patch3: python-build.patch
-Patch4: perl-x32.patch
-Patch5: python-x32.patch
+Patch1: perl-x32.patch
+Patch2: perl-install.patch
+Patch3: ruby-install.patch
+Patch4: swig-java.patch
+Patch5: plugindir.patch
URL: http://openbabel.sourceforge.net/
BuildRequires: cairo-devel
BuildRequires: cmake >= 2.6.0
@@ -127,11 +128,12 @@ Ruby binding for OpenBabel.
Wiązanie języka Ruby do biblioteki OpenBabel.
%prep
-%setup -q
+%setup -q -c
+%{__mv} %{name}-%{snap}*/* ./
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p0
+%patch3 -p1
%patch4 -p1
%patch5 -p1
@@ -148,8 +150,11 @@ Wiązanie języka Ruby do biblioteki OpenBabel.
-DPERL_BINDINGS=ON \
-DPYTHON_BINDINGS=ON \
-DRUBY_BINDINGS=ON \
+ -DRUN_SWIG=ON \
-DOPENBABEL_USE_SYSTEM_INCHI=ON \
- -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config
+ -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config \
+ -DPERLLIB_INSTALL_DIR=%{perl_vendorarch} \
+ -DRUBYLIB_INSTALL_DIR=%{ruby_vendorarchdir}
%{__make}
%install
@@ -160,8 +165,6 @@ install -d $RPM_BUILD_ROOT%{py_sitedir}
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
@@ -179,11 +182,12 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README THANKS doc/*.html
+%doc AUTHORS README.md THANKS doc/*.html
%attr(755,root,root) %{_bindir}/babel
%attr(755,root,root) %{_bindir}/obabel
%attr(755,root,root) %{_bindir}/obchiral
%attr(755,root,root) %{_bindir}/obconformer
+%attr(755,root,root) %{_bindir}/obdistgen
%attr(755,root,root) %{_bindir}/obenergy
%attr(755,root,root) %{_bindir}/obfit
%attr(755,root,root) %{_bindir}/obgen
@@ -195,6 +199,9 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/obrotamer
%attr(755,root,root) %{_bindir}/obrotate
%attr(755,root,root) %{_bindir}/obspectrophore
+%attr(755,root,root) %{_bindir}/obsym
+%attr(755,root,root) %{_bindir}/obtautomer
+%attr(755,root,root) %{_bindir}/obthermo
%attr(755,root,root) %{_bindir}/roundtrip
%attr(755,root,root) %{_libdir}/libopenbabel.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libopenbabel.so.4
@@ -248,7 +255,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{py_sitedir}/_openbabel.so
%{py_sitedir}/openbabel.py[co]
%{py_sitedir}/pybel.py[co]
-%{py_sitedir}/openbabel-1.7-py*.egg-info
+#%{py_sitedir}/openbabel-1.7-py*.egg-info
%files -n ruby-openbabel
%defattr(644,root,root,755)
diff --git a/cmake-fix.patch b/cmake-fix.patch
deleted file mode 100644
index 1a118f9..0000000
--- a/cmake-fix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- 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/openbabel-prefix.patch b/openbabel-prefix.patch
index 048f253..8ecd8e2 100644
--- a/openbabel-prefix.patch
+++ b/openbabel-prefix.patch
@@ -22,18 +22,27 @@
CACHE PATH "Install dir for libraries")
if(MSVC)
set(OB_PLUGIN_INSTALL_DIR "${BIN_INSTALL_DIR}"
-@@ -351,9 +351,9 @@
+@@ -394,9 +394,9 @@
# Some rpath handling for Linux and Mac
if(UNIX AND BUILD_SHARED)
if(APPLE)
- set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
+ set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${OBLIB_INSTALL_DIR})
else()
-- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
-+ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OBLIB_INSTALL_DIR}")
+- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}"
++ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OBLIB_INSTALL_DIR}"
+ CACHE PATH "Set sane rpath")
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+@@ -429,7 +429,7 @@
+ configure_file(${openbabel_SOURCE_DIR}/openbabel-2.0.pc.cmake
+ ${openbabel_BINARY_DIR}/openbabel-2.0.pc @ONLY)
+ install(FILES ${openbabel_BINARY_DIR}/openbabel-2.0.pc
+- DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
++ DESTINATION ${OBLIB_INSTALL_DIR}/pkgconfig)
+ endif()
+
+ include_directories(${openbabel_BINARY_DIR}/include
@@ -487,7 +487,7 @@
"${openbabel_BINARY_DIR}/OpenBabel2ConfigVersion.cmake" @ONLY)
diff --git a/perl-install.patch b/perl-install.patch
new file mode 100644
index 0000000..1250ce8
--- /dev/null
+++ b/perl-install.patch
@@ -0,0 +1,15 @@
+--- openbabel-2.3.90/scripts/CMakeLists.txt~ 2015-09-22 12:38:01.000000000 +0200
++++ openbabel-2.3.90/scripts/CMakeLists.txt 2015-11-16 19:52:13.511619342 +0100
+@@ -338,10 +338,10 @@
+ endif()
+
+ install(TARGETS bindings_perl
+- LIBRARY DESTINATION ${LIB_INSTALL_DIR}/auto/Chemistry/OpenBabel/
++ LIBRARY DESTINATION ${PERLLIB_INSTALL_DIR}/auto/Chemistry/OpenBabel/
+ COMPONENT bindings_perl)
+ install(FILES ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm
+- DESTINATION ${LIB_INSTALL_DIR}/Chemistry/
++ DESTINATION ${PERLLIB_INSTALL_DIR}/Chemistry/
+ COMPONENT bindings_perl)
+
+ endif (DO_PERL_BINDINGS)
diff --git a/plugindir.patch b/plugindir.patch
new file mode 100644
index 0000000..6827fd3
--- /dev/null
+++ b/plugindir.patch
@@ -0,0 +1,12 @@
+diff -up openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt.plugindir openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt
+--- openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt.plugindir 2015-02-07 21:42:44.431479900 +0100
++++ openbabel-75414ad4e043f16ba72ae51c7ca60f448576688d/CMakeLists.txt 2015-02-07 21:43:29.000429326 +0100
+@@ -266,7 +266,7 @@ if(NOT MSVC)
+ }
+ " SCANDIR_NEEDS_CONST)
+
+- set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}"
++ set(OB_MODULE_PATH "${OB_PLUGIN_INSTALL_DIR}"
+ CACHE PATH "Set to system install for bindings only build")
+ add_definitions(-DOB_MODULE_PATH="\\"${OB_MODULE_PATH}\\"")
+
diff --git a/python-build.patch b/python-build.patch
deleted file mode 100644
index a4304ad..0000000
--- a/python-build.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- 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',
diff --git a/python-x32.patch b/python-x32.patch
deleted file mode 100644
index dd12a14..0000000
--- a/python-x32.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- openbabel-2.3.2/scripts/python/setup.py.orig 2015-04-02 19:38:00.000000000 +0000
-+++ openbabel-2.3.2/scripts/python/setup.py 2015-04-02 19:39:04.000000000 +0000
-@@ -20,6 +20,7 @@ obExtension = Extension('_openbabel',
- os.path.join("..", "include")],
- library_dirs=[os.path.join(srcdir, "..", "..", "lib"),
- os.path.join(srcdir, "..", "..", "lib64"),
-+ os.path.join(srcdir, "..", "..", "libx32"),
- os.path.join("..", "lib")],
- libraries=['openbabel']
- )
diff --git a/ruby-gcc-no-option.patch b/ruby-gcc-no-option.patch
deleted file mode 100644
index 5d241d7..0000000
--- a/ruby-gcc-no-option.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- openbabel-2.3.1/scripts/ruby/extconf.rb~ 2011-01-11 15:53:32.000000000 +0100
-+++ openbabel-2.3.1/scripts/ruby/extconf.rb 2013-06-12 18:59:40.032654427 +0200
-@@ -36,7 +36,7 @@
- end
-
- if have_library('openbabel')
-- with_ldflags("#$LDFLAGS -dynamic -flat_namespace") do #Enables cc to handle linking better.
-+ with_ldflags("#$LDFLAGS -dynamic") do #Enables cc to handle linking better.
- create_makefile('openbabel')
- end
- else
diff --git a/ruby-install.patch b/ruby-install.patch
new file mode 100644
index 0000000..4db18d3
--- /dev/null
+++ b/ruby-install.patch
@@ -0,0 +1,11 @@
+--- openbabel-2.3.90/scripts/CMakeLists.txt~ 2015-11-16 19:52:13.000000000 +0100
++++ openbabel-2.3.90/scripts/CMakeLists.txt 2015-11-16 19:53:09.209431072 +0100
+@@ -400,7 +400,7 @@
+ endif()
+
+ install(TARGETS bindings_ruby
+- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
++ LIBRARY DESTINATION ${RUBYLIB_INSTALL_DIR}
+ COMPONENT bindings_ruby)
+
+ endif (DO_RUBY_BINDINGS)
diff --git a/swig-java.patch b/swig-java.patch
new file mode 100644
index 0000000..d786fcd
--- /dev/null
+++ b/swig-java.patch
@@ -0,0 +1,40 @@
+--- openbabel-2.3.90/scripts/openbabel-java.i.orig 2015-09-22 12:38:01.000000000 +0200
++++ openbabel-2.3.90/scripts/openbabel-java.i 2015-11-16 19:43:52.950908988 +0100
+@@ -233,7 +233,6 @@
+ %warnfilter(516) OpenBabel::SpaceGroup; // Ignoring std::string methods in favour of char* ones
+ %include <openbabel/math/spacegroup.h>
+
+-# CloneData should be used instead of the following method
+ %ignore OpenBabel::OBBase::SetData;
+ %ignore OpenBabel::OBBase::GetData(char const *);
+ %ignore OpenBabel::OBBase::HasData(char const *);
+@@ -313,7 +312,6 @@
+ %ignore OpenBabel::OBForceField::DiverseConfGen;
+ #endif
+
+-# Ignore shadowed methods
+ %ignore OpenBabel::OBForceField::VectorSubtract(const double *const, const double *const, double *);
+ %ignore OpenBabel::OBForceField::VectorMultiply(const double *const, const double, double *);
+ %warnfilter(516) OpenBabel::OBForceField; // Ignoring std::string methods in favour of char* ones
+@@ -331,21 +329,12 @@
+
+ %warnfilter(503) OpenBabel::OBBitVec; // Not wrapping any of the overloaded operators
+ %include <openbabel/bitvec.h>
+-# Ignore shadowed method
+ %ignore OpenBabel::OBRotor::GetRotAtoms() const;
+ %include <openbabel/rotor.h>
+ %ignore OpenBabel::Swab;
+ %include <openbabel/rotamer.h>
+ %include <openbabel/spectrophore.h>
+
+-# The following %ignores avoid warning messages due to shadowed classes.
+-# This does not imply a loss of functionality as (in this case)
+-# the shadowed class is identical (from the point of view of SWIG) to
+-# the shadowing class.
+-# This is because C++ references (&) are transformed by SWIG back into
+-# pointers, so that OBAtomIter(OBMol &) would be treated the same as
+-# OBAtomIter(OBMol *).
+-
+ %ignore OBAtomAtomIter(OBAtom &);
+ %ignore OBAtomBondIter(OBAtom &);
+ %ignore OBMolAngleIter(OBMol &);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openbabel.git/commitdiff/b6a15389fce860b9fd70dc711e8eefd0f4b64d0e
More information about the pld-cvs-commit
mailing list