dev-libs/fortran-shlex: new package, v1.0.1

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
Sergey Torokhov 2024-01-22 00:23:29 +03:00
parent e0e41b5e30
commit c8802a2fc8
No known key found for this signature in database
GPG Key ID: 6787AA71304915E3
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST fortran-shlex-1.0.1.tar.gz 6781 BLAKE2B ed64ef1b95cee8b41e12c552e9bd2a92b6af069bcb6004327f2fedda4ca8691441b9d33402b733487c746931c095693dec7423754e3c599ebb6d9af7ef12789f SHA512 d15b80ea222043df8114aa7af153361bd850bca24c489d3e3a78fcf66865eefb25740cceb22d792ca065a3d139d9270bd36d3ed5de61f1f89f945066ba2c19cd

View File

@ -0,0 +1,43 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
FORTRAN_STANDARD="2003"
inherit fortran-2 toolchain-funcs
DESCRIPTION="Modern Fortran port of the tiny-regex-c library for regular expressions"
HOMEPAGE="https://github.com/perazz/fortran-shlex"
SRC_URI="https://github.com/perazz/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
src_compile() {
$(tc-getFC) ${FCFLAGS} -fPIC -Wl,-soname,lib"${PN}".so.1 ${LDFLAGS} \
-shared -o libfortran-shlex.so.1 src/shlex_module.f90 || die
}
src_test() {
cp shlex_module.mod test/shlex_module.mod || die
cp libfortran-shlex.so.1 test/libfortran-shlex.so.1 || die
pushd ./test || die
ln -s libfortran-shlex.so.1 libfortran-shlex.so || die
$(tc-getFC) ${FCFLAGS} -fPIC ${LDFLAGS} -L. \
-o tests shlex_test.f90 -lfortran-shlex || die
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./
./tests || die
popd
}
src_install() {
dolib.so libfortran-shlex.so.1
dosym libfortran-shlex.so.1 /usr/$(get_libdir)/libfortran-shlex.so
insinto /usr/include/"${PN}"
doins shlex_module.mod
}

View File

@ -0,0 +1,11 @@
<?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>
<upstream>
<remote-id type="github">perazz/fortran-shlex</remote-id>
</upstream>
</pkgmetadata>