1 |
commit: b42d8d1364f977dbfceb02de0784c3b0e9e2df8d |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 18 01:34:02 2022 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 18 01:35:24 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b42d8d13 |
7 |
|
8 |
sci-libs/nlopt: new upstream v2.7.1. |
9 |
|
10 |
* Update HOMEPAGE. |
11 |
* Disable MATLAB detection in src_configure(). |
12 |
* No more static libs. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/661952 |
15 |
Bug: https://bugs.gentoo.org/826774 |
16 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
17 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
18 |
|
19 |
sci-libs/nlopt/Manifest | 1 + |
20 |
sci-libs/nlopt/nlopt-2.7.1.ebuild | 97 +++++++++++++++++++++++++++++++++++++++ |
21 |
2 files changed, 98 insertions(+) |
22 |
|
23 |
diff --git a/sci-libs/nlopt/Manifest b/sci-libs/nlopt/Manifest |
24 |
index a4d07e389b10..bc0bc63e1b06 100644 |
25 |
--- a/sci-libs/nlopt/Manifest |
26 |
+++ b/sci-libs/nlopt/Manifest |
27 |
@@ -1 +1,2 @@ |
28 |
DIST nlopt-2.6.2.tar.gz 2040229 BLAKE2B f1f4124de574600ddbef8a885bbdd3a4f57b469b2f958ce94bbc831cf9bfa8a845e438fccfe4ab219a73a5675b8d880f6d49e0e7cbe9d0966777b0d2344521d4 SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b |
29 |
+DIST nlopt-2.7.1.tar.gz 2044180 BLAKE2B 6d459f94a26ee6dd7f72c73c48992bd047150aa525bc4ad088c8516127afc5c7843f6fbb6726c2f845271b87934c13e0892a063362ab50df51f92e81979111fb SHA512 e23cb522fc696010574c14b72be85acc0f8ccf0bf208bf2b8789c57d6c5a6e6d419ee10330581518b1c1567018ae909b626ce7761d4fbd5bf112916871e420e2 |
30 |
|
31 |
diff --git a/sci-libs/nlopt/nlopt-2.7.1.ebuild b/sci-libs/nlopt/nlopt-2.7.1.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..814c7a1440fc |
34 |
--- /dev/null |
35 |
+++ b/sci-libs/nlopt/nlopt-2.7.1.ebuild |
36 |
@@ -0,0 +1,97 @@ |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+ |
42 |
+PYTHON_COMPAT=( python3_{8..10} ) |
43 |
+ |
44 |
+inherit python-r1 cmake fortran-2 |
45 |
+ |
46 |
+DESCRIPTION="Non-linear optimization library" |
47 |
+HOMEPAGE="https://github.com/stevengj/nlopt" |
48 |
+SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
49 |
+ |
50 |
+LICENSE="LGPL-2.1 MIT" |
51 |
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" |
52 |
+SLOT="0" |
53 |
+IUSE="cxx guile octave python test" |
54 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
55 |
+RESTRICT="!test? ( test )" |
56 |
+ |
57 |
+RDEPEND=" |
58 |
+ guile? ( dev-scheme/guile:* ) |
59 |
+ octave? ( >=sci-mathematics/octave-6 ) |
60 |
+ python? ( |
61 |
+ ${PYTHON_DEPS} |
62 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
63 |
+ ) |
64 |
+ " |
65 |
+DEPEND=" |
66 |
+ ${RDEPEND} |
67 |
+ python? ( dev-lang/swig ) |
68 |
+ " |
69 |
+ |
70 |
+src_prepare() { |
71 |
+ cmake_src_prepare |
72 |
+ use python && python_copy_sources |
73 |
+} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ # MATLAB detection causes problems (as in bug 826774) if we don't |
77 |
+ # explicitly disable it. |
78 |
+ local mycmakeargs=( |
79 |
+ -DNLOPT_CXX=$(usex cxx) |
80 |
+ -DNLOPT_FORTRAN=$(usex test) |
81 |
+ -DNLOPT_GUILE=$(usex guile) |
82 |
+ -DNLOPT_OCTAVE=$(usex octave) |
83 |
+ -DNLOPT_MATLAB=OFF |
84 |
+ -DNLOPT_PYTHON=$(usex python) |
85 |
+ -DNLOPT_SWIG=$(usex python) |
86 |
+ -DNLOPT_TESTS=$(usex test) |
87 |
+ ) |
88 |
+ if use python; then |
89 |
+ python_foreach_impl run_in_build_dir cmake_src_configure |
90 |
+ else |
91 |
+ cmake_src_configure |
92 |
+ fi |
93 |
+} |
94 |
+ |
95 |
+src_compile() { |
96 |
+ if use python; then |
97 |
+ python_foreach_impl run_in_build_dir cmake_src_compile |
98 |
+ else |
99 |
+ cmake_src_compile |
100 |
+ fi |
101 |
+} |
102 |
+ |
103 |
+src_test() { |
104 |
+ do_test() { |
105 |
+ local a f |
106 |
+ cd "${BUILD_DIR}"/test |
107 |
+ for a in {1..$(usex cxx 9 7)}; do |
108 |
+ for f in {5..9}; do |
109 |
+ ./testopt -a $a -o $f || die "algorithm $a function $f failed" |
110 |
+ done |
111 |
+ done |
112 |
+ } |
113 |
+ if use python; then |
114 |
+ python_foreach_impl run_in_build_dir do_test |
115 |
+ else |
116 |
+ do_test |
117 |
+ fi |
118 |
+} |
119 |
+ |
120 |
+nlopt_install() { |
121 |
+ cmake_src_install |
122 |
+ python_optimize |
123 |
+} |
124 |
+ |
125 |
+src_install() { |
126 |
+ if use python; then |
127 |
+ python_foreach_impl run_in_build_dir nlopt_install |
128 |
+ else |
129 |
+ cmake_src_install |
130 |
+ fi |
131 |
+ local r |
132 |
+ for r in */README; do newdoc ${r} README.$(dirname ${r}); done |
133 |
+} |