dev-libs/StringiFor: rename to dev-libs/stringifor

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
Sergey Torokhov
2025-09-20 23:28:57 +03:00
parent 78dface686
commit 1b4a8e96ee
6 changed files with 4 additions and 2 deletions

View File

@@ -0,0 +1 @@
DIST StringiFor-1.1.4.tar.gz 601622 BLAKE2B 702c2d99bc560b790e3174a62156a1d7b23c7520a8d8aea48273f0b0b5b3d012a44b5259a7a69f9b2c5fcd6b6a77be9a4abfe954b015e1cf66691f3bc7729bae SHA512 c94e4f9a5b69e9cd9e5be20d54b148536daf748a4511cc83edc4af60f7d9045c6297a0df7144fb93be66bd3d1466a3d78ee482c9a70b51ecf4472e19f9581b62

View File

@@ -0,0 +1,12 @@
diff -Nur a/fobos b/fobos
--- a/fobos 2020-01-27 20:28:35.000000000 +0300
+++ b/fobos 2020-02-18 13:45:52.000000000 +0300
@@ -7,7 +7,7 @@
[common-variables]
$CSHARED_GNU = -c -fPIC -frealloc-lhs -std=f2008 -fall-intrinsics
$CSHARED_INT = -c -fPIC -assume realloc_lhs -standard-semantics -std08
-$LSHARED = -shared
+$LSHARED = -shared -Wl,-soname=libstringifor.so.1
$CSTATIC_GNU = -c -frealloc-lhs -std=f2008 -fall-intrinsics
$CSTATIC_INT = -c -assume realloc_lhs -standard-semantics -std08
$DEBUG_GNU = -Og -g3 -Warray-bounds -Wcharacter-truncation -Wline-truncation -Wimplicit-interface -Wimplicit-procedure -Wunderflow -fcheck=all -fmodule-private -ffree-line-length-132 -fimplicit-none -fbacktrace -fdump-core -finit-real=nan

View File

@@ -0,0 +1,22 @@
diff -Naur a/src/third_party/FACE/src/tests/face_test_ucs4.F90 b/src/third_party/FACE/src/tests/face_test_ucs4.F90
--- a/src/third_party/FACE/src/tests/face_test_ucs4.F90
+++ b/src/third_party/FACE/src/tests/face_test_ucs4.F90
@@ -2,9 +2,10 @@
program face_test_ucs4
!< FACE test.
use face
+use iso_fortran_env
implicit none
-#ifdef UCS4_SUPPORTED
+
character(kind=UCS4, len=:), allocatable :: string_1 !< A string.
character(kind=UCS4, len=:), allocatable :: string_2 !< A string.
character(kind=UCS4, len=:), allocatable :: string_3 !< A string.
@@ -13,5 +14,5 @@
string_2 = colorize(UCS4_' ÜÇŞ4', color_fg='red')
string_3 = colorize(' World', color_fg='blue')
print '(A)', string_1//string_2//string_3
-#endif
+
endprogram face_test_ucs4

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>torokhov-s-a@yandex.ru</email>
<name>Sergey Torokhov</name>
</maintainer>
<longdescription lang="en">
A KISS pure Fortran library providing astrings (class) manipulator for modern (2003+) Fortran projects
</longdescription>
<upstream>
<remote-id type="github">szaghi/StringiFor</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,93 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PN="StringiFor"
FORTRAN_STANDARD=2003
PYTHON_COMPAT=( python3_{11..13} )
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/${MY_PN}/releases/download/v${PV}/${MY_PN}.tar.gz -> ${MY_PN}-${PV}.tar.gz"
S="${WORKDIR}/${MY_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
}