mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-mathematics/stp: enable py3.12 compat
Closes: https://bugs.gentoo.org/929798 Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
OC_COMMIT=119fe41a83bc455a24a11ecc9b78e7b13fcfcc45
|
||||
GT_COMMIT=2ad076167a676e3ed62f90b754b30fac5caa1f88
|
||||
OC_COMMIT="119fe41a83bc455a24a11ecc9b78e7b13fcfcc45"
|
||||
GT_COMMIT="2ad076167a676e3ed62f90b754b30fac5caa1f88"
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit flag-o-matic python-single-r1 cmake
|
||||
|
||||
@@ -16,6 +16,7 @@ HOMEPAGE="https://stp.github.io/
|
||||
SRC_URI="
|
||||
https://github.com/stp/stp/archive/${PV}.tar.gz
|
||||
-> ${P}.tar.gz
|
||||
|
||||
test? (
|
||||
https://github.com/stp/OutputCheck/archive/${OC_COMMIT}.tar.gz
|
||||
-> ${P}_OutputCheck.tar.gz
|
||||
@@ -40,18 +41,24 @@ RDEPEND="
|
||||
dev-libs/icu:=
|
||||
sci-mathematics/cryptominisat:=
|
||||
)
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
sys-apps/help2man
|
||||
test? ( dev-python/lit )
|
||||
test? (
|
||||
dev-python/lit
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-CMakeLists.txt-fix_cflags.patch
|
||||
"${FILESDIR}"/${P}-cstdint.patch
|
||||
"${FILESDIR}"/${P}-stp.py-library_path.patch
|
||||
"${FILESDIR}/${P}-CMakeLists.txt-fix_cflags.patch"
|
||||
"${FILESDIR}/${P}-cstdint.patch"
|
||||
"${FILESDIR}/${P}-stp.py-library_path.patch"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
@@ -59,13 +66,14 @@ pkg_setup() {
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${P}.tar.gz
|
||||
unpack "${P}.tar.gz"
|
||||
|
||||
if use test ; then
|
||||
local i
|
||||
for i in OutputCheck gtest ; do
|
||||
tar xf "${DISTDIR}"/${P}_${i}.tar.gz --strip-components=1 \
|
||||
-C "${S}"/utils/${i} || die "failed to unpack ${i}"
|
||||
tar xf "${DISTDIR}/${P}_${i}.tar.gz" --strip-components=1 \
|
||||
-C "${S}/utils/${i}" \
|
||||
|| die "failed to unpack ${i}"
|
||||
done
|
||||
fi
|
||||
}
|
||||
@@ -75,7 +83,7 @@ src_prepare() {
|
||||
sed -i "s/set(LIBDIR lib/set(LIBDIR $(get_libdir)/" CMakeLists.txt || die
|
||||
|
||||
# Remove problematic test
|
||||
rm "${S}"/tests/query-files/misc-tests/no-query.cvc || die
|
||||
rm "${S}/tests/query-files/misc-tests/no-query.cvc" || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
@@ -86,9 +94,9 @@ src_configure() {
|
||||
|
||||
local CMAKE_BUILD_TYPE
|
||||
if use debug ; then
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
CMAKE_BUILD_TYPE="Debug"
|
||||
else
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
CMAKE_BUILD_TYPE="Release"
|
||||
fi
|
||||
|
||||
local -a mycmakeargs=(
|
||||
@@ -107,8 +115,8 @@ src_install() {
|
||||
# Because Python files for tests (in BUILD_DIR) and those installed on the
|
||||
# system differ, and are generated upon install, we have to wait for CMake
|
||||
# to install them into the temporary image.
|
||||
use python && python_optimize "${D}/$(python_get_sitedir)"/stp
|
||||
use python && python_optimize "${D}/$(python_get_sitedir)/stp"
|
||||
|
||||
mv "${D}"/usr/man "${D}"/usr/share/man || die
|
||||
mv "${D}/usr/man" "${D}/usr/share/man" || die
|
||||
dodoc -r papers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user