public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/, sci-chemistry/openbabel/files/
Date: Sun, 12 Jun 2022 10:36:35 +0000 (UTC)	[thread overview]
Message-ID: <1655030185.4a0dcf6b2ab6b2bc5725cc51b813bfa478bee3cf.sam@gentoo> (raw)

commit:     4a0dcf6b2ab6b2bc5725cc51b813bfa478bee3cf
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 12 10:26:07 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 10:36:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0dcf6b

sci-chemistry/openbabel: fix build with GCC 12

Closes: https://bugs.gentoo.org/851510
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../openbabel-3.1.1-fix-time-check-cmake.patch     | 32 ++++++++++++++++++++++
 .../openbabel/openbabel-3.1.1_p20210225.ebuild     |  4 +++
 2 files changed, 36 insertions(+)

diff --git a/sci-chemistry/openbabel/files/openbabel-3.1.1-fix-time-check-cmake.patch b/sci-chemistry/openbabel/files/openbabel-3.1.1-fix-time-check-cmake.patch
new file mode 100644
index 000000000000..69e41211023b
--- /dev/null
+++ b/sci-chemistry/openbabel/files/openbabel-3.1.1-fix-time-check-cmake.patch
@@ -0,0 +1,32 @@
+https://github.com/openbabel/openbabel/pull/2493
+
+From: Sam James <sam@gentoo.org>
+Date: Sun, 12 Jun 2022 11:23:59 +0100
+Subject: [PATCH] CMake: fix time check typo (fixes build failure w/ GCC 12)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Without this fixed check, we get a build failure with GCC 12:
+```
+/var/tmp/portage/sci-chemistry/openbabel-3.1.1_p20210225/work/openbabel-08e23f39b0cc39b4eebd937a5a2ffc1a7bac3e1b/include/openbabel/obutil.h:65:14: error: ‘clock’ was not declared in this scope; did you mean ‘clock_t’?
+   65 |       start= clock();
+      |              ^~~~~
+      |              clock_t
+```
+
+Bug: https://bugs.gentoo.org/851510
+--- a/src/config.h.cmake
++++ b/src/config.h.cmake
+@@ -182,8 +182,8 @@
+ #define OB_MODULE_PATH "@OB_MODULE_PATH@"
+ 
+ #ifndef TIME_WITH_SYS_TIME
+-  #ifdef HAVE_SYS_TIME
+-    #ifdef HAVE_TIME
++  #ifdef HAVE_SYS_TIME_H
++    #ifdef HAVE_TIME_H
+       #define TIME_WITH_SYS_TIME 1
+     #else
+       #define TIME_WITH_SYS_TIME 0
+

diff --git a/sci-chemistry/openbabel/openbabel-3.1.1_p20210225.ebuild b/sci-chemistry/openbabel/openbabel-3.1.1_p20210225.ebuild
index 61a6ad498b66..0eb8ddaa0cf5 100644
--- a/sci-chemistry/openbabel/openbabel-3.1.1_p20210225.ebuild
+++ b/sci-chemistry/openbabel/openbabel-3.1.1_p20210225.ebuild
@@ -80,6 +80,10 @@ RDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}"/openbabel-3.1.1-fix-time-check-cmake.patch
+)
+
 pkg_pretend() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 }


             reply	other threads:[~2022-06-12 10:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12 10:36 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-15 10:09 [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/, sci-chemistry/openbabel/files/ Andrew Ammerlaan
2021-03-28  0:17 Pacho Ramos
2018-05-06 22:13 Sergei Trofimovich
2017-05-13 16:20 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1655030185.4a0dcf6b2ab6b2bc5725cc51b813bfa478bee3cf.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox