1 |
commit: 7618b11bc8c66b75d218a5025c467f5b0d4a96b4 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 16 23:12:57 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 16 23:12:57 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7618b11b |
7 |
|
8 |
sci-mathematics/octave: add 8.1.0 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sci-mathematics/octave/Manifest | 1 + |
13 |
sci-mathematics/octave/octave-8.1.0.ebuild | 233 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 234 insertions(+) |
15 |
|
16 |
diff --git a/sci-mathematics/octave/Manifest b/sci-mathematics/octave/Manifest |
17 |
index 083f66c96461..ad1f6c9bfd39 100644 |
18 |
--- a/sci-mathematics/octave/Manifest |
19 |
+++ b/sci-mathematics/octave/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST octave-7.3.0.tar.xz 26215288 BLAKE2B 53fff89e798f8b8795f83e46f66793f2cf37f98933fa62a47d5ec389f89a3447eb96128c1d6b68a4184630d071ecf1a4323299c251b43c3211a8f781486b32e5 SHA512 1399d7010cbd4e83d6dc60ab8cc2abb20e64a762e905a00066e6331c5350df93b4ff8f2670fd52fc183918cea21bc176cb263ca71080de6e4041f5e0ea21558e |
22 |
+DIST octave-8.1.0.tar.xz 26957620 BLAKE2B d1d90a242b1517dd0284af454b9de83238c5f515690c1ffd8bd5d8c43ff6c690ccab590a877e74631394295b97292d71b2dc1c62ea50f0c4ff3e9ac728f67dbf SHA512 7e43e1a272cb51e981d4f534bbed2c2915bb714be3f151f98862ed8ecec1ee3a90600dd22778077b6cdecee4c802a2e4d13a49c339cef683e1356941b9e1cd1d |
23 |
|
24 |
diff --git a/sci-mathematics/octave/octave-8.1.0.ebuild b/sci-mathematics/octave/octave-8.1.0.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..212af2b3d89a |
27 |
--- /dev/null |
28 |
+++ b/sci-mathematics/octave/octave-8.1.0.ebuild |
29 |
@@ -0,0 +1,233 @@ |
30 |
+# Copyright 1999-2023 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+inherit autotools flag-o-matic fortran-2 java-pkg-opt-2 pax-utils qmake-utils toolchain-funcs xdg |
36 |
+ |
37 |
+DESCRIPTION="High-level interactive language for numerical computations" |
38 |
+HOMEPAGE="https://www.gnu.org/software/octave/" |
39 |
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" |
40 |
+ |
41 |
+LICENSE="GPL-3" |
42 |
+SLOT="0/${PV}" |
43 |
+IUSE="curl doc fftw fltk +glpk gnuplot gui hdf5 imagemagick java json opengl portaudio postscript +qhull +qrupdate readline sndfile +sparse ssl sundials X zlib" |
44 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" |
45 |
+ |
46 |
+# Although it is listed in INSTALL.OCTAVE as a build tool, Octave runs |
47 |
+# "makeinfo" from sys-apps/texinfo at runtime to convert its texinfo |
48 |
+# documentation to text (see scripts/help/help.m). |
49 |
+# |
50 |
+# (un)zip isn't mentioned, but there's a test that uses it (bug #775254). |
51 |
+# |
52 |
+# The use of USE=imagemagick to pull in media-gfx/graphicsmagick is not |
53 |
+# ideal, but both "graphicsmagick" and "imagemagick" are global USE |
54 |
+# flags whose existing descriptions conflict with the obvious way we |
55 |
+# would want to use them in octave. In any case, upstream doesn't really |
56 |
+# support imagemagick, only graphicsmagick (bug 864785). |
57 |
+RDEPEND=" |
58 |
+ app-arch/bzip2 |
59 |
+ app-arch/unzip |
60 |
+ app-arch/zip |
61 |
+ app-text/ghostscript-gpl |
62 |
+ sys-apps/texinfo |
63 |
+ dev-libs/libpcre2 |
64 |
+ sys-libs/ncurses:= |
65 |
+ sys-libs/zlib |
66 |
+ virtual/blas |
67 |
+ virtual/lapack |
68 |
+ curl? ( net-misc/curl:= ) |
69 |
+ fftw? ( sci-libs/fftw:3.0= ) |
70 |
+ fltk? ( >=x11-libs/fltk-1.3:1=[opengl,xft] ) |
71 |
+ glpk? ( sci-mathematics/glpk:= ) |
72 |
+ gnuplot? ( sci-visualization/gnuplot ) |
73 |
+ gui? ( |
74 |
+ dev-qt/qtcore:5 |
75 |
+ dev-qt/qtgui:5 |
76 |
+ dev-qt/qthelp:5 |
77 |
+ dev-qt/qtnetwork:5 |
78 |
+ dev-qt/qtopengl:5 |
79 |
+ dev-qt/qtprintsupport:5 |
80 |
+ dev-qt/qtwidgets:5 |
81 |
+ x11-libs/qscintilla:= |
82 |
+ ) |
83 |
+ hdf5? ( sci-libs/hdf5:= ) |
84 |
+ imagemagick? ( media-gfx/graphicsmagick:=[cxx] ) |
85 |
+ java? ( >=virtual/jre-1.8:* ) |
86 |
+ json? ( dev-libs/rapidjson ) |
87 |
+ opengl? ( |
88 |
+ media-libs/freetype:= |
89 |
+ media-libs/fontconfig:= |
90 |
+ virtual/glu |
91 |
+ x11-libs/gl2ps:= |
92 |
+ ) |
93 |
+ portaudio? ( media-libs/portaudio ) |
94 |
+ postscript? ( |
95 |
+ app-text/epstool |
96 |
+ media-gfx/pstoedit |
97 |
+ media-gfx/transfig |
98 |
+ ) |
99 |
+ qhull? ( media-libs/qhull:= ) |
100 |
+ qrupdate? ( sci-libs/qrupdate:= ) |
101 |
+ readline? ( sys-libs/readline:= ) |
102 |
+ sndfile? ( media-libs/libsndfile ) |
103 |
+ sparse? ( |
104 |
+ sci-libs/arpack:= |
105 |
+ sci-libs/camd:= |
106 |
+ sci-libs/ccolamd:= |
107 |
+ sci-libs/cholmod:= |
108 |
+ sci-libs/colamd:= |
109 |
+ sci-libs/cxsparse:= |
110 |
+ sci-libs/umfpack:= |
111 |
+ ) |
112 |
+ ssl? ( |
113 |
+ dev-libs/openssl:= |
114 |
+ ) |
115 |
+ sundials? ( >=sci-libs/sundials-4:= ) |
116 |
+ X? ( x11-libs/libX11:= ) |
117 |
+" |
118 |
+DEPEND="${RDEPEND}" |
119 |
+BDEPEND=" |
120 |
+ dev-util/gperf |
121 |
+ virtual/pkgconfig |
122 |
+ doc? ( |
123 |
+ dev-texlive/texlive-fontsrecommended |
124 |
+ dev-texlive/texlive-plaingeneric |
125 |
+ dev-texlive/texlive-metapost |
126 |
+ virtual/latex-base |
127 |
+ ) |
128 |
+ java? ( >=virtual/jdk-1.8:* ) |
129 |
+ gui? ( dev-qt/linguist-tools:5 ) |
130 |
+ qrupdate? ( app-misc/pax-utils ) |
131 |
+ sparse? ( app-misc/pax-utils ) |
132 |
+" |
133 |
+ |
134 |
+# There are three ways to plot in Octave: |
135 |
+# |
136 |
+# 1. The old gnuplot renderer |
137 |
+# 2. The OpenGL renderer using the FLTK backend |
138 |
+# 3. The OpenGL renderer using the Qt backend |
139 |
+# |
140 |
+# It's possible to use the Qt GUI without OpenGL, but OpenGL rendering |
141 |
+# is all that FLTK is used for, so it doesn't make sense to enable |
142 |
+# USE=fltk without USE=opengl. |
143 |
+# |
144 |
+# Building without either USE=gnuplot or USE=opengl is technically legal, |
145 |
+# but will leave you unable to plot anything. |
146 |
+# |
147 |
+# Octave's FLTK support is unofficially deprecated, in the sense that |
148 |
+# you'll often get "why are you using FLTK?" in response to |
149 |
+# bugs. (Upstream bug 59321 for a random example.) In the future, it |
150 |
+# will probably make sense to merge USE=opengl and USE=X into USE=gui, |
151 |
+# dropping USE=fltk entirely. |
152 |
+REQUIRED_USE=" |
153 |
+ fltk? ( opengl X ) |
154 |
+ gui? ( X ) |
155 |
+ opengl? ( || ( fltk gui ) ) |
156 |
+" |
157 |
+ |
158 |
+PATCHES=( |
159 |
+ "${FILESDIR}"/${PN}-5.1.0-pkgbuilddir.patch |
160 |
+ "${FILESDIR}"/${PN}-6.4.0-omit-qtchooser-qtver.patch |
161 |
+) |
162 |
+ |
163 |
+src_prepare() { |
164 |
+ default |
165 |
+ |
166 |
+ # occasional fail on install, force regeneration (bug #401189) |
167 |
+ rm doc/interpreter/contributors.texi || die |
168 |
+ |
169 |
+ eautoreconf |
170 |
+} |
171 |
+ |
172 |
+src_configure() { |
173 |
+ # libstdc++ bug, bug #887815 |
174 |
+ append-cxxflags -U_GLIBCXX_ASSERTIONS |
175 |
+ |
176 |
+ # Unfortunate dependency on mpi from hdf5 (bug #302621) |
177 |
+ use hdf5 && has_version sci-libs/hdf5[mpi] && \ |
178 |
+ export CXX=mpicxx CC=mpicc FC=mpif77 F77=mpif77 |
179 |
+ |
180 |
+ # Tell autoconf where to find qt binaries, fix bug #837752 |
181 |
+ export MOC="$(qt5_get_bindir)/moc" \ |
182 |
+ UIC="$(qt5_get_bindir)/uic" \ |
183 |
+ RCC="$(qt5_get_bindir)/rcc" \ |
184 |
+ LRELEASE="$(qt5_get_bindir)/lrelease" \ |
185 |
+ QCOLLECTIONGENERATOR="$(qt5_get_bindir)/qcollectiongenerator" \ |
186 |
+ QHELPGENERATOR="$(qt5_get_bindir)/qhelpgenerator" |
187 |
+ |
188 |
+ # Some of these use_with flags are a bit mismatched. The configure |
189 |
+ # script offers only --without-foo, and detects "foo" automatically |
190 |
+ # unless --without-foo is specified. Passing --with-foo is not an |
191 |
+ # error, however, so it kind of works. We wind up with, for example, |
192 |
+ # |
193 |
+ # --with-sundials_ida (no-op) with USE="sundials" |
194 |
+ # --without-sundials_ida (disables it) with USE="-sundials" |
195 |
+ # |
196 |
+ econf \ |
197 |
+ --localstatedir="${EPREFIX}/var/state/octave" \ |
198 |
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \ |
199 |
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" \ |
200 |
+ --disable-64 \ |
201 |
+ --enable-shared \ |
202 |
+ --with-z \ |
203 |
+ --with-bz2 \ |
204 |
+ $(use_enable doc docs) \ |
205 |
+ $(use_enable java) \ |
206 |
+ $(use_enable json rapidjson) \ |
207 |
+ $(use_enable readline) \ |
208 |
+ $(use_with curl) \ |
209 |
+ $(use_with fftw fftw3) \ |
210 |
+ $(use_with fftw fftw3f) \ |
211 |
+ $(use_enable fftw fftw-threads) \ |
212 |
+ $(use_with glpk) \ |
213 |
+ $(use_with hdf5) \ |
214 |
+ $(use_with imagemagick magick GraphicsMagick++) \ |
215 |
+ $(use_with opengl) \ |
216 |
+ $(use_with fltk) \ |
217 |
+ $(use_with ssl openssl) \ |
218 |
+ $(use_with portaudio) \ |
219 |
+ $(use_with qhull qhull_r) \ |
220 |
+ $(use_with qrupdate) \ |
221 |
+ $(use_with gui qt 5) \ |
222 |
+ $(use_with sndfile) \ |
223 |
+ $(use_with sparse arpack) \ |
224 |
+ $(use_with sparse umfpack) \ |
225 |
+ $(use_with sparse colamd) \ |
226 |
+ $(use_with sparse ccolamd) \ |
227 |
+ $(use_with sparse cholmod) \ |
228 |
+ $(use_with sparse cxsparse) \ |
229 |
+ $(use_with sundials sundials_ida) \ |
230 |
+ $(use_with X x) |
231 |
+} |
232 |
+ |
233 |
+src_compile() { |
234 |
+ # Otherwise it will write to /var/cache/fonts/ and trip sandbox |
235 |
+ export VARTEXFONTS="${T}/fonts" |
236 |
+ |
237 |
+ default |
238 |
+ |
239 |
+ if use java; then |
240 |
+ pax-mark m "${S}/src/.libs/octave-cli" |
241 |
+ fi |
242 |
+} |
243 |
+ |
244 |
+src_install() { |
245 |
+ default |
246 |
+ |
247 |
+ if use doc; then |
248 |
+ dodoc $(find doc -name '*.pdf') |
249 |
+ else |
250 |
+ # bug #566134, macros.texi is installed by make install if use doc |
251 |
+ insinto /usr/share/${PN}/${PV}/etc |
252 |
+ doins doc/interpreter/macros.texi |
253 |
+ fi |
254 |
+ |
255 |
+ use java && \ |
256 |
+ java-pkg_regjar "${ED}/usr/share/${PN}/${PV}/m/java/octave.jar" |
257 |
+ |
258 |
+ echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}/${PV}" > 99octave || die |
259 |
+ doenvd 99octave |
260 |
+ |
261 |
+ find "${ED}" -type f -name '*.la' -delete || die |
262 |
+} |