public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: dev-libs/fortran-shlex/
@ 2024-01-21 21:31 Sergey Torokhov
  0 siblings, 0 replies; only message in thread
From: Sergey Torokhov @ 2024-01-21 21:31 UTC (permalink / raw
  To: gentoo-commits

commit:     c8802a2fc83156acdacd08d4d5a5e757af1517d7
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sun Jan 21 21:23:29 2024 +0000
Commit:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
CommitDate: Sun Jan 21 21:23:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c8802a2f

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

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>

 dev-libs/fortran-shlex/Manifest                   |  1 +
 dev-libs/fortran-shlex/fortran-shlex-1.0.1.ebuild | 43 +++++++++++++++++++++++
 dev-libs/fortran-shlex/metadata.xml               | 11 ++++++
 3 files changed, 55 insertions(+)

diff --git a/dev-libs/fortran-shlex/Manifest b/dev-libs/fortran-shlex/Manifest
new file mode 100644
index 0000000000..59aed2a536
--- /dev/null
+++ b/dev-libs/fortran-shlex/Manifest
@@ -0,0 +1 @@
+DIST fortran-shlex-1.0.1.tar.gz 6781 BLAKE2B ed64ef1b95cee8b41e12c552e9bd2a92b6af069bcb6004327f2fedda4ca8691441b9d33402b733487c746931c095693dec7423754e3c599ebb6d9af7ef12789f SHA512 d15b80ea222043df8114aa7af153361bd850bca24c489d3e3a78fcf66865eefb25740cceb22d792ca065a3d139d9270bd36d3ed5de61f1f89f945066ba2c19cd

diff --git a/dev-libs/fortran-shlex/fortran-shlex-1.0.1.ebuild b/dev-libs/fortran-shlex/fortran-shlex-1.0.1.ebuild
new file mode 100644
index 0000000000..6bdbdcf695
--- /dev/null
+++ b/dev-libs/fortran-shlex/fortran-shlex-1.0.1.ebuild
@@ -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
+}

diff --git a/dev-libs/fortran-shlex/metadata.xml b/dev-libs/fortran-shlex/metadata.xml
new file mode 100644
index 0000000000..81408ecf64
--- /dev/null
+++ b/dev-libs/fortran-shlex/metadata.xml
@@ -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>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-21 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-21 21:31 [gentoo-commits] repo/proj/guru:dev commit in: dev-libs/fortran-shlex/ Sergey Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox