mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
nlopt, new recipe (#11366)
This commit is contained in:
74
sci-libs/nlopt/nlopt-2.7.1.recipe
Normal file
74
sci-libs/nlopt/nlopt-2.7.1.recipe
Normal file
@@ -0,0 +1,74 @@
|
||||
SUMMARY="Non-linear optimization library"
|
||||
DESCRIPTION="NLopt is a library for nonlinear local and global optimization, for functions with \
|
||||
and without gradient information. It is designed as a simple, unified interface and packaging of \
|
||||
several free/open-source nonlinear optimization libraries."
|
||||
HOMEPAGE="https://github.com/stevengj/nlopt"
|
||||
COPYRIGHT="2007-2011 Massachusetts Institute of Technology"
|
||||
LICENSE="MIT
|
||||
GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="db88232fa5cef0ff6e39943fc63ab6074208831dc0031cf1545f6ecd31ae2a1a"
|
||||
SOURCE_FILENAME="nlopt-v$portVersion.tar.gz"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.11.1"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
nlopt$secondaryArchSuffix = $portVersion
|
||||
lib:libnlopt$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
nlopt${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libnlopt$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
nlopt$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:liboctave$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:python3
|
||||
cmd:swig
|
||||
"
|
||||
|
||||
defineDebugInfoPackage nlopt$secondaryArchSuffix \
|
||||
"$libDir"/libnlopt.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -S. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs -Wno-dev
|
||||
make -Cbuild $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -Cbuild install
|
||||
|
||||
prepareInstalledDevelLib \
|
||||
libnlopt
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
"$developDir"
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
ctest --test-dir build --output-on-failure
|
||||
}
|
||||
Reference in New Issue
Block a user