From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1113730-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0DC0C138334
	for <garchives@archives.gentoo.org>; Sun, 29 Sep 2019 11:26:54 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0E4EBE08A2;
	Sun, 29 Sep 2019 11:26:53 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D3C94E08A2
	for <gentoo-commits@lists.gentoo.org>; Sun, 29 Sep 2019 11:26:52 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 47E3F34B6BB
	for <gentoo-commits@lists.gentoo.org>; Sun, 29 Sep 2019 11:26:51 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id A7EA0779
	for <gentoo-commits@lists.gentoo.org>; Sun, 29 Sep 2019 11:26:48 +0000 (UTC)
From: "Pacho Ramos" <pacho@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Pacho Ramos" <pacho@gentoo.org>
Message-ID: <1569756401.23e15c4c2d4ef0352a77c96a7aca963cd621372d.pacho@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/openbabel/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sci-chemistry/openbabel/Manifest sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild
X-VCS-Directories: sci-chemistry/openbabel/
X-VCS-Committer: pacho
X-VCS-Committer-Name: Pacho Ramos
X-VCS-Revision: 23e15c4c2d4ef0352a77c96a7aca963cd621372d
X-VCS-Branch: master
Date: Sun, 29 Sep 2019 11:26:48 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 5773dacd-7ecb-48b0-958c-a18851ce0b82
X-Archives-Hash: 42850316a1e4daf3db5217bcd0584c4b

commit:     23e15c4c2d4ef0352a77c96a7aca963cd621372d
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 29 11:26:27 2019 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Sep 29 11:26:41 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23e15c4c

sci-chemistry/openbabel: Fix openmp support, add a desktop file.

Closes: https://bugs.gentoo.org/659148
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 sci-chemistry/openbabel/Manifest                  |   1 +
 sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild | 101 ++++++++++++++++++++++
 2 files changed, 102 insertions(+)

diff --git a/sci-chemistry/openbabel/Manifest b/sci-chemistry/openbabel/Manifest
index ac268758e8c..b22751d4a86 100644
--- a/sci-chemistry/openbabel/Manifest
+++ b/sci-chemistry/openbabel/Manifest
@@ -1 +1,2 @@
 DIST openbabel-2.4.1.tar.gz 11618304 BLAKE2B 8fc051e83add9be6456e281a109bd6bbec282a64ffc83309819f0decbf167b4914fbb7f1966e95e103f268754045b804317f51c79a952ace707c6af2bd320125 SHA512 427e678f0a911bd27b9a8a05e60b6e09f113be4e5dd180daaf80c28d06368e52b57501261755ab3817a8d31f2754db24471fd0ceee706d029386d6f70800e9c6
+DIST openbabel.png 29060 BLAKE2B 8d217d92125cc73462437411dd4e0cc05179cb0934f5ed15a307acc6b549b8ebab250a48a05ef7657f48c6df394f37da9b659de61efb1477b79b573a5b393ad3 SHA512 bbcaaa37663b526c9038ccb9edaf05ccc3ad1a861739a737f05f363098d8402a10b36e341fcc0aca636e809c6c32db99bf987b41719a0c756bf5e31444d3eb70

diff --git a/sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild b/sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild
new file mode 100644
index 00000000000..0834c411ef2
--- /dev/null
+++ b/sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+WX_GTK_VER="3.0"
+
+inherit cmake-utils desktop eutils wxwidgets
+
+DESCRIPTION="Interconverts file formats used in molecular modeling"
+HOMEPAGE="http://openbabel.org/wiki/Main_Page"
+SRC_URI="
+	mirror://sourceforge/openbabel/${P}.tar.gz
+	https://openbabel.org/docs/dev/_static/babel130.png -> ${PN}.png
+"
+
+# See src/CMakeLists.txt for LIBRARY_VERSION
+SLOT="0/5.0.0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc openmp test wxwidgets"
+
+RDEPEND="
+	dev-cpp/eigen:3
+	dev-libs/libxml2:2
+	sci-libs/inchi
+	sys-libs/zlib
+	wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	>=dev-util/cmake-2.4.8
+	doc? ( app-doc/doxygen )
+"
+
+DOCS=( AUTHORS NEWS.md README.md THANKS doc/dioxin.{inc,mol2} doc/README.{dioxin.pov,povray} )
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.3.2-gcc-6_and_7-backport.patch
+	"${FILESDIR}"/${P}-gcc-8.patch
+)
+
+pkg_setup() {
+	if use openmp; then
+		if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
+			ewarn "OpenMP is not available in your current selected gcc"
+			die "need openmp capable gcc"
+		fi
+		FORTRAN_NEED_OPENMP=1
+	fi
+}
+
+src_prepare() {
+	sed \
+		-e '/__GNUC__/s:== 4:>= 4:g' \
+		-i include/openbabel/shared_ptr.h || die
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	use wxwidgets && setup-wxwidgets
+	local mycmakeargs=(
+		-DOPENBABEL_USE_SYSTEM_INCHI=ON
+		-DENABLE_OPENMP=$(usex openmp)
+		-DBUILD_GUI=$(usex wxwidgets)
+	)
+
+	cmake-utils_src_configure
+}
+
+src_install() {
+	docinto html
+	dodoc doc/{*.html,*.png}
+	if use doc ; then
+		docinto html/API
+		dodoc -r doc/API/html/*
+	fi
+
+	make_desktop_entry obgui "Open Babel" "${PN}"
+	doicon "${DISTDIR}/${PN}.png"
+
+	cmake-utils_src_install
+}
+
+src_test() {
+	local mycmakeargs=(
+		-DOPENBABEL_USE_SYSTEM_INCHI=ON
+		-DPYTHON_EXECUTABLE=false
+		-DOPENMP=$(usex openmp)
+		-DBUILD_GUI=$(usex wxwidgets)
+		-DTESTS=$(usex test)
+	)
+
+	cmake-utils_src_configure
+	cmake-utils_src_compile
+	cmake-utils_src_test -E py
+}
+
+pkg_postinst() {
+	optfeature "perl support" sci-chemistry/openbabel-perl
+	optfeature "python support" sci-chemistry/openbabel-python
+}