dev-octave/control: new package, add 3.4.0

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-05-05 09:30:47 +02:00
parent 61bbf1f66b
commit 7cf0713142
6 changed files with 214 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
--- a/src/Makefile
+++ b/src/Makefile
@@ -15,7 +15,7 @@
AR := $(shell $(MKOCTFILE) -p AR)
-PKG_CXXFLAGS := -Wall -Wno-deprecated-declarations $(PKG_CXXFLAGS_APPEND)
+PKG_CXXFLAGS := $(CXXFLAGS) -Wall -Wno-deprecated-declarations $(PKG_CXXFLAGS_APPEND)
all: __control_slicot_functions__.oct \
__control_helper_functions__.oct
@@ -66,6 +66,7 @@
# helper functions
__control_helper_functions__.oct: __control_helper_functions__.cc
+ LDFLAGS="$(LDFLAGS)" \
$(MKOCTFILE) $(PKG_CXXFLAGS) __control_helper_functions__.cc
clean:

View File

@@ -0,0 +1,53 @@
Description: Skip tests that fail with lapack 3.10.0
Author: Sébastien Villemot <sebastien@debian.org>
Bug: https://savannah.gnu.org/bugs/?61205
Last-Update: 2021-09-22
--- a/inst/btaconred.m
+++ b/inst/btaconred.m
@@ -277,5 +277,5 @@ endfunction
%! Mo = [Ao, Bo; Co, Do];
%! Me = [Ae, Be; Ce, De];
%!
-%!assert (Mo, Me, 1e-4);
+%!xtest assert (Mo, Me, 1e-4);
%!assert (Info.hsvc, HSVCe, 1e-4);
--- a/inst/btamodred.m
+++ b/inst/btamodred.m
@@ -300,5 +300,5 @@ endfunction
%! Mo = [Ao, Bo; Co, Do];
%! Me = [Ae, Be; Ce, De];
%!
-%!assert (Mo, Me, 1e-4);
+%!xtest assert (Mo, Me, 1e-4);
%!assert (Info.hsv, HSVe, 1e-4);
--- a/inst/moen4.m
+++ b/inst/moen4.m
@@ -3028,7 +3028,7 @@ endfunction
%! De = [ -0.4997 0.0451
%! -1.0011 -0.5567 ];
%!
-%!assert (SYS.A, Ae, 1e-4);
-%!assert (SYS.B, Be, 1e-4);
-%!assert (SYS.C, Ce, 1e-4);
+%!xtest assert (SYS.A, Ae, 1e-4);
+%!xtest assert (SYS.B, Be, 1e-4);
+%!xtest assert (SYS.C, Ce, 1e-4);
%!assert (SYS.D, De, 1e-4);
--- a/inst/hnamodred.m
+++ b/inst/hnamodred.m
@@ -465,5 +465,5 @@ endfunction
%! Mo = [Ao, Bo; Co, Do];
%! Me = [Ae, Be; Ce, De];
%!
-%!assert (Mo, Me, 1e-4);
+%!xtest assert (Mo, Me, 1e-4);
%!assert (Info.hsv, HSVe, 1e-4);
--- a/inst/cfconred.m
+++ b/inst/cfconred.m
@@ -330,5 +330,5 @@ endfunction
%! Mo = [Ao, Bo; Co, Do];
%! Me = [Ae, Be; Ce, De];
%!
-%!assert (Mo, Me, 1e-4);
+%!xtest assert (Mo, Me, 1e-4);
%!assert (Info.hsv, HSVe, 1e-4);

View File

@@ -0,0 +1,80 @@
Description: Use external SLICOT instead of embedded copy
Author: Sébastien Villemot <sebastien.villemot@ens.fr>
Forwarded: not-needed
Reviewed-By: Rafael Laboissière <rafael@debian.org>
Last-Update: 2021-06-29
--- a/src/Makefile
+++ b/src/Makefile
@@ -22,47 +22,33 @@
# TODO: Private oct-files for control package.
-# unpack and compile SLICOT library
-# Note that TG04BX is a custom routine.
-# It has the extension .fortran such that
-# it is not deleted by rm *.f when using
-# the developer makefile makefile_control.m
-# The other rotuines *.fortan are modified versions
-# of the original slicot routines.
-#
-# MA02ID.f use in its original version is compiled by an
-# extra command suppressing warnings on indexing errors
-#
-slicotlibrary.a: slicot.tar.gz
- tar -xzf slicot.tar.gz
- mkdir sltmp
- mv slicot/src/*.f ./sltmp
- mv slicot/src_aux/*.f ./sltmp
- if [ "$(HAVE_DGGES)" = "1" ]; then \
- echo "copy routines using DGGES"; \
- cp SB04OD.fortran ./sltmp/SB04OD.f; \
- cp SG03AD.fortran ./sltmp/SG03AD.f; \
- cp SG03BD.fortran ./sltmp/SG03BD.f; \
- fi;
- cp AB08NX.fortran ./sltmp/AB08NX.f
- cp AG08BY.fortran ./sltmp/AG08BY.f
- cp SB01BY.fortran ./sltmp/SB01BY.f
- cp SB01FY.fortran ./sltmp/SB01FY.f
- cp SB06ND.fortran ./sltmp/SB06ND.f
- cp TB01MD.fortran ./sltmp/TB01MD.f
- cp TB01ND.fortran ./sltmp/TB01ND.f
- cp TB01ZD.fortran ./sltmp/TB01ZD.f
- cp TG04BX.fortran ./sltmp/TG04BX.f
- cp ODLTZM.fortran ./sltmp/ODLTZM.f
- cp makefile.slicot ./sltmp/makefile
- cd sltmp; $(MKOCTFILE) -w -c MA02ID.f; rm MA02ID.f; $(MKOCTFILE) -c *.f;
- $(AR) -rc slicotlibrary.a ./sltmp/*.o
- rm -rf sltmp slicot
+sltmp/%.f: %.fortran
+ mkdir -p sltmp
+ cp $< $@
+
+FORTRAN_SOURCES = \
+ sltmp/AB08NX.f \
+ sltmp/AG08BY.f \
+ sltmp/SB01BY.f \
+ sltmp/SB01FY.f \
+ sltmp/SB06ND.f \
+ sltmp/TB01MD.f \
+ sltmp/TB01ND.f \
+ sltmp/TB01ZD.f \
+ sltmp/TG04BX.f \
+ sltmp/ODLTZM.f
+
+ifeq ($(HAVE_DGGES), 1)
+FORTRAN_SOURCES += \
+ sltmp/SB04OD.f \
+ sltmp/SG03AD.f \
+ sltmp/SG03BD.f
+endif
# slicot functions
-__control_slicot_functions__.oct: __control_slicot_functions__.cc common.cc slicotlibrary.a
- LDFLAGS="$(LDFLAGS)" \
- $(MKOCTFILE) $(PKG_CXXFLAGS) __control_slicot_functions__.cc common.cc slicotlibrary.a
+__control_slicot_functions__.oct: __control_slicot_functions__.cc common.cc $(FORTRAN_SOURCES)
+ LDFLAGS="$(LDFLAGS)" \
+ $(MKOCTFILE) $(PKG_CXXFLAGS) __control_slicot_functions__.cc common.cc $(FORTRAN_SOURCES) -lslicot
# helper functions
__control_helper_functions__.oct: __control_helper_functions__.cc