Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: sci-libs/slicot/files/, sci-libs/slicot/
Date: Thu, 07 May 2020 11:13:58
Message-Id: 1588808155.634f8d92dc88baf041f835d16d51aadeba3912f0.andrewammerlaan@gentoo
1 commit: 634f8d92dc88baf041f835d16d51aadeba3912f0
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sun May 3 18:59:09 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Wed May 6 23:35:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=634f8d92
7
8 sci-libs/slicot: new package
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 sci-libs/slicot/Manifest | 1 +
14 sci-libs/slicot/files/Makefile | 26 +++++++++++++
15 sci-libs/slicot/metadata.xml | 30 +++++++++++++++
16 sci-libs/slicot/slicot-5.0_p20101122.ebuild | 57 +++++++++++++++++++++++++++++
17 4 files changed, 114 insertions(+)
18
19 diff --git a/sci-libs/slicot/Manifest b/sci-libs/slicot/Manifest
20 new file mode 100644
21 index 0000000..ac5de03
22 --- /dev/null
23 +++ b/sci-libs/slicot/Manifest
24 @@ -0,0 +1 @@
25 +DIST slicot_5.0+20101122.orig.tar.gz 2489463 BLAKE2B dc34617f84b51f6be9bb471b30dd8d7cf3dd67b1a0d6ec14af33ccd49aee33ee39b657af6d619059da42734d86eb23e0faf7827db36152001263c4c131234aad SHA512 bef2707bf484636a5c58325561e3f342f08887458020c4922a2b346b88047b48e3f2d372c5c984226856be5c327f2535c32cf299baa553b8bf0fbeea896d6c9b
26
27 diff --git a/sci-libs/slicot/files/Makefile b/sci-libs/slicot/files/Makefile
28 new file mode 100755
29 index 0000000..f15cc08
30 --- /dev/null
31 +++ b/sci-libs/slicot/files/Makefile
32 @@ -0,0 +1,26 @@
33 +#!/usr/bin/make -f
34 +# -*- makefile -*-
35 +
36 +.PHONY: default
37 +default: libslicot.so
38 +
39 +SLICOT_SRC=$(sort $(shell echo src/*.f))
40 +SLICOT_OBJ=$(SLICOT_SRC:.f=.o)
41 +
42 +shared_dir:
43 + mkdir -p $(subst _dir,,$(@))
44 + touch $@
45 +
46 +$(subst src/,shared/,$(SLICOT_OBJ)): \
47 + shared/%.o : src/%.f shared_dir
48 +
49 + $(F77) $(FFLAGS) -fPIC -c $< -o $@
50 +
51 +libslicot.so: libslicot.so.$(SO)
52 + ln -snf $< $@
53 +
54 +libslicot.so.$(SO): libslicot.so.$(VERS)
55 + ln -snf $< $@
56 +
57 +libslicot.so.$(VERS): $(subst src/,shared/,$(SLICOT_OBJ))
58 + $(F77) -fPIC ${FFLAGS} $(LDFLAGS) -shared -Wl,-soname=libslicot.so.$(SO) -o $@ $^
59
60 diff --git a/sci-libs/slicot/metadata.xml b/sci-libs/slicot/metadata.xml
61 new file mode 100644
62 index 0000000..4aaef1d
63 --- /dev/null
64 +++ b/sci-libs/slicot/metadata.xml
65 @@ -0,0 +1,30 @@
66 +<?xml version="1.0" encoding="UTF-8"?>
67 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
68 +<pkgmetadata>
69 + <maintainer type="person">
70 + <email>lssndrbarbieri@×××××.com</email>
71 + <name>Alessandro Barbieri</name>
72 + </maintainer>
73 + <upstream>
74 + <bugs-to>mailto:vsima@×××.ro</bugs-to>
75 + <maintainer>
76 + <email>vsima@×××.ro</email>
77 + <name>Vasile Sima</name>
78 + </maintainer>
79 + </upstream>
80 + <longdescription lang="en">
81 +The subroutine library SLICOT provides Fortran 77 implementations of numerical algorithms for computations in systems and control theory. Based on numerical linear algebra routines from BLAS and LAPACK libraries, SLICOT provides methods for the design and analysis of control systems. The basic ideas behind the library are:
82 +
83 + usefulness of algorithms;
84 + robustness, algorithms must either return reliable results or an error or warning indicator;
85 + numerical stability and accuracy: the results are as good as can be expected when working at a given precision. If possible an estimate of the achieved accuracy should be given;
86 + performance with respect to speed and memory requirements. Although important because of ever increasing complexity of control problems, this objective may never be met at cost of the two previous ones;
87 + portability and reusability: the library should be independent of platforms;
88 + standardisation: the library is based on rigorous programming and documentation standards;
89 + benchmarking, i.e., a standardised set of examples that allows an evaluation of the performance of a method as well as the implementation with respect to correctness, accuracy, and speed. Benchmarking gives also insight in the behaviour of the method and its implementation in extreme situations, i.e., for problems where the limit of the possible accuracy is reached.
90 +
91 +The current version of SLICOT consists of over 570 user-callable and computational routines in various domains of systems and control. Almost all of these routines have associated on-line documentation. Over 240 routines have associated example programs, data and results. New routines are still in preparation. Due to the use of Fortran 77, reusability of the software is obtained, so SLICOT can serve as the core for various existing and future CACSD platforms and production quality software. SLICOT routines can be linked to MATLAB through a gateway compiler, e.g., the NAG Gateway Generator. Recently, MATLAB or Scilab interfaces have been developed for many routines.
92 +
93 +The use of Fortran 77 allows to exploit the structural features of the underlying computational problem and the use of appropriate data structures. This is advantageous for speed of computation and required memory. As the complexity of systems and related control solutions is ever increasing, the issue of speed and memory remains a valid one. The performance of the library has been assessed with respect to numerical quality, computational speed, and memory requirements for a variety of examples. Comparisons indicate that SLICOT routines usually outperform equivalent MATLAB functions, often by orders of magnitude; see Benner e.a. (1997).
94 + </longdescription>
95 +</pkgmetadata>
96
97 diff --git a/sci-libs/slicot/slicot-5.0_p20101122.ebuild b/sci-libs/slicot/slicot-5.0_p20101122.ebuild
98 new file mode 100644
99 index 0000000..2146050
100 --- /dev/null
101 +++ b/sci-libs/slicot/slicot-5.0_p20101122.ebuild
102 @@ -0,0 +1,57 @@
103 +# Copyright 1999-2020 Gentoo Authors
104 +# Distributed under the terms of the GNU General Public License v2
105 +
106 +EAPI="7"
107 +
108 +inherit flag-o-matic fortran-2 toolchain-funcs
109 +
110 +MY_PV="${PV/_p/+}"
111 +MY_P="${PN}-${MY_PV}"
112 +
113 +DESCRIPTION="Subroutine Library in Systems and Control Theory"
114 +HOMEPAGE="https://web.archive.org/web/20191022092917/http://www.slicot.org"
115 +SRC_URI="http://cdn-fastly.deb.debian.org/debian/pool/main/s/${PN}/${PN}_${MY_PV}.orig.tar.gz"
116 +
117 +LICENSE="GPL-2+"
118 +SLOT="0"
119 +KEYWORDS="~amd64"
120 +
121 +IUSE="doc examples"
122 +
123 +DEPEND="
124 + virtual/blas
125 + virtual/lapack
126 +"
127 +RDEPEND="${DEPEND}"
128 +
129 +S="${WORKDIR}/${MY_P}"
130 +
131 +src_unpack() {
132 + default
133 + rm -f "${S}/makefile" || die
134 + cp "${FILESDIR}/Makefile" "${S}" || die
135 +}
136 +
137 +src_prepare() {
138 + export SO="0"
139 + export VERS="${SO}.0"
140 + append-fflags "$($(tc-getPKG_CONFIG) --libs blas)" "$($(tc-getPKG_CONFIG) --libs lapack)"
141 + default
142 +}
143 +
144 +src_install() {
145 + dolib.so libslicot.so
146 + dolib.so "libslicot.so.${SO}"
147 + dolib.so "libslicot.so.${VERS}"
148 + use doc && HTML_DOCS=( libindex.html )
149 + use doc && HTML_DOCS+=( doc/*.html )
150 + einstalldocs
151 + if use examples; then
152 + insinto "/usr/share/${P}/examples"
153 + doins -r examples/.
154 + insinto "/usr/share/${P}/examples77"
155 + doins -r examples77/.
156 + insinto "/usr/share/${P}/benchmark_data"
157 + doins -r benchmark_data/.
158 + fi
159 +}