commit: d820c1e66cf14fc974084c92e937611a5c6006f3
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 20:36:50 2022 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sun Dec 18 21:50:55 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d820c1e6
sci-mathematics/libpoly: new package; add 0.1.11
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
sci-mathematics/libpoly/Manifest | 1 +
sci-mathematics/libpoly/libpoly-0.1.11.ebuild | 60 +++++++++++++++++++++++++++
sci-mathematics/libpoly/metadata.xml | 19 +++++++++
3 files changed, 80 insertions(+)
diff --git a/sci-mathematics/libpoly/Manifest b/sci-mathematics/libpoly/Manifest
new file mode 100644
index 000000000000..8e2480c62da5
--- /dev/null
+++ b/sci-mathematics/libpoly/Manifest
@@ -0,0 +1 @@
+DIST libpoly-0.1.11.tar.gz 614216 BLAKE2B
42a2510a6a9f94e7170b5df97ec8f2b7b29cb9c95bd13c8c7abebc9e7db7fedcbeb7a928f22d173e154180acc199e081323d2f1cb23264bf31ac1bfc88494dc8
SHA512
df08a6bab33e27023316972e2496801cea4959faf403b5df8314fa45b4541cd1352583a44084bea130c1e3ca4ed86de032f7f96eeb915599f178e80976a68f7a
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
+}
diff --git a/sci-mathematics/libpoly/metadata.xml
b/sci-mathematics/libpoly/metadata.xml
new file mode 100644
index 000000000000..9d9fdde167c9
--- /dev/null
+++ b/sci-mathematics/libpoly/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="project">
+ <email>[email protected]</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription>
+ LibPoly is a C library for manipulating polynomials. The target
+ applications are symbolic reasoning engines, such as SMT solvers, that need
+ to reason about polynomial constraints. It is research software under
+ development, so the features and the API might change rapidly.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/SRI-CSL/libpoly/issues/</bugs-to>
+ <remote-id type="github">SRI-CSL/libpoly</remote-id>
+ </upstream>
+</pkgmetadata>