backports/nlopt: upgrade to 2.8.0
This commit is contained in:
parent
f2e1f14f99
commit
d7fb3c5419
1 changed files with 46 additions and 13 deletions
|
@ -1,38 +1,71 @@
|
||||||
# Contributor: Anjandev Momi <anjan@momi.ca>
|
# Contributor: Anjandev Momi <anjan@momi.ca>
|
||||||
# Maintainer: Anjandev Momi <anjan@momi.ca>
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
||||||
|
maintainer="Celeste <cielesti@protonmail.com>"
|
||||||
pkgname=nlopt
|
pkgname=nlopt
|
||||||
pkgver=2.7.1
|
pkgver=2.8.0
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization"
|
pkgdesc="Library for nonlinear optimization"
|
||||||
url="https://github.com/stevengj/nlopt/"
|
url="https://github.com/stevengj/nlopt"
|
||||||
arch="all"
|
arch="all"
|
||||||
license="LGPL-2.1-or-later"
|
license="LGPL-2.1-or-later"
|
||||||
makedepends="samurai cmake"
|
makedepends="
|
||||||
subpackages="$pkgname-dev $pkgname-doc"
|
cmake
|
||||||
|
guile-dev
|
||||||
|
python3-dev
|
||||||
|
samurai
|
||||||
|
swig
|
||||||
|
"
|
||||||
|
subpackages="
|
||||||
|
$pkgname-dev
|
||||||
|
$pkgname-doc
|
||||||
|
$pkgname-guile
|
||||||
|
"
|
||||||
source="$pkgname-$pkgver.tar.gz::https://github.com/stevengj/nlopt/archive/refs/tags/v$pkgver.tar.gz"
|
source="$pkgname-$pkgver.tar.gz::https://github.com/stevengj/nlopt/archive/refs/tags/v$pkgver.tar.gz"
|
||||||
|
|
||||||
|
case "$CARCH" in
|
||||||
|
# octave unavailable on these 3 archs
|
||||||
|
s390x|riscv64|ppc64le) ;;
|
||||||
|
*)
|
||||||
|
makedepends="$makedepends octave-dev"
|
||||||
|
subpackages="$subpackages $pkgname-octave"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ "$CBUILD" != "$CHOST" ]; then
|
if [ "$CBUILD" != "$CHOST" ]; then
|
||||||
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
local crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
||||||
fi
|
fi
|
||||||
cmake -B build -G Ninja \
|
cmake -B build -G Ninja \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||||
-DBUILD_SHARED_LIBS=True \
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
-DCMAKE_BUILD_TYPE=minsizerel \
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||||
$CMAKE_CROSSOPTS .
|
$crossopts
|
||||||
cmake --build build
|
cmake --build build
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd build
|
ctest --test-dir build --output-on-failure
|
||||||
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
DESTDIR="$pkgdir" cmake --install build
|
DESTDIR="$pkgdir" cmake --install build
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guile() {
|
||||||
|
pkgdesc="$pkgdesc (Guile bindings)"
|
||||||
|
depends="$pkgname=$pkgver-r$pkgrel guile"
|
||||||
|
|
||||||
|
amove usr/lib/guile usr/share/guile
|
||||||
|
}
|
||||||
|
|
||||||
|
octave() {
|
||||||
|
pkgdesc="$pkgdesc (Octave bindings)"
|
||||||
|
depends="$pkgname=$pkgver-r$pkgrel octave"
|
||||||
|
|
||||||
|
amove usr/lib/octave usr/share/octave
|
||||||
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
e23cb522fc696010574c14b72be85acc0f8ccf0bf208bf2b8789c57d6c5a6e6d419ee10330581518b1c1567018ae909b626ce7761d4fbd5bf112916871e420e2 nlopt-2.7.1.tar.gz
|
cb294caa5532e11ae0d22ed849705920bbae79f712144c840a5ca865ef8e6a15c6c9540c81ced0c3c05b9f44c360d50f74e235e69d893be34b7e1c5599f07c71 nlopt-2.8.0.tar.gz
|
||||||
"
|
"
|
||||||
|
|
Loading…
Reference in a new issue