sci-libs/Mutationpp: new package, add 1.0.5

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-05-17 01:25:36 +02:00
parent 2dcaf21d30
commit 666ca1bcd3
4 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST Mutationpp-1.0.5.tar.gz 4038229 BLAKE2B 7b7d52d1ef851d8f076ae9301e43fe6fbf51d38748c5da8ff960b3eba42e01df3156dea5b363fcdaa150ca3db3700dee4246869fe7b743ec64ad446bdd27bcef SHA512 9c1d89376b55b83689ec05e1ed43f4ad70d15c7ecc6b7de4b4401dac5abc1db8ae4b7f6cbe3db038f53776690be6fd611f6b7a07ae38b9ce0deae24008b87ffa

View File

@@ -0,0 +1,88 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
FORTRAN_NEEDED="fortran"
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1 cmake fortran-2
DESCRIPTION="MUlticomponent Thermodynamic And Transport library for IONized gases"
HOMEPAGE="https://github.com/mutationpp/Mutationpp"
SRC_URI="https://github.com/mutationpp/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
LICENSE="LGPL-3"
SLOT="0"
IUSE="doc fortran python test"
RDEPEND="
dev-cpp/eigen
python? (
${PYTHON_DEPS}
dev-python/numpy[${PYTHON_USEDEP}]
)
"
DEPEND="
${RDEPEND}
test? ( dev-cpp/catch:0 )
python? (
dev-python/pybind11[${PYTHON_USEDEP}]
>=dev-python/scikit-build-0.11.1[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
)
"
BDEPEND="
dev-util/ninja
dev-util/cmake
doc? ( app-doc/doxygen )
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DOCS=( {README,CHANGELOG}.md docs )
PATCHES=( "${FILESDIR}/${P}-system-libs.patch" )
distutils_enable_tests pytest
src_prepare() {
rm -r thirdparty || die
cmake_src_prepare
use python && python_prepare_all
}
src_configure() {
local mycmakeargs=(
-DENABLE_COVERAGE=OFF
-DBUILD_DOCUMENTATION=$(usex doc)
-DBUILD_FORTRAN_WRAPPER=$(usex fortran)
-DBUILD_PYTHON_WRAPPER=$(usex python)
-DENABLE_TESTING=$(usex test)
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
use python && python_foreach_impl distutils-r1_python_compile
}
src_install() {
cmake_src_install
use python && python_foreach_impl distutils-r1_python_install
insinto "/usr/share/${PN}"
doins -r data
echo MPP_DIRECTORY="/usr/share/${PN}" > "99${PN}"
echo MPP_DATA_DIRECTORY="/usr/share/${PN}/data" >> "99${PN}"
doenvd "99${PN}"
}
src_test() {
export MPP_DIRECTORY="."
export MPP_DATA_DIRECTORY="${MPP_DATA_DIRECTORY}/data"
cmake_src_test
use python && python_foreach_impl distutils-r1_python_test
}

View File

@@ -0,0 +1,31 @@
--- a/cmake/modules/FindCatch2.cmake
+++ b/cmake/modules/FindCatch2.cmake
@@ -33,7 +33,6 @@
"/usr/include"
"$ENV{CPLUS_INCLUDE_PATH}"
"$ENV{CPATH}"
- "${CMAKE_SOURCE_DIR}/thirdparty/catch"
)
# First try to use the standard find_package that should be able to find the
--- a/cmake/modules/FindEigen3.cmake
+++ b/cmake/modules/FindEigen3.cmake
@@ -34,7 +34,6 @@
"/usr/include"
"$ENV{CPLUS_INCLUDE_PATH}"
"$ENV{CPATH}"
- "${CMAKE_SOURCE_DIR}/thirdparty/eigen"
)
# First try to use the standard find_package that should be able to find the
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@
#######################################################################
if (SKBUILD)
- add_subdirectory(thirdparty/pybind11)
+ find_package(pybind11 REQUIRED)
add_subdirectory(interface/python)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<upstream>
<bugs-to>https://github.com/mutationpp/Mutationpp/issues</bugs-to>
<remote-id type="github">mutationpp/Mutationpp</remote-id>
</upstream>
</pkgmetadata>