Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 6bd8babda7 | |||
| 0ef6d90ac0 | |||
| 87b836b89a | |||
| ca892adcc2 |
194
openbabel-3.1.1-std-binary-function.patch
Normal file
194
openbabel-3.1.1-std-binary-function.patch
Normal file
@@ -0,0 +1,194 @@
|
||||
|
||||
github.com/openbabel/openbabel/issues/2461
|
||||
github.com/openbabel/openbabel/pull/2464
|
||||
|
||||
pull/2464 committed as github.com/openbabel/openbabel/commit/b59ba6d;
|
||||
only use first commit of pull/2464 here, this is
|
||||
github.com/openbabel/openbabel/commit/e2f9cca,
|
||||
adapted to opensuse source tree (no kekulize.h):
|
||||
|
||||
From e2f9cca93219e180bc814eada74b05ed7fba2f70 Mon Sep 17 00:00:00 2001
|
||||
From: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
|
||||
Date: Mon, 25 Apr 2022 11:55:17 +0900
|
||||
Subject: [PATCH] refactor: do not use `std::binary_function`, which is removed
|
||||
in C++17
|
||||
|
||||
fix #2461
|
||||
---
|
||||
include/openbabel/inchiformat.h | 1 -
|
||||
include/openbabel/plugin.h | 2 +-
|
||||
scripts/openbabel-R.i | 7 -------
|
||||
scripts/openbabel-csharp.i | 7 -------
|
||||
scripts/openbabel-java.i | 7 -------
|
||||
scripts/openbabel-perl.i | 7 -------
|
||||
scripts/openbabel-php.i | 7 -------
|
||||
scripts/openbabel-python.i | 7 -------
|
||||
scripts/openbabel-ruby.i | 7 -------
|
||||
src/ops/sort.cpp | 2 +-
|
||||
10 files changed, 2 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/include/openbabel/inchiformat.h b/include/openbabel/inchiformat.h
|
||||
index 9e2db80549..0033a22766 100644
|
||||
--- a/include/openbabel/inchiformat.h
|
||||
+++ b/include/openbabel/inchiformat.h
|
||||
@@ -131,7 +131,6 @@ class InChIFormat : public OBMoleculeFormat
|
||||
// and "CH4" is less than "C2H6"
|
||||
// and "CH4" is less than "ClH" (hydrogen chloride)
|
||||
struct InchiLess
|
||||
- : public std::binary_function<const std::string&, const std::string&, bool>
|
||||
{
|
||||
bool operator()(const std::string& s1, const std::string& s2) const
|
||||
{
|
||||
diff --git a/include/openbabel/plugin.h b/include/openbabel/plugin.h
|
||||
index 9f1b1efd72..16c235fa3c 100644
|
||||
--- a/include/openbabel/plugin.h
|
||||
+++ b/include/openbabel/plugin.h
|
||||
@@ -38,7 +38,7 @@ namespace OpenBabel
|
||||
///@{
|
||||
|
||||
/// @brief Case insensitive string comparison for PluginMapType key.
|
||||
-struct OBERROR CharPtrLess : public std::binary_function<const char*,const char*, bool>
|
||||
+struct OBERROR CharPtrLess
|
||||
{
|
||||
bool operator()(const char* p1,const char* p2) const
|
||||
{ return strcasecmp(p1,p2)<0; }
|
||||
diff --git a/scripts/openbabel-R.i b/scripts/openbabel-R.i
|
||||
index 0a655f168b..b6b4c6ccc6 100644
|
||||
--- a/scripts/openbabel-R.i
|
||||
+++ b/scripts/openbabel-R.i
|
||||
@@ -293,13 +293,6 @@ CAST_GENERICDATA_TO(VirtualBond)
|
||||
|
||||
%include <openbabel/chains.h>
|
||||
%include <openbabel/typer.h>
|
||||
-
|
||||
-// To avoid warning in plugin.h about "Nothing known about std::binary_function"
|
||||
-namespace std {
|
||||
- template <T1, T2, T3>
|
||||
- class binary_function {};
|
||||
-}
|
||||
-%template(dummy) std::binary_function <const char *, const char *, bool>;
|
||||
%include <openbabel/plugin.h>
|
||||
|
||||
// To avoid warning in oberror.h about "Nothing known about std::stringbuf"
|
||||
diff --git a/scripts/openbabel-csharp.i b/scripts/openbabel-csharp.i
|
||||
index df323504af..77d9d15701 100644
|
||||
--- a/scripts/openbabel-csharp.i
|
||||
+++ b/scripts/openbabel-csharp.i
|
||||
@@ -831,13 +831,6 @@ CAST_GENERICDATA_TO(VirtualBond);
|
||||
|
||||
%include <openbabel/chains.h>
|
||||
%include <openbabel/typer.h>
|
||||
-
|
||||
-// To avoid warning in plugin.h about "Nothing known about std::binary_function"
|
||||
-namespace std {
|
||||
- template <T1, T2, T3>
|
||||
- class binary_function {};
|
||||
-}
|
||||
-%template(dummy) std::binary_function <const char *, const char *, bool>;
|
||||
%include <openbabel/plugin.h>
|
||||
|
||||
// To avoid warning in oberror.h about "Nothing known about std::stringbuf"
|
||||
diff --git a/scripts/openbabel-java.i b/scripts/openbabel-java.i
|
||||
index c88f3c5e16..2e525e2ab3 100644
|
||||
--- a/scripts/openbabel-java.i
|
||||
+++ b/scripts/openbabel-java.i
|
||||
@@ -249,13 +249,6 @@ CAST_GENERICDATA_TO(VirtualBond)
|
||||
|
||||
%include <openbabel/chains.h>
|
||||
%include <openbabel/typer.h>
|
||||
-
|
||||
-// To avoid warning in plugin.h about "Nothing known about std::binary_function"
|
||||
-namespace std {
|
||||
- template <T1, T2, T3>
|
||||
- class binary_function {};
|
||||
-}
|
||||
-%template(dummy) std::binary_function <const char *, const char *, bool>;
|
||||
%include <openbabel/plugin.h>
|
||||
|
||||
// To avoid warning in oberror.h about "Nothing known about std::stringbuf"
|
||||
diff --git a/scripts/openbabel-perl.i b/scripts/openbabel-perl.i
|
||||
index 0dbc69342d..b06a50cda1 100644
|
||||
--- a/scripts/openbabel-perl.i
|
||||
+++ b/scripts/openbabel-perl.i
|
||||
@@ -194,13 +194,6 @@ CAST_GENERICDATA_TO(VirtualBond)
|
||||
|
||||
%import <openbabel/chains.h>
|
||||
%import <openbabel/typer.h>
|
||||
-
|
||||
-// To avoid warning in oberror.h about "Nothing known about std::binary_function"
|
||||
-namespace std {
|
||||
- template <T1, T2, T3>
|
||||
- class binary_function {};
|
||||
-}
|
||||
-%template(Dummy) std::binary_function <const char *, const char *, bool>;
|
||||
%include <openbabel/plugin.h>
|
||||
|
||||
// To avoid warning in oberror.h about "Nothing known about std::stringbuf"
|
||||
diff --git a/scripts/openbabel-php.i b/scripts/openbabel-php.i
|
||||
index 6d2346bc34..83ee9c6354 100644
|
||||
--- a/scripts/openbabel-php.i
|
||||
+++ b/scripts/openbabel-php.i
|
||||
@@ -226,13 +226,6 @@ CAST_GENERICDATA_TO(VirtualBond)
|
||||
|
||||
%include <openbabel/chains.h>
|
||||
%include <openbabel/typer.h>
|
||||
-
|
||||
-// To avoid warning in plugin.h about "Nothing known about std::binary_function"
|
||||
-namespace std {
|
||||
- template <T1, T2, T3>
|
||||
- class binary_function {};
|
||||
-}
|
||||
-%template(dummy) std::binary_function <const char *, const char *, bool>;
|
||||
%include <openbabel/plugin.h>
|
||||
|
||||
// To avoid warning in oberror.h about "Nothing known about std::stringbuf"
|
||||
diff --git a/scripts/openbabel-python.i b/scripts/openbabel-python.i
|
||||
index 2d361e8ebb..7ddde52b72 100644
|
||||
--- a/scripts/openbabel-python.i
|
||||
+++ b/scripts/openbabel-python.i
|
||||
@@ -267,13 +267,6 @@ CAST_GENERICDATA_TO(SquarePlanarStereo)
|
||||
|
||||
%include <openbabel/chains.h>
|
||||
%include <openbabel/typer.h>
|
||||
-
|
||||
-// To avoid warning in plugin.h about "Nothing known about std::binary_function"
|
||||
-namespace std {
|
||||
- template <T1, T2, T3>
|
||||
- class binary_function {};
|
||||
-}
|
||||
-%template(dummy) std::binary_function <const char *, const char *, bool>;
|
||||
%include <openbabel/plugin.h>
|
||||
|
||||
// To avoid warning in oberror.h about "Nothing known about std::stringbuf"
|
||||
diff --git a/scripts/openbabel-ruby.i b/scripts/openbabel-ruby.i
|
||||
index 6bdfd6b86b..0e5afcb536 100644
|
||||
--- a/scripts/openbabel-ruby.i
|
||||
+++ b/scripts/openbabel-ruby.i
|
||||
@@ -215,13 +215,6 @@ CAST_GENERICDATA_TO(SquarePlanarStereo)
|
||||
|
||||
%import <openbabel/chains.h>
|
||||
%import <openbabel/typer.h>
|
||||
-
|
||||
-// To avoid warning in oberror.h about "Nothing known about std::binary_function"
|
||||
-namespace std {
|
||||
- template <T1, T2, T3>
|
||||
- class binary_function {};
|
||||
-}
|
||||
-%template(Dummy) std::binary_function <const char *, const char *, bool>;
|
||||
%include <openbabel/plugin.h>
|
||||
|
||||
// To avoid warning in oberror.h about "Nothing known about std::stringbuf"
|
||||
diff --git a/src/ops/sort.cpp b/src/ops/sort.cpp
|
||||
index 38e052487a..79aa7b88c1 100644
|
||||
--- a/src/ops/sort.cpp
|
||||
+++ b/src/ops/sort.cpp
|
||||
@@ -29,7 +29,7 @@ namespace OpenBabel
|
||||
{
|
||||
|
||||
template<class T>
|
||||
-struct Order : public std::binary_function<std::pair<OBBase*,T>, std::pair<OBBase*,T>, bool>
|
||||
+struct Order
|
||||
{
|
||||
Order(OBDescriptor* pDesc, bool rev) : _pDesc(pDesc), _rev(rev){}
|
||||
bool operator()(std::pair<OBBase*,T> p1, std::pair<OBBase*,T> p2) const
|
||||
|
||||
98
openbabel-3.1.1-std-bind1st.patch
Normal file
98
openbabel-3.1.1-std-bind1st.patch
Normal file
@@ -0,0 +1,98 @@
|
||||
|
||||
github.com/openbabel/openbabel/pull/2001
|
||||
github.com/openbabel/openbabel/commit/90df8dd
|
||||
|
||||
|
||||
From 90df8ddbd622b91c027e469d2df8c0570f7dc645 Mon Sep 17 00:00:00 2001
|
||||
From: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
|
||||
Date: Wed, 3 Aug 2022 23:10:11 +0900
|
||||
Subject: [PATCH] Remove deprecated std::bind1st and std::binder1st (#2001)
|
||||
|
||||
---
|
||||
src/formats/povrayformat.cpp | 4 ++--
|
||||
src/stereo/perception.cpp | 16 +++++-----------
|
||||
2 files changed, 7 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/formats/povrayformat.cpp b/src/formats/povrayformat.cpp
|
||||
index 0cd50f6b10..214a24e924 100644
|
||||
--- a/src/formats/povrayformat.cpp
|
||||
+++ b/src/formats/povrayformat.cpp
|
||||
@@ -523,7 +523,7 @@ namespace OpenBabel
|
||||
|
||||
/* ---- Add a pigment - statement for start-atom of bond ---- */
|
||||
bond_type = bond->GetBeginAtom() -> GetType();
|
||||
- bond_type.erase(remove_if(bond_type.begin(), bond_type.end(), bind1st(equal_to<char>(), '.')), bond_type.end());
|
||||
+ bond_type.erase(remove(bond_type.begin(), bond_type.end(), '.'), bond_type.end());
|
||||
ofs << "\t pigment{color Color_"
|
||||
<< bond_type
|
||||
<< "}" << endl;
|
||||
@@ -584,7 +584,7 @@ namespace OpenBabel
|
||||
|
||||
/* ---- Add a pigment - statement for end-atom of bond i ---- */
|
||||
bond_type = bond->GetEndAtom() -> GetType();
|
||||
- bond_type.erase(remove_if(bond_type.begin(), bond_type.end(), bind1st(equal_to<char>(), '.')), bond_type.end());
|
||||
+ bond_type.erase(remove(bond_type.begin(), bond_type.end(), '.'), bond_type.end());
|
||||
|
||||
ofs << "\t pigment{color Color_"
|
||||
<< bond_type
|
||||
diff --git a/src/stereo/perception.cpp b/src/stereo/perception.cpp
|
||||
index 7c9fcc3484..f25bfcf813 100644
|
||||
--- a/src/stereo/perception.cpp
|
||||
+++ b/src/stereo/perception.cpp
|
||||
@@ -2969,9 +2969,6 @@ namespace OpenBabel {
|
||||
}
|
||||
|
||||
void StereoRefToImplicit(OBMol& mol, OBStereo::Ref atomId) {
|
||||
- // The following is for use in replace_if(...) below
|
||||
- const std::binder1st<std::equal_to<OBStereo::Ref> > equal_to_atomId = std::bind1st (equal_to<OBStereo::Ref>(), atomId);
|
||||
-
|
||||
std::vector<OBGenericData*> vdata = mol.GetAllData(OBGenericDataType::StereoData);
|
||||
for (std::vector<OBGenericData*>::iterator data = vdata.begin(); data != vdata.end(); ++data) {
|
||||
OBStereo::Type datatype = ((OBStereoBase*)*data)->GetType();
|
||||
@@ -2987,23 +2984,20 @@ namespace OpenBabel {
|
||||
if (datatype == OBStereo::CisTrans) {
|
||||
OBCisTransStereo *ct = dynamic_cast<OBCisTransStereo*>(*data);
|
||||
OBCisTransStereo::Config ct_cfg = ct->GetConfig();
|
||||
- replace_if(ct_cfg.refs.begin(), ct_cfg.refs.end(), equal_to_atomId, (OBStereo::Ref) OBStereo::ImplicitRef);
|
||||
+ replace(ct_cfg.refs.begin(), ct_cfg.refs.end(), atomId, (OBStereo::Ref) OBStereo::ImplicitRef);
|
||||
ct->SetConfig(ct_cfg);
|
||||
}
|
||||
else if (datatype == OBStereo::Tetrahedral) {
|
||||
OBTetrahedralStereo *ts = dynamic_cast<OBTetrahedralStereo*>(*data);
|
||||
OBTetrahedralStereo::Config ts_cfg = ts->GetConfig();
|
||||
if (ts_cfg.from == atomId) ts_cfg.from = OBStereo::ImplicitRef;
|
||||
- replace_if(ts_cfg.refs.begin(), ts_cfg.refs.end(), equal_to_atomId, (OBStereo::Ref) OBStereo::ImplicitRef);
|
||||
+ replace(ts_cfg.refs.begin(), ts_cfg.refs.end(), atomId, (OBStereo::Ref) OBStereo::ImplicitRef);
|
||||
ts->SetConfig(ts_cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImplicitRefToStereo(OBMol& mol, OBStereo::Ref centerId, OBStereo::Ref newId) {
|
||||
- // The following is for use in replace_if(...) below
|
||||
- const std::binder1st<std::equal_to<OBStereo::Ref> > equal_to_implicitRef = std::bind1st (equal_to<OBStereo::Ref>(), (OBStereo::Ref) OBStereo::ImplicitRef);
|
||||
-
|
||||
std::vector<OBGenericData*> vdata = mol.GetAllData(OBGenericDataType::StereoData);
|
||||
for (std::vector<OBGenericData*>::iterator data = vdata.begin(); data != vdata.end(); ++data) {
|
||||
OBStereo::Type datatype = ((OBStereoBase*)*data)->GetType();
|
||||
@@ -3022,9 +3016,9 @@ namespace OpenBabel {
|
||||
if (ct_cfg.begin == centerId || ct_cfg.end == centerId) {
|
||||
// Assumption: the first two refs are on the begin atom, the last two on the end atom
|
||||
if (ct_cfg.begin == centerId)
|
||||
- replace_if(ct_cfg.refs.begin(), ct_cfg.refs.begin()+2, equal_to_implicitRef, (OBStereo::Ref) newId);
|
||||
+ replace(ct_cfg.refs.begin(), ct_cfg.refs.begin()+2, (OBStereo::Ref) OBStereo::ImplicitRef, (OBStereo::Ref) newId);
|
||||
if (ct_cfg.end == centerId)
|
||||
- replace_if(ct_cfg.refs.begin()+2, ct_cfg.refs.end(), equal_to_implicitRef, (OBStereo::Ref) newId);
|
||||
+ replace(ct_cfg.refs.begin()+2, ct_cfg.refs.end(), (OBStereo::Ref) OBStereo::ImplicitRef, (OBStereo::Ref) newId);
|
||||
ct->SetConfig(ct_cfg);
|
||||
}
|
||||
}
|
||||
@@ -3033,7 +3027,7 @@ namespace OpenBabel {
|
||||
OBTetrahedralStereo::Config ts_cfg = ts->GetConfig();
|
||||
if (ts_cfg.center == centerId) {
|
||||
if (ts_cfg.from == OBStereo::ImplicitRef) ts_cfg.from = newId;
|
||||
- replace_if(ts_cfg.refs.begin(), ts_cfg.refs.end(), equal_to_implicitRef, (OBStereo::Ref) newId);
|
||||
+ replace(ts_cfg.refs.begin(), ts_cfg.refs.end(), (OBStereo::Ref) OBStereo::ImplicitRef, (OBStereo::Ref) newId);
|
||||
ts->SetConfig(ts_cfg);
|
||||
}
|
||||
}
|
||||
86
openbabel-3.1.1-std-bind2nd.patch
Normal file
86
openbabel-3.1.1-std-bind2nd.patch
Normal file
@@ -0,0 +1,86 @@
|
||||
|
||||
github.com/openbabel/openbabel/pull/2569
|
||||
github.com/openbabel/openbabel/commit/f827a72
|
||||
|
||||
|
||||
From f33412937390b2b0d0c0e91a1ed1274e1dd24157 Mon Sep 17 00:00:00 2001
|
||||
From: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
|
||||
Date: Mon, 30 Jan 2023 07:40:37 +0900
|
||||
Subject: [PATCH] refactor: remove deprecated std::bind2nd
|
||||
|
||||
c.f. #2001
|
||||
---
|
||||
src/confsearch.cpp | 4 ++--
|
||||
src/formats/fchkformat.cpp | 8 ++++----
|
||||
src/formats/vaspformat.cpp | 4 ++--
|
||||
3 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/confsearch.cpp b/src/confsearch.cpp
|
||||
index 5e6cc2d1e8..5f85a8ff2f 100644
|
||||
--- a/src/confsearch.cpp
|
||||
+++ b/src/confsearch.cpp
|
||||
@@ -131,7 +131,7 @@ namespace OpenBabel
|
||||
|
||||
const double arr[] = {3.0, 2.0, 1.5, 1.0, 0.5, 0.25};
|
||||
std::vector<double> vec (arr, arr + sizeof(arr) / sizeof(arr[0]) );
|
||||
- vec.erase(std::remove_if(vec.begin(), vec.end(), std::bind2nd(std::less<double>(), (cutoff + 0.1) )), vec.end());
|
||||
+ vec.erase(std::remove_if(vec.begin(), vec.end(), [=](double v) { return v < cutoff + 0.1; }), vec.end());
|
||||
vec.push_back(cutoff);
|
||||
|
||||
levels = vec;
|
||||
@@ -443,7 +443,7 @@ int OBForceField::DiverseConfGen(double rmsd, unsigned int nconfs, double energy
|
||||
UpdateConformersFromTree(&_mol, _energies, &divposes, verbose);
|
||||
|
||||
// Add back the energy offset
|
||||
- transform(_energies.begin(), _energies.end(), _energies.begin(), bind2nd(std::plus<double>(), energy_offset));
|
||||
+ transform(_energies.begin(), _energies.end(), _energies.begin(), [=](double e) { return e + energy_offset; });
|
||||
|
||||
// Clean up
|
||||
delete [] store_initial;
|
||||
diff --git a/src/formats/fchkformat.cpp b/src/formats/fchkformat.cpp
|
||||
index 886e073623..cf334f9a86 100644
|
||||
--- a/src/formats/fchkformat.cpp
|
||||
+++ b/src/formats/fchkformat.cpp
|
||||
@@ -665,16 +665,16 @@ namespace OpenBabel
|
||||
no atom numbers < 0 or > Natoms */
|
||||
if (NBond.end() != find_if(NBond.begin(),
|
||||
NBond.end(),
|
||||
- bind2nd(less_equal<int>(), 0)) ||
|
||||
+ [](int i) { return i <= 0; }) ||
|
||||
NBond.end() != find_if(NBond.begin(),
|
||||
NBond.end(),
|
||||
- bind2nd(greater<int>(), MxBond)) ||
|
||||
+ [=](int i) { return i > MxBond; }) ||
|
||||
IBond.end() != find_if(IBond.begin(),
|
||||
IBond.end(),
|
||||
- bind2nd(less<int>(), 0)) ||
|
||||
+ [](int i) { return i < 0; }) ||
|
||||
IBond.end() != find_if(IBond.begin(),
|
||||
IBond.end(),
|
||||
- bind2nd(greater<int>(), Natoms)))
|
||||
+ [=](int i) { return i > Natoms; }))
|
||||
{
|
||||
error_msg << "Invalid connectivity : check the \"NBond\" and/or"
|
||||
<< " \"IBond\" section(s).";
|
||||
diff --git a/src/formats/vaspformat.cpp b/src/formats/vaspformat.cpp
|
||||
index 1c8aaa6d4f..376b533a12 100644
|
||||
--- a/src/formats/vaspformat.cpp
|
||||
+++ b/src/formats/vaspformat.cpp
|
||||
@@ -534,7 +534,7 @@ namespace OpenBabel {
|
||||
for (size_t natom = 0; natom < pmol->NumAtoms(); ++natom) {
|
||||
const vector3 dxyz = currXyz[natom] - prevXyz[natom];
|
||||
vector3::const_iterator iter = std::find_if(dxyz.begin(), dxyz.end(),
|
||||
- std::bind2nd(std::not_equal_to<double>(), 0.0));
|
||||
+ [](double v) { return v != 0.0; });
|
||||
if (iter != dxyz.end()) dipGrad[natom].SetRow(iter - dxyz.begin(),
|
||||
(currDm - prevDm) / *iter);
|
||||
}
|
||||
@@ -588,7 +588,7 @@ namespace OpenBabel {
|
||||
if (max != 0.0) {
|
||||
// Normalize
|
||||
std::transform(Intensities.begin(), Intensities.end(), Intensities.begin(),
|
||||
- std::bind2nd(std::divides<double>(), max / 100.0));
|
||||
+ [=](double v) { return v / (max / 100.0); });
|
||||
} else {
|
||||
Intensities.clear();
|
||||
}
|
||||
19
openbabel-cmake-4-exports.patch
Normal file
19
openbabel-cmake-4-exports.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
policy CMP0065 (enable link flags such that symbols are exported from
|
||||
executables) was added in cmake version 3.4, set to OLD by default,
|
||||
and removed in cmake version 4
|
||||
|
||||
ensure the OLD linking behaviour for test_runner to fix test failures
|
||||
|
||||
|
||||
--- a/test/CMakeLists.txt 2020-05-08 17:38:02.000000000 +0200
|
||||
+++ b/test/CMakeLists.txt 2025-04-19 18:30:34.700723621 +0200
|
||||
@@ -148,6 +148,7 @@
|
||||
endif()
|
||||
|
||||
add_executable(test_runner ${srclist} obtest.cpp)
|
||||
+set_target_properties(test_runner PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
target_link_libraries(test_runner ${libs})
|
||||
if(NOT BUILD_SHARED AND NOT BUILD_MIXED)
|
||||
set_target_properties(test_runner PROPERTIES LINK_SEARCH_END_STATIC TRUE)
|
||||
|
||||
44
openbabel-cmake-4.patch
Normal file
44
openbabel-cmake-4.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
cf. https://github.com/openbabel/openbabel/pull/2784
|
||||
|
||||
|
||||
--- a/CMakeLists.txt 2020-05-08 17:38:02.000000000 +0200
|
||||
+++ b/CMakeLists.txt 2025-04-16 16:30:45.258797826 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
-# Please ensure that any changes remain compliant with 3.1.
|
||||
+# Please ensure that any changes remain compliant with 3.10.
|
||||
if(NOT EMBED_OPENBABEL)
|
||||
- cmake_minimum_required(VERSION 3.1)
|
||||
+ cmake_minimum_required(VERSION 3.10)
|
||||
endif()
|
||||
|
||||
project(openbabel)
|
||||
@@ -10,9 +10,6 @@
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
- if(POLICY CMP0042)
|
||||
- cmake_policy(SET CMP0042 OLD)
|
||||
- endif()
|
||||
endif()
|
||||
|
||||
include (CheckCXXCompilerFlag)
|
||||
--- a/doc/examples/static_executable/CMakeLists.txt 2020-05-08 17:38:02.000000000 +0200
|
||||
+++ b/doc/examples/static_executable/CMakeLists.txt 2025-04-16 16:30:45.258797826 +0200
|
||||
@@ -25,7 +25,7 @@
|
||||
#
|
||||
|
||||
# This line is required for cmake backwards compatibility.
|
||||
-cmake_minimum_required(VERSION 2.6)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# Name of your project
|
||||
project(myproject)
|
||||
--- a/scripts/CMakeLists.txt 2020-05-08 17:38:02.000000000 +0200
|
||||
+++ b/scripts/CMakeLists.txt 2025-04-16 16:30:45.258797826 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 2.6.0)
|
||||
+cmake_minimum_required(VERSION 3.10)
|
||||
# Library versioning (used in Mac Python bindings)x
|
||||
set(SOVERSION 4)
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 9 19:30:12 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
|
||||
|
||||
- Until upstream provides fixed code, disable test_align_{4,5},
|
||||
known to fail w/ gcc-15; see gh#openbabel/openbabel/issues/2766
|
||||
and ..../2799
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 19 17:05:53 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
|
||||
|
||||
- Add openbabel-cmake-4.patch and openbabel-cmake-4-exports.patch
|
||||
to fix cmake-4 failures
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 19 15:44:17 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
|
||||
|
||||
- Add patches from upstream to fix compiler deprecation warnings
|
||||
* openbabel-3.1.1-std-binary-function.patch,
|
||||
* openbabel-3.1.1-std-bind1st.patch,
|
||||
* openbabel-3.1.1-std-bind2nd.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 14 01:53:56 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
||||
@@ -46,6 +46,16 @@ Patch2: openbabel-3.1.1-version-number.patch
|
||||
Patch3: openbabel-3.1.1-gcc-12.patch
|
||||
# PATCH-FIX-UPSTREAM openbabel-3.1.1-wx-stl-compat.patch -- Fix build with wxWidgets using STL (gh#openbabel/openbabel!2527)
|
||||
Patch4: openbabel-3.1.1-wx-stl-compat.patch
|
||||
# PATCH-FIX-UPSTREAM openbabel-3.1.1-std-binary-function.patch -- part of github.com/openbabel/openbabel/pull/2464
|
||||
Patch5: openbabel-3.1.1-std-binary-function.patch
|
||||
# PATCH-FIX-UPSTREAM openbabel-3.1.1-std-bind1st.patch -- github.com/openbabel/openbabel/pull/2001
|
||||
Patch6: openbabel-3.1.1-std-bind1st.patch
|
||||
# PATCH-FIX-UPSTREAM openbabel-3.1.1-std-bind2nd.patch -- github.com/openbabel/openbabel/pull/2569
|
||||
Patch7: openbabel-3.1.1-std-bind2nd.patch
|
||||
# PATCH-FIX-UPSTREAM openbabel-cmake-4.patch -- github.com/openbabel/openbabel/pull/2784
|
||||
Patch8: openbabel-cmake-4.patch
|
||||
# ensure previous cmake behaviour to fix test failures
|
||||
Patch9: openbabel-cmake-4-exports.patch
|
||||
BuildRequires: cmake >= 3.1
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: inchi-devel >= 1.04
|
||||
@@ -152,17 +162,27 @@ biochemistry, or related areas.
|
||||
%postun -n libopenbabel%{abiver} -p /sbin/ldconfig
|
||||
|
||||
%check
|
||||
|
||||
## disable test_align_{4,5}, known to fail w/ gcc-15
|
||||
## cf. gh#openbabel/openbabel/issues/2766 and ..../2799
|
||||
%if 0%{?suse_version} > 1600
|
||||
%ifarch x86_64 aarch64 %{power64}
|
||||
## multiple --exclude-regex options do not work...
|
||||
%define test_filter_add |test_align_(4|5)
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 %{power64} riscv64
|
||||
# See gh#openbabel/openbabel/266, gh#openbabel/openbabel#2246
|
||||
%define test_filter --exclude-regex "(test_regressions_1|test_regressions_221|test_regressions_228|inchiSteffen_PubChem.smi_Test|pytest_sym|pybindtest_obconv_writers|pybindtest_bindings)"
|
||||
%global test_filter --exclude-regex "(test_regressions_1|test_regressions_221|test_regressions_228|inchiSteffen_PubChem.smi_Test|pytest_sym|pybindtest_obconv_writers|pybindtest_bindings%{?test_filter_add})"
|
||||
%else
|
||||
# Some test failures on Tumbleweed apparently linked to slight changes in floating point value outputs.
|
||||
# They look harmless - maybe float comparison margin is just not big enough - and may be linked to newer rapidjson.
|
||||
%if 0%{?suse_version} > 1500
|
||||
%ifarch %{ix86}
|
||||
%define test_filter --exclude-regex "(pybindtest_obconv_writers|test_cifspacegroup_11|pybindtest_bindings)"
|
||||
%global test_filter --exclude-regex "(pybindtest_obconv_writers|test_cifspacegroup_11|pybindtest_bindings)"
|
||||
%else
|
||||
%define test_filter --exclude-regex "pybindtest_obconv_writers"
|
||||
%global test_filter --exclude-regex "pybindtest_obconv_writers%{?test_filter_add}"
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
Reference in New Issue
Block a user