已开启
.提交源码和spec #1
yangxianzhao创建于 2020年12月4日
.提交源码和spec #1
已开启
yangxianzhao创建于 2020年12月4日
从refs/pull/1/head合入到master
共 7 个文件变更+2257-0
@@ -0,0 +1,83 @@
1+# Octave packaging macros
2+ 
3+# Octave binary API provided
4+%octave_api %(octave-config -p API_VERSION || echo 0)
5+ 
6+# Octave Package Directories
7+%octshareprefix %{_datadir}/octave
8+%octprefix %{octshareprefix}/packages
9+%octarchprefix %{_libdir}/octave/packages
10+%octpkgdir %{octprefix}/%{octpkg}-%{version}
11+%octpkglibdir %{octarchprefix}/%{octpkg}-%{version}
12+ 
13+# Run an octave command - quietly with no startup files
14+%octave_cmd() octave -H -q --no-window-system --no-site-file --eval '%*';
15+ 
16+# For compiled tarfile name
17+%octave_host %(octave-config -p CANONICAL_HOST_TYPE || echo 0)
18+ 
19+# Build unpacked source directory into a package tar file in a temporary location
20+# Pass -T to use source tarball
21+%octave_pkg_build(T) %{lua:
22+ if (rpm.expand("%{-T}") == "-T") then
23+ octpkg_tarfile = rpm.expand("%{SOURCE0}")
24+ else
25+ octpkg_tarfile = rpm .expand("%{_tmppath}/%{octpkg}-%{version}.tar.gz")
26+ print("tar czf "..octpkg_tarfile.." -C "..rpm.expand("%{_builddir} %{buildsubdir}").."\\n")
27+ end
28+ -- Avoid a warning from pkg build about making the build directory
29+ -- and use a clean directory as octave pkg build will delete contents
30+ print(rpm.expand("mkdir -p %{_builddir}/%{buildsubdir}/build\\n"))
31+ -- This fails to keep the arguments to %octave_cmd for some reason
32+ -- print(rpm.expand("%octave_cmd pkg build -verbose -nodeps %{_builddir}/%{buildsubdir} "..octpkg_tarfile).."\\n")
33+ print(rpm.expand("octave -H -q --no-window-system --no-site-file --eval 'pkg build -verbose -nodeps %{_builddir}/%{buildsubdir}/build "..octpkg_tarfile).."'\\n")
34+ -- Extract the source tarball for debuginfo generation
35+ print(rpm.expand("tar xf "..octpkg_tarfile.." -C %{_builddir}/%{buildsubdir}/build\\n"))
36+}
37+ 
38+# Install a package. We use the octave pkg install command to install the
39+# built package into the buildroot. We also put a note to prevent the root
40+# user from removing the package with the octave pkg uninstall command
41+# We call unlink to remove the 'octave_packages' file which contains the
42+# buildroot string and needs to be generated at package install time.
43+%octave_pkg_install \
44+mkdir -p %{buildroot}%{octprefix} \
45+mkdir -p %{buildroot}%{octarchprefix} \
46+%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});unlink(pkg("local_list"));unlink(pkg("global_list")); \
47+if [ -e %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m ] \
48+then \
49+ mv %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m.orig \
50+fi \
51+echo "function on_uninstall (desc)" > %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
52+echo " error ('Can not uninstall %s installed by the redhat package manager', desc.name);" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
53+echo "endfunction" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
54+if [ -e %{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}/*.metainfo.xml ] \
55+then \
56+ echo "Found .metainfo.xml appdata file" \
57+ mkdir -p %{buildroot}/%{_metainfodir} \
58+ cp -p %{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}/*.metainfo.xml %{buildroot}/%{_metainfodir}/ \
59+ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml \
60+else \
61+ echo "Did not find a .metainfo.xml appdata file" \
62+fi \
63+%{nil}
64+ 
65+# Run pkg tests - We need to reinstall to recreate 'octave_packages' so that
66+# octave can find the package, then remove 'octave_packages' again, and re-strip
67+# any shared objects.
68+%octave_pkg_check \
69+%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("list");pkg("install","-verbose",glob("%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-*.tar.gz"){1,1});pkg("load","%{octpkg}");pkg("list");runtests("%{buildroot}%{octpkgdir}");unlink(pkg("local_list")); \
70+/usr/lib/rpm/brp-strip-shared %{__strip} \
71+%{nil}
72+ 
73+# preun script - we need to remove our uninstall protection and perhaps
74+# run the package's own uninstall script.
75+%octave_pkg_preun \
76+if [ -e %{octpkgdir}/packinfo/on_uninstall.m.orig ]; then \
77+ mv %{octpkgdir}/packinfo/on_uninstall.m.orig %{octpkgdir}/packinfo/on_uninstall.m \
78+ cd %{octpkgdir}/packinfo \
79+ %octave_cmd l=pkg("list");on_uninstall(l{cellfun(@(x)strcmp(x.name,"%{octpkg}"),l)}); \
80+else \
81+ echo > %{octpkgdir}/packinfo/on_uninstall.m \
82+fi \
83+%{nil}
Binary files do not support preview
Binary files do not support preview
@@ -0,0 +1,28 @@
1+ 
2+# HG changeset patch
3+# User Mike Miller <mtmiller@octave.org>
4+# Date 1554238576 25200
5+# Node ID c3716220d5b93c49e1c7cc8ebe0b76dd961f4ec7
6+# Parent fc73dafece570f201c18a4eb4a8729a654cfcfbb
7+fix pause and kbhit with glibc 2.28 end-of-file state behavior (bug #55029)
8+ 
9+* sysdep.cc (octave::kbhit): Call "clearerr (stdin)" on end-of-file condition
10+in addition to "std::cin.clear ()". In glibc 2.28, end-of-file is persistent
11+and must be cleared by the application.
12+ 
13+diff --git a/libinterp/corefcn/sysdep.cc b/libinterp/corefcn/sysdep.cc
14+--- a/libinterp/corefcn/sysdep.cc
15++++ b/libinterp/corefcn/sysdep.cc
16+@@ -566,7 +566,10 @@
17+ int c = std::cin.get ();
18+
19+ if (std::cin.fail () || std::cin.eof ())
20+- std::cin.clear ();
21++ {
22++ std::cin.clear ();
23++ clearerr (stdin);
24++ }
25+
26+ // Restore it, enabling system call restarts (if possible).
27+ octave::set_interrupt_handler (saved_interrupt_handler, true);
28+ 
@@ -0,0 +1,504 @@
1+diff -up octave-5.0.91/configure.ac.sundials3 octave-5.0.91/configure.ac
2+--- octave-5.0.91/configure.ac.sundials3 2019-02-04 10:50:20.000000000 -0700
3++++ octave-5.0.91/configure.ac 2019-02-05 22:05:44.096260529 -0700
4+@@ -2220,15 +2220,15 @@ OCTAVE_CHECK_LIB(sundials_ida, [SUNDIALS
5+ [], [don't use SUNDIALS IDA library, solvers ode15i and ode15s will be disabled],
6+ [warn_sundials_ida=
7+ OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE
8+- OCTAVE_CHECK_SUNDIALS_IDA_DENSE
9+- OCTAVE_CHECK_SUNDIALS_IDAKLU])
10++ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE
11++ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU])
12+ LIBS="$save_LIBS"
13+
14+ dnl Define this way instead of with an #if in oct-conf-post.h so that
15+ dnl the build features script will get the correct value.
16+ if test -n "$SUNDIALS_IDA_LIBS" \
17+ && test -n "$SUNDIALS_NVECSERIAL_LIBS" \
18+- && test $octave_cv_sundials_ida_dense = yes \
19++ && test $octave_cv_sundials_sunlinsol_dense = yes \
20+ && test $octave_cv_sundials_realtype_is_double = yes; then
21+ AC_DEFINE(HAVE_SUNDIALS, 1, [Define to 1 if SUNDIALS is available.])
22+ fi
23+diff -up octave-5.0.91/libinterp/dldfcn/__ode15__.cc.sundials3 octave-5.0.91/libinterp/dldfcn/__ode15__.cc
24+--- octave-5.0.91/libinterp/dldfcn/__ode15__.cc.sundials3 2019-02-04 10:50:20.000000000 -0700
25++++ octave-5.0.91/libinterp/dldfcn/__ode15__.cc 2019-02-05 22:06:48.074012827 -0700
26+@@ -1,6 +1,7 @@
27+ /*
28+
29+ Copyright (C) 2016-2019 Francesco Faccio <francesco.faccio@mail.polimi.it>
30++Copyright (C) 2018 William Greene <w.h.greene@gmail.com>
31+
32+ This file is part of Octave.
33+
34+@@ -44,15 +45,34 @@ along with Octave; see the file COPYING.
35+ # include <ida/ida.h>
36+ # endif
37+
38+-# if defined (HAVE_IDA_IDA_DENSE_H)
39+-# include <ida/ida_dense.h>
40++# if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H)
41++# include <sundials/sundials_matrix.h>
42+ # endif
43+
44+-# if defined (HAVE_IDA_IDA_KLU_H)
45+-# include <ida/ida_klu.h>
46++# if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H)
47++# include <sundials/sundials_linearsolver.h>
48++# endif
49++
50++# if defined (HAVE_SUNLINSOL_SUNLINSOL_DENSE_H)
51++# include <sunlinsol/sunlinsol_dense.h>
52++# endif
53++
54++# if defined (HAVE_IDA_IDA_DIRECT_H)
55++# include <ida/ida_direct.h>
56++# endif
57++
58++# if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H)
59+ # include <sundials/sundials_sparse.h>
60+ # endif
61+
62++# if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H)
63++# include <sunlinsol/sunlinsol_klu.h>
64++# endif
65++
66++# if defined (HAVE_SUNMATRIX_SUNMATRIX_SPARSE_H)
67++# include <sunmatrix/sunmatrix_sparse.h>
68++# endif
69++
70+ # if defined (HAVE_NVECTOR_NVECTOR_SERIAL_H)
71+ # include <nvector/nvector_serial.h>
72+ # endif
73+@@ -112,7 +132,8 @@ namespace octave
74+ havejacsparse (false), mem (nullptr), num (), ida_fun (nullptr),
75+ ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr),
76+ spdfdyp (nullptr), fun (nullptr), jacfun (nullptr), jacspfun (nullptr),
77+- jacdcell (nullptr), jacspcell (nullptr)
78++ jacdcell (nullptr), jacspcell (nullptr),
79++ sunJacMatrix (nullptr), sunLinearSolver (nullptr)
80+ { }
81+
82+
83+@@ -122,11 +143,17 @@ namespace octave
84+ havejacsparse (false), mem (nullptr), num (), ida_fun (ida_fcn),
85+ ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr),
86+ spdfdyp (nullptr), fun (daefun), jacfun (nullptr), jacspfun (nullptr),
87+- jacdcell (nullptr), jacspcell (nullptr)
88++ jacdcell (nullptr), jacspcell (nullptr),
89++ sunJacMatrix (nullptr), sunLinearSolver (nullptr)
90+ { }
91+
92+
93+- ~IDA (void) { IDAFree (&mem); }
94++ ~IDA (void)
95++ {
96++ IDAFree (&mem);
97++ SUNLinSolFree(sunLinearSolver);
98++ SUNMatDestroy(sunJacMatrix);
99++ }
100+
Aoctave.spec+1505-0
Axorg.conf+137-0
@@ -0,0 +1,137 @@
1+# This xorg configuration file is meant to be used by xpra
2+# to start a dummy X11 server.
3+# For details, please see:
4+# https://xpra.org/Xdummy.html
5+ 
6+Section "ServerFlags"
7+ Option "DontVTSwitch" "true"
8+ Option "AllowMouseOpenFail" "true"
9+ Option "PciForceNone" "true"
10+ Option "AutoEnableDevices" "false"
11+ Option "AutoAddDevices" "false"
12+EndSection
13+ 
14+Section "InputDevice"
15+ Identifier "dummy_mouse"
16+ Option "CorePointer" "true"
17+ Driver "void"
18+EndSection
19+ 
20+Section "InputDevice"
21+ Identifier "dummy_keyboard"
22+ Option "CoreKeyboard" "true"
23+ Driver "void"
24+EndSection
25+ 
26+Section "Device"
27+ Identifier "dummy_videocard"
28+ Driver "dummy"
29+ Option "ConstantDPI" "true"
30+ #VideoRam 4096000
31+ #VideoRam 256000
32+ VideoRam 192000
33+EndSection
34+ 
35+Section "Monitor"
36+ Identifier "dummy_monitor"
37+ HorizSync 5.0 - 1000.0
38+ VertRefresh 5.0 - 200.0
39+ #This can be used to get a specific DPI, but only for the default resolution:
40+ #DisplaySize 508 317
41+ #NOTE: the highest modes will not work without increasing the VideoRam
42+ # for the dummy video card.
43+ Modeline "32768x32768" 15226.50 32768 35800 39488 46208 32768 32771 32781 32953
44+ Modeline "32768x16384" 7516.25 32768 35544 39192 45616 16384 16387 16397 16478
45+ Modeline "16384x8192" 2101.93 16384 16416 24400 24432 8192 8390 8403 8602
46+ Modeline "8192x4096" 424.46 8192 8224 9832 9864 4096 4195 4202 4301
47+ Modeline "5496x1200" 199.13 5496 5528 6280 6312 1200 1228 1233 1261
48+ Modeline "5280x1080" 169.96 5280 5312 5952 5984 1080 1105 1110 1135
49+ Modeline "5280x1200" 191.40 5280 5312 6032 6064 1200 1228 1233 1261
50+ Modeline "5120x3200" 199.75 5120 5152 5904 5936 3200 3277 3283 3361
51+ Modeline "4800x1200" 64.42 4800 4832 5072 5104 1200 1229 1231 1261
52+ Modeline "3840x2880" 133.43 3840 3872 4376 4408 2880 2950 2955 3025
53+ Modeline "3840x2560" 116.93 3840 3872 4312 4344 2560 2622 2627 2689
54+ Modeline "3840x2048" 91.45 3840 3872 4216 4248 2048 2097 2101 2151
55+ Modeline "3840x1080" 100.38 3840 3848 4216 4592 1080 1081 1084 1093
56+ Modeline "3600x1200" 106.06 3600 3632 3984 4368 1200 1201 1204 1214
57+ Modeline "3288x1080" 39.76 3288 3320 3464 3496 1080 1106 1108 1135
58+ Modeline "2048x2048" 49.47 2048 2080 2264 2296 2048 2097 2101 2151
59+ Modeline "2048x1536" 80.06 2048 2104 2312 2576 1536 1537 1540 1554
60+ Modeline "2560x1600" 47.12 2560 2592 2768 2800 1600 1639 1642 1681
61+ Modeline "2560x1440" 42.12 2560 2592 2752 2784 1440 1475 1478 1513
62+ Modeline "1920x1440" 69.47 1920 1960 2152 2384 1440 1441 1444 1457
63+ Modeline "1920x1200" 26.28 1920 1952 2048 2080 1200 1229 1231 1261
64+ Modeline "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135
65+ Modeline "1680x1050" 20.08 1680 1712 1784 1816 1050 1075 1077 1103
66+ Modeline "1600x1200" 22.04 1600 1632 1712 1744 1200 1229 1231 1261
67+ Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946
68+ Modeline "1440x900" 30.66 1440 1472 1584 1616 900 921 924 946
69+ ModeLine "1366x768" 72.00 1366 1414 1446 1494 768 771 777 803
70+ Modeline "1280x1024" 31.50 1280 1312 1424 1456 1024 1048 1052 1076
71+ Modeline "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841
72+ Modeline "1280x768" 23.11 1280 1312 1392 1424 768 786 789 807
73+ Modeline "1360x768" 24.49 1360 1392 1480 1512 768 786 789 807
74+ Modeline "1024x768" 18.71 1024 1056 1120 1152 768 786 789 807
75+ Modeline "768x1024" 19.50 768 800 872 904 1024 1048 1052 1076
76+ 
77+ 
78+ #common resolutions for android devices (both orientations):
79+ Modeline "800x1280" 25.89 800 832 928 960 1280 1310 1315 1345
80+ Modeline "1280x800" 24.15 1280 1312 1400 1432 800 819 822 841
81+ Modeline "720x1280" 30.22 720 752 864 896 1280 1309 1315 1345
82+ Modeline "1280x720" 27.41 1280 1312 1416 1448 720 737 740 757
83+ Modeline "768x1024" 24.93 768 800 888 920 1024 1047 1052 1076
84+ Modeline "1024x768" 23.77 1024 1056 1144 1176 768 785 789 807
85+ Modeline "600x1024" 19.90 600 632 704 736 1024 1047 1052 1076
86+ Modeline "1024x600" 18.26 1024 1056 1120 1152 600 614 617 631
87+ Modeline "536x960" 16.74 536 568 624 656 960 982 986 1009
88+ Modeline "960x536" 15.23 960 992 1048 1080 536 548 551 563
89+ Modeline "600x800" 15.17 600 632 688 720 800 818 822 841
90+ Modeline "800x600" 14.50 800 832 880 912 600 614 617 631
91+ Modeline "480x854" 13.34 480 512 560 592 854 873 877 897
92+ Modeline "848x480" 12.09 848 880 920 952 480 491 493 505
93+ Modeline "480x800" 12.43 480 512 552 584 800 818 822 841
94+ Modeline "800x480" 11.46 800 832 872 904 480 491 493 505
95+ #resolutions for android devices (both orientations)
96+ #minus the status bar
97+ #38px status bar (and width rounded up)
98+ Modeline "800x1242" 25.03 800 832 920 952 1242 1271 1275 1305
99+ Modeline "1280x762" 22.93 1280 1312 1392 1424 762 780 783 801
100+ Modeline "720x1242" 29.20 720 752 856 888 1242 1271 1276 1305
101+ Modeline "1280x682" 25.85 1280 1312 1408 1440 682 698 701 717
102+ Modeline "768x986" 23.90 768 800 888 920 986 1009 1013 1036
103+ Modeline "1024x730" 22.50 1024 1056 1136 1168 730 747 750 767
104+ Modeline "600x986" 19.07 600 632 704 736 986 1009 1013 1036
105+ Modeline "1024x562" 17.03 1024 1056 1120 1152 562 575 578 591
106+ Modeline "536x922" 16.01 536 568 624 656 922 943 947 969
107+ Modeline "960x498" 14.09 960 992 1040 1072 498 509 511 523
108+ Modeline "600x762" 14.39 600 632 680 712 762 779 783 801
109+ Modeline "800x562" 13.52 800 832 880 912 562 575 578 591
110+ Modeline "480x810" 12.59 480 512 552 584 810 828 832 851
111+ Modeline "848x442" 11.09 848 880 920 952 442 452 454 465
112+ Modeline "480x762" 11.79 480 512 552 584 762 779 783 801
113+EndSection
114+ 
115+Section "Screen"
116+ Identifier "dummy_screen"
117+ Device "dummy_videocard"
118+ Monitor "dummy_monitor"
119+ DefaultDepth 24
120+ SubSection "Display"
121+ Viewport 0 0
122+ Depth 24
123+ #Modes "32768x32768" "32768x16384" "16384x8192" "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200"
124+ Modes "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200"
125+ #Virtual 32000 32000
126+ #Virtual 16384 8192
127+ Virtual 8192 4096
128+ #Virtual 5120 3200
129+ EndSubSection
130+EndSection
131+ 
132+Section "ServerLayout"
133+ Identifier "dummy_layout"
134+ Screen "dummy_screen"
135+ InputDevice "dummy_mouse"
136+ InputDevice "dummy_keyboard"
137+EndSection