mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-20 00:08:58 -04:00
Python 3.10 target is scheduled for removal in Gentoo: https://public-inbox.gentoo.org/gentoo-dev/e6ca9f1f4ababb79ab2a3d005c39b483c3ecef6e.camel@gentoo.org/ Sphinx 8.2.0 already dropped support for CPython 3.10 and PyPy 3.10, leading to multiple CI failures in ::guru. We can safely remove this target, because GURU is "experimental" and does not have stable keywords. Let's not remove "pypy3" right now because a) There are not many packages using it. b) So we can see which packages supported PyPy 3.10, and test them with PyPy 3.11. Closes: https://github.com/gentoo/guru/pull/291 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
92 lines
2.4 KiB
Bash
92 lines
2.4 KiB
Bash
# Copyright 1999-2024 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
FORTRAN_STANDARD=2003
|
|
PYTHON_COMPAT=( python3_{11..12} )
|
|
|
|
inherit fortran-2 python-any-r1 toolchain-funcs
|
|
|
|
DESCRIPTION="StringiFor, Strings Fortran Manipulator, yet another strings Fortran module"
|
|
HOMEPAGE="https://github.com/szaghi/StringiFor"
|
|
SRC_URI="https://github.com/szaghi/StringiFor/releases/download/v${PV}/StringiFor.tar.gz -> ${P}.tar.gz"
|
|
|
|
S="${WORKDIR}/${PN}"
|
|
|
|
# For FOSS projects: GPL-3
|
|
# For closed source/commercial projects: BSD 2-Clause, BSD 3-Clause, MIT
|
|
LICENSE="GPL-3 BSD-2 BSD MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
IUSE="static-libs test"
|
|
RESTRICT="mirror !test? ( test )"
|
|
|
|
BDEPEND="
|
|
${PYTHON_DEPS}
|
|
$(python_gen_any_dep '
|
|
dev-build/FoBiS[${PYTHON_USEDEP}]
|
|
')
|
|
"
|
|
|
|
PATCHES=(
|
|
"${FILESDIR}/stringifor-1.1.1_fobos_soname.patch"
|
|
"${FILESDIR}/stringifor-1.1.3_fix_tests.patch"
|
|
)
|
|
|
|
set_build_mode() {
|
|
case $(tc-getFC) in
|
|
*gfortran* )
|
|
BUILD_MODE_SHARED="-mode stringifor-shared-gnu"
|
|
BUILD_MODE_STATIC="-mode stringifor-static-gnu"
|
|
BUILD_MODE_TESTS="-mode tests-gnu" ;;
|
|
*ifort* )
|
|
BUILD_MODE_SHARED="-mode stringifor-shared-intel"
|
|
BUILD_MODE_STATIC="-mode stringifor-static-intel"
|
|
BUILD_MODE_TESTS="-mode tests-intel" ;;
|
|
* )
|
|
die "Sorry, GNU gfortran or Intel ifort are currently supported in the ebuild" ;;
|
|
esac
|
|
}
|
|
|
|
pkg_setup() {
|
|
fortran-2_pkg_setup
|
|
set_build_mode
|
|
}
|
|
|
|
src_prepare() {
|
|
default
|
|
|
|
sed -i -e 's:\$OPTIMIZE = -O2:\$OPTIMIZE = '"${FFLAGS}"':' \
|
|
-e '/^\$LSHARED/s:$: '"${LDFLAGS}"':' fobos || die
|
|
}
|
|
|
|
src_compile() {
|
|
${EPYTHON} FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_SHARED} || die
|
|
use static-libs && { ${EPYTHON} FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_STATIC} || die; }
|
|
}
|
|
|
|
src_test() {
|
|
${EPYTHON} FoBiS.py build -compiler custom -fc $(tc-getFC) ${BUILD_MODE_TESTS} || die
|
|
for e in $( find ./exe/ -type f -executable -print ); do
|
|
if [ "$e" != "./exe/stringifor_test_parse_large_csv" ] ; then
|
|
echo " run test $e :" && { $e || die; }
|
|
else
|
|
# The output of this test is too huge so it's cutted here
|
|
echo " run test $e :" && { $e | tail -n 10 || die; }
|
|
fi
|
|
done
|
|
}
|
|
|
|
src_install() {
|
|
mv lib/mod lib/stringifor || die
|
|
doheader -r lib/stringifor/
|
|
|
|
mv lib/libstringifor.so{,.1} || die
|
|
dosym libstringifor.so.1 /usr/$(get_libdir)/libstringifor.so
|
|
dolib.so lib/libstringifor.so.1
|
|
|
|
use static-libs && dolib.a lib/libstringifor.a
|
|
}
|