summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/libpoly/libpoly-0.1.11.ebuild')
-rw-r--r--sci-mathematics/libpoly/libpoly-0.1.11.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/sci-mathematics/libpoly/libpoly-0.1.11.ebuild b/sci-mathematics/libpoly/libpoly-0.1.11.ebuild
new file mode 100644
index 000000000000..e3b8fb247367
--- /dev/null
+++ b/sci-mathematics/libpoly/libpoly-0.1.11.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit python-single-r1 cmake
+
+DESCRIPTION="C library for manipulating polynomials"
+HOMEPAGE="https://github.com/SRI-CSL/libpoly/"
+SRC_URI="https://github.com/SRI-CSL/${PN}/archive/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="LGPL-3+"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/gmp:=
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep 'dev-python/sympy[${PYTHON_USEDEP}]')
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-util/patchelf"
+
+DOCS=( README.md examples )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIBPOLY_BUILD_PYTHON_API=$(usex python)
+ -DLIBPOLY_BUILD_STATIC=OFF
+ -DLIBPOLY_BUILD_STATIC_PIC=OFF
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ mv "${D}"/usr/lib "${D}"/usr/$(get_libdir) || die
+
+ if use python ; then
+ local sitedir="${D}"/"$(python_get_sitedir)"
+ local sopath="${BUILD_DIR}"/python/polypy.so
+
+ patchelf --remove-rpath "${sopath}" || die
+
+ mkdir -p "${sitedir}" || die
+ cp "${sopath}" "${sitedir}" || die
+ fi
+}