Gentoo Archives: gentoo-commits

From: Haelwenn Monnier <contact@×××××××××.me>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-octave/control/files/, dev-octave/control/
Date: Thu, 05 May 2022 14:42:34
Message-Id: 1651735937.7cf07131421f0f51511dd6149d27c6ed5f45381e.lanodan@gentoo
1 commit: 7cf07131421f0f51511dd6149d27c6ed5f45381e
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Thu May 5 07:30:47 2022 +0000
4 Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
5 CommitDate: Thu May 5 07:32:17 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7cf07131
7
8 dev-octave/control: new package, add 3.4.0
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 dev-octave/control/Manifest | 2 +
13 dev-octave/control/control-3.4.0.ebuild | 32 +++++++++
14 .../files/control-3.4.0-respect-flags.patch | 19 +++++
15 .../control/files/control-lapack-3.10.0.patch | 53 ++++++++++++++
16 .../files/control-use-external-slicot.patch | 80 ++++++++++++++++++++++
17 dev-octave/control/metadata.xml | 28 ++++++++
18 6 files changed, 214 insertions(+)
19
20 diff --git a/dev-octave/control/Manifest b/dev-octave/control/Manifest
21 new file mode 100644
22 index 000000000..5eb70e5e1
23 --- /dev/null
24 +++ b/dev-octave/control/Manifest
25 @@ -0,0 +1,2 @@
26 +DIST control-3.4.0.tar.gz 2981767 BLAKE2B c1c13679b10e1b1cee3d7a2057059f1998a7af460de213c18e8e4affbbe8f5068f690ac788ba8422bd91b7a1142f10c9642c0dae1077205599b063c82ccf00bd SHA512 60728f2c42d3d3ad0cdc1e32c458fdcd0a8ccdfd1a00dd27bcb321cbf891b030c005a5ada6de6b745f93efa5a10e9d42004024a575b8088cb46336c677432a5f
27 +DIST octaveforge_configure 75 BLAKE2B a6d08088e51628113f7ee2d125fad93a20978cdec60d30cd6628a6056b127968ccf0bc58d2a01166ecc68e8e1ff25518ecf0a2fff69f1ccf63ba2e95eb327db2 SHA512 f293f8ac550953d7c758dadd1bfbf57754a725e6480e8f11b85b883370989b323324492a16118a9b4bfa897a6720f7f20776754cbf763c61bfa10c90191d9a8f
28
29 diff --git a/dev-octave/control/control-3.4.0.ebuild b/dev-octave/control/control-3.4.0.ebuild
30 new file mode 100644
31 index 000000000..00ae92738
32 --- /dev/null
33 +++ b/dev-octave/control/control-3.4.0.ebuild
34 @@ -0,0 +1,32 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +
40 +inherit octaveforge
41 +
42 +DESCRIPTION="Computer-Aided Control System Design"
43 +HOMEPAGE="https://octave.sourceforge.io/control/index.html"
44 +
45 +LICENSE="GPL-3+"
46 +SLOT="0"
47 +KEYWORDS="~amd64"
48 +
49 +DEPEND=">=sci-mathematics/octave-4.0.0"
50 +RDEPEND="
51 + ${DEPEND}
52 + sci-libs/slicot
53 +"
54 +
55 +PATCHES=(
56 + "${FILESDIR}/${PN}-use-external-slicot.patch"
57 + "${FILESDIR}/${PN}-lapack-3.10.0.patch"
58 + "${FILESDIR}/${P}-respect-flags.patch"
59 +)
60 +
61 +src_prepare() {
62 + default
63 + #bundled slicot
64 + rm -f src/slicot.tar.gz || die
65 + octaveforge_src_prepare
66 +}
67
68 diff --git a/dev-octave/control/files/control-3.4.0-respect-flags.patch b/dev-octave/control/files/control-3.4.0-respect-flags.patch
69 new file mode 100644
70 index 000000000..a34eff85a
71 --- /dev/null
72 +++ b/dev-octave/control/files/control-3.4.0-respect-flags.patch
73 @@ -0,0 +1,19 @@
74 +--- a/src/Makefile
75 ++++ b/src/Makefile
76 +@@ -15,7 +15,7 @@
77 +
78 + AR := $(shell $(MKOCTFILE) -p AR)
79 +
80 +-PKG_CXXFLAGS := -Wall -Wno-deprecated-declarations $(PKG_CXXFLAGS_APPEND)
81 ++PKG_CXXFLAGS := $(CXXFLAGS) -Wall -Wno-deprecated-declarations $(PKG_CXXFLAGS_APPEND)
82 +
83 + all: __control_slicot_functions__.oct \
84 + __control_helper_functions__.oct
85 +@@ -66,6 +66,7 @@
86 +
87 + # helper functions
88 + __control_helper_functions__.oct: __control_helper_functions__.cc
89 ++ LDFLAGS="$(LDFLAGS)" \
90 + $(MKOCTFILE) $(PKG_CXXFLAGS) __control_helper_functions__.cc
91 +
92 + clean:
93
94 diff --git a/dev-octave/control/files/control-lapack-3.10.0.patch b/dev-octave/control/files/control-lapack-3.10.0.patch
95 new file mode 100644
96 index 000000000..519994bca
97 --- /dev/null
98 +++ b/dev-octave/control/files/control-lapack-3.10.0.patch
99 @@ -0,0 +1,53 @@
100 +Description: Skip tests that fail with lapack 3.10.0
101 +Author: Sébastien Villemot <sebastien@××××××.org>
102 +Bug: https://savannah.gnu.org/bugs/?61205
103 +Last-Update: 2021-09-22
104 +--- a/inst/btaconred.m
105 ++++ b/inst/btaconred.m
106 +@@ -277,5 +277,5 @@ endfunction
107 + %! Mo = [Ao, Bo; Co, Do];
108 + %! Me = [Ae, Be; Ce, De];
109 + %!
110 +-%!assert (Mo, Me, 1e-4);
111 ++%!xtest assert (Mo, Me, 1e-4);
112 + %!assert (Info.hsvc, HSVCe, 1e-4);
113 +--- a/inst/btamodred.m
114 ++++ b/inst/btamodred.m
115 +@@ -300,5 +300,5 @@ endfunction
116 + %! Mo = [Ao, Bo; Co, Do];
117 + %! Me = [Ae, Be; Ce, De];
118 + %!
119 +-%!assert (Mo, Me, 1e-4);
120 ++%!xtest assert (Mo, Me, 1e-4);
121 + %!assert (Info.hsv, HSVe, 1e-4);
122 +--- a/inst/moen4.m
123 ++++ b/inst/moen4.m
124 +@@ -3028,7 +3028,7 @@ endfunction
125 + %! De = [ -0.4997 0.0451
126 + %! -1.0011 -0.5567 ];
127 + %!
128 +-%!assert (SYS.A, Ae, 1e-4);
129 +-%!assert (SYS.B, Be, 1e-4);
130 +-%!assert (SYS.C, Ce, 1e-4);
131 ++%!xtest assert (SYS.A, Ae, 1e-4);
132 ++%!xtest assert (SYS.B, Be, 1e-4);
133 ++%!xtest assert (SYS.C, Ce, 1e-4);
134 + %!assert (SYS.D, De, 1e-4);
135 +--- a/inst/hnamodred.m
136 ++++ b/inst/hnamodred.m
137 +@@ -465,5 +465,5 @@ endfunction
138 + %! Mo = [Ao, Bo; Co, Do];
139 + %! Me = [Ae, Be; Ce, De];
140 + %!
141 +-%!assert (Mo, Me, 1e-4);
142 ++%!xtest assert (Mo, Me, 1e-4);
143 + %!assert (Info.hsv, HSVe, 1e-4);
144 +--- a/inst/cfconred.m
145 ++++ b/inst/cfconred.m
146 +@@ -330,5 +330,5 @@ endfunction
147 + %! Mo = [Ao, Bo; Co, Do];
148 + %! Me = [Ae, Be; Ce, De];
149 + %!
150 +-%!assert (Mo, Me, 1e-4);
151 ++%!xtest assert (Mo, Me, 1e-4);
152 + %!assert (Info.hsv, HSVe, 1e-4);
153
154 diff --git a/dev-octave/control/files/control-use-external-slicot.patch b/dev-octave/control/files/control-use-external-slicot.patch
155 new file mode 100644
156 index 000000000..db284757b
157 --- /dev/null
158 +++ b/dev-octave/control/files/control-use-external-slicot.patch
159 @@ -0,0 +1,80 @@
160 +Description: Use external SLICOT instead of embedded copy
161 +Author: Sébastien Villemot <sebastien.villemot@×××.fr>
162 +Forwarded: not-needed
163 +Reviewed-By: Rafael Laboissière <rafael@××××××.org>
164 +Last-Update: 2021-06-29
165 +--- a/src/Makefile
166 ++++ b/src/Makefile
167 +@@ -22,47 +22,33 @@
168 +
169 + # TODO: Private oct-files for control package.
170 +
171 +-# unpack and compile SLICOT library
172 +-# Note that TG04BX is a custom routine.
173 +-# It has the extension .fortran such that
174 +-# it is not deleted by rm *.f when using
175 +-# the developer makefile makefile_control.m
176 +-# The other rotuines *.fortan are modified versions
177 +-# of the original slicot routines.
178 +-#
179 +-# MA02ID.f use in its original version is compiled by an
180 +-# extra command suppressing warnings on indexing errors
181 +-#
182 +-slicotlibrary.a: slicot.tar.gz
183 +- tar -xzf slicot.tar.gz
184 +- mkdir sltmp
185 +- mv slicot/src/*.f ./sltmp
186 +- mv slicot/src_aux/*.f ./sltmp
187 +- if [ "$(HAVE_DGGES)" = "1" ]; then \
188 +- echo "copy routines using DGGES"; \
189 +- cp SB04OD.fortran ./sltmp/SB04OD.f; \
190 +- cp SG03AD.fortran ./sltmp/SG03AD.f; \
191 +- cp SG03BD.fortran ./sltmp/SG03BD.f; \
192 +- fi;
193 +- cp AB08NX.fortran ./sltmp/AB08NX.f
194 +- cp AG08BY.fortran ./sltmp/AG08BY.f
195 +- cp SB01BY.fortran ./sltmp/SB01BY.f
196 +- cp SB01FY.fortran ./sltmp/SB01FY.f
197 +- cp SB06ND.fortran ./sltmp/SB06ND.f
198 +- cp TB01MD.fortran ./sltmp/TB01MD.f
199 +- cp TB01ND.fortran ./sltmp/TB01ND.f
200 +- cp TB01ZD.fortran ./sltmp/TB01ZD.f
201 +- cp TG04BX.fortran ./sltmp/TG04BX.f
202 +- cp ODLTZM.fortran ./sltmp/ODLTZM.f
203 +- cp makefile.slicot ./sltmp/makefile
204 +- cd sltmp; $(MKOCTFILE) -w -c MA02ID.f; rm MA02ID.f; $(MKOCTFILE) -c *.f;
205 +- $(AR) -rc slicotlibrary.a ./sltmp/*.o
206 +- rm -rf sltmp slicot
207 ++sltmp/%.f: %.fortran
208 ++ mkdir -p sltmp
209 ++ cp $< $@
210 ++
211 ++FORTRAN_SOURCES = \
212 ++ sltmp/AB08NX.f \
213 ++ sltmp/AG08BY.f \
214 ++ sltmp/SB01BY.f \
215 ++ sltmp/SB01FY.f \
216 ++ sltmp/SB06ND.f \
217 ++ sltmp/TB01MD.f \
218 ++ sltmp/TB01ND.f \
219 ++ sltmp/TB01ZD.f \
220 ++ sltmp/TG04BX.f \
221 ++ sltmp/ODLTZM.f
222 ++
223 ++ifeq ($(HAVE_DGGES), 1)
224 ++FORTRAN_SOURCES += \
225 ++ sltmp/SB04OD.f \
226 ++ sltmp/SG03AD.f \
227 ++ sltmp/SG03BD.f
228 ++endif
229 +
230 + # slicot functions
231 +-__control_slicot_functions__.oct: __control_slicot_functions__.cc common.cc slicotlibrary.a
232 +- LDFLAGS="$(LDFLAGS)" \
233 +- $(MKOCTFILE) $(PKG_CXXFLAGS) __control_slicot_functions__.cc common.cc slicotlibrary.a
234 ++__control_slicot_functions__.oct: __control_slicot_functions__.cc common.cc $(FORTRAN_SOURCES)
235 ++ LDFLAGS="$(LDFLAGS)" \
236 ++ $(MKOCTFILE) $(PKG_CXXFLAGS) __control_slicot_functions__.cc common.cc $(FORTRAN_SOURCES) -lslicot
237 +
238 + # helper functions
239 + __control_helper_functions__.oct: __control_helper_functions__.cc
240
241 diff --git a/dev-octave/control/metadata.xml b/dev-octave/control/metadata.xml
242 new file mode 100644
243 index 000000000..4e993b7c8
244 --- /dev/null
245 +++ b/dev-octave/control/metadata.xml
246 @@ -0,0 +1,28 @@
247 +<?xml version="1.0" encoding="UTF-8"?>
248 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
249 +<pkgmetadata>
250 + <maintainer type="person">
251 + <email>lssndrbarbieri@×××××.com</email>
252 + <name>Alessandro Barbieri</name>
253 + </maintainer>
254 + <upstream>
255 + <changelog>https://octave.sourceforge.io/control/NEWS.html</changelog>
256 + <doc lang="en">https://octave.sourceforge.io/control/overview.html</doc>
257 + <maintainer>
258 + <email>f.alexander.wilms@×××××.com</email>
259 + <name>Alexander Wilms</name>
260 + </maintainer>
261 + <maintainer>
262 + <email>doug.dastew@×××××.com</email>
263 + <name>Doug Stewart</name>
264 + </maintainer>
265 + <maintainer>
266 + <email>lukas.reichlin@×××××.com</email>
267 + <name>Lukas Reichlin</name>
268 + </maintainer>
269 + <remote-id type="sourceforge">octave/control</remote-id>
270 + </upstream>
271 + <longdescription lang="en">
272 +Computer-Aided Control System Design (CACSD) Tools for GNU Octave, based on the proven SLICOT Library
273 + </longdescription>
274 +</pkgmetadata>