From 8cd66f068b3bd39aabc188403e977295b0ba4d38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 6 Sep 2022 23:27:35 +0200 Subject: [PATCH] openbabel: Fix build with glibc 2.36 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- .../0001-Workaround-xdr-linker-error.patch | 0 ...ude-of-ctime-to-fix-build-with-glibc.patch | 50 +++++++++++++++++++ .../openbabel-gui.desktop | 0 .../openbabel/openbabel_git.bb | 1 + 4 files changed, 51 insertions(+) rename recipes-misc/recipes-chemistry/openbabel/{files => openbabel}/0001-Workaround-xdr-linker-error.patch (100%) create mode 100644 recipes-misc/recipes-chemistry/openbabel/openbabel/0002-Add-missing-include-of-ctime-to-fix-build-with-glibc.patch rename recipes-misc/recipes-chemistry/openbabel/{files => openbabel}/openbabel-gui.desktop (100%) diff --git a/recipes-misc/recipes-chemistry/openbabel/files/0001-Workaround-xdr-linker-error.patch b/recipes-misc/recipes-chemistry/openbabel/openbabel/0001-Workaround-xdr-linker-error.patch similarity index 100% rename from recipes-misc/recipes-chemistry/openbabel/files/0001-Workaround-xdr-linker-error.patch rename to recipes-misc/recipes-chemistry/openbabel/openbabel/0001-Workaround-xdr-linker-error.patch diff --git a/recipes-misc/recipes-chemistry/openbabel/openbabel/0002-Add-missing-include-of-ctime-to-fix-build-with-glibc.patch b/recipes-misc/recipes-chemistry/openbabel/openbabel/0002-Add-missing-include-of-ctime-to-fix-build-with-glibc.patch new file mode 100644 index 00000000..4a5d29ff --- /dev/null +++ b/recipes-misc/recipes-chemistry/openbabel/openbabel/0002-Add-missing-include-of-ctime-to-fix-build-with-glibc.patch @@ -0,0 +1,50 @@ +From 22a05780aa392cd5e01dda6ffde1da28b5639ac9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 6 Sep 2022 22:43:19 +0200 +Subject: [PATCH] Add missing include of to fix build with glibc 2.36 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +| include/openbabel/obutil.h:65:14: error: 'clock' was not declared in this scope +| 65 | start= clock(); +| | ^~~~~ +| include/openbabel/obutil.h:40:1: note: 'clock' is defined in header ''; did you forget to '#include '? +| 39 | #include +| +++ |+#include +| 40 | +| include/openbabel/obutil.h: In member function 'double OpenBabel::OBStopwatch::Lap()': +| include/openbabel/obutil.h:70:13: error: 'clock' was not declared in this scope +| 70 | stop= clock(); +| | ^~~~~ +| include/openbabel/obutil.h:70:13: note: 'clock' is defined in header ''; did you forget to '#include '? +| include/openbabel/obutil.h:71:40: error: 'CLOCKS_PER_SEC' was not declared in this scope +| 71 | return((stop - start) / (double) CLOCKS_PER_SEC); +| | ^~~~~~~~~~~~~~ +| include/openbabel/obutil.h:71:40: note: the macro 'CLOCKS_PER_SEC' had not yet been defined + +Upstream-Status: Submitted [https://github.com/openbabel/openbabel/pull/2533] + +Signed-off-by: Andreas Müller +--- + include/openbabel/obutil.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/include/openbabel/obutil.h b/include/openbabel/obutil.h +index cc65e40a1..35c38d466 100644 +--- a/include/openbabel/obutil.h ++++ b/include/openbabel/obutil.h +@@ -36,6 +36,10 @@ GNU General Public License for more details. + #endif + #endif + ++#if HAVE_CLOCK_T ++#include ++#endif ++ + #include + + #ifndef M_PI +-- +2.35.3 + diff --git a/recipes-misc/recipes-chemistry/openbabel/files/openbabel-gui.desktop b/recipes-misc/recipes-chemistry/openbabel/openbabel/openbabel-gui.desktop similarity index 100% rename from recipes-misc/recipes-chemistry/openbabel/files/openbabel-gui.desktop rename to recipes-misc/recipes-chemistry/openbabel/openbabel/openbabel-gui.desktop diff --git a/recipes-misc/recipes-chemistry/openbabel/openbabel_git.bb b/recipes-misc/recipes-chemistry/openbabel/openbabel_git.bb index bdc86e43..b402d402 100644 --- a/recipes-misc/recipes-chemistry/openbabel/openbabel_git.bb +++ b/recipes-misc/recipes-chemistry/openbabel/openbabel_git.bb @@ -16,6 +16,7 @@ DEPENDS = " \ SRC_URI = " \ git://github.com/openbabel/openbabel.git;branch=master;protocol=https \ file://0001-Workaround-xdr-linker-error.patch \ + file://0002-Add-missing-include-of-ctime-to-fix-build-with-glibc.patch \ file://openbabel-gui.desktop \ " SRCREV = "cbd4db43f8908b874864280fdc03bf92569eebc1"