diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-29 11:38:31 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-29 11:38:31 +0100 |
commit | 90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch) | |
tree | 83fc5facb6b12be510a37bc3d241cc63e965b13a /sci-libs/nlopt | |
parent | feb0daf81d888e9160f9f94502de09b66f2a63fd (diff) |
gentoo resync : 29.06.2020
Diffstat (limited to 'sci-libs/nlopt')
-rw-r--r-- | sci-libs/nlopt/Manifest | 5 | ||||
-rw-r--r-- | sci-libs/nlopt/nlopt-2.6.2-r1.ebuild | 109 | ||||
-rw-r--r-- | sci-libs/nlopt/nlopt-2.6.2.ebuild | 19 |
3 files changed, 129 insertions, 4 deletions
diff --git a/sci-libs/nlopt/Manifest b/sci-libs/nlopt/Manifest index 6f40d8de381d..5b902d46582f 100644 --- a/sci-libs/nlopt/Manifest +++ b/sci-libs/nlopt/Manifest @@ -3,7 +3,8 @@ AUX nlopt-2.3-pkgconfig.patch 318 BLAKE2B 3569931fb9e2fceebf46c542e10fcd2562c8ac AUX nlopt-2.4.2-fix-dynamic-underlinking.patch 2522 BLAKE2B 5cdb8ea93cb44c25b1814431962259727c5c4dc97b4cf78d239189187f953a4b9458849a9afe77979841768b78226c6218ecc531328cb5752d26b9df63468ee5 SHA512 bdb07b216ffb68b68cb3f03076336234c558db3953c48b02511883bf9fb12f5915c04950a2e3222577c7af4fb1e288a165af2e8adf211fc853e747c98a65cd19 AUX nlopt-2.4.2-octave-4-map.patch 1858 BLAKE2B 34b1696762a9690a5ef5f3abc265b37d5de2f92b29e514952aa062faf1553a77ed3dba6f2abf7c8f1f7cbcc1cc63c9546967f3a317a773aa5e7c5c1e9c13f7e3 SHA512 00c45fe04fdc1acf4ccbb77aaf39feab0cb2b811b45edf791db7e87aa9e965c23b6131400eebd68335be8dcb86f346c01892e718f739f07dc0853b3dd9ea5ad4 DIST nlopt-2.4.2.tar.gz 2361992 BLAKE2B c1c9f533c7e7b3bb61e81343ebd26b87e05434fdbea1f347fc5f6a6c10160289ce105a51c6540296f3f1d122d31b415452da49b84516cd13fabc73372e4cfd0e SHA512 136aacc00a69f77e8a7ce5dc26a5f3f027bc8c01b97aa1f43919462e0a412154eabfb01be258e082dffe61f9b554bb2bfbb550a7b82c7c77c7b22874a64a9703 -DIST v2.6.2.tar.gz 2040229 BLAKE2B f1f4124de574600ddbef8a885bbdd3a4f57b469b2f958ce94bbc831cf9bfa8a845e438fccfe4ab219a73a5675b8d880f6d49e0e7cbe9d0966777b0d2344521d4 SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b +DIST nlopt-2.6.2.tar.gz 2040229 BLAKE2B f1f4124de574600ddbef8a885bbdd3a4f57b469b2f958ce94bbc831cf9bfa8a845e438fccfe4ab219a73a5675b8d880f6d49e0e7cbe9d0966777b0d2344521d4 SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b EBUILD nlopt-2.4.2-r2.ebuild 2714 BLAKE2B 3939763ab3da6e8708c10b3ca39f1c001f2d9913e883648cade9d58b83c3242804991373fdd36599474715840562533881c8ab0ffd98cda54ad71d3d4c12cbe4 SHA512 c2a7e3336ccb1887c2c6074aed5fffb254dd11e607d871bd3ed864794d04cdfb7a3aff711b8cb5f7f0a98629f34a196f4f5fa7221f5c07324b2439b48cc9e5c9 -EBUILD nlopt-2.6.2.ebuild 1962 BLAKE2B dafee2481e89c71e5c55cb0480358754ee82fd9486f85a751485cfdfdeb0743119d6e7ac3cdfe10f85076eed564507296a6e9f94d640ecbd84800a53cc0ed55b SHA512 fb35120424450c937211755fc1350d24510b09c49fe6b58c6d611f3ca98ef861e0aa89bd3ac27d9aedd747e5c0a18a22df1fb1be2b99b7dfe3eed44ebba5b5e8 +EBUILD nlopt-2.6.2-r1.ebuild 2301 BLAKE2B 92872c3fe8856a81648071c2f4fea997c96f3e8590ccf9d5bcfc27dafc73bdff822e18768521c8ce42e1eb4e3ebca1a4ccd15038e4688ebb179907ab422c71ae SHA512 68a32c60540e17cb91ed86987e3981ad519656ab2bab83fbacc98fb01e439ca65e85a8c75c8d06860b4fc47329e08f19b591e1fae25192510f9a5d44216bf749 +EBUILD nlopt-2.6.2.ebuild 2412 BLAKE2B 722391655b7a5cebb487bf893efe1203a440affc3739282ba26e7a5202edff01d953a43a157da5c6c7d5f809135674089f8179edc2be43498daa8aaa5d8c4a19 SHA512 462bb900b0eaa779bf29c6dfb99f52b432e7c3c29c4c997e3fb8019b94ba0885fbab8b57e0d7673fc561407923942e7026febe1d3c196a10f9d53cd11feea02d MISC metadata.xml 1095 BLAKE2B e5032d65fbb49b125b6cb5abe332c52a1e058271c71aec2d2522cc78874a079f8987e2e8356290295bcb886c32e1cf794df9b157ebc712a862605105b80abe31 SHA512 74a37bc3e6fa74d0f96c3390fadf16e76caf904f43cf9ac0496f70e3e3bc458727e58d9fc65c39a81302b081575e530c27be3812488df20fab42aff5494437f7 diff --git a/sci-libs/nlopt/nlopt-2.6.2-r1.ebuild b/sci-libs/nlopt/nlopt-2.6.2-r1.ebuild new file mode 100644 index 000000000000..416022d0dc54 --- /dev/null +++ b/sci-libs/nlopt/nlopt-2.6.2-r1.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit python-r1 cmake fortran-2 + +DESCRIPTION="Non-linear optimization library" +HOMEPAGE="https://ab-initio.mit.edu/nlopt/" +SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1 MIT" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +SLOT="0" +IUSE="cxx guile octave python static-libs test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +RDEPEND=" + guile? ( dev-scheme/guile:* ) + octave? ( sci-mathematics/octave ) + python? ( + ${PYTHON_DEPS} + dev-python/numpy[${PYTHON_USEDEP}] + ) + " +DEPEND=" + ${RDEPEND} + python? ( dev-lang/swig ) + " + +src_prepare() { + cmake_src_prepare + use python && python_copy_sources +} + +src_configure() { + local mycmakeargs=( + -DNLOPT_CXX=$(usex cxx) + -DNLOPT_FORTRAN=$(usex test) + -DNLOPT_GUILE=$(usex guile) + -DNLOPT_OCTAVE=$(usex octave) + -DNLOPT_PYTHON=$(usex python) + -DNLOPT_SWIG=$(usex python) + -DNLOPT_TESTS=$(usex test) + ) + if use python; then + python_foreach_impl run_in_build_dir cmake_src_configure + else + cmake_src_configure + fi + if use static-libs; then + mycmakeargs+=( + -DBUILD_SHARED_LIBS=OFF + ) + BUILD_DIR="${S}_static-libs" run_in_build_dir cmake_src_configure + fi +} + +src_compile() { + if use python; then + python_foreach_impl run_in_build_dir cmake_src_compile + else + cmake_src_compile + fi + if use static-libs; then + BUILD_DIR="${S}_static-libs" run_in_build_dir cmake_src_compile + fi +} + +src_test() { + do_test() { + local a f + cd "${BUILD_DIR}"/test + for a in {1..$(usex cxx 9 7)}; do + for f in {5..9}; do + ./testopt -a $a -o $f || die "algorithm $a function $f failed" + done + done + } + if use python; then + python_foreach_impl run_in_build_dir do_test + else + do_test + fi + if use static-libs; then + BUILD_DIR="${S}_static-libs" run_in_build_dir do_test + fi +} + +nlopt_install() { + cmake_src_install + python_optimize +} + +src_install() { + if use python; then + python_foreach_impl run_in_build_dir nlopt_install + else + cmake_src_install + fi + if use static-libs; then + BUILD_DIR="${S}_static-libs" run_in_build_dir dolib.a libnlopt.a + fi + local r + for r in */README; do newdoc ${r} README.$(dirname ${r}); done +} diff --git a/sci-libs/nlopt/nlopt-2.6.2.ebuild b/sci-libs/nlopt/nlopt-2.6.2.ebuild index f21aa295b041..21c2ada3624a 100644 --- a/sci-libs/nlopt/nlopt-2.6.2.ebuild +++ b/sci-libs/nlopt/nlopt-2.6.2.ebuild @@ -5,11 +5,11 @@ EAPI=7 PYTHON_COMPAT=( python2_7 python3_{6..9} ) -inherit python-r1 cmake +inherit python-r1 cmake fortran-2 DESCRIPTION="Non-linear optimization library" HOMEPAGE="https://ab-initio.mit.edu/nlopt/" -SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz" +SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="LGPL-2.1 MIT" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" @@ -52,6 +52,12 @@ src_configure() { else cmake_src_configure fi + if use static-libs; then + mycmakeargs+=( + -DBUILD_SHARED_LIBS=OFF + ) + BUILD_DIR="${S}_static-libs" run_in_build_dir cmake_src_configure + fi } src_compile() { @@ -60,6 +66,9 @@ src_compile() { else cmake_src_compile fi + if use static-libs; then + BUILD_DIR="${S}_static-libs" run_in_build_dir cmake_src_compile + fi } src_test() { @@ -77,6 +86,9 @@ src_test() { else do_test fi + if use static-libs; then + BUILD_DIR="${S}_static-libs" run_in_build_dir do_test + fi } nlopt_install() { @@ -90,6 +102,9 @@ src_install() { else cmake_src_install fi + if use static-libs; then + BUILD_DIR="${S}_static-libs" run_in_build_dir dolib.a libnlopt.a + fi local r for r in */README; do newdoc ${r} README.$(dirname ${r}); done } |