Fix rhbz#2130870

This commit is contained in:
Antonio Trande 2022-09-29 21:58:25 +02:00
parent 28073a0026
commit f58d73c656
2 changed files with 25 additions and 25 deletions

View File

@ -10,26 +10,21 @@ diff -up a/CMakeLists.txt.plugindir b/CMakeLists.txt
# This should be phased out in preference for just using the target name # This should be phased out in preference for just using the target name
set(BABEL_LIBRARY openbabel) set(BABEL_LIBRARY openbabel)
@@ -276,7 +276,7 @@ @@ -750,7 +750,7 @@
} "${openbabel_BINARY_DIR}/OpenBabel3ConfigVersion.cmake" @ONLY)
" SCANDIR_NEEDS_CONST)
- set(OB_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${OB_PLUGIN_INSTALL_DIR}")
+ set(OB_MODULE_PATH "${LIB_INSTALL_DIR}/openbabel3")
# Add some visibility support when using GCC
# note: Altough MinGW g++ 4.4 passes this test, visibility can't be used
@@ -751,11 +751,11 @@
# Now to configure the installed config file. # Now to configure the installed config file.
set(OB_CONFIG_DIR "${LIB_INSTALL_DIR}/cmake/openbabel3") -set(OB_CONFIG_DIR "${LIB_INSTALL_DIR}/cmake/openbabel3")
-set(OpenBabel3_INCLUDE_DIRS "\${OpenBabel3_INSTALL_PREFIX}/${OB_INCLUDE_DIRS}") +set(OB_CONFIG_DIR "lib${LIB_SUFFIX}/cmake/openbabel3")
+set(OpenBabel3_INCLUDE_DIRS "\${INCLUDE_INSTALL_DIR}/openbabel3") set(OpenBabel3_INCLUDE_DIRS "\${OpenBabel3_INSTALL_PREFIX}/${OB_INCLUDE_DIRS}")
set(OpenBabel3_LIBRARIES "$<TARGET_FILE:openbabel>") set(OpenBabel3_LIBRARIES "$<TARGET_FILE:openbabel>")
set(OB_EXPORTS_FILE --- a/OpenBabel3Config.cmake.orig.in 2020-05-08 17:38:02.000000000 +0200
- "\${OpenBabel3_INSTALL_PREFIX}/${OB_CONFIG_DIR}/OpenBabel3_EXPORTS.cmake") +++ b/OpenBabel3Config.cmake.in 2022-09-29 21:36:17.995630395 +0200
+ "\${LIB_INSTALL_DIR}/cmake/openbabel3/OpenBabel3_EXPORTS.cmake") @@ -1,5 +1,5 @@
set(REL_REF) # The OpenBabel3 config file. To get the targets include the exports file.
if(NOT WIN32) -get_filename_component(OpenBabel3_INSTALL_PREFIX "${OpenBabel3_DIR}@REL_REF@"
set(REL_REF "/../../..") +get_filename_component(OpenBabel3_INSTALL_PREFIX "/usr"
ABSOLUTE)
set(OpenBabel3_VERSION_MAJOR "@BABEL_MAJ_VER@")

View File

@ -3,7 +3,7 @@
# we don't want to provide private Perl or Python extension libs # we don't want to provide private Perl or Python extension libs
%global __provides_exclude_from ^(%{perl_vendorarch}/auto|%{python3_sitearch})/.*\\.so$ %global __provides_exclude_from ^(%{perl_vendorarch}/auto|%{python3_sitearch})/.*\\.so$
# Avoid LTO flags in these architectures # Avoid LTO flags in these architectures:
# eigen3/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1199:26: # eigen3/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:1199:26:
# error: inlining failed in call to 'always_inline' 'Eigen::internal::bload<Eigen::internal::blas_data_mapper<double, long, 0, 0, 1>, double __vector(2), long, 2l, 0, # error: inlining failed in call to 'always_inline' 'Eigen::internal::bload<Eigen::internal::blas_data_mapper<double, long, 0, 0, 1>, double __vector(2), long, 2l, 0,
%if 0%{?rhel} %if 0%{?rhel}
@ -14,7 +14,7 @@
Name: openbabel Name: openbabel
Version: 3.1.1 Version: 3.1.1
Release: 14%{?dist} Release: 15%{?dist}
Summary: Chemistry software file format converter Summary: Chemistry software file format converter
License: GPLv2 License: GPLv2
URL: https://openbabel.org/ URL: https://openbabel.org/
@ -25,7 +25,7 @@ Source2: openbabel-inchi-license-lgpl-2.1.txt
# fix perl modules install path # fix perl modules install path
Patch0: %{name}-perl.patch Patch0: %{name}-perl.patch
# fix plugin directory location (#680292, patch by lg) # fix openbabel version + cmake config files
Patch1: %{name}-plugindir.patch Patch1: %{name}-plugindir.patch
# fix SWIG_init even when not using swig (#772149) # fix SWIG_init even when not using swig (#772149)
@ -225,6 +225,7 @@ export CXXFLAGS="%{optflags} -DEIGEN_ALTIVEC_DISABLE_MMA"
-DRUBY_BINDINGS:BOOL=ON \ -DRUBY_BINDINGS:BOOL=ON \
-DWITH_MAEPARSER:BOOL=OFF \ -DWITH_MAEPARSER:BOOL=OFF \
-DWITH_COORDGEN:BOOL=OFF \ -DWITH_COORDGEN:BOOL=OFF \
-DOB_PLUGIN_INSTALL_DIR:PATH=%{_lib}/openbabel3 \
%if 0%{?rhel} %if 0%{?rhel}
-DOPENBABEL_USE_SYSTEM_INCHI=false \ -DOPENBABEL_USE_SYSTEM_INCHI=false \
%else %else
@ -302,10 +303,10 @@ ctest3 -j1 --force-new-ctest-process
%exclude %{_mandir}/man1/obgui.1* %exclude %{_mandir}/man1/obgui.1*
%files devel %files devel
%{_includedir}/%{name}3 %{_includedir}/%{name}3/
%{_libdir}/libopenbabel.so %{_libdir}/libopenbabel.so
%{_libdir}/libopenbabel.so.7 %{_libdir}/libopenbabel.so.7
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/openbabel-3.pc
%{_libdir}/cmake/openbabel3/ %{_libdir}/cmake/openbabel3/
%if 0%{?rhel} %if 0%{?rhel}
%{_libdir}/libinchi.so %{_libdir}/libinchi.so
@ -325,7 +326,7 @@ ctest3 -j1 --force-new-ctest-process
%license COPYING %license COPYING
%doc THANKS AUTHORS authors.txt README.md %doc THANKS AUTHORS authors.txt README.md
%{_datadir}/%{name}/ %{_datadir}/%{name}/
%{_libdir}/%{name}/ %{_libdir}/%{name}3/
%{_libdir}/libopenbabel.so.7.0.0 %{_libdir}/libopenbabel.so.7.0.0
%if 0%{?rhel} %if 0%{?rhel}
%license inchi-license-lgpl-2.1.txt %license inchi-license-lgpl-2.1.txt
@ -345,6 +346,10 @@ ctest3 -j1 --force-new-ctest-process
%{ruby_vendorarchdir}/openbabel.so %{ruby_vendorarchdir}/openbabel.so
%changelog %changelog
* Thu Sep 29 2022 Antonio Trande <sagitter@fedoraproject.org> - 3.1.1-15
- Fix openbabel version in CMakeLists.txt
- Fix rhbz#2130870
* Tue Sep 27 2022 Antonio Trande <sagitter@fedoraproject.org> - 3.1.1-14 * Tue Sep 27 2022 Antonio Trande <sagitter@fedoraproject.org> - 3.1.1-14
- Fix EPEL builds - Fix EPEL builds