From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 04699138334 for ; Fri, 19 Jul 2019 16:45:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7694AE0826; Fri, 19 Jul 2019 16:45:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 154A4E081E for ; Fri, 19 Jul 2019 16:45:08 +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 180DC347FC7 for ; Fri, 19 Jul 2019 16:45:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 82BA75FD for ; Fri, 19 Jul 2019 16:45:04 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1563554691.c0a49bf0854adc1729059f952a3f051008080a7e.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cantera/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/cantera/cantera-2.4.0-r1.ebuild X-VCS-Directories: sci-libs/cantera/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c0a49bf0854adc1729059f952a3f051008080a7e X-VCS-Branch: master Date: Fri, 19 Jul 2019 16:45:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: caf2ae46-e61e-45da-99ec-ae17ad16e8cd X-Archives-Hash: 6f6cb320177f8c86f6c72678ddaeac81 commit: c0a49bf0854adc1729059f952a3f051008080a7e Author: band-a-prend yandex ru> AuthorDate: Fri Jun 21 21:58:53 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Jul 19 16:44:51 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0a49bf0 sci-libs/cantera: 2.4.0-r1. Disable default optimization flag "-O3" By default the optimization flag "-O3" was used with warning "-Wno-inline". The addition of expicit build option optimize_flags="-Wno-inline" now disables default "-O3" optimization flag in favor of options taken from "make.conf". Signed-off-by: Sergey Torokhov mail.ru> Signed-off-by: Michał Górny gentoo.org> sci-libs/cantera/cantera-2.4.0-r1.ebuild | 130 +++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/sci-libs/cantera/cantera-2.4.0-r1.ebuild b/sci-libs/cantera/cantera-2.4.0-r1.ebuild new file mode 100644 index 00000000000..9d31e347b02 --- /dev/null +++ b/sci-libs/cantera/cantera-2.4.0-r1.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{5,6} ) + +FORTRAN_NEEDED=fortran +FORTRAN_STANDARD=90 + +inherit desktop fortran-2 python-single-r1 scons-utils toolchain-funcs + +DESCRIPTION="Object-oriented tool suite for chemical kinetics, thermodynamics, and transport" +HOMEPAGE="http://www.cantera.org" +SRC_URI="https://github.com/Cantera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+cti fortran pch +python test" + +REQUIRED_USE=" + cti? ( ${PYTHON_REQUIRED_USE} ) + python? ( cti ) + ${PYTHON_REQUIRED_USE} + " + +RDEPEND=" + python? ( + dev-python/numpy[${PYTHON_USEDEP}] + ) + sci-libs/sundials:0= +" + +DEPEND=" + ${RDEPEND} + dev-cpp/eigen + dev-libs/boost + dev-libs/libfmt + python? ( + dev-python/cython[${PYTHON_USEDEP}] + ) + test? ( + >=dev-cpp/gtest-1.8.0 + ) +" + +PATCHES=( "${FILESDIR}/${PN}_${PV}_libdirname_variable.patch" ) + +pkg_setup() { + fortran-2_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + default + # patch to work 'scons test' properly in case of set up 'renamed_shared_libraries="no"' option + sed -i "s/, libs=\['cantera_shared'\]//" "${S}"/test_problems/SConscript || die "failed to modify 'test_problems/SConscript'" + # patch env to pass CCACHE_DIR variable + sed -i "s/ENV={'PATH': os.environ\['PATH'\]}/ENV={'PATH': os.environ\['PATH'\], 'CCACHE_DIR': os.environ.get('CCACHE_DIR','')}/" "${S}"/SConstruct || die "failed to modify 'SConstruct'" +} + +## Full list of configuration options of Cantera is presented here: +## http://cantera.org/docs/sphinx/html/compiling/config-options.html + +src_configure() { + scons_vars=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + cc_flags="${CXXFLAGS}" + cxx_flags="-std=c++11" + debug="no" + FORTRAN="$(tc-getFC)" + FORTRANFLAGS="${CXXFLAGS}" + optimize_flags="-Wno-inline" + renamed_shared_libraries="no" + use_pch=$(usex pch) +## In some cases other order can break the detection of right location of Boost: ## + system_fmt="y" + system_sundials="y" + system_eigen="y" + env_vars="all" + extra_inc_dirs="/usr/include/eigen3" + ) + use test || scons_vars+=( googletest="none" ) + + scons_targets=( + f90_interface=$(usex fortran y n) + python2_package="none" + ) + + if use cti ; then + local scons_python=$(usex python full minimal) + scons_targets+=( python3_package="${scons_python}" python3_cmd="${EPYTHON}" ) + else + scons_targets+=( python3_package="none" ) + fi +} + +src_compile() { + escons build "${scons_vars[@]}" "${scons_targets[@]}" prefix="/usr" +} + +src_test() { + escons test +} + +src_install() { + escons install stage_dir="${D%/}" libdirname="$(get_libdir)" + if ! use cti ; then + rm -r "${D%/}/usr/share/man" || die "Can't remove man files." + else + # Run the byte-compile of modules + python_optimize "${D%/}/$(python_get_sitedir)/${PN}" + fi +} + +pkg_postinst() { + if use cti && ! use python ; then + elog "Cantera was build without 'python' use-flag therefore the CTI tool 'ck2cti'" + elog "will convert Chemkin files to Cantera format without verification of kinetic mechanism." + fi + + local post_msg=$(usex fortran "and Fortran " "") + elog "C++ ${post_msg}samples are installed to '/usr/share/${PN}/samples/' directory." + + if use python ; then + elog "Python examples are installed to '$(python_get_sitedir)/${PN}/examples/' directories." + fi +}